:root {
  --black: #080808;
  --coal: #111111;
  --panel: #171717;
  --panel-soft: #1d1d1d;
  --gold: #d6b676;
  --gold-bright: #efd69b;
  --cream: #f5f0e6;
  --muted: #a9a59d;
  --line: rgba(214, 182, 118, .19);
  --danger: #e27a6f;
  --success: #7cc69c;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .28);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--black); }
body { margin: 0; min-height: 100vh; background: var(--black); color: var(--cream); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.eyebrow { margin: 0 0 8px; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(380px, .8fr); background: radial-gradient(circle at 20% 18%, #242016 0, #0b0b0b 38%, #050505 78%); }
.auth-brand { min-height: 100vh; padding: clamp(44px, 7vw, 112px); display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); overflow: hidden; position: relative; }
.auth-brand::after { content: ""; position: absolute; width: 520px; height: 520px; right: -210px; bottom: -210px; border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 0 0 70px rgba(214,182,118,.025), 0 0 0 140px rgba(214,182,118,.018); }
.auth-brand > img { width: 180px; height: 82px; object-fit: contain; object-position: left; }
.auth-brand h1 { max-width: 790px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(48px, 6.2vw, 96px); font-weight: 400; line-height: .96; letter-spacing: -.045em; }
.auth-brand p:last-child { max-width: 620px; color: #c9c4b9; font-size: 18px; line-height: 1.65; }
.auth-card { align-self: center; width: min(430px, calc(100% - 48px)); margin: auto; padding: 42px; background: rgba(23,23,23,.83); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.auth-logo { display: none; width: 130px; height: 65px; object-fit: contain; object-position: left; margin-bottom: 24px; }
.auth-card h2 { margin: 0 0 30px; font-size: 29px; }
.auth-help { margin: 22px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.setup-login-link { width: 100%; margin-top: 24px; display: grid; place-items: center; }

.stack { display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: #d8d4cc; font-size: 13px; font-weight: 650; }
input, textarea, select { width: 100%; min-height: 46px; padding: 11px 13px; color: var(--cream); background: #0e0e0e; border: 1px solid #34322e; border-radius: 11px; outline: none; transition: border-color .2s, box-shadow .2s; }
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,182,118,.1); }
.check { display: flex; align-items: center; gap: 9px; font-weight: 450; }
.check input { width: 17px; min-height: 17px; accent-color: var(--gold); }
.button { min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 11px; color: var(--cream); background: #202020; font-weight: 750; }
.button.primary { color: #12100c; border-color: var(--gold); background: linear-gradient(135deg, var(--gold-bright), #bd9550); }
.button.ghost { color: var(--gold-bright); background: transparent; }
.button.danger { color: #ffd7d2; border-color: rgba(226,122,111,.3); background: rgba(226,122,111,.1); }
.button:disabled { cursor: wait; opacity: .55; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--gold-bright); background: #151515; font-size: 18px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px 20px; display: flex; flex-direction: column; background: #0c0c0c; border-right: 1px solid var(--line); }
.brand { display: block; padding: 0 11px 28px; border-bottom: 1px solid var(--line); }
.brand img { width: 112px; height: 56px; object-fit: contain; object-position: left; }
.sidebar nav { padding: 24px 0; display: grid; gap: 4px; overflow: auto; }
.nav-link { min-height: 43px; padding: 10px 12px; display: flex; align-items: center; gap: 11px; border-radius: 10px; color: #bdb8ae; font-size: 14px; font-weight: 650; }
.nav-link .nav-icon { width: 22px; color: var(--gold); font-size: 16px; text-align: center; }
.nav-link:hover, .nav-link.active { color: var(--cream); background: linear-gradient(90deg, rgba(214,182,118,.13), rgba(214,182,118,.03)); }
.nav-link.active { box-shadow: inset 2px 0 var(--gold); }
.sidebar-profile { margin-top: auto; padding: 14px 8px 2px; display: grid; grid-template-columns: 38px 1fr 34px; gap: 9px; align-items: center; border-top: 1px solid var(--line); }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; color: #17130c; background: var(--gold); border-radius: 50%; font-size: 12px; font-weight: 900; }
.sidebar-profile strong, .sidebar-profile small { display: block; max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-profile strong { font-size: 12px; }.sidebar-profile small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sidebar-profile .icon-button { width: 34px; height: 34px; font-size: 14px; }

.workspace { min-width: 0; background: radial-gradient(circle at 92% 0, rgba(214,182,118,.07), transparent 26%), #101010; }
.topbar { min-height: 112px; padding: 27px clamp(24px, 4vw, 54px) 22px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,.055); }
.topbar h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 3vw, 42px); font-weight: 400; letter-spacing: -.02em; }
.topbar-actions { display: flex; gap: 9px; }
.badge { position: relative; }
.badge[data-count]:not([data-count="0"])::after { content: attr(data-count); position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; color: #15100a; background: var(--gold-bright); border: 2px solid #101010; border-radius: 20px; font-size: 10px; font-weight: 900; }
.content { padding: clamp(22px, 4vw, 52px); outline: none; }
.hero { min-height: 270px; padding: clamp(28px, 4vw, 54px); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, .6fr); gap: 34px; align-items: end; background: linear-gradient(120deg, #211d14, #111 56%, #18150f); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; position: relative; }
.hero::after { content: "T3"; position: absolute; right: 2%; top: -36%; color: rgba(214,182,118,.035); font-family: Georgia, serif; font-size: 360px; line-height: 1; pointer-events: none; }
.hero h2 { max-width: 720px; margin: 0 0 15px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 5vw, 64px); font-weight: 400; line-height: 1.02; letter-spacing: -.035em; }
.hero p { max-width: 640px; margin: 0; color: #bbb6ac; line-height: 1.65; }
.hero-actions { display: grid; gap: 10px; position: relative; z-index: 1; }
.section-head { margin: 40px 0 18px; display: flex; justify-content: space-between; align-items: end; gap: 18px; }
.section-head h2 { margin: 0; font-size: 22px; }.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { min-width: 0; padding: 20px; background: var(--panel); border: 1px solid rgba(255,255,255,.07); border-radius: var(--radius); box-shadow: 0 8px 26px rgba(0,0,0,.12); }
.card.interactive { cursor: pointer; transition: transform .2s, border-color .2s; }.card.interactive:hover { transform: translateY(-2px); border-color: var(--line); }
.configuration-card h3 { margin-top: 16px; }.configuration-card[data-status="ready"] { border-color: rgba(124,198,156,.28); }.configuration-card[data-status="missing"] { border-color: rgba(226,122,111,.24); }
.card h3 { margin: 0 0 8px; font-size: 16px; }.card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.metric { min-height: 142px; display: flex; flex-direction: column; justify-content: space-between; }
.metric strong { color: var(--gold-bright); font-family: Georgia, serif; font-size: 34px; font-weight: 400; }
.metric span { color: var(--muted); font-size: 12px; }
.metric .metric-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--gold); background: rgba(214,182,118,.09); border-radius: 10px; }
.list { display: grid; gap: 11px; }.list-item { padding: 17px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; background: var(--panel); border: 1px solid rgba(255,255,255,.065); border-radius: 14px; }
.list-item h3 { margin: 0 0 5px; font-size: 15px; }.list-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.meta { display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--muted); font-size: 12px; }
.pill { width: max-content; padding: 5px 9px; color: var(--gold-bright); background: rgba(214,182,118,.1); border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.empty { padding: 46px 24px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed #3b3933; border-radius: var(--radius); }
.searchbar { margin-bottom: 20px; display: grid; grid-template-columns: minmax(200px, 1fr) repeat(2, minmax(130px, .3fr)) auto; gap: 10px; }
.person { display: grid; grid-template-columns: 48px 1fr; gap: 13px; align-items: center; }.person .avatar { width: 48px; height: 48px; }
.person strong, .person small { display: block; }.person small { margin-top: 4px; color: var(--muted); }
.value { color: var(--gold-bright); font-family: Georgia, serif; font-size: 24px; }
.card-ticket { min-height: 250px; padding: 26px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(135deg, #272116, #0e0e0e 58%); border: 1px solid rgba(239,214,155,.35); border-radius: 22px; position: relative; overflow: hidden; }
.card-ticket::before { content: ""; width: 240px; height: 240px; position: absolute; right: -90px; top: -100px; border: 1px solid rgba(214,182,118,.16); border-radius: 50%; box-shadow: 0 0 0 40px rgba(214,182,118,.03), 0 0 0 80px rgba(214,182,118,.02); }
.card-ticket img { width: 84px; height: 42px; object-fit: contain; object-position: left; }.card-ticket h3 { margin: 0; font-size: 22px; }.card-ticket p { color: #bfb8a9; }.card-number { color: var(--gold-bright); letter-spacing: .18em; }
.mobile-nav { display: none; }

dialog { width: min(650px, calc(100% - 32px)); max-height: min(84vh, 840px); padding: 0; color: var(--cream); background: #151515; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: auto; }
dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(4px); }
.modal-head { position: sticky; top: 0; z-index: 2; padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; background: rgba(21,21,21,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.modal-head h2 { margin: 0; font-size: 23px; }.modal-head + div { padding: 24px; }
.toast { position: fixed; z-index: 99; right: 22px; bottom: 22px; max-width: 390px; padding: 14px 17px; color: #15100a; background: var(--gold-bright); border-radius: 11px; box-shadow: var(--shadow); font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }.toast.error { color: #fff; background: #9b4138; }

@media (max-width: 1050px) {
  .grid.four { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .auth-shell { display: block; padding: 28px 0; background: radial-gradient(circle at 50% 0, #272116, #080808 45%); }
  .auth-brand { display: none; }.auth-card { margin: 42px auto; padding: 28px; }.auth-logo { display: block; }
  .app-shell { display: block; padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }.workspace { min-height: 100vh; }.topbar { min-height: 90px; padding: 20px; }.topbar h1 { font-size: 30px; }.content { padding: 20px; }
  .mobile-nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(66px + env(safe-area-inset-bottom)); padding: 7px 8px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(10,10,10,.96); border-top: 1px solid var(--line); backdrop-filter: blur(18px); }
  .mobile-nav .nav-link { min-width: 0; padding: 6px 2px; display: flex; flex-direction: column; justify-content: center; gap: 3px; font-size: 9px; text-align: center; }.mobile-nav .nav-icon { width: auto; font-size: 17px; }.mobile-nav .nav-link.active { box-shadow: none; }
  .hero { min-height: 300px; padding: 28px 23px; }.hero h2 { font-size: 39px; }.hero-actions { grid-template-columns: 1fr 1fr; }.hero::after { font-size: 250px; }
  .grid, .grid.two, .grid.four { grid-template-columns: 1fr; }.metric { min-height: 116px; }.grid.four { grid-template-columns: repeat(2, 1fr); }.metric strong { font-size: 27px; }
  .searchbar { grid-template-columns: 1fr 1fr; }.searchbar input { grid-column: 1 / -1; }.searchbar .button { grid-column: 1 / -1; }
  .list-item { grid-template-columns: 1fr; }.list-item > .button { width: 100%; }.section-head { align-items: start; }
  .toast { left: 16px; right: 16px; bottom: 84px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
