@import url('/css/brand-system.css');

:root {
  color-scheme: light;
  --ink: #17343e;
  --muted: #657b83;
  --teal-950: #063f49;
  --teal-800: #0a6472;
  --teal-700: #147e91;
  --teal-500: #2bb3b9;
  --mint: #55d6d9;
  --violet: #7b4cc9;
  --rose: #e06a6e;
  --amber: #c77b18;
  --bg: #f3f8f9;
  --surface: #ffffff;
  --soft: #e9f7f6;
  --soft-violet: #f0ebfa;
  --soft-rose: #fff0f1;
  --line: #dce8ea;
  --shadow: 0 22px 55px rgba(6, 55, 64, .11);
  --radius: 20px;
  --container: 1180px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8f5f6;
  --muted: #9db4ba;
  --bg: #092c34;
  --surface: #103a43;
  --soft: #164951;
  --soft-violet: #30284b;
  --soft-rose: #4c2b31;
  --line: #28515a;
  --shadow: 0 22px 55px rgba(0, 0, 0, .24);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.65 "Plus Jakarta Sans", system-ui, sans-serif;
}
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
h1, h2, h3 { color: var(--ink); font-family: Sora, sans-serif; line-height: 1.18; }
p { margin-top: 0; }
:focus-visible { outline: 3px solid rgba(85, 214, 217, .55); outline-offset: 3px; }

.skip-link {
  position: fixed; z-index: 999; top: 10px; left: 10px; transform: translateY(-150%);
  padding: 10px 14px; border-radius: 10px; background: var(--teal-950); color: #fff;
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.site-header {
  position: sticky; z-index: 60; top: 0; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(16px);
}
.nav-wrap { min-height: 74px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 188px; }
.brand img { width: 172px; height: 44px; object-fit: contain; object-position: left center; }
.desktop-nav { display: flex; align-items: center; justify-content: center; gap: 20px; flex: 1; }
.desktop-nav a { position: relative; padding: 26px 0 22px; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--teal-700); }
.desktop-nav a.active::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--mint); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { min-width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); }
.icon-btn:hover { border-color: var(--mint); color: var(--teal-700); }
.profile-button { min-width: 116px; height: 44px; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-align: left; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 50%; background: linear-gradient(145deg, var(--mint), var(--violet)); color: #fff; font: 700 12px Sora, sans-serif; }
.profile-button span:nth-child(2) { display: flex; flex: 1; flex-direction: column; line-height: 1.2; }
.profile-button strong { font-size: 11px; }
.profile-button small { color: var(--muted); font-size: 8px; }
.menu-btn { display: none; }
.mobile-nav { padding: 8px 20px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.mobile-nav a { display: block; padding: 11px 8px; border-radius: 9px; color: var(--muted); font-weight: 700; }
.mobile-nav a:hover, .mobile-nav a.active { background: var(--soft); color: var(--teal-700); }
.profile-menu { position: fixed; z-index: 75; top: 68px; right: max(20px, calc((100vw - var(--container)) / 2)); width: 255px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.profile-menu header { display: flex; align-items: center; gap: 10px; padding: 8px 8px 13px; }
.profile-menu header div { display: flex; flex-direction: column; min-width: 0; }
.profile-menu header small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; }
.profile-menu a { display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.profile-menu a:hover { background: var(--soft); color: var(--teal-700); }
.profile-menu hr { margin: 7px; border: 0; border-top: 1px solid var(--line); }

.page-hero { position: relative; overflow: hidden; padding: 58px 0 62px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 88% 8%, rgba(123, 76, 201, .15), transparent 29%), radial-gradient(circle at 70% 90%, rgba(85, 214, 217, .2), transparent 30%), linear-gradient(180deg, color-mix(in srgb, var(--surface) 93%, #e9fbfb), var(--soft)); }
.page-hero.compact { padding: 42px 0 46px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--muted); font-size: 12px; font-weight: 700; }
.eyebrow, .kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--violet); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.page-hero h1 { max-width: 820px; margin: 10px 0 14px; font-size: clamp(34px, 4.2vw, 54px); letter-spacing: -.045em; }
.page-hero p { max-width: 760px; margin: 0; color: var(--muted); font-size: 17px; }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.trust-row span, .pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 76%, transparent); color: var(--muted); font-size: 11px; font-weight: 700; }

.page-shell { padding: 38px 0 78px; }
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; gap: 28px; }
.sidebar { position: sticky; top: 96px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 34px rgba(6, 55, 64, .06); }
.sidebar strong { display: block; padding: 5px 8px 11px; font: 700 13px Sora, sans-serif; }
.sidebar a, .sidebar button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 10px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; text-align: left; }
.sidebar a:hover, .sidebar a.active, .sidebar button:hover, .sidebar button.active { background: var(--soft); color: var(--teal-700); }
.content-stack { display: grid; gap: 22px; min-width: 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 34px rgba(6, 55, 64, .055); }
.card-pad { padding: 25px; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 23px 25px; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { margin: 5px 0 4px; font-size: 20px; }
.card-header p { margin: 0; color: var(--muted); font-size: 13px; }
.card-body { padding: 25px; }
.section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-title h2 { margin: 4px 0 5px; font-size: 24px; }
.section-title p { margin: 0; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--soft) 55%, var(--surface)); }
.stat small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.stat strong { display: block; margin-top: 5px; font: 700 22px Sora, sans-serif; }

