[hidden] { display: none !important; }
.auth-screen { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 420px); padding: 36px; border: 1px solid var(--border-soft); border-radius: 24px; background: var(--panel); box-shadow: var(--shadow); text-align: center; }
.auth-brand { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 32px; text-align: left; }
.auth-brand strong { font-size: 20px; }
.auth-brand strong span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.auth-card h1 { font-size: 28px; margin: 0 0 10px; }
.auth-subtitle,.auth-footer { color: var(--muted); font-size: 14px; line-height: 1.6; }
.auth-google { display: flex; justify-content: center; align-items: center; gap: 14px; width: 100%; margin-top: 28px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); color: var(--text); font: inherit; font-weight: 650; cursor: pointer; }
.auth-google span { font-size: 20px; color: var(--green); }
.auth-google:hover:not(:disabled) { border-color: var(--green); background: var(--bg); }
.auth-google:disabled { opacity: .55; cursor: wait; }
.auth-feedback { font-size: 13px; line-height: 1.5; color: var(--muted); }
.auth-feedback:empty { display: none; }
.auth-footer { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-soft); font-size: 12px; }
.vault-card { max-width: 760px; padding: 32px; }
.vault-symbol { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--panel-2); color: var(--green); font-size: 30px; margin-bottom: 24px; }
.vault-card h2 { font-size: clamp(24px, 3vw, 32px); margin: 8px 0 12px; }
.vault-description { max-width: 440px; }
.vault-status { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; margin: 24px 0; background: var(--bg); border: 1px solid var(--border-soft); border-radius: 12px; }
.vault-status p { margin: 0; font-size: 14px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; margin-top: 7px; }
.connected .status-dot { background: var(--green); }
.vault-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.access-details { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 13px; line-height: 1.6; }
.access-details summary { cursor: pointer; font-weight: 600; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
:root {
  color-scheme: dark;
  --bg: #080d0d;
  --panel: #0d1813;
  --panel-2: #10241a;
  --border: rgba(95, 239, 157, 0.22);
  --border-soft: rgba(255, 255, 255, 0.08);
  --text: #f4fff8;
  --muted: #a8b8ad;
  --green: #59ef9d;
  --green-2: #25c775;
  --danger: #ff6f7d;
  --warning: #ffd166;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(89, 239, 157, 0.16), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(37, 199, 117, 0.1), transparent 28%),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--border-soft);
  background: rgba(8, 13, 13, 0.74);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 32px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #06100b;
  font-weight: 900;
  box-shadow: 0 12px 40px rgba(89, 239, 157, 0.24);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  text-decoration: none;
  color: var(--muted);
}

.nav-link span {
  color: var(--text);
  font-weight: 750;
}

.nav-link small {
  font-size: 11px;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(89, 239, 157, 0.1);
  border-color: var(--border);
}

.main {
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.topbar h1,
.hero-card h2,
.section-head h2,
.empty-state h2 {
  margin: 4px 0 0;
  letter-spacing: -0.04em;
}

.topbar-actions,
.button-row,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.env-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 8px 11px;
  background: rgba(89, 239, 157, 0.08);
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.account-identity {
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-message {
  margin: -8px 0 20px;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(89, 239, 157, 0.08);
  color: var(--text);
}

.account-message[data-tone="warning"] {
  border-color: rgba(255, 209, 102, 0.35);
  background: rgba(255, 209, 102, 0.08);
}

.account-message[data-tone="error"] {
  border-color: rgba(255, 111, 125, 0.4);
  background: rgba(255, 111, 125, 0.08);
  color: #ffb5bd;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.status-pill.disconnected {
  border-color: rgba(255, 209, 102, 0.28);
  color: var(--warning);
  background: rgba(255, 209, 102, 0.08);
}

.status-pill.connected {
  color: var(--green);
}

.page {
  display: none;
}

.page.active {
  display: grid;
  gap: 18px;
}

.hero-card,
.card,
.connection-card,
.google-account-card,
.empty-state {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 36, 26, 0.94), rgba(9, 20, 15, 0.94));
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding: 28px;
}

.hero-card p,
.section-head p,
.card p,
.connection-card p,
.empty-state p,
.google-account-card p,
.rules-grid p {
  color: var(--muted);
  line-height: 1.6;
}

.status-stack {
  display: grid;
  gap: 10px;
}

.mini-status {
  padding: 14px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
}

.mini-status span,
.mini-status strong {
  display: block;
}

.mini-status span {
  color: var(--muted);
  font-size: 12px;
}

.mini-status strong {
  margin-top: 4px;
}

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

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

.card,
.connection-card,
.empty-state,
.google-account-card {
  padding: 22px;
}

.muted-card {
  border-color: var(--border-soft);
}

.plain-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.button-link,
.primary-button,
.ghost-button {
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
}

.button-link,
.primary-button {
  display: inline-flex;
  padding: 12px 16px;
  background: var(--green);
  color: #06100b;
}

.ghost-button {
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  color: var(--text);
}

.ghost-button.danger {
  color: var(--danger);
}

.section-head,
.google-account-card,
.connection-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.google-account-card {
  align-items: center;
}

.google-account-card.compact {
  display: grid;
  grid-template-columns: 1fr auto;
}

.google-status-main {
  max-width: 980px;
}

.google-status-side {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: 220px;
  text-align: right;
}

.google-status-side p {
  margin: 0;
  font-size: 13px;
}

.permission-note {
  margin: 18px 0;
  padding: 13px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  font-weight: 750;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rules-grid div {
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.empty-state {
  min-height: 360px;
  display: grid;
  place-content: center;
  text-align: center;
}

@media (max-width: 980px) {
  .app-shell,
  .hero-card,
  .grid.two,
  .rules-grid,
  .google-account-card.compact {
    grid-template-columns: 1fr;
  }

  .google-status-side {
    justify-items: start;
    text-align: left;
  }

  .sidebar {
    position: static;
    height: auto;
  }
}
