:root {
    --ink: #101218;
    --muted: #6c7180;
    --line: #e5e8ed;
    --surface: #ffffff;
    --canvas: #f3f5f7;
    --sidebar: #121419;
    --sidebar-muted: #8f95a3;
    --accent: #d8ff3e;
    --accent-strong: #b8e800;
    --blue: #4568ff;
    --amber: #f3a91b;
    --green: #18a66a;
    --radius-lg: 22px;
    --radius-md: 15px;
    --shadow: 0 14px 40px rgba(20, 24, 34, 0.065);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    display: flex;
    width: 244px;
    flex-direction: column;
    padding: 30px 20px 24px;
    color: #fff;
    background:
        radial-gradient(circle at 28px 94%, rgba(216, 255, 62, 0.09), transparent 25%),
        var(--sidebar);
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-mark {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 11px;
    color: #101218;
    background: var(--accent);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.05em;
    transform: skew(-5deg);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font-size: 19px; letter-spacing: 0.09em; }
.brand-copy small { margin-top: 6px; color: var(--sidebar-muted); font-size: 10px; font-weight: 700; letter-spacing: 0.18em; }

.main-nav { margin-top: 60px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 13px;
    color: var(--sidebar-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 650;
}
.nav-item svg { width: 21px; height: 21px; }
.nav-item.active { color: #fff; background: rgba(255,255,255,0.085); box-shadow: inset 3px 0 var(--accent); }

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: auto;
    padding: 15px 8px 0;
    border-top: 1px solid rgba(255,255,255,0.09);
}
.sidebar-footer > div:last-child { display: flex; flex-direction: column; }
.sidebar-footer strong { font-size: 13px; }
.sidebar-footer small { margin-top: 2px; color: var(--sidebar-muted); font-size: 11px; }
.connection-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 5px rgba(243,169,27,.12); }
.connection-dot.online { background: var(--accent); box-shadow: 0 0 0 5px rgba(216,255,62,.12); }
.connection-dot.error { background: #ff6363; box-shadow: 0 0 0 5px rgba(255,99,99,.12); }

.workspace { min-height: 100vh; margin-left: 244px; padding: 38px clamp(24px, 4vw, 64px) 28px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1480px; margin: 0 auto 28px; }
.eyebrow, .section-kicker { margin: 0 0 3px; color: #858b99; font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.topbar h1 { margin: 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; letter-spacing: -.045em; }

.sync-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 208px;
    padding: 11px 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.72);
}
.sync-chip > span:last-child { display: flex; flex-direction: column; }
.sync-chip small { color: var(--muted); font-size: 11px; }
.sync-chip strong { font-size: 13px; font-weight: 750; }
.pulse { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(24,166,106,.1); }

.search-panel, .table-card, .spotlight-card, .metric-card { border: 1px solid rgba(216,220,227,.88); background: var(--surface); box-shadow: var(--shadow); }
.search-panel { max-width: 1480px; margin: 0 auto; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-lg); }
.search-heading, .table-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.search-heading h2, .table-heading h2 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.025em; }
.demo-badge { padding: 6px 9px; border: 1px solid #eadb96; border-radius: 8px; color: #725c00; background: #fff9d9; font-size: 10px; font-weight: 850; letter-spacing: .08em; }

.search-form { display: grid; grid-template-columns: minmax(280px, 1fr) 155px 145px 136px; gap: 12px; margin-top: 24px; }
.search-field, .select-field { border: 1px solid var(--line); background: #f8f9fb; transition: border-color .15s, box-shadow .15s, background .15s; }
.search-field:focus-within, .select-field:focus-within { border-color: #9eac54; background: #fff; box-shadow: 0 0 0 4px rgba(216,255,62,.18); }
.search-field { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; border-radius: 14px; }
.search-field svg { width: 21px; color: #7f8490; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-weight: 600; }
.search-field input::placeholder { color: #969ba6; font-weight: 500; }
.select-field { display: flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 7px 13px; border-radius: 14px; }
.select-field span { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.select-field select { width: 100%; margin-left: -4px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; font-weight: 700; }
.primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    border: 0;
    border-radius: 14px;
    color: #111318;
    background: var(--accent);
    font-weight: 800;
    box-shadow: inset 0 -2px rgba(0,0,0,.08);
    transition: transform .15s, background .15s;
}
.primary-button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.primary-button:active { transform: translateY(0); }
.primary-button:disabled { cursor: wait; opacity: .65; transform: none; }
.primary-button svg { width: 18px; }

.overview-grid { display: grid; grid-template-columns: minmax(330px, 1.75fr) repeat(3, minmax(150px, .72fr)); gap: 14px; max-width: 1480px; margin: 14px auto; }
.spotlight-card { position: relative; overflow: hidden; padding: 24px 26px; border-radius: var(--radius-lg); color: #fff; background: #191c23; }
.spotlight-card::after { content: ""; position: absolute; right: -30px; bottom: -65px; width: 180px; height: 180px; border: 28px solid rgba(216,255,62,.09); border-radius: 50%; }
.spotlight-topline { display: flex; align-items: center; gap: 9px; color: #c5c9d1; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.trophy-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: var(--accent); background: rgba(216,255,62,.11); }
.trophy-icon svg { width: 16px; }
.spotlight-content { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 25px; }
.spotlight-content h2 { max-width: 380px; margin: 0; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.2; letter-spacing: -.025em; }
.spotlight-content p { margin: 7px 0 0; color: #9ea4b1; font-size: 13px; }
.sales-number { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; }
.sales-number strong { color: var(--accent); font-size: clamp(30px, 3vw, 43px); line-height: 1; letter-spacing: -.045em; }
.sales-number span { margin-top: 5px; color: #a8adb7; font-size: 11px; }

.metric-card { position: relative; display: flex; min-height: 160px; flex-direction: column; justify-content: center; padding: 22px; overflow: hidden; border-radius: var(--radius-lg); }
.metric-card::before { content: ""; position: absolute; top: 23px; right: 20px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 10%, transparent); }
.metric-card > span { color: var(--muted); font-size: 13px; font-weight: 650; }
.metric-card strong { margin: 8px 0 4px; color: var(--ink); font-size: clamp(32px, 3vw, 42px); line-height: 1; letter-spacing: -.045em; }
.metric-card small { color: #9499a4; font-size: 11px; }
.metric-card.total { color: var(--blue); }
.metric-card.reserved { color: var(--amber); }
.metric-card.available { color: var(--green); }

.table-card { max-width: 1480px; margin: 0 auto; padding: 26px 0 4px; border-radius: var(--radius-lg); overflow: hidden; }
.table-heading { padding: 0 26px 22px; }
.result-count { padding: 7px 11px; border-radius: 9px; color: #565c69; background: #f0f2f5; font-size: 12px; font-weight: 700; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 15px 20px; text-align: left; }
th { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #767c89; background: #f8f9fb; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
td { border-bottom: 1px solid #edf0f3; color: #3b404b; font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcf7; }
td:first-child { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; font-weight: 750; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.available-value { color: var(--green); font-weight: 850; }
.reserved-value { color: #a36d00; }
.pill { display: inline-grid; min-width: 32px; min-height: 26px; place-items: center; padding: 2px 8px; border: 1px solid #e1e4e9; border-radius: 8px; background: #f8f9fb; font-size: 12px; font-weight: 750; }
.color-cell { display: flex; align-items: center; gap: 9px; }
.color-swatch { width: 9px; height: 9px; flex: 0 0 auto; border: 1px solid rgba(0,0,0,.13); border-radius: 50%; background: #bbb; }
.state-message { margin: 0 26px 22px; padding: 26px; border: 1px dashed #d7dbe1; border-radius: 14px; color: var(--muted); background: #fafbfc; text-align: center; }
.state-message.error { border-color: #f2c9c9; color: #a43a3a; background: #fff7f7; }
.page-footer { max-width: 1480px; margin: 22px auto 0; color: #999eaa; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-align: right; }

@media (max-width: 1120px) {
    .overview-grid { grid-template-columns: repeat(3, 1fr); }
    .spotlight-card { grid-column: 1 / -1; }
    .search-form { grid-template-columns: 1fr 1fr 1fr; }
    .search-field { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .sidebar { position: static; width: 100%; height: 72px; flex-direction: row; align-items: center; justify-content: space-between; padding: 0 18px; }
    .brand-mark { width: 36px; height: 36px; }
    .main-nav { margin: 0; }
    .nav-item { min-height: 42px; padding: 0 12px; }
    .sidebar-footer { display: none; }
    .workspace { margin-left: 0; padding: 24px 15px; }
    .topbar { align-items: flex-start; }
    .sync-chip { min-width: 0; padding: 9px 11px; }
    .sync-chip small { display: none; }
    .search-panel { padding: 21px 17px; border-radius: 18px; }
    .search-form { grid-template-columns: 1fr 1fr; }
    .search-field, .primary-button { grid-column: 1 / -1; }
    .overview-grid { grid-template-columns: 1fr 1fr; }
    .spotlight-card, .metric-card.available { grid-column: 1 / -1; }
    .spotlight-content { align-items: flex-start; flex-direction: column; }
    .sales-number { align-items: flex-start; }
    .metric-card { min-height: 138px; }
    .table-heading { padding-inline: 18px; }
    th, td { padding-inline: 16px; }
}

@media (max-width: 470px) {
    .brand-copy small { display: none; }
    .sync-chip { background: transparent; border: 0; padding-right: 0; }
    .search-heading { align-items: flex-start; flex-direction: column; }
    .overview-grid { grid-template-columns: 1fr; }
    .spotlight-card, .metric-card.available { grid-column: auto; }
}

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

