:root {
    --bg: #09090b;
    --bg-2: #111117;
    --panel: rgba(17, 17, 23, 0.86);
    --panel-2: rgba(25, 25, 33, 0.92);
    --line: rgba(255, 149, 0, 0.16);
    --line-soft: rgba(255, 255, 255, 0.06);
    --text: #fafafc;
    --muted: #a6a7b3;
    --accent: #ff8a00;
    --accent-2: #ffb14a;
    --accent-3: #ff5e00;
    --success: #4ad395;
    --danger: #ff6b6b;
    --blue: #7ea7ff;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    --radius: 26px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 138, 0, 0.12), transparent 22%),
        radial-gradient(circle at 85% 10%, rgba(255, 94, 0, 0.10), transparent 20%),
        radial-gradient(circle at 50% 100%, rgba(255, 177, 74, 0.07), transparent 30%),
        linear-gradient(180deg, #08080a 0%, #0d0d12 45%, #09090b 100%);
}

a { color: inherit; text-decoration: none; }
strong { font-weight: 800; }
pre { margin: 12px 0 0; white-space: pre-wrap; word-break: break-word; }
code {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    padding: 3px 8px;
    border-radius: 10px;
}

.bg-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 0% 0%, rgba(255,140,0,.10), transparent 30%),
        radial-gradient(circle at 100% 0%, rgba(255,100,0,.08), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(255,160,0,.07), transparent 30%);
}

.login-page, .public-page {
    display: grid;
    place-items: center;
    padding: 28px;
}

.login-shell,
.public-wrap {
    width: 100%;
    max-width: 1180px;
    display: grid;
    gap: 22px;
}

.public-wrap.large { max-width: 1080px; }

.hero-card,
.login-card,
.card,
.stat-card,
.sidebar {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.hero-card::before,
.login-card::before,
.card::before,
.stat-card::before,
.sidebar::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0));
    pointer-events: none;
}

.hero-card {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 24px;
    padding: 30px;
    overflow: hidden;
}

.compact-hero { grid-template-columns: 1fr .55fr; }

.hero-card::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -100px;
    top: -100px;
    background: radial-gradient(circle, rgba(255,140,0,.18), transparent 60%);
    pointer-events: none;
}

.hero-text { max-width: 720px; line-height: 1.6; }
.hero-side-glass {
    align-self: stretch;
    display: grid;
    gap: 14px;
    align-content: center;
}
.mini-stat {
    padding: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 22px;
}
.mini-stat span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
    font-size: 13px;
}
.mini-stat strong { font-size: 20px; }

.brand-mark {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
    color: #150e04;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1px;
    box-shadow: 0 16px 40px rgba(255, 138, 0, 0.32);
}

.logo-row {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

.eyebrow {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 138, 0, 0.10);
    border: 1px solid rgba(255, 138, 0, 0.18);
    color: #ffd19a;
    font-size: 12px;
    letter-spacing: .8px;
    text-transform: uppercase;
}

h1, h2, h3 { margin: 0 0 10px; }
h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.05; }
h2 { font-size: 24px; }
h3 { font-size: 22px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.center { text-align: center; }

.login-card,
.card,
.stat-card { padding: 24px; }
.glass-card { background: rgba(15, 15, 20, 0.88); }
.install-card { max-width: 620px; }
.login-form,
.stack-gap { display: grid; gap: 14px; }
.stack-small { display: grid; gap: 10px; }
.form-grid,
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.form-grid-single { display: grid; gap: 14px; }
.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.choice-card {
    position: relative;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    cursor: pointer;
    overflow: hidden;
}
.choice-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.choice-card span {
    display: block;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}
.choice-card small { color: var(--muted); }
.choice-card:has(input:checked) {
    border-color: rgba(255, 138, 0, 0.5);
    box-shadow: inset 0 0 0 1px rgba(255, 138, 0, 0.14), 0 14px 34px rgba(255, 138, 0, 0.12);
}

input, textarea, select {
    width: 100%;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(10, 10, 14, 0.86);
    color: var(--text);
    border-radius: 16px;
    padding: 15px 16px;
    outline: none;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: rgba(255,140,0,.48);
    box-shadow: 0 0 0 4px rgba(255,140,0,.08);
    transform: translateY(-1px);
}

textarea { resize: vertical; min-height: 130px; }

.btn {
    border: 0;
    border-radius: 16px;
    padding: 13px 18px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-wide { width: 100%; }
.btn-primary {
    color: #140d04;
    background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
    box-shadow: 0 16px 32px rgba(255, 138, 0, 0.28);
}
.btn-secondary,
.btn-mini {
    background: rgba(255,255,255,.05);
    color: var(--text);
    border: 1px solid rgba(255,255,255,.08);
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255,255,255,.12);
}
.btn-mini {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 12px;
}
.btn.danger {
    color: white;
    background: rgba(255,107,107,.16);
    border: 1px solid rgba(255,107,107,.24);
}

.alert,
.hint-box,
.link-box,
.empty-state,
.issued-item {
    border-radius: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.03);
}
.alert { margin-bottom: 18px; }
.alert.success,
.success-box {
    background: rgba(74,211,149,.10);
    border-color: rgba(74,211,149,.18);
}
.alert.error {
    background: rgba(255,107,107,.10);
    border-color: rgba(255,107,107,.18);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px 1fr;
}

.sidebar {
    padding: 28px;
    border-right: 1px solid var(--line);
    background: rgba(12, 12, 16, 0.92);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-text { margin: 14px 0 22px; line-height: 1.6; }
.side-nav {
    display: grid;
    gap: 8px;
}
.side-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
}
.side-nav a:hover { border-color: rgba(255,138,0,.18); }

