:root {
    --s-bg: #07080c;
    --s-card: #12141c;
    --s-card2: #1a1d27;
    --s-line: rgba(255,255,255,.08);
    --s-text: #f4f6fb;
    --s-muted: #8b93a7;
    --s-accent: #7c5cff;
    --s-accent2: #22d3ee;
    --s-ok: #34d399;
    --s-warn: #fbbf24;
    --s-hot: #fb7185;
    --s-safe-t: env(safe-area-inset-top, 0px);
    --s-safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
html, body { height: 100%; }
body.staff-app {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--s-bg);
    color: var(--s-text);
    overscroll-behavior-y: contain;
}
body.staff-app.locked { overflow: hidden; }

.s-pin {
    min-height: 100%;
    padding: calc(48px + var(--s-safe-t)) 24px calc(32px + var(--s-safe-b));
    display: flex; flex-direction: column; align-items: center;
    background: radial-gradient(1200px 500px at 50% -10%, rgba(124,92,255,.35), transparent 55%), var(--s-bg);
}
.s-pin-logo {
    width: 72px; height: 72px; border-radius: 22px;
    background: linear-gradient(135deg, var(--s-accent), var(--s-accent2));
    display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
    box-shadow: 0 20px 50px -16px #7c5cff;
    margin-bottom: 18px;
}
.s-pin h1 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em; }
.s-pin p { color: var(--s-muted); font-weight: 600; margin: 8px 0 22px; text-align: center; }
.s-pin input.slug {
    width: 100%; max-width: 340px; background: var(--s-card); border: 1px solid var(--s-line);
    color: #fff; border-radius: 16px; padding: 14px 16px; font: inherit; font-weight: 700; margin-bottom: 18px;
}
.s-dots { display: flex; gap: 12px; margin-bottom: 22px; }
.s-dots i {
    width: 14px; height: 14px; border-radius: 50%; border: 2px solid #3f4558;
}
.s-dots i.on { background: #fff; border-color: #fff; }
.s-pad {
    display: grid; grid-template-columns: repeat(3, 78px); gap: 14px; justify-content: center;
}
.s-pad button {
    width: 78px; height: 78px; border: 0; border-radius: 50%;
    background: var(--s-card); color: #fff; font-size: 1.45rem; font-weight: 700; font-family: inherit;
}
.s-pad button:active { transform: scale(.94); background: #252836; }
.s-pin-err { color: var(--s-hot); font-weight: 700; min-height: 22px; margin-bottom: 10px; font-size: .88rem; }
.s-admin {
    margin-top: 22px; background: none; border: 0; color: var(--s-accent2); font-weight: 800; font-family: inherit;
}

.s-shell { display: none; min-height: 100%; padding-bottom: calc(84px + var(--s-safe-b)); }
.s-shell.on { display: block; }
.s-top {
    position: sticky; top: 0; z-index: 20;
    padding: calc(10px + var(--s-safe-t)) 16px 12px;
    background: rgba(7,8,12,.88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.s-who { min-width: 0; }
.s-who strong { display: block; font-size: 1.02rem; }
.s-who span { color: var(--s-muted); font-size: .75rem; font-weight: 700; }
.s-live {
    display: flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800;
    background: rgba(52,211,153,.12); color: var(--s-ok); border-radius: 999px; padding: 6px 10px;
}
.s-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--s-ok); animation: sPulse 1.3s infinite; }
@keyframes sPulse { 50% { opacity: .4; transform: scale(1.25); } }

.s-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 16px 12px;
}
.s-stat {
    background: var(--s-card); border-radius: 16px; padding: 10px 8px; text-align: center;
}
.s-stat b { display: block; font-size: 1.05rem; }
.s-stat span { color: var(--s-muted); font-size: .65rem; font-weight: 700; }

.s-page { display: none; padding: 0 16px 20px; }
.s-page.on { display: block; }

.s-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.s-table {
    background: var(--s-card); border-radius: 18px; padding: 14px 10px 12px; text-align: center;
    border: 1px solid transparent; min-height: 92px;
}
.s-table b { display: block; font-size: 1.05rem; }
.s-table small { color: var(--s-muted); font-weight: 700; }
.s-table.dolu { border-color: rgba(124,92,255,.45); }
.s-table.hazir { border-color: rgba(52,211,153,.6); box-shadow: 0 0 0 1px rgba(52,211,153,.2); }
.s-table.cagri { border-color: rgba(251,113,133,.7); animation: sBlink .9s infinite; }
@keyframes sBlink { 50% { background: #2a1520; } }

.s-kds { display: flex; flex-direction: column; gap: 12px; }
.s-ticket {
    background: var(--s-card); border-radius: 20px; padding: 14px;
    border-left: 4px solid var(--s-accent);
}
.s-ticket.hazirlaniyor { border-color: var(--s-warn); }
.s-ticket.hazir { border-color: var(--s-ok); }
.s-ticket-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.s-ticket-hd strong { font-size: 1.05rem; }
.s-item { display: flex; justify-content: space-between; padding: 6px 0; color: #d5d9e6; font-weight: 600; font-size: .9rem; }
.s-actions { display: flex; gap: 8px; margin-top: 10px; }
.s-btn {
    flex: 1; border: 0; border-radius: 14px; padding: 12px 8px; font-weight: 800; font-family: inherit; color: #081018;
    background: linear-gradient(135deg, var(--s-accent), #9b8cff);
}
.s-btn.ok { background: linear-gradient(135deg, #34d399, #6ee7b7); }
.s-btn.ghost { background: #252836; color: #fff; }
.s-btn.hot { background: linear-gradient(135deg, #fb7185, #f43f5e); color: #fff; }

.s-feed { display: flex; flex-direction: column; gap: 10px; }
.s-ev {
    display: flex; gap: 12px; background: var(--s-card); border-radius: 18px; padding: 12px 14px;
}
.s-ev .dot {
    width: 38px; height: 38px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    background: #252836; flex-shrink: 0;
}
.s-ev b { display: block; font-size: .92rem; }
.s-ev p { color: var(--s-muted); font-size: .78rem; font-weight: 600; margin-top: 2px; }
.s-ev time { color: #64708a; font-size: .72rem; font-weight: 700; }

.s-tabbar {
    position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--s-safe-b));
    height: 64px; background: rgba(18,20,28,.94); border: 1px solid var(--s-line);
    border-radius: 22px; display: flex; z-index: 40; padding: 4px;
    box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.s-tab {
    flex: 1; background: none; border: 0; color: #6b7388; font-size: .68rem; font-weight: 800;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-family: inherit; position: relative;
}
.s-tab i { font-size: 1.05rem; }
.s-tab.on { color: #fff; }
.s-badge {
    position: absolute; top: 4px; right: 18%; min-width: 16px; height: 16px; border-radius: 99px;
    background: var(--s-hot); color: #fff; font-size: .62rem; display: none; align-items: center; justify-content: center; padding: 0 4px;
}

.s-sheet-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; }
.s-sheet-bg.on { display: block; }
.s-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: #161822; border-radius: 28px 28px 0 0;
    padding: 10px 16px calc(24px + var(--s-safe-b));
    transform: translateY(110%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
    max-height: 90vh; overflow: auto;
}
.s-sheet.on { transform: none; }
.s-handle { width: 42px; height: 5px; background: #2d3142; border-radius: 99px; margin: 6px auto 12px; }
.s-search {
    width: 100%; background: #0d0f16; border: 1px solid var(--s-line); color: #fff;
    border-radius: 14px; padding: 12px 14px; font: inherit; font-weight: 600; margin: 8px 0 12px;
}
.s-prod {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--s-line); font-weight: 700;
}
.s-prod button {
    width: 32px; height: 32px; border: 0; border-radius: 10px; background: var(--s-accent); color: #fff; font-weight: 800;
}
.s-toast {
    position: fixed; top: calc(16px + var(--s-safe-t)); left: 50%; transform: translateX(-50%) translateY(-16px);
    background: #fff; color: #0b1020; padding: 10px 16px; border-radius: 999px; font-weight: 800; font-size: .82rem;
    opacity: 0; z-index: 80; pointer-events: none; transition: .22s;
}
.s-toast.on { opacity: 1; transform: translateX(-50%); }
.s-empty { text-align: center; color: var(--s-muted); padding: 40px 10px; font-weight: 700; }
.s-legal { font-size: .68rem; color: #6b7388; line-height: 1.45; padding: 8px 4px 20px; }

@media (min-width: 720px) {
    body.staff-app { max-width: 430px; margin: 0 auto; box-shadow: 0 0 0 14px #11131a; }
}
