:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #132238;
  --muted: #5a6b83;
  --brand: #0f6bff;
  --brand-2: #00a3a3;
  --danger: #c22727;
  --ok: #1d8f5d;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(18, 37, 63, 0.12);
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1320;
    --surface: #121c2e;
    --surface-2: #1a2740;
    --text: #e8f0ff;
    --muted: #9ab0d1;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 10% -10%, rgba(15, 107, 255, 0.22), transparent 45%), var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.app {
  max-width: 920px;
  margin: 0 auto;
  padding: 4.5rem var(--space-3) 2rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: var(--space-2) var(--space-3);
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: clamp(1rem, 2vw, 1.3rem);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

@media (max-width: 480px) {
  .brand-text {
    display: none;
  }
}

.brand-logo {
  height: clamp(24px, 4vw, 32px);
  width: auto;
  display: block;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-quick-logout {
  min-height: 36px;
  padding: 0.4rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  font-size: 0.85rem;
  font-weight: 600;
}

.header-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--muted) 28%, transparent);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}

.header-nav-link.active {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  color: var(--brand);
}

.header-search-input {
  width: min(320px, 52vw);
  min-height: 36px;
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
  background: var(--surface);
}

.home-topbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 460px) auto;
  align-items: center;
}

.topbar-center {
  display: flex;
  justify-content: center;
  position: relative;
}

.home-search-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: min(68vh, 720px);
  overflow: auto;
  z-index: 80;
  display: grid;
  gap: 0.65rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
  border-radius: 12px;
  padding: 0.6rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(7, 22, 44, 0.18);
}

.home-search-dropdown:empty {
  display: none;
}

.home-app {
  max-width: 1120px;
}

.home-hero {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  background:
    radial-gradient(circle at 95% 0%, rgba(15, 107, 255, 0.24), transparent 38%),
    linear-gradient(140deg, color-mix(in srgb, var(--surface) 90%, var(--brand) 10%), var(--surface));
}

.home-stats {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-stat-card {
  background: color-mix(in srgb, var(--surface) 88%, var(--brand) 12%);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  text-align: center;
}

.home-stat-card strong {
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  line-height: 1;
}

.home-slider {
  overflow: hidden;
  border-radius: 14px;
  margin-top: 0.75rem;
}

.home-slider-track {
  display: flex;
  gap: 0.8rem;
  width: max-content;
  animation: home-slider-move 42s linear infinite;
}

.home-slider:hover .home-slider-track {
  animation-play-state: paused;
}

.home-slide-card {
  position: relative;
  width: 190px;
  height: 260px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
}

.home-slide-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.home-slide-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.65));
  color: #fff;
  display: grid;
  gap: 0.45rem;
}

.home-slide-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
}

.home-slide-top strong {
  font-size: 0.95rem;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}

.home-slide-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.home-slide-overlay .small {
  color: rgba(255, 255, 255, 0.92);
}

.home-slide-actions {
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.home-slide-card:hover .home-slide-actions,
.home-slide-card:focus-within .home-slide-actions {
  opacity: 1;
  transform: translateY(0);
}

.home-slide-add {
  min-height: 34px;
  padding: 0.42rem 0.72rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.home-slide-add.btn-ghost {
  background: rgba(255, 255, 255, 0.86);
  color: #112046;
}

.home-table-wrap {
  margin-top: 0.85rem;
  overflow-x: auto;
}

.home-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.home-table th,
.home-table td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
  font-size: 0.88rem;
}

.home-table th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.home-table-show {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 200px;
}

.home-table-show img {
  width: 36px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface-2);
}

