:root {
  --bg: #090d13;
  --surface: rgba(19, 24, 32, 0.92);
  --surface-2: rgba(255, 255, 255, 0.055);
  --surface-3: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.075);
  --text: #f6f8fb;
  --muted: rgba(246, 248, 251, 0.68);
  --subtle: rgba(246, 248, 251, 0.48);
  --accent: #b7c8c2;
  --dark-accent: #1c2838;
  --radius: 24px;
  --radius-sm: 16px;
  --max: 1180px;
  --shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #101722 0%, #090d13 44%, #080b10 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(calc(100% - 28px), var(--max));
  margin: 16px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 17, 24, 0.94);
  box-shadow: var(--shadow);
}

.brand,
.nav-links,
.actions,
.top-actions,
.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: 10px;
}

.brand {
  min-width: 210px;
  gap: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--line);
}

.brand-title,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand-title {
  font-weight: 500;
  font-size: 1rem;
}

.brand small {
  margin-top: 3px;
  color: var(--subtle);
  font-size: 0.76rem;
}

.nav-links {
  gap: 2px;
}

.nav-links a {
  min-height: 38px;
  border-radius: 999px;
  padding: 9px 11px;
  color: var(--muted);
  font-size: 0.88rem;
  transition: background 140ms ease, color 140ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 17px;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease;
}

.button.primary {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(246, 248, 251, 0.94);
  color: #111820;
}

.button.primary:hover {
  background: #ffffff;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.11);
}

.button.large {
  min-height: 48px;
  padding-inline: 24px;
}

.view {
  display: none;
  width: min(calc(100% - 28px), var(--max));
  margin: 0 auto;
  padding-top: 24px;
}

.view.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  min-height: calc(100vh - 126px);
  align-items: end;
  padding: clamp(32px, 6vw, 70px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(27, 36, 49, 0.9), rgba(8, 12, 18, 0.98));
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 780px;
  padding-bottom: 28px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 20px;
  font-size: clamp(3rem, 7vw, 6.2rem);
  font-weight: 530;
  line-height: 0.95;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 540;
  line-height: 1.08;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.06rem;
  font-weight: 700;
}

.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.hero-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
}

