@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f3f5f8;
    --panel: #ffffff;
    --ink: #1c2430;
    --muted: #7b8494;
    --line: #e8edf3;
    --green: #16a34a;
    --green-2: #22c55e;
    --green-soft: #e8f8ee;
    --gold: var(--green);
    --gold-2: var(--green-2);
    --ok: #16a34a;
    --err: #dc4c3f;
    --in: #16a34a;
    --out: #f59e0b;
    --break: #3b82f6;
    --shadow: 0 10px 30px rgba(28, 36, 48, 0.06);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: "Source Sans 3", "Noto Sans", "Segoe UI", sans-serif;
    background:
        radial-gradient(900px 420px at 8% -10%, rgba(34, 197, 94, 0.12), transparent 55%),
        radial-gradient(800px 360px at 100% 0%, rgba(22, 163, 74, 0.08), transparent 50%),
        var(--bg);
    color: var(--ink);
}

.kiosk {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 18px 18px 22px;
    gap: 16px;
}

[hidden] { display: none !important; }

.kiosk-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    background: var(--panel);
    border-radius: 24px;
    padding: 14px 18px;
    box-shadow: var(--shadow);
}

.kiosk-brand, .brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.kiosk-brand strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.brand-logo {
    display: block;
    width: min(240px, 34vw);
    height: auto;
}
.brand-logo-kiosk { width: min(240px, 34vw); }

.mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, var(--green-2), var(--green));
    color: #fff;
    font-weight: 800;
    flex: 0 0 44px;
}

.kiosk-brand small, .kiosk-clock span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.kiosk-clock {
    text-align: center;
}

.kiosk-clock span {
    white-space: nowrap;
    text-transform: capitalize;
}

.kiosk-clock time {
    display: block;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.kiosk-top-actions {
    justify-self: end;
    display: flex;
    gap: 8px;
    align-items: center;
}
.kiosk-top-actions form { margin: 0; }
.lock-btn {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.admin-link {
    justify-self: end;
    color: #5b6573;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    background: #f3f5f8;
    padding: 10px 14px;
    border-radius: 14px;
}

.admin-link:hover {
    background: var(--green-soft);
    color: var(--green);
}

.test-banner {
    margin: 0;
    text-align: center;
    color: var(--green);
    background: var(--green-soft);
    font-size: 13px;
    font-weight: 700;
    border-radius: 16px;
    padding: 10px 14px;
}

.kiosk-stage {
    flex: 1;
    display: grid;
    place-items: center;
}

.kiosk-login {
    width: min(440px, 100%);
    text-align: left;
}
.kiosk-login h1,
.kiosk-login .hint,
.kiosk-login .eyebrow {
    text-align: center;
}
.kiosk-login-form {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.kiosk-login-form label {
    display: block;
    width: 100%;
    margin-bottom: 14px;
    font-weight: 600;
}
.kiosk-login-form input[type="email"],
.kiosk-login-form input[type="password"] {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    font: inherit;
    background: #fff;
}
.kiosk-login-form .check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}
.kiosk-login-form .check input {
    width: auto;
    margin: 0;
}
.kiosk-login-form .btn-primary {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 13px 16px;
    background: var(--green);
    color: #fff;
    font-weight: 800;
}

.designer-credit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 8px 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}
.designer-credit img {
    height: 48px;
    width: auto;
    display: block;
}

.panel {
    width: min(520px, 100%);
    background: var(--panel);
    border: 0;
    border-radius: 28px;
    padding: 36px 32px 28px;
    box-shadow: var(--shadow);
}

.eyebrow {
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    font-weight: 800;
    margin: 0 0 8px;
}

h1, h2 {
    margin: 0 0 8px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

h1 { font-size: clamp(26px, 4vw, 34px); }
h2 { font-size: 26px; }

.hint, .status-line { color: var(--muted); margin: 0; }
.status-line { min-height: 1.4em; margin-top: 12px; text-align: center; font-weight: 600; }

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    min-height: 22px;
    margin: 22px 0 18px;
}

.pin-dots span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--green);
    background: transparent;
}

.pin-dots span.on {
    background: var(--green);
}

.hidden-scan {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.keypad button, .actions button, .ghost-btn, .btn {
    font: inherit;
    cursor: pointer;
}

.keypad button {
    height: 72px;
    border: 0;
    border-radius: 18px;
    background: #f3f5f8;
    color: var(--ink);
    font-size: 24px;
    font-weight: 800;
}

.keypad button:hover { background: #e8edf3; }
.keypad button[data-key="OK"] { background: var(--green); color: #fff; }
.keypad button[data-key="OK"]:hover { background: #15803d; }
.keypad button[data-key="C"] { background: #fdecea; color: var(--err); }

.employee-card {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 20px;
}

.avatar {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: var(--green-soft);
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--green);
    font-size: 22px;
}

.employee-card #employee-last { color: var(--muted); margin: 0; }

.actions {
    display: grid;
    gap: 10px;
}

.actions button {
    min-height: 64px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.actions button.in { background: var(--in); }
.actions button.out { background: var(--out); }
.actions button.break { background: var(--break); }
.actions button.ergani-retry { background: #265b9b; }
.actions button.suggested { box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22); }

.ghost-btn {
    margin-top: 14px;
    width: 100%;
    background: #f3f5f8;
    border: 0;
    color: #5b6573;
    border-radius: 14px;
    padding: 12px;
    font-weight: 700;
}

.result-panel { text-align: center; }
.result-badge {
    width: 92px;
    height: 92px;
    margin: 8px auto 18px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    font-size: 34px;
    font-weight: 800;
}
.result-badge.ok { background: var(--green-soft); color: var(--ok); }
.result-badge.err { background: #fdecea; color: var(--err); }
.result-badge.warn { background: #fff7e8; color: var(--out); }

@media (max-width: 720px) {
    .kiosk { padding: 12px; }
    .kiosk-top { grid-template-columns: 1fr auto; }
    .admin-link { display: none; }
    .kiosk-brand strong { max-width: 160px; }
    .brand-logo-kiosk { width: min(168px, 42vw); }
    .panel { padding: 24px 18px; }
    .keypad button { height: 62px; }
}