@media (max-width: 760px) {
  .home-table-mobile-cards {
    min-width: 0;
  }

  .home-table-mobile-cards thead {
    display: none;
  }

  .home-table-mobile-cards tbody {
    display: grid;
    gap: 0.85rem;
  }

  .home-table-mobile-cards tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.9rem;
    border: 1px solid color-mix(in srgb, var(--muted) 16%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface-2) 50%, white 50%);
  }

  .home-table-mobile-cards td {
    display: grid;
    grid-template-columns: minmax(86px, 0.7fr) minmax(0, 1fr);
    gap: 0.6rem;
    align-items: start;
    padding: 0;
    border-bottom: 0;
  }

  .home-table-mobile-cards td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .home-table-mobile-cards .home-table-show {
    min-width: 0;
  }

  .home-table-mobile-cards .home-table-show span {
    overflow-wrap: anywhere;
  }
}

.pricing-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr;
  margin-top: 0.95rem;
}

.pricing-grid-compact .pricing-card {
  margin-bottom: 0;
}

.pricing-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(18, 99, 255, 0.08), transparent 34%),
    color-mix(in srgb, var(--surface) 94%, #f7faff 6%);
  border: 1px solid color-mix(in srgb, var(--muted) 18%, transparent);
  border-radius: 16px;
  padding: 1rem;
  display: grid;
  gap: 0.7rem;
}

.pricing-card-featured {
  border-color: color-mix(in srgb, var(--brand) 38%, transparent);
  box-shadow: 0 14px 34px rgba(18, 79, 180, 0.12);
}

.pricing-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.pricing-plan-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.pricing-price {
  margin-top: 0.15rem;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
}

.pricing-limit {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  background: color-mix(in srgb, var(--brand) 14%, var(--surface));
  color: color-mix(in srgb, var(--brand) 80%, #0c2e6f 20%);
  font-weight: 700;
  font-size: 0.8rem;
}

.pricing-points {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.pricing-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.plans-app {
  max-width: 1160px;
}

.plans-hero {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  background:
    radial-gradient(circle at 100% 0%, rgba(17, 97, 255, 0.15), transparent 32%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, #eef5ff 8%), var(--surface));
}

.plans-hero-note {
  display: grid;
  gap: 0.3rem;
  align-content: start;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 78%, #ffffff 22%);
  border: 1px solid color-mix(in srgb, var(--muted) 16%, transparent);
}

.pricing-compare-table td:first-child,
.pricing-compare-table th:first-child {
  min-width: 140px;
  font-weight: 700;
}

@keyframes home-slider-move {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 860px) {
  .home-slide-actions {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 780px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .plans-hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
    align-items: center;
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}

.grid {
  display: grid;
  gap: var(--space-3);
}

.two-col {
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .two-col {
    grid-template-columns: 1.2fr 1fr;
  }

  .home-hero {
    grid-template-columns: 1.2fr 1fr;
  }
}

@media (max-width: 760px) {
  .home-topbar {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .topbar-center {
    justify-content: stretch;
  }

  .home-search-dropdown {
    max-height: 55vh;
  }

  .header-search-input {
    width: 100%;
    min-width: 180px;
  }
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-2);
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.35rem, 4vw, 2rem);
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
  background: var(--surface);
  color: var(--text);
  padding: 0.7rem 0.8rem;
}

textarea {
  resize: vertical;
}

.btn {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0.6rem 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
}

.btn-danger {
  background: color-mix(in srgb, var(--danger) 15%, var(--surface));
  color: var(--danger);
}

.row {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 15%, var(--surface));
  color: var(--brand);
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
}

.small {
  color: var(--muted);
  font-size: 0.86rem;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 0.5rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid color-mix(in srgb, var(--muted) 25%, transparent);
}

.bottom-nav .inner {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

.bottom-nav a {
  text-align: center;
  padding: 0.55rem 0.35rem;
  border-radius: 10px;
  font-size: 0.8rem;
}

.bottom-nav a.active {
  background: var(--surface);
  font-weight: 600;
}

.show-card img {
  width: 72px;
  height: 102px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
}

.show-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--space-2);
}

.show-card.is-paused {
  background: color-mix(in srgb, var(--surface-2) 82%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--muted) 24%, transparent);
  box-shadow: none;
}

