/* ============================================================
   Ahmed Mobiles — Premium DARK Shop Management UI
   Dark slate/charcoal surfaces + neon cyan accents,
   subtle neon glow, smooth hovers. Full-width ERP/POS feel:
   fluid layout, data-dense tables, full-height sidebar.
   Light theme direction SUPERSEDED — dark is the theme.
   No external libs. No framework.
   ============================================================ */
:root {
  --bg: #0d1220;
  --surface: #151c2e;
  --surface-2: #1b2338;
  --surface-3: #222c44;
  --text: #e9edf5;
  --muted: #8e99b0;
  --border: #28324a;
  --accent: #22d3ee;
  --accent-dark: #0e9dbf;
  --accent-soft: rgba(34, 211, 238, .12);
  --cyan: #3ae2ff;
  --cyan-soft: rgba(58, 226, 255, .12);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, .12);
  --warn: #ffb02e;
  --warn-soft: rgba(255, 176, 46, .12);
  --info: #5aa9ff;
  --info-soft: rgba(90, 169, 255, .12);
  --radius: 12px;
  --shadow: 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, .5);
  --glow: 0 0 14px rgba(34, 211, 238, .35);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--accent); }
a:hover { color: #a5f3fc; }
h1 { font-size: 1.45rem; margin: 0 0 16px; font-weight: 700; letter-spacing: -0.01em; color: #f2f5fb; }
h2 { font-size: 1.08rem; margin: 22px 0 10px; font-weight: 700; color: #dfe5f2; }

/* ============ App shell: full-height sidebar + fluid main ============ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 252px; flex: 0 0 252px;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 200;
  background: linear-gradient(180deg, #101827 0%, #0a0f1c 100%);
  border-right: 1px solid var(--border);
  color: #c9d2e6;
  display: flex; flex-direction: column;
  box-shadow: 2px 0 16px rgba(0, 0, 0, .5);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none; font-weight: 800; font-size: 1.18rem;
  padding: 18px 20px 14px; letter-spacing: -0.01em;
}
.brand:hover { color: #fff; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 38px;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  box-shadow: var(--glow);
}
.side-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.side-nav::-webkit-scrollbar { width: 6px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }
.side-link {
  display: flex; align-items: center; gap: 11px;
  color: #a9b4cc; text-decoration: none;
  padding: 10px 12px; margin: 2px 0; border-radius: 9px;
  font-size: .94rem; font-weight: 500;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.side-link .ico { width: 22px; text-align: center; font-size: 1.05rem; flex: 0 0 22px; }
.side-link:hover {
  background: rgba(34, 211, 238, .08); color: #fff;
  box-shadow: inset 0 0 18px rgba(34, 211, 238, .06);
  transform: translateX(2px);
}
.side-link.active {
  background: rgba(34, 211, 238, .13); color: #fff;
  border-left-color: var(--accent);
  font-weight: 700;
  box-shadow: inset 0 0 22px rgba(34, 211, 238, .1), 0 0 12px rgba(34, 211, 238, .18);
}
.side-foot { padding: 14px 16px 18px; border-top: 1px solid var(--border); }
.side-user {
  color: var(--muted); font-size: .86rem; margin-bottom: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.btn-logout {
  display: block; text-align: center; text-decoration: none;
  background: rgba(255,255,255,.05); color: #e9edf5;
  border: 1px solid var(--border);
  padding: 9px 12px; border-radius: 9px; font-weight: 600; font-size: .92rem;
  transition: background .15s, box-shadow .15s;
}
.btn-logout:hover { background: rgba(255, 107, 107, .16); color: #fff; box-shadow: 0 0 12px rgba(255,107,107,.25); }

.side-overlay {
  display: none; position: fixed; inset: 0; z-index: 150;
  background: rgba(4, 8, 16, .65);
}

.main {
  flex: 1; min-width: 0; margin-left: 252px;
  display: flex; flex-direction: column; min-height: 100vh;
}

/* ============ Topbar (full width of main) ============ */
.topbar {
  background: rgba(21, 28, 46, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
  position: sticky; top: 0; z-index: 100;
}
.topbar-inner {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 26px; width: 100%;
}
.topbar .brand { color: var(--text); padding: 0; font-size: 1.05rem; }
.topbar .brand:hover { color: #fff; }
.topbar-spacer { flex: 1; }
.nav-toggle {
  display: none; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: 1.25rem; border-radius: 9px;
  padding: 5px 12px; cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.nav-toggle:hover { border-color: var(--accent); box-shadow: var(--glow); }
.user-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: .88rem; font-weight: 600;
  padding: 7px 13px; border-radius: 999px; white-space: nowrap;
}

/* ============ Content: FULL WIDTH, no narrow container ============ */
.content { padding: 22px 28px 46px; width: 100%; }
.footer {
  margin-top: auto; text-align: center; color: #5d6a86;
  font-size: .82rem; padding: 16px;
  border-top: 1px solid var(--border); background: var(--surface);
}
.muted { color: var(--muted); }
.right { text-align: right; }

/* ============ KPI / stat cards (fill available width) ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-radius: var(--radius);
  padding: 16px 18px; text-decoration: none; color: var(--text);
  border: 1px solid var(--border); border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  min-width: 0;
}
a.card:hover {
  transform: translateY(-3px);
  border-left-color: var(--accent);
  box-shadow: var(--shadow-lg), 0 0 16px rgba(34, 211, 238, .16);
}
.card.pos { border-left-color: var(--accent); }
.card.red { border-left-color: var(--danger); }
.card.blue { border-left-color: var(--info); }
.card.orange, .card.warn { border-left-color: var(--warn); }
.card-label {
  font-size: .76rem; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-value {
  font-size: 1.65rem; font-weight: 800; margin-top: 6px;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(34, 211, 238, .35);
}
.card.red .card-value { color: var(--danger); text-shadow: 0 0 18px rgba(255,107,107,.3); }
.card.blue .card-value { color: var(--info); text-shadow: 0 0 18px rgba(90,169,255,.3); }
.card.orange .card-value, .card.warn .card-value { color: var(--warn); text-shadow: 0 0 18px rgba(255,176,46,.3); }

.two-col {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

/* Panels */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 20px; min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
.panel:hover { border-color: #34405c; box-shadow: var(--shadow), 0 0 18px rgba(34,211,238,.07); }
.panel h2 { margin-top: 0; }

/* ============ 7-day sales chart (pure CSS) ============ */
.chart { display: flex; gap: 12px; align-items: stretch; height: 230px; padding-top: 6px; }
.bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.bar-val {
  font-size: .72rem; font-weight: 700; color: var(--muted); height: 18px;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.bar-track {
  flex: 1; width: 100%; max-width: 72px; min-height: 40px;
  display: flex; align-items: flex-end;
  background: #0d1322; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.bar {
  width: 100%; min-height: 5px; border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #a5f3fc 0%, var(--accent) 55%, var(--accent-dark) 100%);
  box-shadow: 0 0 12px rgba(34, 211, 238, .45);
  transition: filter .15s;
}
.bar-col:hover .bar { filter: brightness(1.2); }
.bar-col.today .bar {
  background: linear-gradient(180deg, #8fd8ff 0%, var(--cyan) 70%);
  box-shadow: 0 0 12px rgba(58, 226, 255, .45);
}
.bar-label { margin-top: 8px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.bar-col.today .bar-label { color: var(--cyan); font-weight: 800; }

/* ============ Tables: data-dense, full width ============ */
.table-wrap {
  overflow-x: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 18px;
}
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th {
  background: #1a2236; font-size: .74rem; color: var(--muted);
  font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap; position: sticky; top: 0;
}
tbody tr { transition: background .12s; }
tbody tr:nth-child(even) td { background: rgba(255,255,255,.018); }
tbody tr:hover td { background: rgba(34, 211, 238, .06); }
tbody tr:last-child td { border-bottom: none; }
tr.row-low td { background: rgba(255, 107, 107, .08); }
tr.row-low td:first-child { border-left: 4px solid var(--danger); }
tr.row-low:hover td { background: rgba(255, 107, 107, .13); }
tr.row-short td { background: rgba(255, 107, 107, .08); }
tr.row-short td:first-child { border-left: 4px solid var(--danger); }
.shortfall-note { width: 100%; margin: 8px 0 0; color: var(--warn); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Highlighted sale price: bold neon cyan — quick to spot on the stock list */
.price-hl {
  font-weight: 800; font-size: 1.18rem; color: var(--accent);
  white-space: nowrap; text-shadow: 0 0 14px rgba(34, 211, 238, .4);
}
.net-big { font-size: 2.1rem; font-weight: 800; }

/* ============ Forms ============ */
form label { display: block; margin: 10px 0 4px; font-weight: 600; font-size: .9rem; color: #c9d2e6; }
input[type=text], input[type=number], input[type=date], input[type=month],
input[type=tel], input[type=password], select, textarea {
  width: 100%; padding: 10px 13px; border: 1px solid #2e3a55; border-radius: 9px;
  font-size: .96rem; background: #0f1626; color: var(--text); font-family: var(--font);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #5d6a86; }
select option { background: #151c2e; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .16), 0 0 14px rgba(34,211,238,.12);
}
input[type=date]::-webkit-calendar-picker-indicator,
input[type=month]::-webkit-calendar-picker-indicator { filter: invert(.7); }
textarea { min-height: 70px; resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.form-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.form-box h2 { margin-top: 0; }
.inline-form { display: inline; }
.qty-input { max-width: 90px; }

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  background: linear-gradient(180deg, #8ff3ff, #0fb9d8);
  color: #062b36; border: 1px solid #0e9dbf;
  padding: 10px 20px; border-radius: 9px; font-size: .96rem; font-weight: 700;
  cursor: pointer; text-decoration: none; margin: 4px 6px 4px 0; text-align: center;
  box-shadow: 0 0 14px rgba(34, 211, 238, .35), 0 2px 6px rgba(0,0,0,.4);
  transition: filter .15s, transform .1s, box-shadow .15s;
  font-family: var(--font);
}
.btn:hover { filter: brightness(1.1); color: #062b36; box-shadow: 0 0 22px rgba(34,211,238,.55), 0 2px 6px rgba(0,0,0,.4); }
.btn:active { transform: translateY(1px); }
.btn-big { font-size: 1.05rem; padding: 12px 24px; }
.btn-small { font-size: .85rem; padding: 7px 13px; margin: 2px 4px 2px 0; }
.btn-grey { background: linear-gradient(180deg, #3a4763, #2a3450); border-color: #2a3450; color: #e9edf5; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.btn-grey:hover { color: #fff; filter: brightness(1.15); box-shadow: 0 0 14px rgba(120,140,180,.35); }
.btn-red { background: linear-gradient(180deg, #ff7b7b, #d63d3d); border-color: #b91c1c; color: #1c0505; box-shadow: 0 0 14px rgba(255,107,107,.3); }
.btn-red:hover { color: #1c0505; box-shadow: 0 0 22px rgba(255,107,107,.5); }
.btn-blue { background: linear-gradient(180deg, #6fb5ff, #2f7fe0); border-color: #1d4ed8; color: #04101f; box-shadow: 0 0 14px rgba(90,169,255,.3); }
.btn-blue:hover { color: #04101f; box-shadow: 0 0 22px rgba(90,169,255,.5); }
.btn-wa { background: linear-gradient(180deg, #35f283, #0fc25c); border-color: #0aa850; color: #062b36; }
.btn-ghost {
  background: rgba(255,255,255,.04); color: var(--text);
  border: 1px solid var(--border); box-shadow: none;
}
.btn-ghost:hover { background: rgba(34,211,238,.1); color: #fff; border-color: var(--accent); box-shadow: 0 0 14px rgba(34,211,238,.25); }

/* ============ Flash messages ============ */
.flash {
  padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600;
  border: 1px solid; border-left-width: 5px; font-size: .94rem;
}
.flash-ok { background: rgba(34,211,238,.09); color: #a5f3fc; border-color: rgba(34,211,238,.3); border-left-color: var(--accent); }
.flash-err { background: rgba(255,107,107,.09); color: #ffa3a3; border-color: rgba(255,107,107,.3); border-left-color: var(--danger); }

/* ============ Auth pages (premium centered card, dark) ============ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 480px at 15% 10%, rgba(34, 211, 238, .1), transparent 60%),
    radial-gradient(800px 500px at 90% 90%, rgba(58, 226, 255, .09), transparent 60%),
    linear-gradient(135deg, #0c1222 0%, #070b15 100%);
}
.auth-card {
  width: 100%; max-width: 400px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-lg), 0 0 30px rgba(34,211,238,.08);
  padding: 34px 32px 30px; text-align: center;
}
.auth-logo {
  width: 62px; height: 62px; border-radius: 17px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center; font-size: 1.9rem;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  box-shadow: var(--glow);
}
.auth-card h1 { font-size: 1.5rem; margin: 0 0 4px; color: #fff; }
.auth-card .muted { font-size: .92rem; margin: 0 0 8px; }
.auth-card form { text-align: left; margin-top: 10px; }
.auth-card .btn { width: 100%; margin: 14px 0 0; padding: 12px; font-size: 1.02rem; }
.auth-foot { margin-top: 16px; font-size: .8rem; color: #5d6a86; }
/* legacy class kept for compatibility */
.auth-box {
  max-width: 380px; margin: 60px auto; background: var(--surface); padding: 26px;
  border-radius: 14px; border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); text-align: center;
}

/* ============ Invoice view (screen) ============ */
.invoice {
  background: var(--surface); max-width: 680px; margin: 0 auto; padding: 26px;
  border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.invoice-head { text-align: center; border-bottom: 2px solid var(--accent); padding-bottom: 12px; margin-bottom: 14px; }
.invoice-head h1 { margin: 0; color: var(--accent); text-shadow: 0 0 16px rgba(34,211,238,.3); }
.invoice-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.totals { max-width: 280px; margin-left: auto; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand, .grand { font-weight: bold; font-size: 1.15rem; border-top: 2px solid var(--border); margin-top: 6px; padding-top: 8px; }
.action-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; justify-content: center; }
.line-total { font-variant-numeric: tabular-nums; }
.thanks { text-align: center; }

/* ============ Status pills ============ */
.status { padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; display: inline-block; border: 1px solid transparent; }
.st-Received { background: var(--warn-soft); color: var(--warn); border-color: rgba(255,176,46,.3); }
.st-Partially\ Received { background: rgba(255,176,46,.18); color: #ffcf6e; border-color: rgba(255,176,46,.35); }
.st-Sent { background: var(--info-soft); color: var(--info); border-color: rgba(90,169,255,.3); }
.st-Draft { background: rgba(255,255,255,.05); color: var(--muted); border-color: var(--border); }
.st-InRepair, .st-In\ Repair { background: var(--info-soft); color: var(--info); border-color: rgba(90,169,255,.3); }
.st-Ready { background: var(--accent-soft); color: var(--accent); border-color: rgba(34,211,238,.3); }
.st-Delivered { background: rgba(255,255,255,.05); color: var(--muted); border-color: var(--border); }
.st-Cancelled { background: var(--danger-soft); color: var(--danger); border-color: rgba(255,107,107,.3); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { width: auto; }

/* Legacy top-nav classes (kept so nothing breaks if referenced) */
.topbar .nav { display: none; }
.nav a.on { font-weight: 700; }

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .content { padding: 18px 20px 40px; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; width: 262px; flex-basis: 262px; }
  .sidebar.open { transform: none; }
  .side-overlay.show { display: block; }
  .main { margin-left: 0; }
  .nav-toggle { display: block; }
  .topbar-inner { padding: 10px 14px; }
  .content { padding: 14px 14px 36px; }
  .user-chip span.uname { display: none; }
  .chart { height: 190px; gap: 7px; }
  .bar-val { font-size: .62rem; }
  h1 { font-size: 1.25rem; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .card-value { font-size: 1.35rem; }
}

@media print {
  .sidebar, .topbar, .action-bar, .no-print, .footer { display: none !important; }
  .main { margin-left: 0; }
  body { background: #fff; color: #000; }
  .content { padding: 0; }
  .invoice { background: #fff; color: #000; border: none; box-shadow: none; }
  .invoice h1, .invoice-head h1 { color: #000; text-shadow: none; }
  .price-hl { color: #000; text-shadow: none; }
  th { background: #eee; color: #000; }
  td, th { border-color: #999; }
  a { color: #000; }
}

/* Footer credit */
.credit { margin-top: 10px; font-size: .72rem; color: #8b94ad; text-align: center; }
.credit a { color: var(--accent); text-decoration: none; font-weight: 600; }
.credit a:hover { text-decoration: underline; }
.auth-card .credit { margin-top: 14px; }

/* ============ Styled confirm modal ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(4, 8, 16, .72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: 16px;
  max-width: 420px; width: 100%; padding: 30px 28px; text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.6), 0 0 30px rgba(34,211,238,.15);
  animation: modalIn .22s cubic-bezier(.2,.9,.3,1.15);
}
@keyframes modalIn {
  from { transform: scale(.9) translateY(12px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal-icon { font-size: 2.6rem; margin-bottom: 12px; }
.modal-card h3 { margin: 0 0 8px; color: #fff; font-size: 1.3rem; }
.modal-card p { color: var(--muted); margin: 0 0 22px; line-height: 1.5; }
.modal-actions { display: flex; gap: 12px; justify-content: center; }
.modal-actions .btn { margin: 0; min-width: 110px; }

/* ============ Status badges ============ */
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: .78rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  white-space: nowrap;
}
.badge-ok { background: rgba(34,211,238,.14); color: var(--accent); border: 1px solid rgba(34,211,238,.4); box-shadow: 0 0 10px rgba(34,211,238,.2); }
.badge-warn { background: rgba(255,176,46,.13); color: var(--warn); border: 1px solid rgba(255,176,46,.4); }
.badge-err { background: rgba(255,107,107,.13); color: var(--danger); border: 1px solid rgba(255,107,107,.4); }
.badge-info { background: rgba(90,169,255,.13); color: var(--info); border: 1px solid rgba(90,169,255,.4); }

/* ============ Supplier profile ============ */
.profile-head {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow);
}
.profile-id { display: flex; gap: 16px; align-items: center; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 18px; flex: 0 0 64px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; font-weight: 800; color: #04121a;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  box-shadow: var(--glow);
}
.profile-head h1 { margin: 0 0 4px; font-size: 1.5rem; }
.profile-head .muted { margin: 2px 0; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.profile-actions .btn { margin: 0; }
.danger-zone {
  border: 1px solid rgba(255,107,107,.35); border-radius: var(--radius);
  background: rgba(255,107,107,.05); padding: 18px 20px; margin-top: 24px;
}
.danger-zone h3 { margin: 0 0 6px; color: var(--danger); }
.danger-zone p { color: var(--muted); margin: 0 0 12px; font-size: .9rem; }
.money-pos { color: var(--accent); font-weight: 800; }
.money-neg { color: var(--warn); font-weight: 800; }
tr.row-click { cursor: pointer; }
@media (max-width: 640px) {
  .modal-card { padding: 24px 20px; }
  .profile-avatar { width: 52px; height: 52px; flex-basis: 52px; font-size: 1.4rem; }
}

/* ============ Supplier with open (unreceived) orders ============ */
tr.row-open-order td {
  background: rgba(255, 176, 46, .07);
}
tr.row-open-order td:first-child {
  box-shadow: inset 4px 0 0 var(--warn);
}
tr.row-open-order:hover td {
  background: rgba(255, 176, 46, .12);
}
.open-order-banner {
  border: 1px solid rgba(255,176,46,.45); border-radius: var(--radius);
  background: rgba(255,176,46,.08); color: var(--warn);
  padding: 12px 18px; margin-bottom: 20px; font-weight: 700;
  box-shadow: 0 0 14px rgba(255,176,46,.12);
}
.open-order-banner a { color: var(--warn); }
