@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@200;300;400;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:  #78FFDF;
  --white:   #FFFFFF;
  --radius:  2rem;
  --input-h: 3.5rem;
}

/* ---- Page ---- */
body {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(45deg, #e06c5a 0%, #7b5ea7 50%, #3a8fd1 100%);
  background-attachment: fixed;
  padding: 2rem 1rem;
  color: var(--white);
}

/* ---- Card ---- */
.card {
  width: 100%;
  max-width: 28rem;
  text-align: center;
}

/* ---- Heading ---- */
.card h1 {
  font-size: 1.6rem;
  font-weight: 200;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.card .domain-name {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.75;
  margin-bottom: 2rem;
}

/* ---- Form ---- */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

input,
textarea {
  width: 100%;
  max-width: 25rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius);
  color: var(--white);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 300;
  padding: 0 1.25rem;
  height: var(--input-h);
  outline: none;
  transition: border-color 0.2s;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255,255,255,0.55);
}

input:focus,
textarea:focus {
  border-color: var(--accent);
}

textarea {
  height: 10rem;
  padding: 1rem 1.25rem;
  resize: vertical;
  border-radius: 1.2rem;
}

/* ---- reCAPTCHA — center it ---- */
.recaptcha-wrap {
  display: flex;
  justify-content: center;
}

/* ---- Submit button ---- */
button[type="submit"] {
  width: 100%;
  max-width: 25rem;
  height: var(--input-h);
  border-radius: var(--radius);
  border: 1px solid var(--white);
  background: var(--white);
  color: #333;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.275rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  position: relative;
}

button[type="submit"]:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1a1a;
}

button[type="submit"].loading {
  pointer-events: none;
  opacity: 0.7;
}

/* ---- Error / notice ---- */
.notice {
  width: 100%;
  max-width: 25rem;
  padding: 0.85rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.notice.error {
  background: rgba(255,80,80,0.2);
  border: 1px solid rgba(255,120,120,0.5);
}

.notice.success-msg {
  background: rgba(120,255,223,0.15);
  border: 1px solid rgba(120,255,223,0.4);
}

/* ---- Success page ---- */
.success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.success-back {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.success-back:hover { opacity: 1; }

/* ---- Admin ---- */
.admin-body {
  background: #f4f4f6;
  color: #1a1a1a;
  font-family: 'Source Sans Pro', sans-serif;
  min-height: 100vh;
  padding: 0;
  align-items: flex-start;
  justify-content: flex-start;
}

.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e1e1e6;
}

.admin-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
}

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e1e1e6;
}

.tab {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: #888;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover { color: #c4622d; }
.tab.active { color: #c4622d; border-bottom-color: #c4622d; }

.tab .count {
  background: #e1e1e6;
  border-radius: 99px;
  padding: 0.1em 0.5em;
  font-size: 0.78em;
  margin-left: 0.3em;
}

.tab.active .count { background: #f0e8e3; }

.domain-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.pill {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background: #e1e1e6;
  color: #555;
  transition: background 0.15s, color 0.15s;
}

.pill:hover { background: #c4622d; color: #fff; }
.pill.active { background: #c4622d; color: #fff; }

.pill .count {
  background: rgba(0,0,0,0.15);
  border-radius: 99px;
  padding: 0 0.4em;
  margin-left: 0.3em;
  font-size: 0.78em;
}

/* Table */
.table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
  color: #333;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #fdf8f5; }

td.message-cell {
  max-width: 320px;
  white-space: pre-wrap;
  word-break: break-word;
}

.domain-tag {
  display: inline-block;
  padding: 0.2em 0.6em;
  border-radius: 4px;
  background: #f0e8e3;
  color: #c4622d;
  font-size: 0.82em;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #aaa;
}

@media (max-width: 600px) {
  .admin-header { flex-direction: column; align-items: flex-start; }
}