.show-card.is-paused > img {
  filter: grayscale(1);
  opacity: 0.6;
}

.show-card.is-paused .show-toggle {
  color: var(--muted);
  cursor: default;
  opacity: 1;
}

.tracking-paused-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 15%, var(--surface));
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--muted) 32%, transparent);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.tracking-dialog {
  width: min(94vw, 600px);
  max-width: 94vw;
  max-height: 88vh;
  max-height: 88dvh;
  margin: auto;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tracking-dialog[open] { display: flex; flex-direction: column; }
.tracking-dialog::backdrop { background: rgba(10, 22, 40, 0.48); }
.tracking-dialog-header { padding: 1.25rem 1.25rem 0.75rem; flex: 0 0 auto; }
.tracking-dialog-header h2 { margin: 0 0 0.45rem; font-size: 1.35rem; }
.tracking-dialog-header p { margin: 0.45rem 0; }
.tracking-selection-count { color: var(--brand); font-weight: 700; }
.tracking-dialog progress { display: block; width: 100%; height: 6px; margin: 0.65rem 0 1rem; accent-color: var(--brand); }
.tracking-dialog progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 10px; }
.tracking-dialog progress::-webkit-progress-value { background: var(--brand); border-radius: 10px; }
.tracking-selection-hint { min-height: 1.3em; }
.tracking-options { overflow-y: auto; min-height: 0; padding: 0.25rem 1.25rem 1rem; overscroll-behavior: contain; }

.tracking-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  min-height: 52px;
  margin: 0 0 0.4rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.tracking-option[hidden] { display: none; }
.tracking-option.is-selected { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 38%, transparent); }
.tracking-option:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.tracking-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex: 0 0 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.tracking-option input:disabled { cursor: not-allowed; }
.tracking-option-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.tracking-option-status { flex: 0 0 auto; font-size: 0.75rem; color: var(--muted); }
.tracking-option.is-selected .tracking-option-status { color: var(--brand); font-weight: 600; }
.tracking-dialog-footer { display: flex; justify-content: flex-end; gap: 0.6rem; padding: 1rem 1.25rem; border-top: 1px solid color-mix(in srgb, var(--muted) 20%, transparent); background: var(--surface); flex: 0 0 auto; }

@media (max-width: 480px) {
  .tracking-dialog { max-height: 94vh; max-height: 94dvh; }
  .tracking-dialog-header { padding: 1rem 1rem 0.5rem; }
  .tracking-options { padding-left: 1rem; padding-right: 1rem; }
  .tracking-dialog-footer { padding: 0.75rem 1rem; }
  .tracking-dialog-footer .btn { flex: 1; }
}

.show-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
  padding: 0.35rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--muted) 28%, transparent);
  background: var(--surface-2);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.show-toggle .hint {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 500;
}

.show-toggle .chev {
  width: 1rem;
  text-align: center;
  transition: transform 0.18s ease;
}

.show-toggle[aria-expanded="true"] .chev {
  transform: rotate(90deg);
}

.search-wrap {
  position: sticky;
  top: 3.7rem;
  z-index: 20;
}

.unread-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}

.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, var(--surface-2), color-mix(in srgb, var(--surface-2) 70%, #fff), var(--surface-2));
  background-size: 220% 100%;
  animation: pulse 1.2s infinite linear;
}

@keyframes pulse {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -20% 0;
  }
}

.toast-wrap {
  position: fixed;
  right: 1rem;
  bottom: 5.7rem;
  z-index: 100;
  display: grid;
  gap: 0.6rem;
}

.toast {
  background: var(--surface);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.6rem 0.75rem;
  min-width: 220px;
}

.center {
  max-width: 420px;
  margin: 9vh auto 2rem;
}

.hidden {
  display: none !important;
}

body[data-page="auth"] {
  background:
    radial-gradient(circle at 12% -5%, rgba(15, 107, 255, 0.3), transparent 42%),
    radial-gradient(circle at 90% 12%, rgba(0, 163, 163, 0.18), transparent 45%),
    #eaf0fb;
}

