@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@700;800&family=Inter:wght@500;600;700;800&display=swap');

:root {
  --color-bg: #14110D;
  --color-surface: #1F1B15;
  --color-surface-2: #292319;
  --color-text: #F7F3EA;
  --color-text-muted: #B8AF9F;
  --color-border: #35301F;
  --color-accent: #FF8A2E;
  --color-accent-dark: #E4610A;
  --color-warn: #FFC94A;
  --color-ready: #3FD37B;
  --color-served: #6B7280;
  --font-display: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius-md: 16px;
  --radius-pill: 999px;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--color-bg); color:var(--color-text); font-family:var(--font-body); font-size:16px; }
h1,h2,h3 { font-family:var(--font-display); margin:0; }
a { color:inherit; text-decoration:none; }
button { font-family:inherit; cursor:pointer; }

.k-header { display:flex; align-items:center; justify-content:space-between; padding:18px 26px; background:var(--color-surface); border-bottom:1px solid #2E2A22; position:sticky; top:0; z-index:10; }
.k-header__brand { font-family:var(--font-display); font-weight:800; font-size:19px; display:flex; align-items:center; gap:10px; }
.k-header__meta { display:flex; align-items:center; gap:18px; font-size:14px; color:var(--color-text-muted); }
.k-header__logout { padding:9px 18px; border-radius:var(--radius-pill); background:#2E2A22; color:#fff; font-weight:700; font-size:13px; }

.k-main { padding:24px; max-width:1400px; margin:0 auto; }
.k-stats { display:flex; gap:16px; margin-bottom:22px; flex-wrap:wrap; }
.k-stat { background:var(--color-surface); border-radius:var(--radius-md); padding:16px 22px; flex:1; min-width:140px; text-align:center; }
.k-stat .n { font-size:30px; font-weight:800; font-family:var(--font-display); }
.k-stat .l { font-size:12px; color:var(--color-text-muted); text-transform:uppercase; letter-spacing:0.05em; margin-top:2px; }

.k-columns { display:grid; grid-template-columns:repeat(auto-fit, minmax(300px,1fr)); gap:18px; }
.k-order { background:var(--color-surface); border-radius:var(--radius-md); padding:18px; border-left:5px solid var(--color-warn); }
.k-order.status-en_preparation { border-left-color: var(--color-warn); }
.k-order.status-prete { border-left-color: var(--color-ready); }
.k-order.status-servie { border-left-color: var(--color-served); opacity:0.55; }
.k-order__top { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.k-order__code { font-family:var(--font-display); font-weight:800; font-size:19px; }
.k-order__slot { background:var(--color-surface-2); padding:5px 12px; border-radius:var(--radius-pill); font-weight:700; font-size:14px; }
.k-order__name { color:var(--color-text-muted); font-size:14px; margin-bottom:10px; }
.k-order__items { list-style:none; margin:0 0 14px; padding:0; font-size:15px; }
.k-order__items li { padding:6px 0; border-bottom:1px dashed #332E24; }
.k-order__items li:last-child { border-bottom:none; }
.k-order__items .opts { display:block; font-size:12.5px; color:var(--color-text-muted); margin-top:2px; }
.k-order__note { background:#3A2A16; color:var(--color-warn); padding:8px 12px; border-radius:10px; font-size:13px; margin-bottom:12px; }
.k-order__actions { display:flex; gap:8px; flex-wrap:wrap; }
.k-btn { flex:1; padding:13px; border-radius:12px; font-weight:800; font-size:14px; border:none; text-align:center; }
.k-btn-prep { background:var(--color-warn); color:#3A2A00; }
.k-btn-ready { background:var(--color-ready); color:#053017; }
.k-btn-served { background:var(--color-served); color:#fff; }
.k-btn-pay { background:#2E2A22; color:#fff; }
.k-order__correct { display:flex; align-items:center; gap:8px; margin-top:12px; padding-top:12px; border-top:1px dashed #332E24; font-size:12.5px; color:var(--color-text-muted); }
.k-order__correct select { background:var(--color-surface-2); color:#fff; border:1px solid #35301F; border-radius:8px; padding:7px 10px; font-size:13px; font-weight:600; }

.k-empty { text-align:center; padding:60px 20px; color:var(--color-text-muted); font-size:16px; }

.k-toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px); background:#3A1414; color:#FF8A8A; padding:14px 24px; border-radius:14px; font-weight:700; font-size:14px; z-index:400; opacity:0; transition:all .25s; box-shadow:0 12px 30px rgba(0,0,0,0.4); max-width:90vw; text-align:center; pointer-events:none; }
.k-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

.k-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.6); z-index:300; opacity:0; pointer-events:none; transition:opacity .2s; }
.k-overlay.open { opacity:1; pointer-events:auto; }
.k-modal { position:fixed; top:50%; left:50%; transform:translate(-50%,-45%); z-index:301; width:min(400px, calc(100vw - 32px));
  max-height:calc(100vh - 32px); overflow-y:auto; box-sizing:border-box;
  background:#FFFFFF; border-radius:18px; padding:0; opacity:0; pointer-events:none; transition:all .2s; box-shadow:0 30px 70px rgba(0,0,0,0.55); border:1px solid #000; }
.k-modal.open { opacity:1; transform:translate(-50%,-50%); pointer-events:auto; }
.k-modal * { box-sizing:border-box; }
.k-modal h3 { font-size:16px; font-weight:800; color:#111; letter-spacing:0.01em; }

.cash-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px 22px; border-bottom:2px solid #111; }
.cash-header__badge { flex-shrink:0; width:38px; height:38px; border-radius:50%; background:#111; color:#fff; display:grid; place-items:center; font-size:15px; font-weight:800; font-family:var(--font-display); }
.cash-header__close { background:none; border:1px solid #CCC; color:#111; width:30px; height:30px; border-radius:50%; font-size:15px; line-height:1; padding:0; flex-shrink:0; }
.cash-header__close:hover { background:#111; color:#fff; border-color:#111; }

.cash-total { display:flex; align-items:center; justify-content:space-between; margin:18px 22px; padding:14px 16px; border:1.5px solid #111; border-radius:12px; }
.cash-total__label { font-size:11.5px; text-transform:uppercase; letter-spacing:0.05em; font-weight:700; color:#555; }
.cash-total__amount { font-size:19px; font-weight:800; font-family:var(--font-display); color:#111; }

.cash-field { margin:0 22px 16px; }
.cash-field label { display:block; font-size:11.5px; font-weight:700; color:#555; text-transform:uppercase; letter-spacing:0.05em; margin-bottom:8px; }
.cash-input-wrap { position:relative; }
.cash-input-wrap input[type="number"] {
  width:100%; padding:16px 46px 16px 16px; border-radius:12px; border:1.5px solid #BBB;
  background:#FAFAFA; color:#111; font-size:24px; font-weight:800; font-family:var(--font-display);
  transition:border-color .15s;
}
.cash-input-wrap input[type="number"]:focus { outline:none; border-color:#111; background:#fff; }
.cash-input-suffix { position:absolute; right:16px; top:50%; transform:translateY(-50%); font-size:16px; font-weight:700; color:#888; pointer-events:none; }

.quick-amounts { display:grid; grid-template-columns:repeat(5, 1fr); gap:7px; margin:0 22px 18px; }
.quick-amounts button { padding:11px 4px; border-radius:10px; border:1.5px solid #BBB; background:#fff; color:#111; font-weight:700; font-size:12.5px; transition:all .15s; white-space:nowrap; }
.quick-amounts button:hover { border-color:#111; background:#F5F5F5; }
.quick-amounts button:active { transform:scale(0.95); }
.quick-amounts__exact { background:#111 !important; color:#fff !important; border-color:#111 !important; }

.cash-change { display:flex; align-items:center; gap:12px; margin:0 22px 18px; padding:14px 16px; border-radius:12px; animation:cash-change-in .2s ease; }
@keyframes cash-change-in { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
.cash-change__icon { font-size:20px; flex-shrink:0; width:32px; height:32px; border-radius:50%; display:grid; place-items:center; }
.cash-change__label { font-size:11px; text-transform:uppercase; letter-spacing:0.05em; font-weight:700; opacity:0.7; }
.cash-change__amount { font-size:19px; font-weight:800; font-family:var(--font-display); }
.cash-change--ok { background:#fff; border:2px solid #111; color:#111; }
.cash-change--ok .cash-change__icon { background:#111; color:#fff; }
.cash-change--bad { background:#F5F5F5; border:2px dashed #999; color:#333; }
.cash-change--bad .cash-change__icon { background:#fff; border:1.5px solid #999; }

.k-modal__actions { display:flex; gap:10px; padding:18px 22px 22px; border-top:1px solid #E5E5E5; margin-top:2px; }
.k-modal__actions button { flex:1; padding:14px; border-radius:12px; font-weight:800; border:1.5px solid #111; font-size:13.5px; transition:opacity .15s, transform .15s; }
.k-modal__actions button:active { transform:scale(0.97); }
.k-modal__actions .k-btn-served { background:#fff; color:#111; }
.k-modal__actions .k-btn-served:hover { background:#F5F5F5; }
.k-modal__actions #cash-confirm-btn { background:#111; color:#fff; }
.k-modal__actions #cash-confirm-btn:disabled { opacity:.3; cursor:not-allowed; background:#999; border-color:#999; }

.login-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; background:var(--color-bg); }
.login-card { background:var(--color-surface); border-radius:20px; padding:40px; width:100%; max-width:360px; }
.login-card h1 { font-size:20px; margin-bottom:4px; color:#fff; }
.login-card p { color:var(--color-text-muted); font-size:13px; margin-bottom:24px; }
.field { margin-bottom:16px; }
.field label { display:block; font-weight:700; font-size:13px; margin-bottom:6px; }
.field input { width:100%; padding:12px 14px; border-radius:10px; border:1px solid #35301F; background:var(--color-surface-2); color:#fff; font-size:15px; }
.field input:focus { outline:none; border-color:var(--color-accent); }
.btn-accent { display:block; width:100%; padding:13px; border-radius:var(--radius-pill); background:var(--color-accent); color:#1B1712; font-weight:800; border:none; font-size:15px; }
.alert-error { background:#3A1414; color:#FF8A8A; padding:10px 14px; border-radius:10px; font-size:13px; margin-bottom:16px; }

@media (max-width: 640px) {
  .k-header { padding:14px 16px; flex-wrap:wrap; gap:10px; }
  .k-header__brand { font-size:16px; }
  .k-header__meta { width:100%; justify-content:center; flex-wrap:wrap; gap:8px 16px; font-size:13px; }
  .k-main { padding:16px; }
  .k-stats { justify-content:center; }
  .k-stat { flex:1 1 calc(50% - 8px); min-width:calc(50% - 8px); }
  .k-columns { grid-template-columns:1fr; }
  .k-order__actions { flex-direction:column; }
  .k-order__actions .k-btn { flex:1 1 auto; }
  .login-card { padding:28px 22px; }
}
