@charset "UTF-8";

[hidden] { display: none !important; }

.admin-body {
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
}
.admin-body.modal-open,
.admin-body.nav-open { overflow: hidden; }
.admin-body button:disabled { cursor: not-allowed; opacity: .58; transform: none; }
.admin-body .icon { width: 19px; height: 19px; }
.admin-spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: admin-spin .7s linear infinite;
}
@keyframes admin-spin { to { transform: rotate(360deg); } }
@keyframes admin-rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* Session bootstrap */
.admin-boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background:
    radial-gradient(circle at 50% 40%, rgba(201,229,124,.16), transparent 25%),
    #f4f6f1;
  color: var(--muted);
  font-size: 12px;
}
.admin-boot-mark { width: 52px; height: 52px; margin-bottom: 9px; border-radius: 15px; }
.admin-boot strong { color: var(--ink); font-size: 18px; letter-spacing: .06em; }
.admin-boot .admin-spinner { margin-top: 12px; color: var(--green); }

/* Administrator login */
.admin-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(430px, .86fr);
  background: #f4f6f1;
}
.admin-login-story {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 42px 54px 30px;
  background: #e7eee3;
  border-right: 1px solid #d9e3d6;
}
.admin-login-story::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 590px;
  height: 590px;
  right: -230px;
  top: -240px;
  border: 1px solid rgba(45,106,90,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 85px rgba(45,106,90,.025), 0 0 0 170px rgba(45,106,90,.018);
}
.admin-login-story::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 250px;
  height: 250px;
  left: -110px;
  bottom: -115px;
  border: 48px solid rgba(201,229,124,.23);
  border-radius: 50%;
}
.admin-login-brand { width: max-content; padding: 0; }
.admin-login-copy { max-width: 680px; margin: auto 0 45px; padding-top: 55px; }
.admin-login-copy h1 { margin-bottom: 23px; font-size: clamp(39px, 5vw, 64px); }
.admin-login-copy h1 em { color: var(--green); font-style: normal; }
.admin-login-copy p { max-width: 585px; margin: 0; color: var(--ink-2); font-size: 15px; line-height: 2; }
.admin-login-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 690px;
  overflow: hidden;
  border: 1px solid rgba(194,207,192,.85);
  border-radius: 15px;
  background: rgba(255,255,255,.43);
  backdrop-filter: blur(10px);
}
.admin-login-metrics > div { padding: 20px 21px; border-right: 1px solid rgba(194,207,192,.75); }
.admin-login-metrics > div:last-child { border: 0; }
.admin-login-metrics strong { display: block; margin-bottom: 9px; color: var(--green); font: 700 25px/1 Georgia, serif; letter-spacing: -.03em; }
.admin-login-metrics span { display: block; color: var(--ink); font-size: 12px; font-weight: 700; }
.admin-login-metrics small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.admin-login-story-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 27px; color: var(--muted); font-size: 9px; letter-spacing: .05em; }
.admin-login-story-footer span:first-child { display: flex; align-items: center; gap: 7px; }
.admin-login-story-footer i { width: 6px; height: 6px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 3px rgba(62,130,112,.12); }
.admin-login-panel { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 40px 48px 20px; background: #fbfcf9; }
.admin-login-card { width: min(410px, 100%); margin: auto 0; }
.admin-login-card h2 { margin: 15px 0 8px; font-size: 33px; letter-spacing: -.035em; }
.admin-login-intro { margin-bottom: 29px; color: var(--muted); font-size: 13px; }
.admin-login-mobile-brand { display: none; }
.admin-password-toggle { width: 30px; height: 30px; margin: -5px -6px -5px 0; padding: 0; border: 0; border-radius: 7px; display: grid; place-items: center; background: transparent; color: var(--muted); cursor: pointer; }
.admin-password-toggle:hover, .admin-password-toggle[aria-pressed="true"] { color: var(--green); background: var(--green-soft); }
.admin-login-assurances { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; color: var(--green); font-size: 9px; }
.admin-login-assurances span::before { content: "✓"; margin-right: 5px; }
.admin-login-note { margin: 25px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.85; }
.admin-login-footer { width: 100%; display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.admin-login-footer a { color: var(--green); font-weight: 700; }

/* Application shell */
.admin-app { --admin-sidebar: 256px; --admin-topbar: 76px; min-height: 100vh; }
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--admin-sidebar);
  padding: 26px 17px 18px;
  display: flex;
  flex-direction: column;
  background: #fbfcf9;
  border-right: 1px solid var(--line);
}
.admin-brand { padding: 0 9px 31px; }
.admin-brand .brand-mark { width: 41px; height: 41px; }
.admin-sidebar-caption { padding: 0 12px 10px; color: #9aa59e; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.admin-nav { display: grid; gap: 6px; }
.admin-nav-item {
  position: relative;
  width: 100%;
  min-height: 51px;
  padding: 8px 11px;
  border: 0;
  border-radius: 11px;
  display: grid;
  grid-template-columns: 23px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  background: transparent;
  color: #596960;
  text-align: left;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.admin-nav-item .icon { grid-row: 1 / 3; width: 18px; }
.admin-nav-item > span { align-self: end; font-size: 13px; font-weight: 650; line-height: 1.4; }
.admin-nav-item > small { align-self: start; color: #9ba79f; font-size: 8px; letter-spacing: .09em; line-height: 1.5; }
.admin-nav-item:hover { background: var(--surface-soft); color: var(--ink); }
.admin-nav-item.active { color: #234f42; background: var(--green-soft); }
.admin-nav-item.active::before { content: ""; position: absolute; left: -17px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--green); }
.admin-nav-item.active .icon { color: var(--green); }
.admin-nav-item.active > small { color: #6d8c7f; }
.admin-sidebar-insight { margin-top: auto; padding: 17px 15px; border: 1px solid #dfe8dc; border-radius: 13px; background: #f0f5ed; }
.admin-sidebar-insight-icon { width: 32px; height: 32px; margin-bottom: 12px; display: grid; place-items: center; border-radius: 9px; background: white; color: var(--green); box-shadow: 0 4px 15px rgba(45,106,90,.07); }
.admin-sidebar-insight-icon .icon { width: 17px; }
.admin-sidebar-insight strong { display: block; font-size: 11px; }
.admin-sidebar-insight p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.8; }
.admin-sidebar-footer { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 16px 7px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; letter-spacing: .06em; }
.admin-workspace { min-height: 100vh; margin-left: var(--admin-sidebar); }
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  height: var(--admin-topbar);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(220,227,220,.9);
  background: rgba(247,248,245,.92);
  backdrop-filter: blur(18px);
}
.admin-topbar-context { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-topbar-context > div { display: grid; }
.admin-topbar-context small { color: var(--muted); font-size: 8px; letter-spacing: .1em; }
.admin-topbar-context strong { font-size: 14px; line-height: 1.5; }
.admin-mobile-menu { display: none; }
.admin-topbar-actions { display: flex; align-items: center; gap: 13px; min-width: 0; }
.admin-range-switch { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #edf1eb; }
.admin-range-switch button { min-width: 51px; padding: 5px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 650; cursor: pointer; }
.admin-range-switch button.active { background: white; color: var(--green); box-shadow: 0 2px 7px rgba(28,52,41,.08); }
.admin-user-chip { max-width: 170px; display: flex; align-items: center; gap: 8px; padding-left: 4px; }
.admin-avatar { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: var(--green); color: var(--lime); font: 700 13px Georgia, serif; }
.admin-user-chip > span:last-child { min-width: 0; display: grid; }
.admin-user-chip small { color: var(--muted); font-size: 8px; line-height: 1.3; }
.admin-user-chip strong { overflow: hidden; color: var(--ink-2); font-size: 11px; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; }
.admin-return-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink-2); font-size: 10px; white-space: nowrap; }
.admin-return-link:hover { border-color: var(--green); color: var(--green); }
.admin-return-link .icon { width: 14px; }
.admin-logout { border: 1px solid transparent; }
.admin-main { width: min(1440px, 100%); min-height: calc(100vh - var(--admin-topbar)); margin: 0 auto; padding: 35px 34px 65px; }
.admin-view { animation: admin-rise .25s ease; }
.admin-page-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.admin-page-header .eyebrow { margin-bottom: 10px; font-size: 9px; }
.admin-page-header h1 { margin-bottom: 8px; font-size: clamp(28px, 3vw, 36px); letter-spacing: -.04em; }
.admin-page-header h1 span { color: var(--green); }
.admin-page-header p { margin: 0; color: var(--muted); font-size: 12px; }
.admin-refresh { flex: 0 0 auto; padding: 8px 13px; font-size: 11px; }
.admin-refresh .icon { width: 15px; }
.admin-refresh.loading .icon { animation: admin-spin .8s linear infinite; }

/* Shared panels, states and data cards */
.admin-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 19px; }
.admin-stat-card { position: relative; overflow: hidden; min-width: 0; padding: 20px 21px 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.admin-stat-card::after { content: ""; position: absolute; width: 70px; height: 70px; right: -30px; top: -35px; border: 14px solid var(--green-soft); border-radius: 50%; opacity: .6; }
.admin-stat-card.blue::after { border-color: var(--blue-soft); }
.admin-stat-card.amber::after { border-color: var(--amber-soft); }
.admin-stat-card.purple::after { border-color: var(--purple-soft); }
.admin-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-stat-label { color: var(--muted); font-size: 10px; font-weight: 650; }
.admin-stat-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: var(--green-soft); color: var(--green); }
.admin-stat-card.blue .admin-stat-icon { color: var(--blue); background: var(--blue-soft); }
.admin-stat-card.amber .admin-stat-icon { color: var(--amber); background: var(--amber-soft); }
.admin-stat-card.purple .admin-stat-icon { color: var(--purple); background: var(--purple-soft); }
.admin-stat-icon .icon { width: 15px; }
.admin-stat-value { display: block; margin: 12px 0 5px; font-size: clamp(25px, 2.5vw, 32px); line-height: 1; letter-spacing: -.045em; }
.admin-stat-note { color: var(--muted); font-size: 9px; }
.admin-stat-note b { color: var(--green); font-weight: 700; }
.admin-panel { min-width: 0; margin-bottom: 19px; padding: 23px 24px; }
.admin-panel-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.admin-panel-header h2 { margin: 2px 0 4px; font-size: 17px; letter-spacing: -.015em; }
.admin-panel-header p { margin: 0; color: var(--muted); font-size: 10px; }
.admin-panel-kicker { color: var(--green); font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.admin-link-button { padding: 4px 0; border: 0; background: transparent; cursor: pointer; font-size: 10px; }
.admin-link-button .icon { width: 13px; }
.admin-overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); gap: 19px; }
.admin-two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }
.admin-chart { width: 100%; min-height: 240px; }
.admin-chart svg { width: 100%; height: auto; overflow: visible; }
.admin-chart-compact { min-height: 185px; }
.admin-chart-compact svg { max-height: 225px; }
.admin-chart-legend { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 5px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.admin-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.admin-chart-legend span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.admin-chart-legend .uv::before { background: #7c9fc5; }
.admin-chart-legend .registration::before { background: #b18a4c; }
.admin-chart-empty-note { margin: -12px 0 8px; color: var(--muted); text-align: center; font-size: 9px; }
.admin-loading-block { min-height: 150px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 11px; }
.admin-stats-grid > .admin-loading-block { grid-column: 1 / -1; min-height: 115px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.admin-state { padding: 35px 20px; text-align: center; color: var(--muted); }
.admin-state-icon { width: 42px; height: 42px; margin: 0 auto 11px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-soft); color: var(--green); }
.admin-state.error .admin-state-icon { background: var(--red-soft); color: var(--red); }
.admin-state strong { display: block; margin-bottom: 4px; color: var(--ink-2); font-size: 12px; }
.admin-state p { max-width: 480px; margin: 0 auto; font-size: 10px; overflow-wrap: anywhere; }
.admin-state .btn { margin-top: 13px; }

/* Tables and lists */
.admin-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.admin-table-card { overflow: hidden; }
.admin-table-card > div > .admin-table-wrap { border: 0; border-radius: 0; }
.admin-table { min-width: 590px; font-size: 10px; }
.admin-table th { padding: 11px 13px; background: #f5f7f3; color: #637269; font-size: 9px; font-weight: 750; letter-spacing: .02em; }
.admin-table td { min-width: 0; padding: 12px 13px; color: var(--ink-2); vertical-align: middle; }
.admin-table tbody tr { transition: background .15s; }
.admin-table tbody tr:hover { background: #fafbf8; }
.admin-table td:first-child { font-weight: 500; }
.admin-table .number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-table .primary-cell { color: var(--ink); font-weight: 650; }
.admin-table .sub-cell { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 400; }
.admin-table .wide-cell { min-width: 190px; }
.admin-table .lesson-title-cell { min-width: 280px; max-width: 440px; }
.admin-table .lesson-title-cell strong { display: block; color: var(--ink); font-size: 11px; line-height: 1.55; }
.admin-table .path-cell { max-width: 310px; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.admin-table .empty-cell { padding: 0; }
.admin-mini-table { margin-top: 13px; }
.admin-mini-table .admin-table { min-width: 360px; }
.admin-user-email { display: inline-flex; align-items: center; gap: 7px; max-width: 230px; padding: 0; border: 0; background: transparent; color: var(--green); font-size: 10px; font-weight: 700; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.admin-user-email:hover { text-decoration: underline; }
.admin-user-email .icon { width: 13px; flex: 0 0 auto; }
.admin-completion { min-width: 100px; }
.admin-completion-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.admin-completion-track { height: 4px; overflow: hidden; border-radius: 5px; background: #e8ede7; }
.admin-completion-track span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.admin-list-meta { display: flex; justify-content: space-between; gap: 15px; margin: 0 2px 10px; color: var(--muted); font-size: 9px; }
.admin-rank { display: inline-grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 800; }
.admin-rank.top { background: var(--green-soft); color: var(--green); }

/* Users */
.admin-user-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; padding: 13px; }
.admin-user-search { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; }
.admin-user-search > .icon { margin-left: 5px; color: var(--muted); width: 17px; }
.admin-user-search input { flex: 1; min-width: 0; padding: 7px 2px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.admin-user-search input::placeholder { color: #9ba69f; }
.admin-pagination { min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fbfcf9; }
.admin-pagination:empty { display: none; }
.admin-pagination-info { color: var(--muted); font-size: 9px; }
.admin-pagination-actions { display: flex; align-items: center; gap: 5px; }
.admin-page-button { min-width: 29px; height: 29px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink-2); font-size: 9px; cursor: pointer; }
.admin-page-button:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.admin-page-button.active { border-color: var(--green); background: var(--green); color: white; }
.admin-page-ellipsis { padding: 0 3px; color: var(--muted); font-size: 10px; }

/* Course statistics */
.admin-lesson-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-lesson-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; padding: 9px 12px; }
.admin-track-filters { display: flex; gap: 3px; }
.admin-track-filters button { padding: 8px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; white-space: nowrap; }
.admin-track-filters button span { margin-left: 4px; opacity: .65; font-size: 8px; }
.admin-track-filters button.active { background: var(--green-soft); color: var(--green); font-weight: 700; }
.admin-sort-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.admin-sort-label select { padding: 7px 27px 7px 9px; border: 1px solid var(--line); border-radius: 7px; outline: 0; background: var(--paper); color: var(--ink-2); font-size: 10px; }
.admin-sort-label select:focus { border-color: var(--green); }

/* Traffic */
.admin-metric-note { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 19px; padding: 15px 18px; border: 1px solid #dce5ef; border-radius: 12px; background: var(--blue-soft); color: #49627d; }
.admin-metric-note > .icon { margin-top: 2px; flex: 0 0 auto; width: 18px; }
.admin-metric-note strong { display: block; margin-bottom: 2px; font-size: 11px; }
.admin-metric-note p { margin: 0; font-size: 10px; line-height: 1.8; }
.admin-metric-note b { color: #355775; }
.admin-traffic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }

/* Settings */
.admin-settings-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .75fr); gap: 20px; align-items: start; }
.admin-settings-card { margin-bottom: 18px; }
.admin-settings-card fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.admin-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); cursor: pointer; }
.admin-switch-row > span:first-child { display: grid; }
.admin-switch-row strong { font-size: 11px; }
.admin-switch-row small { color: var(--muted); font-size: 9px; }
.admin-switch { position: relative; flex: 0 0 auto; width: 39px; height: 22px; }
.admin-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.admin-switch > span { position: absolute; inset: 0; border-radius: 20px; background: #cbd4cd; cursor: pointer; transition: .2s; }
.admin-switch > span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(20,40,30,.2); transition: .2s; }
.admin-switch input:checked + span { background: var(--green); }
.admin-switch input:checked + span::after { transform: translateX(17px); }
.admin-switch input:focus-visible + span { outline: 3px solid rgba(53,105,168,.3); outline-offset: 3px; }
.admin-form-label { display: block; margin-bottom: 7px; color: var(--ink-2); font-size: 11px; font-weight: 700; }
.admin-settings-card textarea { width: 100%; min-height: 130px; resize: vertical; padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: 10px; outline: 0; background: white; color: var(--ink); font-size: 11px; line-height: 1.8; }
.admin-settings-card textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(45,106,90,.08); }
.admin-textarea-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; color: var(--muted); font-size: 8px; }
.admin-announcement-preview { margin-top: 17px; padding: 12px 14px; border: 1px solid #e6d8b9; border-radius: 9px; background: var(--amber-soft); color: #765d3b; }
.admin-announcement-preview strong { display: block; margin-bottom: 3px; font-size: 9px; }
.admin-announcement-preview p { margin: 0; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-form-status { min-height: 35px; padding: 11px 0 8px; color: var(--muted); font-size: 9px; }
.admin-form-status.success { color: var(--green); }
.admin-form-status.error { color: var(--red); }
.admin-export-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; }
.admin-export-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--green-soft); color: var(--green); }
.admin-export-card h2 { margin: 0 0 4px; font-size: 15px; }
.admin-export-card p { margin: 0; color: var(--muted); font-size: 9px; }
.admin-export-card .btn { padding: 8px 12px; font-size: 10px; white-space: nowrap; }
.admin-export-card .icon { width: 14px; }
.admin-settings-aside { display: grid; gap: 14px; }
.admin-info-card { padding: 21px; }
.admin-info-icon { width: 36px; height: 36px; margin-bottom: 14px; display: grid; place-items: center; border-radius: 10px; }
.admin-info-icon.green { color: var(--green); background: var(--green-soft); }
.admin-info-icon.amber { color: var(--amber); background: var(--amber-soft); }
.admin-info-icon .icon { width: 18px; }
.admin-info-card h3 { margin: 0 0 8px; font-size: 13px; }
.admin-info-card p { margin: 0 0 10px; color: var(--ink-2); font-size: 10px; line-height: 1.9; }
.admin-info-card code { padding: 1px 4px; border-radius: 4px; background: var(--surface-soft); color: var(--green); font-size: 9px; overflow-wrap: anywhere; }
.admin-info-card small { display: block; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; line-height: 1.8; }
.admin-settings-tip { padding: 16px 18px; border-left: 3px solid #b7cb8b; border-radius: 4px 10px 10px 4px; background: #eef2e5; }
.admin-settings-tip span { color: var(--green); font-size: 9px; font-weight: 800; }
.admin-settings-tip p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.8; }

/* User detail drawer */
.admin-modal { position: fixed; inset: 0; z-index: 100; }
.admin-modal-backdrop { position: absolute; inset: 0; background: rgba(18,31,25,.42); backdrop-filter: blur(4px); }
.admin-drawer { position: absolute; inset: 0 0 0 auto; width: min(760px, 94vw); display: flex; flex-direction: column; background: var(--paper); box-shadow: -25px 0 80px rgba(18,38,28,.18); animation: admin-drawer-in .24s ease; }
@keyframes admin-drawer-in { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.admin-drawer-header { flex: 0 0 auto; display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 24px 27px 20px; border-bottom: 1px solid var(--line); background: rgba(251,252,249,.96); }
.admin-drawer-header h2 { margin: 3px 0 4px; font-size: 21px; }
.admin-drawer-header p { margin: 0; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.admin-drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 23px 27px 35px; }
.admin-drawer-footer { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 27px; border-top: 1px solid #ead5d1; background: #fff9f7; }
.admin-drawer-footer > div { display: grid; }
.admin-drawer-footer strong { color: var(--red); font-size: 10px; }
.admin-drawer-footer span { color: var(--muted); font-size: 8px; }
.admin-danger-button { border: 1px solid #dca8a1; background: white; color: var(--red); font-size: 10px; white-space: nowrap; }
.admin-danger-button:hover:not(:disabled) { border-color: var(--red); background: var(--red-soft); }
.admin-profile-card { position: relative; overflow: hidden; margin-bottom: 16px; padding: 21px; border: 1px solid #d9e5da; border-radius: 14px; background: #eaf1e7; }
.admin-profile-email { margin: 0 0 4px; color: var(--green); font-size: 15px; font-weight: 750; overflow-wrap: anywhere; }
.admin-profile-meta { margin: 0; color: var(--muted); font-size: 9px; }
.admin-profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.admin-profile-stats > div { padding: 11px 12px; border: 1px solid rgba(196,211,195,.75); border-radius: 9px; background: rgba(255,255,255,.55); }
.admin-profile-stats strong { display: block; font-size: 18px; line-height: 1.3; }
.admin-profile-stats span { color: var(--muted); font-size: 8px; }
.admin-detail-progress { margin-bottom: 16px; padding: 19px 21px; }
.admin-detail-progress-head { display: flex; justify-content: space-between; gap: 15px; align-items: end; }
.admin-detail-progress-head h3 { margin: 0; font-size: 13px; }
.admin-detail-progress-head strong { color: var(--green); font-size: 25px; line-height: 1; }
.admin-detail-progress-track { height: 7px; margin: 14px 0 10px; overflow: hidden; border-radius: 8px; background: #e7ece6; }
.admin-detail-progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #70a381); }
.admin-detail-last { margin: 0; color: var(--muted); font-size: 9px; }
.admin-detail-last strong { color: var(--ink-2); }
.admin-detail-section { margin-bottom: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.admin-detail-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 17px; cursor: pointer; list-style: none; }
.admin-detail-section > summary::-webkit-details-marker { display: none; }
.admin-detail-section > summary::after { content: "+"; color: var(--muted); font-size: 17px; font-weight: 400; }
.admin-detail-section[open] > summary::after { content: "−"; }
.admin-detail-section > summary > span { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; }
.admin-detail-section > summary .pill { font-size: 8px; font-weight: 600; }
.admin-detail-section-body { padding: 0 17px 16px; }
.admin-detail-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.admin-detail-list li { padding: 10px 12px; border-radius: 8px; background: var(--paper); }
.admin-detail-list strong { display: block; color: var(--ink-2); font-size: 10px; line-height: 1.6; }
.admin-detail-list small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; overflow-wrap: anywhere; }
.admin-note-item { padding: 12px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fdfcf8; }
.admin-note-item + .admin-note-item { margin-top: 9px; }
.admin-note-item header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.admin-note-item header strong { color: var(--green); font-size: 10px; }
.admin-note-item header time { flex: 0 0 auto; color: var(--muted); font-size: 8px; }
.admin-note-item p { margin: 0; color: var(--ink-2); font-size: 10px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-activity-list { position: relative; display: grid; gap: 0; }
.admin-activity-item { position: relative; display: grid; grid-template-columns: 12px 1fr auto; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.admin-activity-item:last-child { border: 0; }
.admin-activity-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 3px var(--green-soft); }
.admin-activity-item strong { display: block; font-size: 9px; }
.admin-activity-item small { color: var(--muted); font-size: 8px; }
.admin-activity-item time { color: var(--muted); font-size: 8px; white-space: nowrap; }
.admin-detail-empty { padding: 18px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); text-align: center; font-size: 9px; }
.admin-pageview-list { display: grid; gap: 7px; }
.admin-pageview-item { padding: 10px 12px; border-radius: 8px; background: var(--paper); }
.admin-pageview-item > div { display: flex; justify-content: space-between; gap: 12px; }
.admin-pageview-item code { color: var(--green); font-size: 9px; overflow-wrap: anywhere; }
.admin-pageview-item time { flex: 0 0 auto; color: var(--muted); font-size: 8px; }
.admin-pageview-item p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.6; overflow-wrap: anywhere; }

/* Feedback and mobile navigation */
.admin-mobile-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(20,35,28,.34); backdrop-filter: blur(2px); }
.admin-body .toast-region { max-width: min(390px, calc(100vw - 30px)); }
.admin-toast { border: 1px solid rgba(255,255,255,.08); }
.admin-toast.error { background: #743f3a; }
.admin-toast.success { background: #203a30; }
.admin-toast-message { overflow-wrap: anywhere; }

@media (max-width: 1220px) {
  .admin-app { --admin-sidebar: 230px; }
  .admin-main { padding-left: 25px; padding-right: 25px; }
  .admin-topbar { padding: 0 24px; }
  .admin-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-stat-value { font-size: 29px; }
  .admin-overview-grid { grid-template-columns: 1fr; }
  .admin-chart-compact svg { max-height: none; }
  .admin-login-story { padding: 35px; }
  .admin-login-panel { padding: 35px; }
  .admin-login-metrics > div { padding: 17px 14px; }
  .admin-traffic-grid { grid-template-columns: 1fr; }
  .admin-settings-layout { grid-template-columns: minmax(0, 1.35fr) minmax(245px, .75fr); }
  .admin-export-card { grid-template-columns: auto 1fr; }
  .admin-export-card .btn { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .admin-app { --admin-sidebar: 244px; }
  .admin-sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .admin-body.nav-open .admin-sidebar { transform: translateX(0); }
  .admin-workspace { margin-left: 0; }
  .admin-mobile-menu { display: inline-flex; }
  .admin-two-column { grid-template-columns: 1fr; }
  .admin-settings-layout { grid-template-columns: 1fr; }
  .admin-settings-aside { grid-template-columns: 1fr 1fr; }
  .admin-settings-tip { grid-column: 1 / -1; }
  .admin-login { grid-template-columns: 1fr; }
  .admin-login-story { display: none; }
  .admin-login-panel { padding: 30px 24px 20px; }
  .admin-login-mobile-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 45px; }
  .admin-login-mobile-brand .brand-mark { width: 38px; height: 38px; }
  .admin-login-mobile-brand > span:last-child { display: grid; }
  .admin-login-mobile-brand strong { font-size: 15px; }
  .admin-login-mobile-brand small { color: var(--muted); font-size: 8px; letter-spacing: .13em; }
}

@media (max-width: 720px) {
  .admin-app { --admin-topbar: 66px; }
  .admin-topbar { padding: 0 14px; gap: 8px; }
  .admin-topbar-context > div { display: none; }
  .admin-topbar-actions { flex: 1; justify-content: flex-end; gap: 7px; }
  .admin-user-chip { max-width: 115px; }
  .admin-user-chip small { display: none; }
  .admin-return-link span { display: none; }
  .admin-return-link { width: 34px; height: 34px; justify-content: center; padding: 0; }
  .admin-main { padding: 25px 17px 45px; }
  .admin-page-header { align-items: start; margin-bottom: 21px; }
  .admin-page-header h1 { font-size: 29px; }
  .admin-page-header p { max-width: 420px; font-size: 10px; }
  .admin-page-header .admin-refresh { width: 35px; height: 35px; padding: 0; overflow: hidden; color: transparent; gap: 0; }
  .admin-page-header .admin-refresh .icon { flex: 0 0 auto; color: var(--ink-2); }
  .admin-panel { padding: 19px 17px; }
  .admin-panel-header { flex-wrap: wrap; }
  .admin-chart-legend { width: 100%; }
  .admin-chart { min-height: 180px; overflow-x: auto; }
  .admin-chart svg { min-width: 480px; }
  .admin-chart-compact svg { min-width: 420px; }
  .admin-list-meta span:last-child { display: none; }
  .admin-lesson-controls { align-items: stretch; flex-direction: column; }
  .admin-track-filters { overflow-x: auto; }
  .admin-sort-label { justify-content: space-between; }
  .admin-profile-stats { grid-template-columns: 1fr 1fr; }
  .admin-drawer { width: min(680px, 100vw); }
  .admin-drawer-header, .admin-drawer-body { padding-left: 19px; padding-right: 19px; }
  .admin-drawer-footer { padding: 13px 19px; }
}

@media (max-width: 520px) {
  .admin-login-panel { padding: 24px 20px 16px; }
  .admin-login-mobile-brand { margin-bottom: 38px; }
  .admin-login-card h2 { font-size: 29px; }
  .admin-login-assurances { flex-wrap: wrap; justify-content: flex-start; gap: 7px 14px; }
  .admin-topbar { padding: 0 10px; }
  .admin-user-chip { display: none; }
  .admin-range-switch button { min-width: 47px; padding-left: 8px; padding-right: 8px; }
  .admin-main { padding: 22px 12px 40px; }
  .admin-stats-grid, .admin-lesson-stats { grid-template-columns: 1fr 1fr; gap: 9px; }
  .admin-stat-card { padding: 16px 14px; }
  .admin-stat-label { font-size: 9px; }
  .admin-stat-icon { width: 26px; height: 26px; }
  .admin-stat-value { font-size: 25px; }
  .admin-stat-note { font-size: 8px; }
  .admin-page-header h1 { font-size: 27px; }
  .admin-page-header .eyebrow { margin-bottom: 8px; }
  .admin-page-header p { max-width: 260px; }
  .admin-panel { padding: 17px 13px; border-radius: 13px; }
  .admin-panel-header h2 { font-size: 16px; }
  .admin-user-toolbar { flex-wrap: wrap; }
  .admin-user-search { flex-basis: 100%; }
  .admin-user-toolbar > .btn { margin-left: auto; }
  .admin-pagination { align-items: flex-start; flex-direction: column; }
  .admin-pagination-actions { width: 100%; justify-content: flex-end; }
  .admin-track-filters button { padding: 8px 9px; }
  .admin-sort-label select { max-width: 190px; }
  .admin-settings-aside { grid-template-columns: 1fr; }
  .admin-settings-tip { grid-column: auto; }
  .admin-export-card { grid-template-columns: 1fr; }
  .admin-export-icon { display: none; }
  .admin-textarea-meta span:first-child { max-width: 210px; }
  .admin-drawer-header h2 { font-size: 18px; }
  .admin-drawer-footer { align-items: stretch; flex-direction: column; gap: 9px; }
  .admin-danger-button { width: 100%; }
  .admin-profile-card { padding: 17px 14px; }
  .admin-profile-stats { gap: 7px; }
  .admin-profile-stats > div { padding: 9px; }
  .admin-note-item header { flex-direction: column; gap: 2px; }
  .admin-activity-item { grid-template-columns: 12px 1fr; }
  .admin-activity-item time { grid-column: 2; }
  .admin-pageview-item > div { flex-direction: column; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-view, .admin-drawer { animation: none; }
  .admin-sidebar { transition: none; }
}