.content { padding: 28px; }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.order-card { padding: 28px; }
.form-card { min-height: 100%; }
.form-grid { margin-bottom: 20px; }
.panel.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    gap: 16px;
    margin: 20px 0;
}
.stats-grid.six { grid-template-columns: repeat(6, 1fr); }
.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}
.stat-card strong { font-size: 30px; }

.table-card { margin-bottom: 20px; }
.table-wrap {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
    background: rgba(255,255,255,.01);
}
th, td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    text-align: left;
    vertical-align: top;
}
th {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .6px;
    text-transform: uppercase;
    background: rgba(255,255,255,.02);
}
tr:hover td { background: rgba(255,255,255,.01); }

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.inline-form.compact { min-width: 0; }
.wrap-mobile { flex-wrap: wrap; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.manage-list { margin-top: 16px; }
.add-row { margin-bottom: 16px; }
.compact-box { min-width: 260px; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    border: 1px solid transparent;
}
.badge.available {
    background: rgba(74,211,149,.10);
    color: #8de8b8;
    border-color: rgba(74,211,149,.18);
}
.badge.occupied {
    background: rgba(255,107,107,.10);
    color: #ffb0b0;
    border-color: rgba(255,107,107,.18);
}
.badge-order.status-new {
    background: rgba(255,138,0,.12);
    color: #ffcc8b;
    border-color: rgba(255,138,0,.18);
}
.badge-order.status-processing {
    background: rgba(126,167,255,.12);
    color: #a8c1ff;
    border-color: rgba(126,167,255,.18);
}
.badge-order.status-done {
    background: rgba(74,211,149,.12);
    color: #8de8b8;
    border-color: rgba(74,211,149,.18);
}
.badge-order.status-cancelled {
    background: rgba(255,107,107,.12);
    color: #ffb0b0;
    border-color: rgba(255,107,107,.18);
}

.issued-list {
    display: grid;
    gap: 14px;
}
.issued-item {
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}
.issued-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}
.empty-state {
    color: var(--muted);
    text-align: center;
    padding: 28px;
}

@media (max-width: 1280px) {
    .stats-grid.six { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
    .hero-card,
    .compact-hero,
    .form-grid,
    .panel.two-col,
    .info-grid,
    .choice-grid { grid-template-columns: 1fr; }
    .content, .login-page, .public-page { padding: 18px; }
    .stats-grid.six { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    h1 { font-size: 30px; }
    .stats-grid.six { grid-template-columns: 1fr; }
    .card, .login-card, .hero-card, .stat-card, .sidebar { padding: 18px; }
}

.inner-card {
    padding: 20px;
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.06);
}
.manage-chip {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
    border: 1px solid rgba(255,255,255,.06);
}
.cards-list { display: grid; gap: 12px; }
.filters-row { align-items: center; }
.search-card { margin-bottom: 20px; }
.small-empty { min-height: auto; padding: 20px; }
.success-box { margin-bottom: 16px; }
.link-box {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(74, 211, 149, 0.08);
    border: 1px solid rgba(74, 211, 149, 0.18);
}


.issued-number strong { font-size: 28px; font-weight: 900; letter-spacing: .4px; color: #ffd39a; }
.elevated-block { margin-top: 12px; }
.notify-card { align-self: start; }
.table-card .section-head { margin-bottom: 14px; }
.table-wrap table tbody tr td { padding-top: 16px; padding-bottom: 16px; }


.status-strip {
    padding: 16px 22px;
    margin-bottom: 18px;
}
.status-strip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.status-live {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}
.live-dot,
.signal-dot,
.red-mark {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #ff4d4f;
    box-shadow: 0 0 0 6px rgba(255, 77, 79, 0.12);
}
.live-dot {
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(255, 138, 0, 0.12);
}
.indicator-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.signal-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    color: var(--text);
}
.signal-pill.danger,
.stat-danger {
    border-color: rgba(255, 77, 79, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 77, 79, 0.08), 0 16px 30px rgba(255, 77, 79, 0.09);
}
.stat-hot span {
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 2, 4, 0.72);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
}
.modal-backdrop.show {
    display: flex;
}
.modal-card {
    width: min(520px, 100%);
    background: linear-gradient(180deg, rgba(18,18,24,.97), rgba(12,12,16,.96));
    border: 1px solid rgba(255, 138, 0, 0.2);
    border-radius: 28px;
    box-shadow: 0 40px 100px rgba(0,0,0,.55);
    padding: 28px;
}
@media (max-width: 720px) {
    .status-strip-row { align-items: stretch; }
    .indicator-row { width: 100%; }
    .signal-pill { width: 100%; justify-content: center; }
}


.order-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255,149,0,.22), rgba(255,94,0,.18));
    border: 1px solid rgba(255,149,0,.28);
    color: #ffd39a;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: .2px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 24px rgba(255,149,0,.10);
}

.copy-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.copy-btn.copied {
    border-color: rgba(74,211,149,.26);
    background: rgba(74,211,149,.14);
    color: #9af0c0;
}

.code-copy-row {
    margin-top: 8px;
}

.code-pre {
    margin: 0;
    flex: 1 1 260px;
}

@media (max-width: 820px) {
    .order-category-badge {
        font-size: 22px;
        padding: 10px 16px;
    }
    .hero-side-glass .order-category-badge {
        font-size: 20px;
    }
    .copy-line {
        align-items: stretch;
    }
    .copy-line .copy-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .order-category-badge {
        font-size: 24px;
        padding: 10px 16px;
    }
    .mini-stat strong.order-category-badge {
        display: inline-flex;
    }
}