.btn { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid transparent; border-radius: 12px; font-weight: 800; }
.btn-primary { background: var(--teal-800); color: #fff; box-shadow: 0 10px 24px rgba(10, 100, 114, .18); }
.btn-primary:hover { background: var(--teal-700); }
.btn-secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-secondary:hover { border-color: var(--mint); color: var(--teal-700); }
.btn-danger { background: #b5484f; color: #fff; }
.btn-quiet { padding-inline: 6px; border: 0; background: transparent; color: var(--teal-700); }
.btn:disabled { cursor: not-allowed; opacity: .55; }
.link { color: var(--teal-700); font-weight: 800; }

.field { display: grid; gap: 7px; }
.field > span, .field > label, fieldset legend { color: var(--ink); font-size: 12px; font-weight: 800; }
.field small { color: var(--muted); font-size: 11px; }
.input, .select, .textarea { width: 100%; min-height: 45px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); }
.textarea { min-height: 130px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--mint); outline: 3px solid rgba(85, 214, 217, .18); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field.full { grid-column: 1 / -1; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row div { min-width: 0; }
.switch-row strong { display: block; font-size: 13px; }
.switch-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.switch { position: relative; width: 48px; height: 27px; flex: 0 0 48px; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #a9bcc1; transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: .2s; }
.switch input:checked + span { background: var(--teal-700); }
.switch input:checked + span::after { transform: translateX(21px); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; min-height: 40px; padding-block: 8px; }
.toolbar .search { flex: 1; min-width: 210px; }
.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; }
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 12px; }
.data-table th, .data-table td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { color: var(--muted); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.data-table tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; background: var(--soft); color: var(--teal-700); font-size: 10px; font-weight: 800; }
.status.warning { background: #fff5dd; color: #9c6418; }
.status.danger { background: var(--soft-rose); color: #a33f47; }
.empty-state { padding: 42px 24px; text-align: center; }
.empty-state i { display: inline-grid; width: 54px; height: 54px; place-items: center; border-radius: 16px; background: var(--soft); color: var(--teal-700); font-size: 26px; }
.empty-state h3 { margin: 13px 0 6px; }
.empty-state p { max-width: 500px; margin-inline: auto; color: var(--muted); }
.notice { display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--mint) 55%, var(--line)); border-radius: 13px; background: var(--soft); color: var(--muted); font-size: 12px; }
.notice i { margin-top: 2px; color: var(--teal-700); font-size: 18px; }
.notice strong { color: var(--ink); }
.notice.danger { border-color: #f0cfd1; background: var(--soft-rose); }
.notice.danger i { color: #ad474e; }

.accordion { border-top: 1px solid var(--line); }
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border: 0; background: transparent; color: var(--ink); font-weight: 800; text-align: left; }
.accordion-panel { padding: 0 0 18px; color: var(--muted); }
.accordion-panel > :last-child { margin-bottom: 0; }
.legal-copy { color: var(--muted); }
.legal-copy h2 { scroll-margin-top: 100px; margin: 34px 0 10px; color: var(--ink); font-size: 23px; }
.legal-copy h3 { margin: 22px 0 8px; font-size: 16px; }
.legal-copy li { margin-bottom: 6px; }
.legal-copy a { color: var(--teal-700); text-decoration: underline; text-underline-offset: 3px; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(3, 27, 33, .68); backdrop-filter: blur(5px); }
.modal { width: min(560px, 100%); max-height: min(760px, calc(100vh - 40px)); overflow: auto; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 28px 80px rgba(0,0,0,.28); }
.modal header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.modal h2 { margin: 0; font-size: 21px; }
.modal header button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); }
.modal-body { padding: 24px; }
.modal footer { display: flex; justify-content: flex-end; gap: 10px; padding: 17px 24px; border-top: 1px solid var(--line); }
.toast { position: fixed; z-index: 120; right: 20px; bottom: 20px; max-width: min(390px, calc(100% - 40px)); display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--teal-950); color: #fff; box-shadow: var(--shadow); }
.toast i { margin-top: 2px; color: var(--mint); font-size: 18px; }

.site-footer { padding: 34px 0; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-grid img { width: 150px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; color: var(--muted); font-size: 11px; font-weight: 700; }

@media (max-width: 1050px) {
  .desktop-nav { display: none; }
  .nav-wrap { justify-content: space-between; }
  .nav-actions { margin-left: auto; }
  .menu-btn { display: inline-grid; }
}
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: flex; overflow-x: auto; gap: 5px; padding: 10px; }
  .sidebar strong { display: none; }
  .sidebar a, .sidebar button { width: auto; flex: 0 0 auto; white-space: nowrap; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
}
@media (max-width: 620px) {
  .container { width: min(100% - 28px, var(--container)); }
  .brand { flex-basis: 145px; }
  .brand img { width: 145px; }
  .profile-button { display: none; }
  .page-hero { padding: 42px 0 46px; }
  .page-hero h1 { font-size: 34px; }
  .page-hero p { font-size: 15px; }
  .page-shell { padding: 26px 0 58px; }
  .card-header, .card-body, .card-pad { padding: 19px; }
  .section-title { flex-direction: column; }
  .footer-grid { align-items: flex-start; flex-direction: column; }
  .footer-links { justify-content: flex-start; }
  .modal footer { flex-direction: column-reverse; }
  .modal footer .btn { width: 100%; }
}

@media print {
  .site-header, .site-footer, .sidebar, .hero-actions, .toolbar, .button-row, .toast { display: none !important; }
  body { background: #fff; color: #111; }
  .page-hero { padding: 20px 0; border: 0; background: #fff; }
  .page-shell { padding: 0; }
  .layout { display: block; }
  .card { border: 0; box-shadow: none; }
}
