:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --navy: #111111;
  --navy-2: #1a1a1a;
  --navy-3: #2a2a2a;
  --blue: #a8841a;
  --blue-2: #c9a227;
  --gold: #c9a227;
  --gold-bright: #e8c878;
  --gold-deep: #a8841a;
  --gold-mist: #f7f0dc;
  --gold-soft: #f4e6b5;
  --red: #b42318;
  --ok: #1f7a4d;
  --ivory: #faf8f3;
  --surface: #ffffff;
  --line: #e6e0d4;
  --line-2: #d4ccb8;
  --text: #141414;
  --muted: #5c5c5c;
  --shadow: 0 10px 28px rgba(17, 17, 17, .08);
  --shine: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,0) 48%);
  --gold-grad: linear-gradient(180deg, #e8c878 0%, #c9a227 48%, #a8841a 100%);
  --black-grad: linear-gradient(180deg, #2a2a2a 0%, #141414 55%, #0a0a0a 100%);
  --sidebar: 228px;
  --topbar-h: 48px;
  --content-pad-top: 16px;
  --page-head-h: 56px;
  --page-stack-gap: var(--space-4);
  --font: "Outfit", "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --radius: 12px;
  --on-photo:
    0 1px 2px rgba(0, 0, 0, .55),
    0 0 12px rgba(0, 0, 0, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
html { font-size: 13.5px; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(201, 162, 39, .14), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(17, 17, 17, .06), transparent 52%),
    linear-gradient(180deg, #ffffff 0%, var(--ivory) 100%);
  min-height: 100vh;
  overflow-wrap: break-word;
  line-height: 1.4;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

html {
  scrollbar-width: thin;
  scrollbar-color: #c9a227 #1a140c;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #c9a227 rgba(26, 20, 12, .88);
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background:
    linear-gradient(90deg, rgba(255, 248, 230, .06), transparent 40%),
    linear-gradient(180deg, #1a140c 0%, #0e0c08 100%);
  border-left: 1px solid rgba(201, 162, 39, .16);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f0d78a 0%, #c9a227 46%, #8a6418 100%);
  border-radius: 99px;
  border: 1px solid rgba(80, 52, 8, .28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .42) inset,
    0 0 0 1px rgba(201, 162, 39, .18);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #fff3c4 0%, #e8c878 42%, #c9a227 100%);
}
::-webkit-scrollbar-corner {
  background: #0e0c08;
}
.sidebar,
.sidebar .nav {
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: #c9a227 #0c0c0e;
}
.sidebar .nav::-webkit-scrollbar {
  width: 6px;
}
.sidebar .nav::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, .28);
  border-left: 1px solid rgba(232, 200, 120, .12);
  border-radius: 99px;
}
.sidebar .nav::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f0d78a 0%, #c9a227 46%, #8a6418 100%);
  border-radius: 99px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .45) inset,
    0 0 8px rgba(201, 162, 39, .28);
}

.guest-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 40%) 1fr;
  background: #0a0a0a;
}
.guest-panel {
  padding: var(--space-8) 36px;
  color: #f7f3e8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(900px 480px at 12% 0%, rgba(201, 162, 39, .28), transparent 55%),
    var(--black-grad);
  border-right: 1px solid rgba(201, 162, 39, .4);
}
.guest-panel h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 34px;
  line-height: 1;
  margin: var(--space-5) 0 var(--space-2);
  color: #fff;
}
.guest-panel .product {
  color: rgba(247, 243, 232, .7);
  margin: 0 0 var(--space-3);
  font-size: 13px;
}
.guest-panel .tagline {
  color: var(--gold-bright);
  font-size: 14px;
  margin: 0 0 var(--space-3);
  font-weight: 600;
}
.guest-panel .lead {
  max-width: 380px;
  color: rgba(247, 243, 232, .72);
  line-height: 1.45;
  margin: 0;
  font-size: 13px;
}
.guest-meta { color: rgba(247, 243, 232, .72); font-size: 12px; line-height: 1.45; }
.guest-main {
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(201, 162, 39, .1), transparent 50%),
    linear-gradient(180deg, #fff 0%, var(--ivory) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.auth-card {
  width: min(400px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.98), #fff);
  border: 1px solid rgba(201, 162, 39, .22);
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.95) inset,
    var(--shadow);
  padding: var(--space-6) var(--space-5);
}
.kicker {
  color: var(--gold);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.auth-card h2 {
  font-family: var(--serif);
  font-weight: 600;
  margin: 0 0 var(--space-1);
  font-size: 26px;
}
.subtle { color: var(--muted); margin: 0 0 var(--space-4); font-size: 13px; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  color: #f7f3e8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), transparent 42%),
    var(--black-grad);
  border-right: 1px solid rgba(201, 162, 39, .28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    8px 0 28px rgba(0, 0, 0, .22);
}
.sidebar-brand {
  height: auto;
  min-height: calc(var(--topbar-h) + 1px + var(--content-pad-top) + var(--page-head-h));
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(201, 162, 39, .28);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  flex-shrink: 0;
  background: transparent;
}
.brand-mark {
  width: 110px;
  max-height: 44px;
  background: transparent;
  line-height: 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.brand-mark img {
  width: auto;
  max-width: 110px;
  max-height: 44px;
  height: auto;
  display: block;
  margin: 0 auto;
  background: transparent;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.28));
}
.sidebar-brand .brand-mark {
  width: 68px;
  height: 68px;
  max-height: none;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    var(--shine),
    var(--gold-grad);
  border: 1px solid rgba(232, 200, 120, .55);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.45) inset,
    0 10px 22px rgba(168, 132, 26, .32);
  overflow: hidden;
}
.sidebar-brand .brand-mark img {
  width: 58px;
  height: 58px;
  max-width: 58px;
  max-height: 58px;
  object-fit: contain;
  object-position: center;
  margin: 0;
  filter: none;
}
.brand-mark-lg {
  width: min(188px, 100%);
}
.sidebar-brand-text { width: 100%; }
.sidebar-brand strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;
  color: #ffffff;
}
.sidebar-brand span {
  display: block;
  margin-top: 2px;
  color: rgba(232, 200, 120, .85);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
}
.sidebar .nav {
  padding: 12px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
}
.sidebar .nav-section {
  padding: 4px 2px 6px;
  border: 1px solid rgba(201, 162, 39, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.sidebar .nav a {
  text-decoration: none;
  padding: 6px 10px;
  color: rgba(247, 243, 232, .78);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  border-left: 3px solid transparent;
  border-radius: 0 10px 10px 0;
}
.sidebar .nav a svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--gold-bright);
  opacity: .88;
}
.sidebar .nav a:hover {
  background: rgba(201, 162, 39, .12);
  color: #fff;
}
.sidebar .nav a:hover svg { opacity: 1; }
.sidebar .nav a.active {
  background: linear-gradient(90deg, rgba(201,162,39,.22) 0%, rgba(17, 17, 17, .92) 42%);
  color: #fff;
  border-left-color: var(--gold);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.sidebar .nav a.active svg { opacity: 1; color: var(--gold-bright); }
.sidebar .nav .group {
  margin: 2px 8px 4px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(201, 162, 39, .22);
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  font-weight: 700;
  text-align: left;
}
.sidebar-foot {
  margin-top: auto;
  padding: 10px 14px 14px;
  color: rgba(247, 243, 232, .45);
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: .02em;
  text-align: center;
  border-top: 1px solid rgba(201, 146, 44, .18);
  background: transparent;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: #0c0a08;
  background-image:
    radial-gradient(70% 42% at 50% 78%, rgba(232, 200, 120, .2), transparent 58%),
    linear-gradient(180deg, rgba(10, 8, 6, .38) 0%, rgba(10, 8, 6, .22) 36%, rgba(6, 4, 3, .52) 100%),
    radial-gradient(82% 70% at 50% 42%, transparent 28%, rgba(4, 3, 2, .58) 100%),
    url("../img/lux/wtc-hall.webp?v=20260918dark");
  background-size: auto, auto, auto, cover;
  background-position: center, center, center, center 58%;
  background-repeat: no-repeat;
  background-attachment: scroll;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), transparent 50%),
    linear-gradient(180deg, #1a1a1a, #111111);
  border-bottom: 1px solid rgba(201, 162, 39, .35);
  box-shadow: 0 8px 28px rgba(17, 17, 17, .22);
  color: #f7f3e8;
  position: sticky;
  top: 0;
  z-index: 5;
  gap: var(--space-3);
}
.breadcrumb { color: rgba(247, 243, 232, .72); font-size: 12px; }
.breadcrumb a { text-decoration: none; color: var(--gold-bright); }
.breadcrumb a:hover { color: #fff; }
.topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.account { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold-grad); color: #1a1408;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset;
}
.account-meta { text-align: right; line-height: 1.15; }
.account-meta strong { display: block; font-size: 12px; color: #fff; }
.account-meta span { color: var(--gold-soft, #f4e6b5); font-size: 11px; }
.account-menu { position: relative; }
.account-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu .actions-menu { right: 0; min-width: 140px; }

.content { padding: var(--content-pad-top) 16px 16px; flex: 1; }
.app-footer {
  padding: 6px 16px 10px;
  color: #e8dcc0;
  font-size: 11px;
  font-weight: 600;
  border-top: 1px solid rgba(201, 162, 39, .22);
  line-height: 1.4;
  background: transparent;
  text-shadow: var(--on-photo);
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-3);
  min-height: var(--page-head-h);
  height: auto;
  margin-bottom: var(--page-stack-gap);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(201, 162, 39, .22);
}
.page-head > div:first-child { min-width: 0; flex: 1 1 220px; }
.page-head > .btn,
.page-head > a.btn,
.page-head > .form-actions { flex: 0 0 auto; }
.page-head h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
  letter-spacing: -.03em;
  font-family: var(--serif);
  color: #fff8e8;
  text-shadow: var(--on-photo);
}
.page-head p {
  margin: 2px 0 0;
  color: #f0d78a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-shadow: var(--on-photo);
}
.title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.summary:has(.lux) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.summary .card { padding: 8px 10px; }
.summary .label { color: #2c3642; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; font-weight: 700; }
.summary .value { font-size: 20px; font-weight: 700; line-height: 1.15; margin-top: 2px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  align-items: end;
  padding: 6px 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.1) 36%, transparent 52%),
    linear-gradient(180deg, #fffdf8 0%, #f3e8c8 100%);
  border: 1px solid rgba(201, 162, 39, .42);
  border-radius: 8px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 0 0 1px rgba(201, 162, 39, .1),
    0 6px 14px rgba(26, 20, 12, .08);
}
.filters label {
  min-width: 110px;
  flex: 0 1 160px;
  max-width: 200px;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #6b4e10;
  gap: 2px;
}
.filters label:first-child { flex: 1 1 180px; max-width: 240px; }
.filters input,
.filters select {
  height: 26px;
  padding: 2px 8px;
  border-radius: 6px;
  border-color: rgba(201, 162, 39, .38);
  background: #fffef9;
}
.filters .btn { height: 26px; padding: 0 10px; border-radius: 6px; font-size: 12px; }
.filters-actions { display: flex; gap: 6px; align-items: center; height: 26px; }
.filters .reset {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b4e10;
  text-decoration: none;
  height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
}
.filters .reset:hover { color: var(--navy); }

.grid-4, .grid-2, .grid-3 { display: grid; gap: var(--space-3); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1.15fr .85fr; margin-top: 0; }
.card {
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,.08) 28%, transparent 48%),
    linear-gradient(180deg, #fffdf8 0%, #f6efe0 100%);
  border: 1px solid rgba(201, 162, 39, .4);
  box-shadow:
    0 1px 0 rgba(255,255,255,.88) inset,
    0 0 0 1px rgba(201, 162, 39, .08),
    0 8px 16px rgba(26, 20, 12, .08);
}
.stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
}
.stat-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--gold-mist);
  color: var(--gold-deep);
  border-left: 3px solid var(--gold);
}
.stat-mark svg { width: 14px; height: 14px; }
.stat .label { color: #2c3642; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; font-weight: 700; }
.stat .value { font-size: 24px; font-weight: 700; line-height: 1; margin-top: 1px; }
.stat .hint { color: #3a4450; font-size: 12px; margin-top: 2px; }
html body .card.stat.lux,
html body .summary > .card {
  --lux-blue: linear-gradient(180deg, rgba(255,255,255,.46) 0%, rgba(255,255,255,.08) 32%, transparent 52%),
    linear-gradient(165deg, #4aa3ff 0%, #1e6fe0 36%, #1248b0 70%, #0a2d72 100%);
  display: block;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 92px;
  padding: 12px 14px;
  border: 1px solid rgba(232, 200, 120, .42);
  background: var(--lux-blue);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .58) inset,
    0 -14px 20px rgba(8, 32, 88, .32) inset,
    0 0 0 1px rgba(201, 162, 39, .18),
    0 8px 18px rgba(18, 56, 140, .26);
}
html body .card.stat.lux::after,
html body .summary > .card::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 2px;
  height: 42%;
  border-radius: 10px 10px 46% 46%;
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0));
  pointer-events: none;
}
html body .card.stat.lux .label,
html body .summary > .card .label {
  position: relative;
  z-index: 1;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-shadow: 0 1px 2px rgba(8, 28, 72, .75), 0 0 10px rgba(8, 28, 72, .35);
}
html body .card.stat.lux .value,
html body .summary > .card .value {
  position: relative;
  z-index: 1;
  color: #ffffff;
  font-size: 26px;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(8, 28, 72, .55);
}
html body .card.stat.lux .hint,
html body .summary > .card .hint {
  position: relative;
  z-index: 1;
  color: #ffffff;
}
.card h3,
.card > .page-head h3 {
  margin: 0;
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #6b4e10;
  font-weight: 700;
}
.card > h3 {
  padding: 9px 14px;
  background: linear-gradient(180deg, #fff8e4 0%, #ecd9a4 100%);
  border-bottom: 2px solid #c9a227;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .72) inset;
}
.card > :not(h3):not(.table-wrap):not(.pager):not(.empty-state):not(.page-head) {
  margin: 12px 14px;
}
.summary > .card > *,
.card.stat > *,
.card.lux > *,
.card.cbt-tile > *,
.doc-metrics .card > * {
  margin: 0;
}
.card > .table-wrap { margin: 0; }
.card > .pager {
  margin: 0;
  padding: 6px 14px;
}
.card > .empty-state {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 16px 14px 18px;
}
.card > .page-head {
  margin: 0;
  min-height: 0;
  height: auto;
  padding: 8px 14px;
  border-bottom: 2px solid #c9a227;
  background: linear-gradient(180deg, #fff8e4 0%, #ecd9a4 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .72) inset;
}
.card > .page-head h3,
.card > .page-head p {
  color: #6b4e10;
  text-shadow: none;
}
.card > .page-head p {
  font-weight: 600;
  font-size: 12px;
}
.card.stat.lux,
.summary > .card {
  overflow: hidden;
}

.empty-state {
  text-align: center;
  padding: 16px 12px;
  color: var(--muted);
  border: 0;
  background: transparent;
  border-radius: 0;
  font-size: 13px;
  overflow-wrap: break-word;
}
.empty-state p { margin: 0 0 8px; }
.empty-state p:last-child { margin-bottom: 0; }

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(201, 162, 39, .16); vertical-align: middle; }
th, td { border-right: 1px solid rgba(201, 162, 39, .2); }
th:last-child, td:last-child { border-right: 0; }
th {
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #6b4e10;
  font-weight: 700;
  background: linear-gradient(180deg, #fff8e4 0%, #ecd9a4 100%);
  border-bottom: 2px solid #c9a227;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .72) inset;
  position: sticky;
  top: 0;
}
tbody tr:nth-child(even) { background: #faf8f3; }
tbody tr:hover { background: #f7f0dc; }
td.num, th.num { width: 36px; color: var(--muted); text-align: right; padding-right: 10px; }
.truncate { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; border: 0; background: var(--gold-grad); color: #1a1408;
  padding: 6px 14px; text-decoration: none; cursor: pointer; height: 32px;
  font-size: 13px; font-weight: 700;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow:
    0 1px 0 rgba(255,255,255,.4) inset,
    0 8px 18px rgba(168, 132, 26, .22);
}
.btn:hover { filter: brightness(1.05); color: #1a1408; }
.btn.secondary {
  background: linear-gradient(180deg, #fff, var(--ivory));
  color: var(--text);
  border: 1px solid rgba(17, 17, 17, .14);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset;
}
.btn.secondary:hover { background: var(--navy); color: var(--gold-bright); border-color: var(--navy); }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--muted); box-shadow: none; }
.btn.accent { background: var(--gold-grad); border: 0; color: #1a1408; }
.btn.danger { background: var(--red); border: 0; color: #fff; box-shadow: none; }
.btn.success { background: var(--ok); border: 0; color: #fff; box-shadow: none; }
.btn.warning { background: #8a6418; border: 0; color: #fff8e8; box-shadow: none; }
.btn.small { padding: 4px 10px; font-size: 12px; height: 28px; border-radius: 8px; }

.form { display: grid; gap: var(--space-3); max-width: none; }
.form-section { border-top: 1px solid var(--line); padding-top: var(--space-3); display: grid; gap: var(--space-3); }
.form > .form-section:first-of-type { border-top: 0; padding-top: 0; }
.form-section h3 { margin: 0; }
.form-row { display: grid; gap: var(--space-3); grid-template-columns: 1fr 1fr; }
.form-canvas .form-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-canvas .form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-canvas [data-program-fields] {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
.form-canvas .form-seg {
  display: grid;
  gap: 10px;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-left-width: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
}
.form-canvas .form-seg h3 {
  margin: 0;
  padding: 5px 8px;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 3px;
}
.form-canvas .form-seg.is-search {
  border-left-color: var(--navy);
  background: linear-gradient(180deg, #f4efe4 0%, #faf8f3 70%);
}
.form-canvas .form-seg.is-search h3 { background: var(--navy); color: var(--gold-bright); }
.form-canvas .form-seg.is-person {
  border-left-color: var(--gold);
  background: linear-gradient(180deg, #fbf6ea 0%, #fff 72%);
}
.form-canvas .form-seg.is-person h3 { background: #1a1408; color: var(--gold-bright); }
.form-canvas .form-seg.is-family {
  border-left-color: var(--gold);
  background: linear-gradient(180deg, #f7f1e4 0%, #fbf8f1 72%);
}
.form-canvas .form-seg.is-family h3 { background: #8a6418; color: #fbf4e4; }
.form-canvas .form-seg.is-program {
  border-left-color: #1a6a62;
  background: linear-gradient(180deg, #e7f3f1 0%, #f6fbfa 72%);
}
.form-canvas .form-seg.is-program h3 { background: #14524c; color: #eaf6f4; }
.form-canvas .form-seg.is-extra {
  border-left-color: #7a3b3b;
  background: linear-gradient(180deg, #f6ecec 0%, #fbf6f6 72%);
}
.form-canvas .form-seg.is-extra h3 { background: #6b3030; color: #f8eeee; }
.form-canvas .form-seg.is-review {
  border-left-color: #3d4a63;
  background: linear-gradient(180deg, #f7f3ea 0%, #faf8f3 72%);
}
.form-canvas .form-seg.is-review h3 { background: #2b3648; color: #eef3f8; }
.program-list { display: grid; gap: 8px; }
.program-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px 10px;
  background: rgba(255,255,255,.58);
  display: grid;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.program-card.is-dup { border-color: #c9a15a; background: #fbf6ec; }
.program-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.program-card-head strong {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
}
.program-add-row { display: flex; justify-content: flex-start; }
.extra-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px 10px;
  background: rgba(255,255,255,.5);
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}
.extra-head {
  margin: 0;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--navy);
}
.extra-group .fields-grid,
.form-canvas .extra-group [data-program-fields] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.review-board { display: grid; gap: 8px; }
.review-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: rgba(255,255,255,.55);
}
.review-block h4 {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
}
.confirm-card { padding: 12px; }
.confirm-lead { margin: 0 0 10px; font-size: 13px; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.address-block {
  display: grid;
  gap: 8px;
  padding: 8px 10px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.45);
}
.address-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.address-head h4 {
  margin: 0;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
}
.address-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
.address-grid .span-2 { grid-column: span 2; }
label { display: grid; gap: 3px; font-size: 12px; color: var(--navy-2); font-weight: 600; align-content: start; }
label .req { color: var(--red); display: inline; line-height: 1; }
input, select, textarea {
  padding: 6px 10px; border: 1px solid var(--line-2); background: #fff; color: var(--text); height: 32px;
  border-radius: 10px;
}
.date-field { position: relative; display: block; min-width: 0; }
.date-field [data-date] { width: 100%; padding-right: 30px; }
.date-field-mark {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 15px;
  height: 15px;
  color: var(--navy-2);
  pointer-events: none;
}
.date-field-mark svg { width: 15px; height: 15px; display: block; }
.date-field-picker {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  border: 0;
  background: transparent;
}
textarea { min-height: 72px; height: auto; resize: vertical; }
.field-error { color: var(--red); font-size: 11px; font-weight: 600; }
.alert { padding: 8px 10px; margin-bottom: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.alert.error { background: #f8ece9; color: var(--red); }
.alert.success { background: #e8f3ec; color: var(--ok); }

.badge {
  display: inline-block; padding: 2px 8px; font-size: 10px; font-weight: 700;
  border: 1px solid rgba(201, 162, 39, .22); color: #5c4810; background: var(--gold-mist);
  letter-spacing: .03em; text-transform: uppercase;
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  flex-shrink: 0;
}
.badge.is-active { background: #e6f3eb; color: var(--ok); border-color: #c7e0d1; }
.badge.is-info { background: var(--gold-mist); color: #5c4810; border-color: rgba(201, 162, 39, .35); }
.badge.is-draft { background: #f4efe4; color: #7a6230; }
.badge.is-muted { background: #ececec; color: #5c5c5c; }
.badge.is-done { background: #eef2f5; color: #445566; }
.badge.is-danger { background: #f8ece9; color: var(--red); border-color: #ead3d0; }

.menu-toggle {
  display: none;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(201, 162, 39, .4);
  color: var(--gold-soft);
  padding: 4px 10px;
  height: 32px;
  border-radius: 10px;
}
.checks { display: grid; gap: 6px; }
.checks label { font-weight: 500; display: flex; gap: 8px; align-items: center; }
.stack { display: grid; gap: var(--space-3); }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13px; }
.dl dt { color: #2c3642; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; padding-top: 3px; }
.dl dd { margin: 0; }
.placeholder {
  padding: 8px 10px;
  background: var(--ivory);
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
  border-radius: var(--radius);
}
.pager { display: flex; gap: var(--space-2); align-items: center; justify-content: flex-end; margin-top: var(--space-3); font-size: 12px; color: var(--muted); }
.card:has(> .table-wrap) > .pager {
  margin: 0;
  padding: 6px 10px;
  border-top: 1px solid rgba(201, 162, 39, .18);
  background: linear-gradient(180deg, #faf4e6, #f3e8c8);
}
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.row-actions form { display: inline-flex; margin: 0; }
.row-actions .act {
  position: relative;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #fff 0%, var(--ivory) 100%);
  color: var(--navy);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
}
.row-actions .act svg { width: 13px; height: 13px; }
.row-actions .act:hover { border-color: var(--gold); color: var(--gold-deep); background: #fff; }
.row-actions .act.is-warn:hover { border-color: var(--red); color: var(--red); }
.row-actions .act.is-ok:hover { border-color: var(--ok); color: var(--ok); }
.row-actions .act::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  background: var(--navy);
  color: #f4efe6;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 7px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 12;
}
.row-actions .act:hover::after,
.row-actions .act:focus-visible::after { opacity: 1; }
.account-menu:not([open]) > .actions-menu { display: none; }
.account-menu[open] > .actions-menu { display: block; }
.actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 2px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 148px;
  z-index: 8;
  box-shadow: 0 6px 16px rgba(11, 23, 41, .12);
}
.actions-menu a, .actions-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 6px 10px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
}
.actions-menu a:hover, .actions-menu button:hover { background: var(--ivory); }
.perm-group { margin-bottom: 8px; }
.perm-group h4 { margin: 0 0 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.perm-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.panel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); margin-bottom: var(--space-3); }
.detail-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.kv {
  overflow: hidden;
  padding: 0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,.08) 28%, transparent 48%),
    linear-gradient(180deg, #fffdf8 0%, #f6efe0 100%);
  border: 1px solid rgba(201, 162, 39, .4);
  box-shadow:
    0 1px 0 rgba(255,255,255,.88) inset,
    0 8px 16px rgba(26, 20, 12, .06);
}
.kv .k {
  padding: 7px 10px;
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #6b4e10;
  font-weight: 700;
  background: linear-gradient(180deg, #fff8e4 0%, #ecd9a4 100%);
  border-bottom: 2px solid #c9a227;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .72) inset;
}
.kv .v {
  padding: 8px 10px 10px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 0;
  line-height: 1.3;
}
.future-mods { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.future-mods .placeholder { margin: 0; }
.auth-card .form { gap: 10px; max-width: none; }
.card > .table-wrap { margin: 0; }
.card > h3 + .table-wrap { margin-top: 0; }
.card > .table-wrap th:first-child,
.card > .table-wrap td:first-child { padding-left: 12px; }
.card > .table-wrap th:last-child,
.card > .table-wrap td:last-child { padding-right: 12px; }

.alert.warning { background: #f8f1e4; color: #7a4b12; }
.hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.content > .hint,
.person-ops > .hint {
  color: #fff8e8;
  font-weight: 650;
  text-shadow: var(--on-photo);
}
.content > .hint a,
.person-ops > .hint a {
  color: #ffe7a3;
  font-weight: 700;
}
.nik-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  width: 100%;
}
.nik-head .nik-title { min-width: 0; }
.nik-count {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  text-align: right;
  white-space: nowrap;
}
.nik-count.is-wait { color: var(--blue); }
.nik-count.is-ok { color: #2d6a45; }
.nik-count.is-taken { color: var(--red); }
.match-card.is-taken { border-color: #d7b07a; background: #fbf6ec; }
.inline-check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
[hidden],
.is-hidden { display: none !important; }
.wizard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}
.wizard-nav button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: var(--radius);
  cursor: pointer;
}
.wizard-nav button.is-on {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.match-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  margin-bottom: 8px;
  display: grid;
  gap: 4px;
}
.match-card span { font-size: 12px; color: var(--muted); }
.match-actions { display: flex; gap: 6px; }
.profile-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.profile-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: #f3e6c4;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
}
.profile-meta h1 { margin: 0; }
.profile-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 0;
  padding: 0;
}
.tabs a {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
  color: #1a1408;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 39, .55);
  background: linear-gradient(180deg, #fff8e4 0%, #ecd9a4 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .72) inset,
    0 4px 10px rgba(26, 20, 12, .18);
  text-shadow: none;
}
.tabs a:hover {
  color: #1a1408;
  filter: brightness(1.04);
}
.tabs a.is-on {
  background: linear-gradient(180deg, #2a2a2e 0%, #111111 100%);
  border-color: rgba(232, 200, 120, .55);
  color: #fff8e8;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .18) inset,
    0 0 0 1px rgba(201, 162, 39, .28),
    0 4px 12px rgba(0, 0, 0, .28);
}
.inline-status { display: flex; gap: 4px; align-items: center; }
.inline-status select { min-width: 110px; }

@media (max-width: 1200px) {
  .form-canvas .form-row { grid-template-columns: 1fr 1fr; }
  .form-canvas [data-program-fields],
  .extra-group .fields-grid { grid-template-columns: 1fr 1fr; }
  .address-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .grid-4, .panel-grid, .future-mods { grid-template-columns: 1fr 1fr; }
  .grid-3, .grid-2, .form-row, .dl, .summary { grid-template-columns: 1fr; }
  .form-canvas .form-row,
  .form-canvas .form-row.cols-2 { grid-template-columns: 1fr 1fr; }
  .profile-head { grid-template-columns: auto 1fr; }
  .profile-actions { grid-column: 1 / -1; }
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 23, 41, .38);
  z-index: 18;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
}
.kv .v,
.breadcrumb,
td, th,
.dl dd {
  overflow-wrap: break-word;
  word-break: normal;
}
.wrap-long {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.truncate { overflow-wrap: normal; word-break: normal; }
.badge,
.btn,
.row-actions,
td.num,
th.num {
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 992px) {
  .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panel-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .guest-body { grid-template-columns: 1fr; }
  .guest-panel { min-height: auto; padding: var(--space-5); }
  .guest-panel h1 { font-size: 28px; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    z-index: 20;
    transition: transform .2s ease;
  }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.is-on { display: block; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 10px 12px 14px; }
  .topbar { padding: 6px 10px; height: auto; }
  .account-meta { display: none; }
  .filters { align-items: stretch; }
  .filters label { max-width: none; flex: 1 1 100%; }
  .filters-actions { height: auto; flex-wrap: wrap; }
  .form-canvas .form-row,
  .form-canvas .form-row.cols-2,
  .form-canvas [data-program-fields],
  .extra-group .fields-grid { grid-template-columns: 1fr; }
  .address-grid { grid-template-columns: 1fr; }
  .address-grid .span-2 { grid-column: auto; }
  .page-head { align-items: flex-start; }
  .pager { flex-wrap: wrap; justify-content: flex-start; }
}

@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2, .panel-grid, .future-mods, .summary {
    grid-template-columns: 1fr 1fr;
  }
  .form-row { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; }
  .detail-head { flex-wrap: wrap; }
}

@media (max-width: 576px) {
  .grid-4, .grid-3, .grid-2, .panel-grid, .future-mods, .summary {
    grid-template-columns: 1fr;
  }
  .filters label:first-child { max-width: none; }
  .form-actions .btn { flex: 0 1 auto; }
  .table-wrap.is-cards table { min-width: 0; }
  .table-wrap.is-cards thead { display: none; }
  .table-wrap.is-cards tbody tr {
    display: block;
    margin: 0 0 8px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
  }
  .table-wrap.is-cards tbody tr:nth-child(even),
  .table-wrap.is-cards tbody tr:hover { background: var(--surface); }
  .table-wrap.is-cards td {
    display: grid;
    grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
    align-items: start;
    gap: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    padding: 6px 4px;
    overflow-wrap: break-word;
    word-break: normal;
  }
  .table-wrap.is-cards td:last-child { border-bottom: 0; }
  .table-wrap.is-cards td::before {
    content: attr(data-label);
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .table-wrap.is-cards td:not([data-label])::before,
  .table-wrap.is-cards td[data-label=""]::before { content: none; }
  .table-wrap.is-cards td:not([data-label]),
  .table-wrap.is-cards td[data-label=""] { grid-template-columns: minmax(0, 1fr); }
  .table-wrap.is-cards td.num { text-align: left; width: auto; }
  .table-wrap.is-cards .row-actions { white-space: normal; flex-wrap: wrap; justify-content: flex-end; }
  .table-wrap.is-cards .badge { justify-self: start; }
  .card > .table-wrap.is-cards { margin: 0; }
}

@media (max-width: 480px) {
  html { font-size: 13px; }
  .page-head h1 { font-size: 20px; }
  .stat .value { font-size: 20px; }
  .auth-card { padding: var(--space-5) var(--space-4); }
}
