:root {
  --ink: #091523;
  --ink-2: #0f2032;
  --ink-3: #172d45;
  --line: rgba(157, 188, 214, .16);
  --muted: #9bb0c4;
  --text: #f4f8fb;
  --teal: #58dacd;
  --teal-dark: #1b9e9c;
  --amber: #ffc56b;
  --danger: #ff8a8a;
  --success: #74e5a7;
  --shadow: 0 22px 60px rgba(0, 0, 0, .24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; min-height: 100dvh; background: radial-gradient(circle at 14% 4%, #173852 0, transparent 32%), radial-gradient(circle at 86% 20%, #24334c 0, transparent 25%), var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(88, 218, 205, .75); outline-offset: 3px; }
a { color: inherit; }

.portal-shell { width: min(100% - 32px, 1120px); margin: 0 auto; padding: 28px 0 48px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 42px; }
.brand { display: inline-flex; align-items: center; gap: 12px; border: 0; padding: 0; color: var(--text); background: transparent; text-align: left; }
.brand-mark { display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid rgba(88, 218, 205, .45); border-radius: 14px; background: linear-gradient(145deg, rgba(88, 218, 205, .28), rgba(88, 218, 205, .03)); color: var(--teal); font-weight: 800; letter-spacing: -.08em; box-shadow: 0 0 0 5px rgba(88, 218, 205, .05); }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: .94rem; letter-spacing: .13em; text-transform: uppercase; }
.brand-copy span { color: var(--muted); font-size: .75rem; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.035); font-size: .8rem; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(116, 229, 167, .1); }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 42px; align-items: center; }
.eyebrow { margin: 0 0 14px; color: var(--teal); font-size: .76rem; font-weight: 750; letter-spacing: .17em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 630px; margin-bottom: 18px; font-size: clamp(2.3rem, 5vw, 4.8rem); line-height: .98; letter-spacing: -.065em; }
.lede { max-width: 540px; margin-bottom: 26px; color: var(--muted); font-size: 1.04rem; line-height: 1.7; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; color: #c8d8e5; font-size: .82rem; }
.trust-item { display: inline-flex; align-items: center; gap: 7px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.trust-item svg { color: var(--teal); }
.card { border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, rgba(18, 39, 59, .9), rgba(9, 21, 35, .86)); box-shadow: var(--shadow); }
.access-card { padding: 22px; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.card-header > div, .hero > * { min-width: 0; }
.card-header h2 { margin-bottom: 6px; font-size: 1.2rem; letter-spacing: -.02em; }
.card-header p { margin-bottom: 0; color: var(--muted); font-size: .87rem; line-height: 1.5; }
.mini-tag { color: var(--amber); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
.video-frame { width: 100%; min-width: 0; overflow: hidden; min-height: 190px; aspect-ratio: 16 / 9; border: 1px solid rgba(88, 218, 205, .24); border-radius: 16px; background: #07121d; }
.video-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-empty { display: grid; place-items: center; height: 100%; min-width: 0; min-height: 190px; padding: 25px; color: var(--muted); text-align: center; line-height: 1.55; overflow-wrap: anywhere; }
.video-meta { display: flex; justify-content: space-between; gap: 12px; min-width: 0; margin: 14px 0 16px; }
.video-meta > div { min-width: 0; }
.video-meta strong, .video-meta span { overflow-wrap: anywhere; }
.video-meta strong { display: block; margin-bottom: 4px; }
.video-meta span { color: var(--muted); font-size: .8rem; }
.progress { overflow: hidden; height: 6px; border-radius: 20px; background: rgba(255,255,255,.08); }
.progress > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-dark), var(--teal)); transition: width .2s ease; }
.primary-button, .secondary-button, .danger-button { min-height: 46px; border-radius: 12px; padding: 0 16px; border: 1px solid transparent; font-weight: 750; transition: transform .18s ease, filter .18s ease, background .18s ease; }
.primary-button { width: 100%; color: #04171b; background: var(--teal); }
.secondary-button { color: var(--text); border-color: var(--line); background: rgba(255,255,255,.055); }
.danger-button { color: #fff3f3; border-color: rgba(255, 138, 138, .3); background: rgba(255, 138, 138, .1); }
.primary-button:hover, .secondary-button:hover, .danger-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
button:disabled { cursor: not-allowed; opacity: .48; transform: none !important; filter: none !important; }
.primary-button, .secondary-button, .danger-button { white-space: normal; line-height: 1.2; }
.form-stack { display: grid; gap: 12px; }
.field { display: grid; gap: 7px; }
.field label { color: #d8e5ee; font-size: .78rem; font-weight: 700; }
.field input, .field select { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 11px; padding: 0 13px; color: var(--text); background: rgba(3, 13, 24, .48); }
.field input::placeholder { color: #72889d; }
.hint { margin: 0; color: var(--muted); font-size: .77rem; line-height: 1.5; }
.message { display: none; margin: 12px 0 0; padding: 11px 12px; border-radius: 10px; color: #dffcf2; background: rgba(116, 229, 167, .1); font-size: .82rem; line-height: 1.45; }
.message.show { display: block; }
.message.error { color: #ffe3e3; background: rgba(255, 138, 138, .1); }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 18px; padding: 4px; border-radius: 13px; background: rgba(0,0,0,.18); }
.tab { min-height: 39px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: .78rem; font-weight: 700; }
.tab.active { color: var(--text); background: var(--ink-3); box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.bottom-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; margin-top: 22px; }
.info-card { padding: 21px; }
.info-card h3 { margin-bottom: 8px; font-size: 1rem; }
.info-card p { margin-bottom: 0; color: var(--muted); font-size: .85rem; line-height: 1.65; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }
.plan strong { font-size: .92rem; }
.plan-price { color: var(--teal); font-size: 1.3rem; font-weight: 800; }
.plan small { color: var(--muted); line-height: 1.45; }
.plan button { min-height: 38px; margin-top: 6px; }
.success-panel { display: none; padding: 20px; border: 1px solid rgba(116, 229, 167, .3); border-radius: 16px; background: rgba(116, 229, 167, .08); }
.success-panel.show { display: block; }
.success-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 13px; color: var(--success); background: rgba(116, 229, 167, .13); }
.success-panel h3 { margin-bottom: 7px; }
.success-panel p { margin-bottom: 16px; color: #c5e7d5; font-size: .87rem; line-height: 1.55; }
.success-link { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 0 15px; border-radius: 10px; color: #062018; background: var(--success); font-weight: 750; text-decoration: none; }
.modal-backdrop { display: none; position: fixed; inset: 0; z-index: 20; place-items: center; padding: 20px; background: rgba(2, 8, 15, .72); backdrop-filter: blur(8px); }
.modal-backdrop.show { display: grid; }
.modal { width: min(100%, 410px); padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #0e2135; box-shadow: var(--shadow); }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.modal-header h2 { margin: 0; font-size: 1.18rem; }
.close-button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: transparent; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100dvh; }
.admin-sidebar { display: flex; flex-direction: column; gap: 28px; padding: 28px 18px; border-right: 1px solid var(--line); background: rgba(5, 14, 24, .72); }
.admin-nav { display: grid; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; text-align: left; font-size: .85rem; font-weight: 650; }
.nav-item.active, .nav-item:hover { color: var(--text); background: rgba(88, 218, 205, .1); }
.sidebar-footer { margin-top: auto; color: #6f8497; font-size: .75rem; line-height: 1.5; }
.admin-main { width: min(100%, 1200px); margin: 0 auto; padding: 28px clamp(18px, 4vw, 46px) 50px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 31px; }
.admin-topbar h1 { margin: 0 0 6px; font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.05em; }
.admin-topbar p { margin: 0; color: var(--muted); font-size: .86rem; }
.admin-page { display: none; }
.admin-page.active { display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }
.stat-card { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: rgba(14, 33, 53, .76); }
.stat-card span { color: var(--muted); font-size: .76rem; }
.stat-card strong { display: block; margin-top: 10px; font-size: 1.7rem; letter-spacing: -.04em; }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 18px; }
.admin-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(14, 33, 53, .68); }
.admin-card h2 { margin-bottom: 4px; font-size: 1.05rem; }
.admin-card > p { margin-bottom: 18px; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.data-list { display: grid; gap: 9px; }
.data-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(157,188,214,.1); }
.data-row > div { min-width: 0; }
.data-row small { display: block; margin-top: 4px; }
.data-row:last-child { border-bottom: 0; }
.data-row strong { font-size: .84rem; }
.data-row small { color: var(--muted); font-size: .75rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 12px 14px; border-bottom: 1px solid rgba(157,188,214,.1); text-align: left; font-size: .8rem; }
th { color: var(--muted); background: rgba(0,0,0,.12); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
td { color: #d6e3ec; }
tr:last-child td { border-bottom: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.inline-form .field { flex: 1 1 150px; }
.inline-form button { flex: 0 0 auto; }
.admin-layout { display: grid; gap: 18px; }
.admin-empty { padding: 28px 16px; color: var(--muted); text-align: center; font-size: .82rem; }
.settings-card { max-width: 760px; }
.toggle-field, .check-field { display: flex; align-items: flex-start; gap: 11px; min-height: 44px; cursor: pointer; }
.toggle-field input, .check-field input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--teal); }
.toggle-field span, .check-field span { display: grid; gap: 4px; }
.toggle-field small { color: var(--muted); font-size: .77rem; line-height: 1.45; }
.notification-options { display: grid; gap: 9px; margin: 2px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.notification-options legend { padding: 0 5px; color: #d8e5ee; font-size: .78rem; font-weight: 700; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.button-row button { width: auto; }
.login-view { display: grid; place-items: center; min-height: 100dvh; padding: 24px; }
.login-card { width: min(100%, 410px); padding: 28px; }
.login-card h1 { margin: 0 0 8px; font-size: 1.7rem; }
.login-card > p { margin-bottom: 23px; color: var(--muted); font-size: .87rem; line-height: 1.5; }

@media (max-width: 850px) {
  .hero, .bottom-grid, .split { grid-template-columns: 1fr; }
  .hero { gap: 24px; }
  h1 { max-width: 680px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { display: block; }
  .admin-sidebar { flex-direction: row; align-items: center; overflow-x: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-sidebar .brand-copy, .sidebar-footer { display: none; }
  .admin-nav { display: flex; }
  .nav-item { white-space: nowrap; }
}

@media (max-width: 560px) {
  .portal-shell { width: min(100% - 22px, 1120px); padding-top: 17px; }
  .topbar { margin-bottom: 31px; }
  .status-pill { padding: 8px; font-size: 0; }
  .status-dot { margin: 0 2px; }
  h1 { font-size: 2.65rem; }
  .access-card, .info-card { padding: 17px; border-radius: 18px; }
  .tabs { grid-template-columns: 1fr; }
  .tab { min-height: 42px; }
  .plan-grid { grid-template-columns: 1fr; }
  .stat-grid { gap: 9px; }
  .stat-card { padding: 13px; }
  .stat-card strong { font-size: 1.4rem; }
  .admin-main { padding-inline: 13px; }
  .admin-topbar { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
