:root {
  color-scheme: light;
  --bg-top: #f3eadb;
  --bg-bottom: #eadac7;
  --ink: #23150d;
  --muted: #6b5648;
  --muted-strong: #835934;
  --panel: rgba(255, 249, 241, 0.74);
  --panel-strong: rgba(255, 251, 246, 0.9);
  --surface: rgba(255, 255, 255, 0.58);
  --surface-strong: rgba(255, 252, 247, 0.9);
  --border: rgba(104, 69, 38, 0.14);
  --border-strong: rgba(104, 69, 38, 0.22);
  --accent: #a84d1e;
  --accent-bright: #d9742f;
  --accent-soft: #f4d4b0;
  --danger: #a9382d;
  --success: #2f7752;
  --shadow-lg: 0 32px 90px rgba(76, 42, 12, 0.14);
  --shadow-md: 0 18px 50px rgba(76, 42, 12, 0.1);
  --shadow-sm: 0 10px 24px rgba(76, 42, 12, 0.08);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(247, 183, 102, 0.35), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(175, 90, 35, 0.18), transparent 26%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.2));
}

.page-orb {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(4px);
  pointer-events: none;
  animation: drift 16s ease-in-out infinite;
}

.page-orb-one {
  top: 68px;
  right: -84px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(219, 131, 61, 0.42) 0%, rgba(219, 131, 61, 0) 70%);
}

.page-orb-two {
  bottom: 40px;
  left: -90px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 236, 201, 0.84) 0%, rgba(255, 236, 201, 0) 72%);
  animation-delay: -6s;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1500px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.hero,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.hero::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 34%, rgba(214, 146, 91, 0.1) 100%);
}

.hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  padding: 34px;
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
}

.hero-copy {
  flex: 1 1 760px;
}

.hero-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  flex: 0 1 420px;
}

.eyebrow,
.modal-eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 800;
}

.eyebrow {
  color: var(--muted-strong);
}

h1,
h2 {
  margin: 0;
}

h1 {
  max-width: 11ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

.subcopy,
.panel-copy,
.modal-copy,
.modal-warning {
  color: var(--muted);
  line-height: 1.7;
}

.subcopy {
  max-width: 650px;
  margin: 18px 0 0;
  font-size: 1.05rem;
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(133, 89, 52, 0.16);
  background: rgba(255, 249, 241, 0.76);
  color: var(--muted-strong);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.hero-card {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.92) 0%, rgba(246, 229, 210, 0.92) 100%);
  box-shadow: var(--shadow-md);
}

.hero-card-label {
  margin: 0 0 8px;
  color: var(--muted-strong);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
}

.hero-card-value {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  line-height: 1.4;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 12px;
}

.primary-button,
.secondary-button,
.danger-button,
.toggle {
  min-height: 48px;
  border-radius: 999px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-button,
.secondary-button,
.danger-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.toggle:hover {
  transform: translateY(-1px);
}

.primary-button {
  padding: 0 20px;
  background: linear-gradient(135deg, #a9491a 0%, #db7831 100%);
  color: #fff9f4;
  font-weight: 800;
  box-shadow: 0 14px 26px rgba(169, 73, 26, 0.22);
}

.secondary-button {
  padding: 0 20px;
  background: rgba(255, 250, 244, 0.92);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-weight: 800;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--border);
  background: rgba(255, 250, 244, 0.76);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

.toggle input {
  accent-color: var(--accent);
}

.panel {
  padding: 28px;
  border-radius: var(--radius-xl);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-copy {
  max-width: 720px;
  margin: 12px 0 0;
}

.table-count {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(241, 216, 189, 0.95) 0%, rgba(255, 245, 231, 0.98) 100%);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.status-banner {
  min-height: 30px;
  margin: 0;
  padding: 9px 14px;
  border-radius: 14px;
  background: rgba(255, 250, 243, 0.72);
  color: var(--muted);
  border: 1px solid rgba(104, 69, 38, 0.08);
}

.status-banner[data-tone="error"] {
  color: var(--danger);
  background: rgba(233, 111, 95, 0.09);
  border-color: rgba(169, 56, 45, 0.18);
}

.status-banner[data-tone="success"] {
  color: var(--success);
  background: rgba(75, 156, 110, 0.1);
  border-color: rgba(47, 119, 82, 0.18);
}

.hint-banner {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hint-banner kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(104, 69, 38, 0.14);
  background: rgba(255, 255, 255, 0.84);
  color: var(--accent);
  font: inherit;
  font-weight: 800;
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid rgba(104, 69, 38, 0.12);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.84) 0%, rgba(248, 235, 220, 0.78) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.table-wrap::-webkit-scrollbar {
  height: 10px;
}

.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(168, 77, 30, 0.35);
}

.table-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.35);
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.col-gmail {
  width: 27%;
}

.col-password {
  width: 19%;
}

.col-antigravity,
.col-codex {
  width: 23%;
}

.col-actions,
.actions-column {
  width: 220px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 18px 18px;
  text-align: left;
  background: linear-gradient(180deg, rgba(242, 224, 201, 0.98) 0%, rgba(235, 214, 188, 0.98) 100%);
  color: var(--accent);
  font-size: 0.81rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.sort-button[data-active="true"] {
  color: #8f3f15;
}

.sort-indicator {
  min-width: 1ch;
  font-size: 0.95rem;
}

tbody tr {
  transition: background 160ms ease, transform 160ms ease;
}

tbody tr + tr td {
  border-top: 1px solid rgba(104, 69, 38, 0.08);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.28);
}

tbody tr.saving {
  background: rgba(219, 120, 49, 0.11);
}

tbody tr.error {
  background: rgba(169, 56, 45, 0.08);
}

tbody td {
  padding: 14px 18px;
  vertical-align: middle;
}

.empty-state td {
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
  font-size: 1rem;
}

.cell-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(104, 69, 38, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, transform 140ms ease;
}

.cell-input:hover {
  background: rgba(255, 255, 255, 0.82);
}

.cell-input:focus {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(168, 77, 30, 0.35);
  box-shadow: 0 0 0 4px rgba(217, 116, 47, 0.13);
  background: rgba(255, 255, 255, 0.98);
}

.actions-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.row-state {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 249, 241, 0.88);
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.danger-button {
  min-height: 40px;
  padding: 0 14px;
  background: rgba(169, 56, 45, 0.1);
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 800;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 24, 13, 0.5);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(100%, 540px);
  padding: 30px;
  border-radius: 28px;
  border: 1px solid rgba(104, 69, 38, 0.16);
  background: rgba(255, 251, 246, 0.98);
  box-shadow: var(--shadow-lg);
}

