/* Modern theme using CSS variables */
:root{
  --bg: #f8fafc;              /* page background */
  --surface: #ffffff;          /* cards/navbar surface */
  --muted-surface: #f1f5f9;    /* subtle surface */
  --text: #0f172a;             /* strong text */
  --muted: #475569;            /* muted text */
  --primary: #2563eb;          /* blue */
  --primary-2: #7c3aed;        /* violet */
  --accent: #0891b2;           /* cyan-ish */
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --radius: 14px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', 'Roboto', Arial, sans-serif;
  font-size: 1.02rem;
  margin: 0;
}

.navbar{
  background: linear-gradient(90deg, var(--surface), var(--muted-surface));
  border-bottom: 1px solid #e2e8f0;
}
.navbar .btn{ border-radius: 999px; color:#0f172a !important; }
.navbar .btn.btn-primary{
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color:#0f172a !important;
}
.navbar .btn.btn-primary:hover{ background: #f1f5f9; filter: none; }
.navbar .btn.btn-outline-secondary{
  border-color: #cbd5e1;
  color: #0f172a !important;
  background: #ffffff;
}
.navbar .btn.btn-outline-secondary:hover{ background: #f1f5f9; }
.navbar-brand{ font-weight: 700; letter-spacing: 0.2px; color: var(--text); }


.card {
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(2,6,23,0.05);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card-header {
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, rgba(37,99,235,0.08), rgba(124,58,237,0.06));
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  backdrop-filter: saturate(1.1) blur(3px);
  font-size: 1.05rem;
  font-weight: 600;
}
.card:hover { box-shadow: 0 16px 32px rgba(2,6,23,0.09); transform: translateY(-2px); }

.btn-primary, .btn-success {
  border-radius: 12px;
  padding: 0.6em 1.2em;
  font-weight: 600;
  border: none;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(37,99,235,0.18);
}
.btn-primary:hover, .btn-success:hover { filter: brightness(1.05); }
.btn-success{ background: linear-gradient(90deg, var(--success), #34d399); box-shadow: 0 8px 16px rgba(34,197,94,0.18); }

.btn-outline-secondary, .btn-outline-primary {
  border-radius: 12px;
  font-weight: 600;
  border-color: #cbd5e1 !important;
  color: #333333 !important;
  background: #ffffff;
}
.btn-outline-primary { color: var(--primary) !important; border-color: rgba(37,99,235,0.6) !important; }

.table thead th {
  white-space: nowrap;
  background: linear-gradient(180deg, #f6f8fc, #eef3f9);
  color: #0f172a;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: .85rem;
}
.table-striped > tbody > tr:nth-of-type(odd) { background-color: #fafcff; }
.table > :not(caption) > * > * { border-color: #eef2f7; }
.table td, .table th { padding: .65rem .8rem; }
/* Row hover */
.table tbody tr:hover { background: #f5f8ff; transition: background .15s ease; }

/* Rounded table inside cards */
.card .table { border-radius: 10px; overflow: hidden; }
.card .table thead th:first-child { border-top-left-radius: 10px; }
.card .table thead th:last-child { border-top-right-radius: 10px; }

.badge-success, .text-bg-success { background: var(--success) !important; color: #ffffff !important; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.badge-warning, .text-bg-warning { background: var(--warning) !important; color: #1a1202 !important; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.badge-secondary, .text-bg-secondary { background: #94a3b8 !important; color: #333333 !important; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.badge-info, .text-bg-info { background: var(--accent) !important; color: #ffffff !important; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.badge-danger, .text-bg-danger { background: var(--danger) !important; color: #ffffff !important; box-shadow: 0 1px 0 rgba(0,0,0,.04); }

/* Prevent wrapping for action buttons and badges */
.actions-cell { white-space: nowrap; }
.badge { white-space: nowrap; }
.table.align-middle > :not(caption) > * > * { vertical-align: middle; }

input, select, textarea {
  border-radius: 12px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #333333 !important;
  transition: border 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  border: 1.5px solid rgba(37,99,235,0.9) !important;
  box-shadow: 0 0 0 0.2rem rgba(37,99,235,0.18) !important;
  outline: none;
}

.form-label { color: var(--muted); font-weight: 600; }

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.alert-danger {
  background: #fef2f2;
  color: #7f1d1d;
  border: 1px solid #fecaca;
}

.eco-icon{display:inline-block;width:18px;height:18px;border-radius:50%;background:radial-gradient(circle at 30% 30%,#7dd3fc,#2563eb);}

/* Cashier UX: hide all navbar buttons except POS and Logout */
body[data-role="cashier"] .navbar .btn:not([href="pos.php"]):not([href="logout.php"]):not([href="items_list.php"]) {
  display: none !important;
}