.countdown-label {
  margin: 22px 0 -16px;
  color: var(--subtle);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 620px;
  margin: 30px 0 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.countdown div {
  padding: 17px 12px;
  border-left: 1px solid var(--line-soft);
}

.countdown div:first-child {
  border-left: 0;
}

.countdown-num {
  display: block;
  font-size: clamp(1.65rem, 4vw, 2.8rem);
  font-weight: 500;
  line-height: 1;
}

.countdown span,
.step span,
.stat span,
.meta {
  display: block;
  margin-top: 8px;
  color: var(--subtle);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.actions {
  gap: 12px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(calc(100% - 28px), var(--max));
  margin: 0 auto 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-card,
.panel,
.disclaimer-card {
  border: 1px solid var(--line);
  background: rgba(19, 24, 32, 0.72);
  box-shadow: var(--shadow);
}

.hero-card {
  align-self: center;
  padding: 26px;
  border-radius: var(--radius);
}

.hero-card h2 {
  font-size: 1.35rem;
}

.hero-card p,
.card p,
.muted {
  color: var(--muted);
}

.section {
  padding-top: 78px;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: center;
}

.two-col {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 18px;
  align-items: start;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.grid.six {
  grid-template-columns: repeat(3, 1fr);
}

.card,
.table-card,
.main-panel,
.side-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.card,
.table-card {
  padding: 24px;
}

.step span {
  color: var(--accent);
  font-weight: 800;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.timeline strong {
  display: block;
  margin-bottom: 8px;
}

.timeline span {
  color: var(--muted);
}

.list {
  display: grid;
  gap: 11px;
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

details {
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
}

details:first-child {
  border-top: 0;
}

summary {
  cursor: pointer;
  color: #fff;
  font-weight: 700;
}

.narrow {
  min-height: calc(100vh - 116px);
  place-items: center;
}

.narrow.active {
  display: grid;
}

.panel {
  width: min(100%, 560px);
  padding: 28px;
  border-radius: var(--radius);
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 12px 14px;
  outline: none;
}

textarea {
  min-height: 116px;
  resize: vertical;
}

select option {
  background: #151a22;
}

.app-frame {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
}

.side-panel {
  align-self: start;
  padding: 18px;
}

.side-panel nav {
  display: grid;
  gap: 6px;
}

.side-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.side-panel a:hover,
.side-panel a.active {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.main-panel {
  min-height: 620px;
  padding: 24px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.app-header h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.admin-grid {
  margin-top: 16px;
}

.access-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  width: min(100%, 820px);
  margin: 96px auto 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(19, 24, 32, 0.76);
  box-shadow: var(--shadow);
  align-items: center;
}

.access-card h2 {
  margin: 8px 0 10px;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.18;
}

.access-copy {
  max-width: 430px;
}

.compact-form {
  margin-top: 0;
}

.form-link {
  width: fit-content;
  color: #dbeafe;
  font-size: 0.88rem;
}

.auth-notice {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.auth-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.is-hidden {
  display: none !important;
}

.form-note {
  margin: 0;
  color: var(--subtle);
  font-size: 0.86rem;
}

.preview-list {
  margin-top: 16px;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.stat strong {
  display: block;
  font-size: 2.1rem;
  font-weight: 530;
  line-height: 1;
}

.row,
.table-row {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line-soft);
}

.row {
  grid-template-columns: 1fr auto;
}

.row:first-child,
.table-row:first-child {
  border-top: 0;
}

.table-row {
  grid-template-columns: 1.15fr 1fr 0.85fr 0.85fr;
}

.table-row.header {
  color: var(--subtle);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  width: fit-content;
  border: 1px solid rgba(183, 200, 194, 0.24);
  border-radius: 999px;
  background: rgba(183, 200, 194, 0.08);
  color: #dbe5e1;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.empty {
  display: grid;
  min-height: 150px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-align: center;
}

.disclaimer-card {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 18px;
  color: rgba(246, 248, 251, 0.64);
  font-size: 0.88rem;
  line-height: 1.55;
}

.disclaimer-card strong {
  display: block;
  margin-bottom: 5px;
  color: rgba(246, 248, 251, 0.84);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer {
  width: min(calc(100% - 28px), var(--max));
  margin: 64px auto 30px;
}

@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }

  .hero,
  .two-col,
  .app-frame,
  .access-card {
    grid-template-columns: 1fr;
  }

  .grid.four,
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid.six {
    grid-template-columns: repeat(2, 1fr);
  }

  .side-panel {
    position: static;
  }

  .side-panel nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8 {
    grid-column: span 6;
  }
}

@media (max-width: 680px) {
  .topbar {
    position: static;
    border-radius: 22px;
  }

  .brand {
    min-width: 0;
  }

  .brand span {
    white-space: nowrap;
  }

  .brand small {
    display: none;
  }

  .topbar-actions .button {
    display: none;
  }

  .view {
    width: min(calc(100% - 16px), var(--max));
    padding-top: 14px;
  }

  .hero {
    min-height: auto;
    padding: 34px 20px;
    border-radius: 24px;
  }

  h1 {
    font-size: 3rem;
  }

  .countdown,
  .grid.four,
  .grid.six,
  .timeline,
  .dashboard-grid,
  .side-panel nav {
    grid-template-columns: 1fr;
  }

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: span 1;
  }

  .countdown div {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }

  .countdown div:first-child {
    border-top: 0;
  }

  .app-header,
  .row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .table-row {
    grid-template-columns: 1fr;
  }
}

/* Mobile Drawer Styles */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s ease;
  align-items: center;
  justify-content: center;
}

.menu-toggle:hover {
  background: var(--surface-2);
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  visibility: hidden;
  transition: visibility 0.3s ease;
}

.mobile-drawer.open {
  visibility: visible;
}

.drawer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer.open .drawer-backdrop {
  opacity: 1;
}

.drawer-content {
  position: absolute;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100%;
  background: rgba(13, 17, 24, 0.96);
  border-left: 1px solid var(--line);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  padding: 24px;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.mobile-drawer.open .drawer-content {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.drawer-header .close-btn {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.drawer-nav a {
  font-size: 1.1rem;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

.drawer-nav a:hover,
.drawer-nav a.active {
  background: var(--surface-2);
  color: #fff;
}

.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.drawer-actions .button {
  width: 100%;
}

@media (max-width: 1080px) {
  .menu-toggle {
    display: inline-flex;
  }
}

/* ─── Password Changed Success Toast ─────────────────────────── */
.pw-toast {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(-120px);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 320px;
  max-width: 92vw;
  padding: 18px 24px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 20px;
  background: rgba(10, 24, 16, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(74, 222, 128, 0.12);
  color: #f0faf4;
  font-size: 0.97rem;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.35s ease;
}

.pw-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pw-toast-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.18);
  border: 1px solid rgba(74, 222, 128, 0.32);
}

.pw-toast-icon svg {
  width: 20px;
  height: 20px;
  stroke: #4ade80;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pw-toast-body strong {
  display: block;
  color: #86efac;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.pw-toast-body p {
  margin: 0;
  color: rgba(240, 250, 244, 0.82);
  font-size: 0.93rem;
}