.auth-app {
  max-width: 1080px;
  padding-top: 3.4rem;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
}

.auth-side {
  border-radius: var(--radius);
  padding: 1.4rem;
  background:
    radial-gradient(circle at 95% 0%, rgba(255, 255, 255, 0.2), transparent 42%),
    linear-gradient(145deg, #0f2e5f, #123f83);
  color: #ecf2ff;
  box-shadow: var(--shadow);
}

.auth-side h1 {
  margin: 0.6rem 0 0.7rem;
  font-size: clamp(1.4rem, 4.2vw, 2.15rem);
  color: #fff;
}

.auth-side p {
  margin: 0;
  color: color-mix(in srgb, #ecf2ff 86%, #9ec1ff 14%);
  max-width: 34ch;
}

.auth-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.auth-side-points {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.auth-side-points span {
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.11);
}

.auth-card {
  margin-bottom: 0;
  padding: 1.35rem;
  background: color-mix(in srgb, var(--surface) 94%, #f5f9ff 6%);
}

.auth-card h2 {
  margin: 0 0 0.35rem;
}

body[data-page="auth"] input {
  background: #f2f6ff;
  border-color: #c8d5ee;
}

body[data-page="auth"] input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--brand) 65%, #9cb6e3 35%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}

.auth-primary-actions,
.auth-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.auth-secondary-actions .btn {
  border: 1px solid color-mix(in srgb, var(--muted) 22%, transparent);
}

.auth-recovery-box {
  margin-top: 0.2rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 80%, #fff 20%);
  border: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
}

.auth-recovery-action .btn {
  width: 100%;
}

[data-admin-only] {
  display: none;
}

.admin-app {
  max-width: 1240px;
}

.admin-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.admin-sidebar {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.admin-tab-btn.active {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
}

.admin-filters {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 1fr;
  margin-bottom: 0.9rem;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
  font-size: 0.84rem;
  vertical-align: top;
}

.admin-table th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.admin-mobile-list {
  display: grid;
  gap: 0.7rem;
}

.admin-mini-card {
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(270px, 1fr) minmax(420px, 1.1fr);
    gap: 1.1rem;
  }

  .auth-side,
  .auth-card {
    min-height: 100%;
  }

  .admin-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }

  .admin-sidebar {
    position: sticky;
    top: 4.6rem;
  }

  .admin-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-user-filters {
    grid-template-columns: 1.2fr 1fr 1fr 1.3fr auto;
  }
}

@media (max-width: 860px) {

  .auth-primary-actions,
  .auth-secondary-actions {
    grid-template-columns: 1fr;
  }

  .auth-app {
    padding-top: 2.4rem;
  }

  .admin-table-wrap {
    display: none;
  }
}

@media (min-width: 861px) {
  .admin-mobile-list {
    display: none;
  }
}

/* ── Footer ── */
.site-footer {
  margin-top: 2rem;
  padding: 2rem var(--space-3) 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  backdrop-filter: blur(8px);
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-logo {
  height: 42px;
  width: auto;
  display: block;
}

.footer-desc {
  max-width: 38ch;
  line-height: 1.5;
}

.footer-section h4 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.footer-links a {
  color: var(--muted);
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-icon {
  width: 1.1em;
  height: 1.1em;
  opacity: 0.85;
}

.footer-app-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 15%, var(--surface)), color-mix(in srgb, var(--brand-2) 12%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
  transition: border-color 0.15s ease;
}

.footer-app-badge:hover {
  border-color: color-mix(in srgb, var(--brand) 50%, transparent);
}

.footer-app-badge .badge-icon {
  font-size: 1.1rem;
}

.footer-bottom {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--muted) 14%, transparent);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.footer-bottom a {
  color: var(--muted);
  transition: color 0.15s ease;
}

.footer-bottom a:hover {
  color: var(--brand);
}

@media (min-width: 640px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
