/* ============================================================
   RestoPOS — Laravel 11 + Bootstrap 5
   pos.css  |  v1.0  |  2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── TOKENS ── */
:root {
  --pos-font:    'Inter', system-ui, sans-serif;
  --pos-mono:    'JetBrains Mono', monospace;

  --pos-bg:            #f0f2f5;
  --pos-surface:       #ffffff;
  --pos-surface-2:     #f8f9fa;
  --pos-border:        #e2e8f0;
  --pos-text:          #1a202c;
  --pos-text-muted:    #718096;
  --pos-primary:       #ff6b35;
  --pos-primary-dk:    #e55a25;
  --pos-primary-lt:    #fff3ef;
  --pos-accent:        #2563eb;
  --pos-success:       #22c55e;
  --pos-warning:       #f59e0b;
  --pos-danger:        #ef4444;
  --pos-header:        #ffffff;
  --pos-header-border: #e2e8f0;
  --pos-shadow:        0 1px 3px rgba(0,0,0,.08),0 1px 2px rgba(0,0,0,.04);
  --pos-shadow-lg:     0 4px 16px rgba(0,0,0,.12);
}

[data-theme="dark"] {
  --pos-bg:            #0f111a;
  --pos-surface:       #1a1d2e;
  --pos-surface-2:     #222538;
  --pos-border:        #2d3152;
  --pos-text:          #e2e8f0;
  --pos-text-muted:    #94a3b8;
  --pos-primary-lt:    #2a1a12;
  --pos-header:        #1a1d2e;
  --pos-header-border: #2d3152;
  --pos-shadow:        0 1px 3px rgba(0,0,0,.4),0 1px 2px rgba(0,0,0,.3);
  --pos-shadow-lg:     0 4px 16px rgba(0,0,0,.5);
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--pos-font);
  background: var(--pos-bg) !important;
  color: var(--pos-text) !important;
  transition: background .2s, color .2s;
  min-height: 100vh;
}

/* ── HEADER ── */
.pos-header {
  background: var(--pos-header);
  border-bottom: 1px solid var(--pos-header-border);
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  transition: background .2s, border-color .2s;
}

.pos-header-inner {
  max-width: 1600px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}
/* Navigation scroll area */
.pos-nav {

    display: flex;

    align-items: center;

    gap: 8px;

    flex: 1;

    overflow-x: auto;

    overflow-y: hidden;

    white-space: nowrap;

}


/* Keep buttons same size */
.pos-nav-btn {

    flex-shrink: 0;

}


/* Hide ugly scrollbar */
.pos-nav::-webkit-scrollbar {

    height: 4px;

}


.pos-nav::-webkit-scrollbar-thumb {

    background: var(--pos-border);

    border-radius: 10px;

}


/* Firefox */
.pos-nav {

    scrollbar-width: thin;

}

.pos-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--pos-primary) !important;
  text-decoration: none;
  letter-spacing: -.02em;
  flex-shrink: 0;
  margin-right: 6px;
}
.pos-logo span { color: var(--pos-text); }

/* Nav buttons */
.pos-nav { display: flex; gap: 4px; flex: 1; }

.pos-nav-btn {
  position: relative;
  background: transparent;
  border: none;
  color: var(--pos-text-muted);
  font-family: var(--pos-font);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  transition: all .15s;
}
.pos-nav-btn i { font-size: 1.1rem; }
.pos-nav-btn:hover  { background: var(--pos-primary-lt); color: var(--pos-primary); }
.pos-nav-btn.active { background: var(--pos-primary); color: #fff; }

.pos-nav-badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--pos-warning);
  color: #fff;
  font-size: .55rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  line-height: 14px;
}
.pos-nav-btn.active .pos-nav-badge { background: rgba(255,255,255,.35); }

/* Right controls */
.pos-clock {
  font-family: var(--pos-mono);
  font-size: .82rem;
  color: var(--pos-text-muted);
  background: var(--pos-surface-2);
  border: 1px solid var(--pos-border);
  border-radius: 8px;
  padding: 5px 12px;
}

.pos-icon-btn {
  position: relative;
  background: var(--pos-surface-2);
  border: 1px solid var(--pos-border);
  border-radius: 8px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--pos-text-muted);
  font-size: 1rem;
  transition: all .15s;
}
.pos-icon-btn:hover { background: var(--pos-primary-lt); color: var(--pos-primary); }

.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--pos-primary);
  border: 1.5px solid var(--pos-header);
}

.pos-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg,#ff6b35,#e55a25);
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--pos-primary);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── PAGE WRAPPER ── */
.page-content {
  padding: 20px;
  max-width: 1600px;
  margin: 0 auto;
}