.modal-eyebrow {
  color: var(--danger);
}

.modal-copy {
  margin: 16px 0 8px;
}

.modal-warning {
  min-height: 3.2em;
  margin: 0 0 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(0, 14px, 0) scale(1.04);
  }
}

@media (max-width: 980px) {
  .hero {
    flex-direction: column;
  }

  .hero-side {
    width: 100%;
  }

  h1 {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .shell {
    width: calc(100% - 18px);
    padding-top: 18px;
    padding-bottom: 36px;
  }

  .hero,
  .panel {
    padding: 20px;
    border-radius: 24px;
  }

  .panel-header,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .hero-card {
    padding: 16px 18px;
  }

  h1 {
    font-size: clamp(2.3rem, 12vw, 3.5rem);
  }

  .subcopy {
    font-size: 1rem;
  }

  .hint-banner {
    line-height: 1.7;
  }

  .toggle,
  .primary-button,
  .secondary-button,
  .danger-button {
    justify-content: center;
    width: 100%;
  }

  .modal {
    padding: 14px;
  }

  .modal-card {
    padding: 24px;
  }

  .modal-actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .modal-actions > button {
    flex: 1 1 100%;
  }
}

.hero-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(104, 69, 38, 0.14);
  background: rgba(255, 250, 244, 0.74);
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.hero-nav-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.hero-nav-link.is-active {
  background: linear-gradient(135deg, #a9491a 0%, #db7831 100%);
  color: #fff9f4;
  box-shadow: 0 14px 26px rgba(169, 73, 26, 0.18);
}

.col-site {
  width: 25%;
}

.col-user {
  width: 20%;
}

.col-notes {
  width: 28%;
}

.hero-sites .hero-card-value {
  max-width: 18ch;
}

/* Size trim pass */
.hero {
  padding: 26px;
  gap: 22px;
}

h1 {
  max-width: 9ch;
  font-size: clamp(2.15rem, 4.2vw, 3.95rem);
}

.subcopy {
  max-width: 560px;
  font-size: 0.98rem;
}

.hero-card {
  padding: 16px 18px;
}

.hero-card-value {
  font-size: 1.02rem;
}

.hero-pill {
  min-height: 36px;
  padding: 0 13px;
  font-size: 0.82rem;
}

.primary-button,
.secondary-button,
.toggle {
  min-height: 44px;
}

@media (max-width: 760px) {
  h1 {
    font-size: clamp(1.9rem, 11vw, 2.9rem);
  }

  .hero {
    padding: 18px;
  }
}

/* Extra compact hero pass */
.shell {
  padding-top: 16px;
}

.hero {
  padding: 16px 18px;
  gap: 16px;
  margin-bottom: 16px;
}

.eyebrow {
  margin-bottom: 6px;
  font-size: 0.62rem;
}

h1 {
  max-width: none;
  font-size: clamp(1.45rem, 2.2vw, 2.35rem);
  line-height: 1;
}

.subcopy {
  max-width: 520px;
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.hero-notes {
  gap: 8px;
  margin-top: 14px;
}

.hero-pill {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.75rem;
}

.hero-side {
  gap: 10px;
  flex-basis: 360px;
}

.hero-card {
  padding: 12px 14px;
}

.hero-card-label {
  margin-bottom: 4px;
  font-size: 0.62rem;
}

.hero-card-value {
  font-size: 0.9rem;
}

.hero-nav-link {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.toolbar {
  gap: 8px;
}

.primary-button,
.secondary-button,
.toggle {
  min-height: 36px;
  padding-inline: 14px;
  font-size: 0.82rem;
}

.toggle {
  gap: 8px;
}

@media (max-width: 980px) {
  h1 {
    font-size: clamp(1.4rem, 5.5vw, 2rem);
  }
}

@media (max-width: 760px) {
  .shell {
    padding-top: 12px;
  }

  .hero {
    padding: 14px;
    gap: 12px;
  }

  h1 {
    font-size: clamp(1.3rem, 8.5vw, 1.85rem);
  }

  .subcopy {
    font-size: 0.85rem;
    margin-top: 8px;
  }

  .hero-notes {
    margin-top: 10px;
  }

  .hero-pill {
    min-height: 28px;
    font-size: 0.72rem;
  }
}

.page-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(104, 69, 38, 0.12);
  background: rgba(255, 249, 241, 0.72);
  box-shadow: var(--shadow-sm);
}

.page-switch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.page-switch-link:hover {
  transform: translateY(-1px);
}

.page-switch-link.is-active {
  background: linear-gradient(135deg, #a9491a 0%, #db7831 100%);
  color: #fff9f4;
  box-shadow: 0 10px 20px rgba(169, 73, 26, 0.18);
}

@media (max-width: 760px) {
  .page-switch {
    width: 100%;
    justify-content: stretch;
  }

  .page-switch-link {
    flex: 1 1 0;
  }
}
