/* =====================================================================
   Sube terminali - dokunmatik ekran icin buyuk hedefli arayuz
   ===================================================================== */

:root {
    --t-bg: #0f172a;
    --t-card: #1e293b;
    --t-card-2: #273449;
    --t-line: #334155;
    --t-text: #f1f5f9;
    --t-muted: #94a3b8;
    --t-blue: #3b82f6;
    --t-green: #22c55e;
    --t-amber: #f59e0b;
    --t-purple: #a855f7;
    --t-red: #ef4444;
}

* { box-sizing: border-box; }

body.terminal {
    margin: 0;
    background: var(--t-bg);
    color: var(--t-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    min-height: 100vh;
    -webkit-user-select: none;
    user-select: none;
    overflow-x: hidden;
}

.t-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 26px;
    border-bottom: 1px solid var(--t-line);
    background: #111c33;
    position: sticky;
    top: 0;
    z-index: 10;
}
.t-branch { font-size: 19px; font-weight: 650; letter-spacing: .2px; }
.t-branch small { display: block; font-size: 12px; color: var(--t-muted); font-weight: 400; margin-top: 2px; }
.t-clock { text-align: right; }
.t-clock .time { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -1px; }
.t-clock .date { font-size: 12.5px; color: var(--t-muted); margin-top: 4px; }

.t-body { padding: 22px 26px 40px; max-width: 1400px; margin: 0 auto; }

.t-search { margin-bottom: 18px; }
.t-search input {
    width: 100%;
    padding: 14px 18px;
    font-size: 17px;
    border-radius: 12px;
    border: 1px solid var(--t-line);
    background: var(--t-card);
    color: var(--t-text);
    font-family: inherit;
}
.t-search input::placeholder { color: #64748b; }
.t-search input:focus { outline: none; border-color: var(--t-blue); }

.t-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 13px;
}