/* ── CARDS ── */
.pos-card {
  background: var(--pos-surface);
  border: 1px solid var(--pos-border);
  border-radius: 12px;
  box-shadow: var(--pos-shadow);
  transition: box-shadow .2s, border-color .2s;
}
.pos-card:hover { box-shadow: var(--pos-shadow-lg); }

/* Stat card */
.stat-card {
  background: var(--pos-surface);
  border: 1px solid var(--pos-border);
  border-radius: 12px;
  padding: 20px;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--pos-mono);
  letter-spacing: -.03em;
  color: var(--pos-text);
}
.stat-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--pos-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── TABLE ── */
.pos-table { color: var(--pos-text); }
.pos-table thead th {
  background: var(--pos-surface-2) !important;
  border-color: var(--pos-border) !important;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--pos-text-muted) !important;
  padding: 12px 16px;
}
.pos-table tbody td {
  border-color: var(--pos-border) !important;
  padding: 12px 16px;
  vertical-align: middle;
  color: var(--pos-text) !important;
  background: var(--pos-surface) !important;
}
.pos-table tbody tr:hover td { background: var(--pos-surface-2) !important; }

/* ── STATUS BADGES ── */
.status-pill {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  display: inline-block;
}
.s-pending   { background:#fef3c7;color:#92400e }
.s-active    { background:#dcfce7;color:#166534 }
.s-delivered { background:#dbeafe;color:#1e40af }
.s-hold      { background:#f3e8ff;color:#6b21a8 }
.s-paid      { background:#dcfce7;color:#166534 }
.s-partial   { background:#fef9c3;color:#854d0e }
.s-unpaid    { background:#fee2e2;color:#991b1b }
.s-offline   { background:#f1f5f9;color:#64748b }

[data-theme="dark"] .s-pending   { background:#422006;color:#fcd34d }
[data-theme="dark"] .s-active    { background:#052e16;color:#4ade80 }
[data-theme="dark"] .s-delivered { background:#0c1a4e;color:#60a5fa }
[data-theme="dark"] .s-hold      { background:#3b0764;color:#c084fc }
[data-theme="dark"] .s-paid      { background:#052e16;color:#4ade80 }
[data-theme="dark"] .s-partial   { background:#422006;color:#fcd34d }
[data-theme="dark"] .s-unpaid    { background:#450a0a;color:#f87171 }
[data-theme="dark"] .s-offline   { background:#1e293b;color:#94a3b8 }

/* ── FORM CONTROLS ── */
.form-control, .form-select {
  background: var(--pos-surface) !important;
  border-color: var(--pos-border) !important;
  color: var(--pos-text) !important;
  border-radius: 8px !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--pos-primary) !important;
  box-shadow: 0 0 0 3px rgba(255,107,53,.15) !important;
  background: var(--pos-surface) !important;
}
.form-control::placeholder { color: var(--pos-text-muted) !important; }

/* ── BUTTONS ── */
.btn-pos {
  background: var(--pos-primary);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  transition: all .15s;
  font-family: var(--pos-font);
}
.btn-pos:hover { background: var(--pos-primary-dk); color: #fff; transform: translateY(-1px); }

.btn-pos-outline {
  background: transparent;
  border: 1.5px solid var(--pos-border);
  color: var(--pos-text);
  font-weight: 500;
  border-radius: 8px;
  font-family: var(--pos-font);
  transition: all .15s;
}
.btn-pos-outline:hover { border-color: var(--pos-primary); color: var(--pos-primary); }

/* ── CATEGORY PILLS ── */
.cat-pill {
  background: var(--pos-surface);
  border: 1.5px solid var(--pos-border);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--pos-text-muted);
  transition: all .15s;
  white-space: nowrap;
  font-family: var(--pos-font);
}
.cat-pill:hover, .cat-pill.active {
  background: var(--pos-primary);
  border-color: var(--pos-primary);
  color: #fff;
}

/* ── MENU ITEM ── */
.menu-card {
  background: var(--pos-surface);
  border: 2px solid var(--pos-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s;
  overflow: hidden;
  position: relative;
  text-align: center;
}
.menu-card:hover { border-color: var(--pos-primary); transform: translateY(-2px); box-shadow: var(--pos-shadow-lg); }
.menu-card.selected { border-color: var(--pos-primary); background: var(--pos-primary-lt); }

.menu-card .item-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--pos-primary); color: #fff;
  font-size: .6rem; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  text-transform: uppercase;
}
.menu-emoji { font-size: 2.4rem; padding: 14px 0 6px; }
.menu-name { font-size: .78rem; font-weight: 600; line-height: 1.2; padding: 0 8px 2px; }
.menu-price { font-size: .85rem; font-weight: 700; color: var(--pos-primary); padding-bottom: 10px; font-family: var(--pos-mono); }

/* ── ORDER TICKET ── */
.order-panel {
  background: var(--pos-surface);
  border: 1px solid var(--pos-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 80px);
}

.order-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--pos-border);
}

.qty-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  border: 1.5px solid var(--pos-border);
  background: var(--pos-surface-2);
  color: var(--pos-text);
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  transition: all .1s;
}
.qty-btn:hover { background: var(--pos-primary); color: #fff; border-color: var(--pos-primary); }

/* ── NUMPAD ── */
.numpad {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 6px;
}
.numpad-key {
  background: var(--pos-surface-2);
  border: 1px solid var(--pos-border);
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--pos-mono);
  color: var(--pos-text);
  padding: 15px;
  cursor: pointer;
  transition: all .1s;
  text-align: center;
}
.numpad-key:hover { background: var(--pos-primary); color: #fff; border-color: var(--pos-primary); }

/* ── PAYMENT METHODS ── */
.pay-method {
  width: 100%;
  padding: 12px 8px;
  border-radius: 10px;
  border: 2px solid var(--pos-border);
  background: var(--pos-surface-2);
  color: var(--pos-text-muted);
  font-weight: 600;
  font-size: .82rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all .15s;
  font-family: var(--pos-font);
}
.pay-method i { font-size: 1.3rem; }
.pay-method:hover,
.pay-method.active {
  border-color: var(--pos-primary);
  background: var(--pos-primary-lt);
  color: var(--pos-primary);
}

/* ── RIDER CARD ── */
.rider-card {
  background: var(--pos-surface);
  border: 1px solid var(--pos-border);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all .15s;
}
.rider-card:hover, .rider-card.selected {
  border-color: var(--pos-primary);
  background: var(--pos-primary-lt);
}

/* ── HOLD CARD ── */
.hold-card {
  background: var(--pos-surface);
  border: 1px solid var(--pos-border);
  border-radius: 12px;
  padding: 16px;
  transition: border-color .2s;
}
.hold-card.overdue { border-color: var(--pos-warning); }

.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pos-warning);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%,100%{opacity:1;transform:scale(1)}
  50%    {opacity:.5;transform:scale(1.3)}
}

/* ── LOGIN ── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg,#1a1d2e 0%,#0f111a 60%,#1e0a04 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  width: 100%;
  max-width: 400px;
  padding: 40px;
}
.login-card .form-control {
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.1) !important;
  color: #fff !important;
  padding: 12px 16px 12px 42px;
}
.login-card .form-control:focus {
  background: rgba(255,255,255,.1) !important;
  border-color: var(--pos-primary) !important;
}
.login-card .form-control::placeholder { color: rgba(255,255,255,.3) !important; }
.login-card label { color: rgba(255,255,255,.65); font-size: .82rem; font-weight: 500; }
.login-input-wrap { position: relative; }
.login-input-icon {
  position: absolute;
  left: 14px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,.3);
  pointer-events: none;
  font-size: 1rem;
}

/* ── MISC ── */
.mono { font-family: var(--pos-mono); }

/* Scrollbar */
::-webkit-scrollbar { width:5px;height:5px }
::-webkit-scrollbar-track { background:transparent }
::-webkit-scrollbar-thumb { background:var(--pos-border);border-radius:3px }
::-webkit-scrollbar-thumb:hover { background:var(--pos-text-muted) }

/* Bar chart */
.bar-col { display:flex;flex-direction:column;align-items:center;flex:1;gap:4px }
.bar-fill {
  width:100%;border-radius:4px 4px 0 0;
  background:var(--pos-border);
  transition:background .2s;
  cursor:pointer;
  min-height:4px;
}
.bar-fill:hover, .bar-fill.peak { background:var(--pos-primary) }
.bar-label { font-size:.6rem;color:var(--pos-text-muted);text-align:center }

/* Progress bar item */
.prog-bar-bg { height:4px;border-radius:2px;background:var(--pos-border) }
.prog-bar-fill { height:100%;border-radius:2px;background:var(--pos-primary) }

@media(max-width:992px){
  .pos-nav-btn .nav-label { display:none }
  .pos-nav-btn { padding:6px 10px }
  .order-panel { height:auto }
  .pos-clock { display:none }
}

#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity .3s ease;
}

#page-loader.hide {
    opacity: 0;
    pointer-events: none;
}

.spinner-sm {
    width: 2rem;
    height: 2rem;
}
.spinner-border {
    color: var(--pos-primary) !important;
}
