/* XantelPOS — Liquid Glass Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --glass-bg:        rgba(255,255,255,0.08);
  --glass-bg-hover:  rgba(255,255,255,0.13);
  --glass-bg-strong: rgba(255,255,255,0.16);
  --glass-border:    rgba(255,255,255,0.18);
  --glass-border-focus: rgba(255,255,255,0.45);
  --glass-shadow:    0 8px 32px rgba(0,0,0,0.35);
  --glass-shadow-lg: 0 20px 60px rgba(0,0,0,0.45);

  --accent:          #6C63FF;
  --accent-light:    #8B85FF;
  --accent-glow:     rgba(108,99,255,0.35);
  --success:         #22C55E;
  --danger:          #EF4444;
  --warning:         #F59E0B;

  --text-primary:    rgba(255,255,255,0.95);
  --text-secondary:  rgba(255,255,255,0.60);
  --text-muted:      rgba(255,255,255,0.35);

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;

  --font: 'Inter', system-ui, sans-serif;
}

body {
  font-family: var(--font);
  background: #0f0f1a;
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Background gradient orbs ── */
.bg-orbs {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.bg-orbs::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(108,99,255,0.25) 0%, transparent 70%);
  top: -150px; left: -150px;
  animation: orb-drift 18s ease-in-out infinite alternate;
}
.bg-orbs::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(34,197,94,0.15) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  animation: orb-drift 22s ease-in-out infinite alternate-reverse;
}
@keyframes orb-drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.1); }
}

/* ── Glass card ── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
}
.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow-lg);
}

/* ── Form inputs ── */
.input-glass {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9375rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.input-glass::placeholder { color: var(--text-muted); }
.input-glass:focus {
  border-color: var(--glass-border-focus);
  background: rgba(255,255,255,0.11);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input-glass.error { border-color: var(--danger); }

/* ── Buttons ── */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.8125rem 1.5rem;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 28px var(--accent-glow); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  transition: background 0.2s, border-color 0.2s;
  backdrop-filter: blur(10px);
}
.btn-glass:hover { background: var(--glass-bg-hover); border-color: rgba(255,255,255,0.3); }

/* ── Labels & text ── */
.label { font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.375rem; display: block; }
.text-error { font-size: 0.8125rem; color: var(--danger); margin-top: 0.3rem; }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }
.text-accent { color: var(--accent-light); }

/* ── Sidebar layout ── */
.pos-layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  width: 240px; flex-shrink: 0;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column;
  padding: 1.5rem 0;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  transition: transform 0.3s;
}
.sidebar-logo {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 1rem;
}
.sidebar-logo .brand { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
.sidebar-logo .branch { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

.nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem; font-weight: 500;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.nav-item.active {
  background: rgba(108,99,255,0.15);
  color: var(--accent-light);
  border-left-color: var(--accent);
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-section { font-size: 0.6875rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; padding: 1rem 1.5rem 0.4rem; }

.main-content { margin-left: 240px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.875rem 1.75rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 1rem; font-weight: 600; }

.page-content { padding: 1.75rem; flex: 1; }

/* ── Status badges ── */
.badge {
  display: inline-flex; align-items: center;
  font-size: 0.75rem; font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
}
.badge-success { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.badge-warning { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.badge-danger  { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge-info    { background: rgba(108,99,255,0.15); color: #a5b4fc; border: 1px solid rgba(108,99,255,0.3); }

/* ── Stat cards ── */
.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  transition: background 0.2s, transform 0.2s;
}
.stat-card:hover { background: var(--glass-bg-hover); transform: translateY(-2px); }
.stat-label { font-size: 0.8125rem; color: var(--text-secondary); font-weight: 500; }
.stat-value { font-size: 1.75rem; font-weight: 700; margin-top: 0.375rem; }
.stat-sub   { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 99px; }