.t-emp {
    background: var(--t-card);
    border: 1px solid var(--t-line);
    border-radius: 13px;
    padding: 15px 16px;
    cursor: pointer;
    text-align: left;
    color: inherit;
    font-family: inherit;
    transition: transform .1s, border-color .12s, background .12s;
    border-left: 4px solid var(--t-line);
}
.t-emp:hover, .t-emp:active { background: var(--t-card-2); transform: translateY(-1px); }
.t-emp.s-working  { border-left-color: var(--t-green); }
.t-emp.s-on_break { border-left-color: var(--t-amber); }
.t-emp.s-on_meal  { border-left-color: var(--t-purple); }
.t-emp.s-finished { border-left-color: #475569; opacity: .62; }

.t-emp .name { font-size: 15.5px; font-weight: 650; line-height: 1.3; }
.t-emp .pos { font-size: 12px; color: var(--t-muted); margin-top: 3px; }
.t-emp .row { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; gap: 8px; }
.t-emp .plan { font-size: 12px; color: #cbd5e1; font-variant-numeric: tabular-nums; }

.t-state {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
}
.st-none     { background: #334155; color: #cbd5e1; }
.st-working  { background: rgba(34, 197, 94, .18); color: #4ade80; }
.st-on_break { background: rgba(245, 158, 11, .18); color: #fbbf24; }
.st-on_meal  { background: rgba(168, 85, 247, .18); color: #c084fc; }
.st-finished { background: #334155; color: #94a3b8; }

/* ---------- Modal ---------- */
.t-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, .82);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    backdrop-filter: blur(3px);
}
.t-modal.open { display: flex; }

.t-modal-box {
    background: var(--t-card);
    border: 1px solid var(--t-line);
    border-radius: 18px;
    width: 100%;
    max-width: 460px;
    padding: 26px;
    text-align: center;
    max-height: 94vh;
    overflow-y: auto;
}
.t-modal-box.wide { max-width: 560px; }

.t-modal .who { font-size: 22px; font-weight: 700; }
.t-modal .who-sub { color: var(--t-muted); font-size: 13.5px; margin-top: 4px; }
.t-modal .step-title { font-size: 14px; color: var(--t-muted); margin: 20px 0 12px; }

.t-actions { display: grid; gap: 11px; margin-top: 20px; }
.t-action {
    padding: 19px;
    border-radius: 13px;
    border: none;
    font-size: 18px;
    font-weight: 650;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: filter .12s;
}
.t-action:hover { filter: brightness(1.1); }
.t-action:active { transform: scale(.985); }

.t-cancel {
    margin-top: 15px;
    background: none;
    border: 1px solid var(--t-line);
    color: var(--t-muted);
    padding: 12px 22px;
    border-radius: 11px;
    font-size: 14.5px;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
}
.t-cancel:hover { background: var(--t-card-2); color: var(--t-text); }

/* ---------- PIN ---------- */
.pin-dots { display: flex; justify-content: center; gap: 13px; margin: 20px 0 22px; }
.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--t-line);
    transition: background .12s, border-color .12s;
}
.pin-dot.filled { background: var(--t-blue); border-color: var(--t-blue); }

.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.pin-key {
    padding: 20px 0;
    font-size: 25px;
    font-weight: 600;
    background: var(--t-card-2);
    border: 1px solid var(--t-line);
    border-radius: 13px;
    color: var(--t-text);
    cursor: pointer;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
}
.pin-key:hover { background: #334155; }
.pin-key:active { background: var(--t-blue); }
.pin-key.fn { font-size: 17px; color: var(--t-muted); }

/* ---------- Kamera ---------- */
.t-cam {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    object-fit: cover;
    background: #0b1220;
    border: 3px solid var(--t-line);
    margin: 0 auto 6px;
    display: block;
    transform: scaleX(-1);
}
.t-cam-note { font-size: 11.5px; color: var(--t-muted); }

/* ---------- Sonuc ---------- */
.t-result { text-align: center; padding: 12px 0; }
.t-result .icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    margin-bottom: 16px;
}
.t-result.ok .icon { background: rgba(34, 197, 94, .16); color: var(--t-green); }
.t-result.fail .icon { background: rgba(239, 68, 68, .16); color: var(--t-red); }
.t-result .headline { font-size: 24px; font-weight: 700; }
.t-result .detail { color: var(--t-muted); margin-top: 8px; font-size: 15px; line-height: 1.55; }
.t-result .stamp {
    font-size: 42px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 14px 0 6px;
    letter-spacing: -1px;
}
.t-result .totals {
    display: flex;
    justify-content: center;
    gap: 26px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--t-line);
}
.t-result .totals div { text-align: center; }
.t-result .totals .lbl { font-size: 11px; color: var(--t-muted); text-transform: uppercase; letter-spacing: .5px; }
.t-result .totals .vl { font-size: 17px; font-weight: 650; margin-top: 3px; }

/* ---------- Bilgi ekranlari ---------- */
.t-notice {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.t-notice-box {
    background: var(--t-card);
    border: 1px solid var(--t-line);
    border-radius: 18px;
    padding: 38px 34px;
    max-width: 460px;
    width: 100%;
    text-align: center;
}
.t-notice-box h1 { font-size: 21px; margin: 0 0 12px; }
.t-notice-box p { color: var(--t-muted); line-height: 1.65; margin: 0 0 20px; font-size: 14.5px; }
.t-notice-box input {
    width: 100%;
    padding: 15px;
    font-size: 21px;
    text-align: center;
    letter-spacing: 5px;
    text-transform: uppercase;
    border-radius: 12px;
    border: 1px solid var(--t-line);
    background: var(--t-bg);
    color: var(--t-text);
    font-family: inherit;
    margin-bottom: 12px;
    font-weight: 600;
}
.t-notice-box input.plain {
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 400;
    text-align: left;
    padding: 12px 14px;
}
.t-notice-box input:focus { outline: none; border-color: var(--t-blue); }
.t-notice-box .btn-main {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 650;
    background: var(--t-blue);
    border: none;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
}
.t-notice-box .btn-main:hover { filter: brightness(1.08); }
.t-notice-box .alert {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 16px;
    text-align: left;
}
.t-notice-box .alert.error { background: rgba(239, 68, 68, .14); color: #fca5a5; }
.t-notice-box .alert.success { background: rgba(34, 197, 94, .14); color: #86efac; }

.t-empty { text-align: center; padding: 60px 20px; color: var(--t-muted); }
.t-toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    background: var(--t-red);
    color: #fff;
    padding: 13px 22px;
    border-radius: 11px;
    font-size: 14.5px;
    font-weight: 500;
    z-index: 200;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

@media (max-width: 640px) {
    .t-head { padding: 13px 16px; }
    .t-body { padding: 16px 14px 30px; }
    .t-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
    .t-clock .time { font-size: 24px; }
}
