/* ── Design Tokens ──────────────────────────────────────────────────────────── */
:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-hover: #d1d5db;
  --text: #111827;
  --muted: #6b7280;
  --subtle: #9ca3af;
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;
  --gold: #d97706;
  --gold-light: #fffbeb;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 16px rgba(0,0,0,0.07);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.10);
  --t: 0.15s ease;
}

/* ── Reset & Base ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
main { min-height: 70vh; }
img { display: block; max-width: 100%; }

/* ── Site Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 62px;
  padding: 0 clamp(16px, 4vw, 64px);
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.top-nav { display: flex; align-items: center; gap: 2px; }
.top-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
  font-size: 0.88rem;
  transition: background var(--t), color var(--t);
  white-space: nowrap;
}
.top-nav a:hover { background: var(--bg); color: var(--text); }
.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}
.nav-login-btn {
  margin-left: 6px;
  padding: 7px 15px !important;
  border-radius: var(--radius-full) !important;
  border: 1.5px solid var(--border) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t) !important;
}
.nav-login-btn:hover { border-color: var(--primary) !important; color: var(--primary) !important; }
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 4px;
  padding: 6px 12px !important;
  border-radius: var(--radius-full) !important;
  border: 1.5px solid var(--primary-border) !important;
  background: var(--primary-light) !important;
  color: var(--primary) !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}
.nav-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Toast / Messages ────────────────────────────────────────────────────────── */
.messages { padding: 12px clamp(16px, 4vw, 64px) 0; display: grid; gap: 8px; }
.message {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.88rem;
  font-weight: 500;
}
.message.error { background: var(--danger-light); border-color: var(--danger-border); color: var(--danger); }

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(48px, 6vw, 96px) clamp(16px, 4vw, 64px) clamp(32px, 4vw, 56px);
  background: linear-gradient(150deg, #f0fdf4 0%, #ffffff 55%);
}
.hero-copy { max-width: 560px; }
.hero-copy h1 {
  margin: 12px 0 24px;
  font-size: clamp(1.75rem, 3.5vw, 2.9rem);
  line-height: 1.13;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
}
.hero-image {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  background: white;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}
.trust-chip::before { content: '✓'; color: var(--primary); font-weight: 800; }

/* ── Search ──────────────────────────────────────────────────────────────────── */
.search-bar {
  display: flex;
  max-width: 500px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: white;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t), box-shadow var(--t);
}
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5,150,105,0.12); }
.search-bar input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 11px 16px;
  background: transparent;
  color: var(--text);
  min-width: 0;
  font-size: 0.92rem;
}
.search-bar input::placeholder { color: var(--subtle); }
.search-bar button {
  flex-shrink: 0;
  margin: 4px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 0;
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background var(--t);
}
.search-bar button:hover { background: var(--primary-hover); }

/* ── Category Strip ──────────────────────────────────────────────────────────── */
.category-strip {
  display: flex;
  gap: 6px;
  padding: 14px clamp(16px, 4vw, 64px);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  background: white;
}
.category-strip::-webkit-scrollbar { display: none; }
.category-strip a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--t);
  flex-shrink: 0;
}
.category-strip a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.category-strip a.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ── Section Heading ─────────────────────────────────────────────────────────── */
.section-heading, .page-title, .staff-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 32px clamp(16px, 4vw, 64px) 18px;
}
.section-heading h2, .page-title h1, .staff-head h1 {
  margin: 4px 0 0;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.ghost-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-border);
  background: var(--primary-light);
  transition: all var(--t);
  white-space: nowrap;
}
.ghost-link:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ── Product Grid & Cards ────────────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  padding: 0 clamp(16px, 4vw, 64px) 64px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--t), transform var(--t), border-color var(--t);
}
.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--border-hover);
}
.product-art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 136px;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--primary-light);
  color: var(--primary);
}
.product-art.sky     { background: #eff6ff; color: #1d4ed8; }
.product-art.coral   { background: #fff7ed; color: #c2410c; }
.product-art.gold    { background: #fffbeb; color: #b45309; }
.product-art.lavender{ background: #f5f3ff; color: #7c3aed; }
.product-body { padding: 13px 15px 15px; }
.category-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--primary);
}
.product-body h3 {
  margin: 5px 0 3px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.38;
  min-height: 38px;
  color: var(--text);
}
.product-body h3 a:hover { color: var(--primary); }
.product-body > p { color: var(--muted); font-size: 0.79rem; margin-bottom: 8px; }
.price-row { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; margin: 7px 0; }
.price-row strong { font-size: 1.08rem; font-weight: 700; }
.price-row span  { font-size: 0.78rem; color: var(--subtle); text-decoration: line-through; }
.price-row em    { font-size: 0.72rem; font-style: normal; font-weight: 700; color: var(--gold); background: var(--gold-light); padding: 1px 5px; border-radius: 4px; }
.price-row.large strong { font-size: 1.75rem; }
.stock-row { font-size: 0.78rem; font-weight: 600; color: var(--primary); margin: 4px 0 10px; }
.stock-row.warn { color: var(--danger); }
.alert-text { color: var(--danger); font-size: 0.8rem; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--primary);
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background var(--t), box-shadow var(--t), transform var(--t);
  text-align: center;
  line-height: 1.3;
}
.button:hover  { background: var(--primary-hover); box-shadow: 0 2px 10px rgba(5,150,105,0.28); }
.button:active { transform: scale(0.98); }
.button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.button.full { width: 100%; }
.button.outline { background: transparent; color: var(--primary); }
.button.outline:hover { background: var(--primary-light); box-shadow: none; }
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--t);
}
.ghost-button:hover { border-color: var(--border-hover); color: var(--text); }

/* ── Layouts ─────────────────────────────────────────────────────────────────── */
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  padding: 28px clamp(16px, 4vw, 64px) 64px;
  align-items: start;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1fr);
  gap: 36px;
  padding: 40px clamp(16px, 4vw, 64px) 64px;
  align-items: start;
}
.detail-art {
  border-radius: var(--radius);
  background: var(--primary-light);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.04em;
}
.detail-art.sky     { background: #eff6ff; color: #1d4ed8; }
.detail-art.coral   { background: #fff7ed; color: #c2410c; }
.detail-art.gold    { background: #fffbeb; color: #b45309; }
.detail-art.lavender{ background: #f5f3ff; color: #7c3aed; }
.detail-copy h1 {
  margin: 6px 0 12px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}
.detail-copy > p { color: var(--muted); line-height: 1.72; margin-bottom: 20px; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin: 18px 0;
}
.info-grid div { padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.info-grid span { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }
.info-grid strong { font-weight: 600; font-size: 0.9rem; }
.buy-box { display: flex; gap: 10px; align-items: center; margin-top: 22px; }
.buy-box input {
  width: 84px;
  padding: 9px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.95rem;
  transition: border-color var(--t);
}
.buy-box input:focus { outline: 0; border-color: var(--primary); }

/* ── Cart / Line Items ───────────────────────────────────────────────────────── */
.line-list { display: grid; gap: 10px; }
.line-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  transition: border-color var(--t);
}
.line-item h3 { margin: 0 0 3px; font-size: 0.93rem; font-weight: 600; }
.line-item p, .line-item small { color: var(--muted); font-size: 0.82rem; }
.clickable:hover { border-color: var(--primary); }
.qty-form { display: flex; gap: 6px; align-items: center; }
.qty-form input {
  width: 60px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.88rem;
}

/* ── Summary Card ────────────────────────────────────────────────────────────── */
.summary-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.summary-card h2 { font-size: 0.95rem; font-weight: 700; margin-bottom: 14px; }
.summary-card > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}
.summary-card > div strong { color: var(--text); font-weight: 600; }
.summary-card > .total {
  border-bottom: 0;
  padding-top: 13px;
  font-weight: 700;
  color: var(--text);
  font-size: 0.97rem;
}
.summary-card > .total strong { font-size: 1.15rem; }
.summary-card .button { margin-top: 14px; }
.sticky { position: sticky; top: 76px; }

/* ── Checkout ────────────────────────────────────────────────────────────────── */
.checkout-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.checkout-panel h2 { font-size: 0.93rem; font-weight: 700; margin-bottom: 14px; }
.address-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.address-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 13px 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
  position: relative;
}
.address-card input[type="radio"] { position: absolute; top: 11px; right: 11px; accent-color: var(--primary); }
.address-card:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.address-card strong { font-size: 0.88rem; font-weight: 600; padding-right: 22px; }
.address-card span   { font-size: 0.8rem; color: var(--muted); }
.address-card small  { font-size: 0.75rem; color: var(--subtle); }
.addr-delete {
  margin-top: 6px;
  padding: 3px 0;
  border: 0;
  background: none;
  color: var(--danger);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  opacity: 0;
  transition: opacity var(--t);
}
.address-card:hover .addr-delete { opacity: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.form-group { display: grid; gap: 5px; }
.form-group label { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.field-control {
  width: 100%;
  padding: 9px 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text);
  font-size: 0.88rem;
  transition: border-color var(--t), box-shadow var(--t);
  min-width: 0;
}
.field-control:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5,150,105,0.1); }
.add-addr-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  width: 100%;
  text-align: left;
  transition: color var(--t);
}
.add-addr-toggle:hover { color: var(--primary-hover); }
.add-addr-toggle span { margin-left: auto; font-size: 1rem; transition: transform var(--t); }
.add-addr-toggle.open span { transform: rotate(45deg); }
.add-addr-form { padding-top: 16px; }
.location-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
  margin-bottom: 13px;
}
.location-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.location-status { font-size: 0.78rem; color: var(--muted); margin-left: 6px; }
.max-addr-note {
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  background: var(--gold-light);
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.82rem;
  font-weight: 500;
}

/* ── Login Gate ──────────────────────────────────────────────────────────────── */
.login-gate {
  text-align: center;
  padding: 40px 20px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.login-gate-icon { font-size: 2.5rem; margin-bottom: 12px; }
.login-gate h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 7px; }
.login-gate p { color: var(--muted); font-size: 0.88rem; margin-bottom: 20px; }

/* ── OTP Login Modal ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  position: relative;
  width: min(420px, 100%);
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(0.96);
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  background: var(--bg);
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t);
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 20px;
  color: var(--text);
}
.modal-logo span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-weight: 800;
}
.modal h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 5px; }
.modal > p { color: var(--muted); font-size: 0.88rem; margin-bottom: 22px; }
.modal-progress {
  display: flex;
  gap: 5px;
  margin-bottom: 22px;
}
.modal-progress span {
  flex: 1;
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--border);
  transition: background 0.3s;
}
.modal-progress span.done { background: var(--primary); }
.modal-field { display: grid; gap: 6px; margin-bottom: 14px; }
.modal-field label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.modal-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color var(--t), box-shadow var(--t);
  color: var(--text);
}
.modal-input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5,150,105,0.1); }
.otp-input {
  letter-spacing: 0.32em;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
}
.modal-err { min-height: 18px; color: var(--danger); font-size: 0.8rem; margin: 6px 0 10px; }
.modal-submit {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 0;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--t), box-shadow var(--t);
  margin-top: 4px;
}
.modal-submit:hover { background: var(--primary-hover); box-shadow: 0 2px 10px rgba(5,150,105,0.3); }
.modal-submit:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.modal-resend { text-align: center; margin-top: 12px; font-size: 0.82rem; color: var(--muted); }
.modal-resend button { background: none; border: none; color: var(--primary); font-weight: 600; cursor: pointer; padding: 0; }
.modal-resend button:disabled { color: var(--subtle); cursor: default; }
.modal-back { background: none; border: 0; color: var(--muted); font-size: 0.82rem; cursor: pointer; padding: 0; margin-bottom: 12px; }
.modal-back:hover { color: var(--text); }

/* ── Order Receipt ───────────────────────────────────────────────────────────── */
.receipt {
  max-width: 640px;
  margin: 36px auto 64px;
  padding: 30px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.receipt-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.receipt h1 { font-size: 1.5rem; font-weight: 800; margin: 4px 0 0; letter-spacing: -0.02em; }
.receipt-meta { color: var(--muted); font-size: 0.86rem; margin-bottom: 18px; }
.receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.receipt-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 0;
  font-weight: 700;
  font-size: 1rem;
}
.a5-bill {
  max-width: 1120px;
}
.bill-paper {
  width: min(100%, 210mm);
  min-height: 148mm;
  margin: 0 auto;
  padding: 8mm;
  border: 1px solid #d9e1e7;
  background: #fff;
  color: #111827;
}
.invoice-header,
.bill-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #d9e1e7;
  padding-bottom: 10px;
}
.invoice-header {
  display: grid;
  grid-template-columns: 1.25fr .8fr 1.25fr;
  align-items: start;
  gap: 16px;
}
.invoice-pharmacy {
  display: flex;
  gap: 9px;
  min-width: 0;
}
.invoice-pharmacy img {
  width: 38px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
}
.invoice-pharmacy h1 {
  color: #087a39;
  font-size: 1.25rem;
  margin: 0 0 4px;
  letter-spacing: 0;
  text-transform: uppercase;
}
.invoice-pharmacy strong {
  display: block;
  font-size: .66rem;
  margin-bottom: 4px;
}
.invoice-pharmacy p,
.bill-footer {
  margin: 1px 0;
  font-size: 0.65rem;
  color: #475569;
}
.invoice-title {
  min-height: 100%;
  padding: 0 12px;
  border-left: 1px solid #cbd5e1;
  border-right: 1px solid #cbd5e1;
  text-align: center;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
}
.invoice-title h2 {
  margin: 0;
  font-size: 1.3rem;
  text-transform: uppercase;
}
.invoice-title p {
  margin: 0;
  color: #475569;
  font-size: .68rem;
}
.invoice-title strong {
  padding: 5px 9px;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  font-size: .66rem;
}
.invoice-reference-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 9px;
  margin: 0;
  font-size: .65rem;
}
.invoice-reference-grid dt {
  color: #475569;
  font-weight: 700;
}
.invoice-reference-grid dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.invoice-customer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 22px;
  padding: 9px 6px;
  border-bottom: 1px solid #cbd5e1;
  font-size: .69rem;
}
.invoice-customer-grid div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
}
.invoice-customer-grid span {
  color: #475569;
  font-weight: 700;
}
.bill-items {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 14px;
  font-size: 0.67rem;
}
.bill-paper .bill-items th,
.bill-paper .bill-items td {
  border-bottom: 1px solid #e5e7eb !important;
  padding: 6px 5px !important;
  text-align: left;
  vertical-align: top;
  font-size: 0.67rem !important;
}
.bill-paper .bill-items th {
  color: #fff !important;
  background: #0f2743 !important;
  font-size: 0.62rem !important;
  text-transform: uppercase;
  letter-spacing: 0 !important;
}
.bill-items th:nth-child(1) { width: 20%; }
.bill-items th:nth-child(2) { width: 12%; }
.bill-items th:nth-child(3) { width: 10%; }
.bill-items th:nth-child(4) { width: 11%; }
.bill-items th:nth-child(5) { width: 17%; }
.bill-items th:nth-child(6) { width: 10%; }
.bill-items th:nth-child(7) { width: 9%; }
.bill-items th:nth-child(8) { width: 11%; }
.bill-items th:last-child,
.bill-items td:last-child {
  text-align: right;
}
.bill-paper .bill-items tr:hover td { background: #fff !important; }
.bill-items tbody tr { break-inside: avoid; }
.invoice-summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 42%);
  align-items: start;
  gap: 20px;
  margin-top: 12px;
}
.invoice-closing {
  break-inside: avoid;
  page-break-inside: avoid;
}
.invoice-summary-note {
  color: #0f2743;
  font-size: .72rem;
}
.invoice-summary-note p {
  margin: 26px 0 0;
  color: #087a39;
  font-weight: 700;
}
.bill-total-box {
  width: 100%;
  margin: 0;
  display: grid;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  overflow: hidden;
  font-size: 0.7rem;
}
.bill-total-box div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 8px;
  border-bottom: 1px solid #cbd5e1;
}
.bill-total-box div > span {
  display: grid;
  gap: 1px;
}
.bill-total-box small {
  color: #64748b;
  font-size: .55rem;
}
.bill-total-box .discount { color: #b42318; }
.bill-total-box .after-discount { color: #1456a0; }
.bill-total-box .gst { color: #166534; }
.bill-total-box .grand {
  border-top: 0;
  border-bottom: 0;
  padding-top: 7px;
  background: #0b5d36;
  color: #ffffff;
  font-size: .82rem;
}
.bill-footer {
  margin-top: 12px;
  border-top: 1px solid #d9e1e7;
  border-bottom: 0;
  padding-top: 10px;
  padding-bottom: 0;
}
.bill-note {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
  color: #475569;
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: center;
}
.invoice-advisories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  break-inside: avoid;
}
.invoice-advisories strong {
  padding: 7px 8px;
  font-size: .57rem;
  line-height: 1.35;
  text-transform: uppercase;
  text-align: center;
}
.invoice-advisories strong + strong { border-left: 1px solid #cbd5e1; }
.bill-developer-footer {
  margin-top: 6px;
  color: #334155;
  font-size: 0.58rem;
  line-height: 1.35;
  text-align: center;
}
.rack-report-title {
  margin: 18px 0 8px;
  font-size: 0.95rem;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}
.status.cancelled { background: var(--danger-light); color: var(--danger); border-color: var(--danger-border); }

/* ── Staff Shell ─────────────────────────────────────────────────────────────── */
.staff-shell { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: 72vh; }
.staff-sidebar { padding: 18px 12px; border-right: 1px solid var(--border); background: white; }
.staff-title { margin-bottom: 14px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--subtle); }
.staff-sidebar a { display: block; padding: 8px 11px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; font-size: 0.88rem; margin-bottom: 2px; transition: background var(--t), color var(--t); }
.staff-sidebar a:hover { background: var(--bg); color: var(--text); }
.staff-content { min-width: 0; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 11px;
  padding: 0 clamp(16px, 4vw, 64px) 20px;
}
.metric-grid div { padding: 15px; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
.metric-grid span { display: block; color: var(--subtle); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 7px; }
.metric-grid strong { font-size: 1.55rem; font-weight: 800; }
.admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0 clamp(16px, 4vw, 64px) 48px; }
.admin-panel { padding: 16px; background: white; border: 1px solid var(--border); border-radius: var(--radius); }
.admin-panel h2 { font-size: 0.9rem; font-weight: 700; margin-bottom: 12px; }
.mini-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 0.84rem; }
.mini-row:last-child { border-bottom: 0; }
.admin-search { display: flex; gap: 10px; margin: 0 clamp(16px, 4vw, 64px) 14px; padding: 5px 5px 5px 14px; border: 1px solid var(--border); border-radius: var(--radius-full); background: white; }
.admin-search input { border: 0; outline: 0; flex: 1; background: transparent; font-size: 0.88rem; }
.table-wrap { overflow: auto; margin: 0 clamp(16px, 4vw, 64px) 48px; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th { padding: 11px 14px; text-align: left; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--subtle); border-bottom: 1px solid var(--border); }
td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 0.88rem; }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--muted); font-size: 0.77rem; margin-top: 2px; }
.form-card { margin: 0 clamp(16px, 4vw, 64px) 48px; padding: 22px; max-width: 780px; background: white; border: 1px solid var(--border); border-radius: var(--radius); }
.login-shell { display: grid; place-items: center; min-height: calc(100vh - 62px); padding: 32px 16px; background: var(--bg); }
.login-card { width: min(420px, 100%); padding: 30px; background: white; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: 22px; }
.billing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; padding: 22px clamp(16px, 4vw, 64px) 64px; }
.billing-panel { min-width: 0; }
.customer-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.billing-search { position: relative; margin-bottom: 12px; }
.search-results {
  position: absolute;
  inset: calc(100% + 6px) 0 auto 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  max-height: 460px;
  overflow-y: auto;
  padding: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.result-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  font-size: 0.86rem;
  transition: background var(--t), border-color var(--t);
  text-align: left;
}
.result-row:hover { background: var(--primary-l, #ecfdf5); border-color: var(--primary, #059669); }
.result-row strong { font-weight: 700; color: var(--text); }
.result-row span { color: var(--muted); font-size: 0.74rem; line-height: 1.4; }
.mini-input { width: 68px; }
.form-row { display: grid; gap: 5px; margin-bottom: 11px; }
.form-row label { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: var(--radius-full); border: 1px solid var(--border); font-size: 0.76rem; font-weight: 600; color: var(--muted); }
.empty-state { padding: 36px 24px; border: 1.5px dashed var(--border); border-radius: var(--radius); background: white; color: var(--muted); text-align: center; font-size: 0.88rem; }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 64px); color: var(--subtle); font-size: 0.8rem; border-top: 1px solid var(--border); background: white; }
.status-form { display: flex; gap: 6px; align-items: center; }
.status-form select { padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; cursor: pointer; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero, .detail-layout, .split-layout, .billing-layout { grid-template-columns: 1fr; }
  .hero { padding-bottom: 28px; }
  .hero-image { max-height: 280px; }
  .staff-shell { grid-template-columns: 1fr; }
  .staff-sidebar { border-right: 0; border-bottom: 1px solid var(--border); display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; }
  .staff-title { display: none; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-grid { grid-template-columns: repeat(2, 1fr); }
  .sticky { position: static; }
}
@media (max-width: 620px) {
  .site-header { height: auto; padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .hero-copy h1 { font-size: 1.7rem; }
  .form-grid, .customer-row, .info-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .line-item { grid-template-columns: 1fr; }
  .section-heading, .page-title, .staff-head { flex-direction: column; align-items: flex-start; }
  .footer { flex-direction: column; gap: 6px; }
}

/* ── Premium Staff ERP Dashboard ───────────────────────────────────────────── */
.staff-shell {
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
  background: #fbfcfd;
}
.staff-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
  border-right: 1px solid #e8eef0;
}
.brand-stack {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 28px 8px;
}
.brand-cross,
.brand-logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 4px solid var(--primary);
  color: var(--primary);
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}
.brand-logo {
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
}
.brand-logo img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  display: block;
}
.brand-stack strong {
  display: block;
  color: #0f2141;
  font-size: 1.42rem;
  line-height: 1.02;
  font-weight: 900;
}
.brand-stack span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}
.staff-sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 13px;
  border-radius: 8px;
  color: #334155;
  font-weight: 650;
  font-size: 0.94rem;
}
.staff-sidebar a.active,
.staff-sidebar a:hover {
  background: #e5f6f2;
  color: #047b6d;
}
.nav-ico {
  display: grid;
  place-items: center;
  width: 23px;
  color: inherit;
  font-weight: 900;
}
.side-callout {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e4f8f2, #f4fffb);
  color: #047b6d;
}
.side-callout span { color: #047b6d; font-size: 0.82rem; }
.staff-content { padding: 18px 28px 42px; }
.software-footer {
  margin-top: 28px;
  padding: 14px 8px 0;
  border-top: 1px solid #e6ebef;
  color: #8a94a6;
  font-size: 0.78rem;
  font-weight: 650;
  text-align: center;
}
.software-footer strong {
  color: #047b6d;
  font-weight: 800;
}
.login-footer {
  width: min(420px, 100%);
  margin-top: 0;
}
.staff-topbar {
  display: grid;
  grid-template-columns: 40px minmax(240px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}
.menu-dot,
.admin-chip {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #e4f8f2;
  color: #047b6d;
  font-weight: 800;
}
.staff-search {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  max-width: 500px;
  padding: 0 14px;
  height: 42px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
}
.staff-search input {
  border: 0;
  outline: 0;
  min-width: 0;
  color: #334155;
}
.admin-name { display: grid; line-height: 1.2; }
.admin-name span { color: var(--muted); font-size: 0.82rem; }
.staff-head {
  padding: 0 4px 18px;
  align-items: center;
}
.staff-head h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.55rem;
  font-weight: 850;
}
.staff-head p {
  margin: 5px 0 0;
  color: var(--muted);
}
.dashboard-metrics {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 20px;
  padding: 0 0 22px;
}
.metric-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
  gap: 0 18px;
  min-height: 130px;
  padding: 20px 22px !important;
  border: 1px solid #e6ebef !important;
  border-radius: 8px !important;
  background: white !important;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
}
.metric-card .metric-icon { align-self: center; }
.metric-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: center;
}
.metric-card p { margin: 0; color: #111827; font-weight: 650; }
.metric-card strong {
  display: block;
  max-width: 100%;
  color: #0f172a;
  font-size: clamp(1.28rem, 1.8vw, 1.55rem);
  line-height: 1.15;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.metric-card small {
  display: block;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.metric-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  color: white;
  font-weight: 900;
  font-size: 1.5rem;
}
.metric-icon.green { background: linear-gradient(135deg, #35c99a, #079b7f); }
.metric-icon.blue { background: linear-gradient(135deg, #6ec7ff, #2384e8); }
.metric-icon.purple { background: linear-gradient(135deg, #aa7cf7, #7042dd); }
.metric-icon.orange { background: linear-gradient(135deg, #ffa366, #ff744c); }
.metric-icon.red { background: linear-gradient(135deg, #ff7a9a, #ec3f63); }
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 20px;
  margin-bottom: 20px;
}
.dashboard-bottom {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 0.95fr) minmax(320px, 0.8fr);
  gap: 20px;
}
.dashboard-bottom.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-panel {
  border: 1px solid #e6ebef;
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-head h2 { margin: 0; color: #111827; font-size: 1rem; }
.panel-head a,
.panel-head span { color: #047b6d; font-weight: 750; font-size: 0.86rem; }
.sales-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 16px;
  height: 220px;
  padding: 18px 12px 0;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(180deg, transparent 0, transparent 78%, #effaf7 78%);
}
.bar-col {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  height: 100%;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}
.bar-col span {
  align-self: end;
  min-height: 8px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #0ca896, #dcf5ee);
}
.chart-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-top: 16px;
}
.chart-summary span,
.report-list span { display: block; color: var(--muted); font-size: 0.82rem; }
.chart-summary strong,
.report-list strong { color: #111827; font-size: 1.02rem; }
.good { color: #059669 !important; }
.mini-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: auto; }
.mini-table th,
.mini-table td {
  padding: 12px 0;
  border-bottom: 1px solid #eef2f4;
  text-align: left;
  font-size: 0.9rem;
}
.mini-table th { color: var(--muted); font-weight: 650; }
.linkish { color: #047b6d; font-weight: 750; }
.stock-pill {
  display: inline-flex;
  justify-content: center;
  min-width: 54px;
  padding: 3px 10px;
  border-radius: 8px;
  background: #fff4e6;
  color: #b45309;
  font-weight: 800;
}
.stock-pill.danger { background: #fee2e2; color: #dc2626; }
.bar-icon { color: #10b981; font-weight: 900; margin-right: 8px; }
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.quick-grid a {
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 98px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #111827;
  font-weight: 750;
}
.quick-grid .metric-icon { width: 48px; height: 48px; font-size: 1.1rem; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.row-actions form { margin: 0; }
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}
.form-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.split-admin {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(0, 1fr);
  gap: 20px;
  padding: 0 0 40px;
  align-items: start;
}
.no-margin { margin: 0; }
.wide { max-width: none; }
.section-pad { padding: 0 4px 40px; }
.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.permission-grid label,
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 650;
}
.report-list { display: grid; gap: 14px; }
.report-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #eef2f4;
}
.admin-search { grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) auto; }
.billing-layout {
  grid-template-columns: 1fr;
}
.billing-layout .summary-card {
  position: static;
  width: min(420px, 100%);
  justify-self: end;
  margin-top: 4px;
}
.billing-layout .table-wrap table {
  min-width: 980px;
}
.qty-unit-cell {
  display: flex;
  gap: 8px;
  align-items: center;
}
.qty-unit-cell .unit-input { min-width: 92px; }
.report-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 240px)) auto auto;
  gap: 12px;
  align-items: end;
  margin: 0 4px 20px;
  padding: 14px;
  border: 1px solid #e6ebef;
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
}

@media print {
  @page { size: A5 landscape; margin: 5mm; }
  html,
  body {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto;
    margin: 0;
    background: #fff;
  }
  .messages,
  .staff-sidebar,
  .staff-topbar,
  .staff-head,
  .receipt .head-actions,
  .no-print,
  .return-actions { display: none !important; }
  .staff-shell { display: block; min-height: auto; }
  .staff-content { padding: 0; margin: 0; }
  .receipt {
    box-shadow: none;
    border: 0;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .bill-paper {
    width: auto;
    min-height: auto;
    border: 0;
    padding: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .invoice-header,
  .invoice-customer-grid,
  .invoice-closing {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }
  .invoice-header { gap: 3mm; padding-bottom: 2mm; }
  .invoice-pharmacy img { width: 8mm; height: 9mm; }
  .invoice-pharmacy h1,
  .invoice-title h2 { font-size: 12pt; }
  .invoice-pharmacy strong,
  .invoice-pharmacy p,
  .invoice-reference-grid,
  .invoice-customer-grid { font-size: 6.4pt; }
  .invoice-title p,
  .invoice-title strong { font-size: 6.2pt; }
  .invoice-customer-grid { gap: .6mm 4mm; padding: 1.2mm 1mm; }
  .bill-items {
    margin-top: 2mm;
    font-size: 7pt;
  }
  .bill-items thead { display: table-header-group; }
  .bill-items tbody { display: table-row-group; }
  .bill-items tr {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }
  .bill-paper .bill-items th,
  .bill-paper .bill-items td {
    padding: .85mm .9mm !important;
    font-size: 6.5pt !important;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
  .bill-paper .bill-items th { font-size: 6.2pt !important; }
  .invoice-summary-layout { gap: 4mm; margin-top: 1.8mm; }
  .invoice-summary-note p { margin-top: 2mm; }
  .bill-total-box div { padding: .8mm 1.4mm; }
  .bill-total-box small { font-size: 5.2pt; }
  .bill-footer { margin-top: 1.6mm; padding-top: 1.2mm; padding-bottom: 0; }
  .invoice-advisories { margin-top: 1.4mm; }
  .invoice-advisories strong { padding: .9mm 1.2mm; font-size: 5.2pt; }
  .bill-developer-footer { margin-top: .7mm; font-size: 5.2pt; }
}
.report-filter label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}
.report-definition {
  display: flex;
  align-items: center;
  gap: 10px 18px;
  flex-wrap: wrap;
  margin: -8px 4px 16px;
  padding: 10px 12px;
  border: 1px solid #dce6df;
  border-radius: 6px;
  background: #f7faf8;
  color: #526159;
  font-size: .7rem;
}
.report-definition strong { color: #17633d; }
@media (max-width: 1100px) {
  .dashboard-metrics,
  .dashboard-grid,
  .dashboard-bottom,
  .split-admin { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .staff-shell { grid-template-columns: 1fr; }
  .staff-sidebar { position: static; height: auto; }
  .staff-topbar { grid-template-columns: 1fr; }
  .chart-summary,
  .quick-grid,
  .form-grid,
  .permission-grid { grid-template-columns: 1fr; }
  .dashboard-metrics { grid-template-columns: 1fr; }
  .report-filter { grid-template-columns: 1fr; }
}

/* ── Collapsible Sidebar ─────────────────────────────────────────────────── */
.staff-shell.sidebar-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}
.sidebar-collapsed .staff-sidebar {
  padding: 20px 8px;
  align-items: center;
  overflow: visible;
}
.sidebar-collapsed .brand-stack,
.sidebar-collapsed .side-callout {
  display: none;
}
.sidebar-collapsed .staff-sidebar a {
  justify-content: center;
  padding: 11px 0;
  font-size: 0;
  width: 100%;
}
.sidebar-collapsed .staff-sidebar a .nav-ico {
  font-size: 1.1rem;
  width: 28px;
  text-align: center;
}
.sidebar-collapsed .staff-sidebar a.active,
.sidebar-collapsed .staff-sidebar a:hover {
  background: #e5f6f2;
}
.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: white;
  color: var(--muted, #6b7280);
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--t), color var(--t);
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--bg, #f9fafb); color: var(--text, #111827); }

/* ── Billing full-width ───────────────────────────────────────────────────── */
.billing-page .staff-content { padding: 14px 16px 42px; }
.billing-page .billing-layout { padding: 14px 0 64px; }

/* ══════════════════════════════════════════════════════════════════════════
   MODERN UI REDESIGN — Dark sidebar, elevated cards, refined typography
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Global Page Background ──────────────────────────────────────────────── */
.staff-shell { background: #f0f2f5; }
.staff-content { background: #f0f2f5; min-height: 100vh; padding-left: 12px !important; padding-right: 12px !important; }

/* ── Dark Sidebar ────────────────────────────────────────────────────────── */
.staff-sidebar {
  background: #0d1117 !important;
  border-right: 1px solid rgba(255,255,255,0.06) !important;
  box-shadow: 4px 0 24px rgba(0,0,0,0.18) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,0.35) transparent;
  padding-bottom: 18px !important;
}
.staff-sidebar::-webkit-scrollbar { width: 6px; }
.staff-sidebar::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.35); border-radius: 999px; }
.staff-sidebar::-webkit-scrollbar-track { background: transparent; }

/* Brand */
.brand-cross {
  border-color: #10b981 !important;
  color: #10b981 !important;
  background: rgba(16,185,129,0.12) !important;
}
.brand-logo {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.brand-logo img {
  border-radius: 12px;
}
.brand-stack strong { color: #f1f5f9 !important; font-size: 1.28rem !important; }
.brand-stack span { color: rgba(255,255,255,0.38) !important; font-size: 0.78rem !important; }

/* Nav links */
.staff-sidebar a {
  color: rgba(255,255,255,0.55) !important;
  border-radius: 10px !important;
  transition: background 0.15s, color 0.15s, border-color 0.15s !important;
  border-left: 3px solid transparent;
  padding-left: 10px !important;
}
.staff-sidebar a:hover {
  background: rgba(255,255,255,0.07) !important;
  color: rgba(255,255,255,0.9) !important;
}
.staff-sidebar a.active {
  background: rgba(16,185,129,0.15) !important;
  color: #34d399 !important;
  border-left-color: #10b981 !important;
  font-weight: 700 !important;
}
.staff-sidebar a .nav-ico { color: inherit !important; }
.staff-sidebar .sidebar-logout {
  margin-top: 12px !important;
  color: rgba(255,255,255,0.42) !important;
}

/* Bottom callout */
.side-callout {
  background: rgba(16,185,129,0.1) !important;
  border: 1px solid rgba(16,185,129,0.2) !important;
  border-radius: 10px !important;
  color: #34d399 !important;
}
.side-callout strong { color: #a7f3d0 !important; }
.side-callout span { color: rgba(167,243,208,0.7) !important; }

@media (max-height: 820px) and (min-width: 781px) {
  .staff-sidebar { padding-top: 16px !important; gap: 2px !important; }
  .brand-stack { margin-bottom: 14px !important; }
  .brand-logo,
  .brand-logo img { width: 34px !important; height: 34px !important; }
  .brand-stack strong { font-size: 1.05rem !important; }
  .brand-stack span { margin-top: 4px !important; font-size: 0.66rem !important; }
  .staff-sidebar a {
    min-height: 36px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    font-size: 0.83rem !important;
  }
  .side-callout { display: none !important; }
}

@media (max-height: 680px) and (min-width: 781px) {
  .staff-sidebar { padding-top: 12px !important; }
  .brand-stack { margin-bottom: 10px !important; }
  .staff-sidebar a {
    min-height: 32px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }
}

/* Collapsed sidebar dark treatment */
.sidebar-collapsed .staff-sidebar a.active,
.sidebar-collapsed .staff-sidebar a:hover {
  background: rgba(16,185,129,0.18) !important;
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.staff-topbar {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.06);
}
.menu-dot {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  transition: background 0.15s, box-shadow 0.15s !important;
}
.menu-dot:hover { background: #e2e8f0 !important; box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important; }
.staff-search {
  border-radius: 10px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #f8fafc !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}
.staff-search:focus-within {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12) !important;
  background: white !important;
}
.admin-chip {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  color: white !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-size: 0.82rem !important;
  box-shadow: 0 2px 8px rgba(5,150,105,0.35) !important;
}
.admin-name strong { color: #0f172a; font-size: 0.9rem; }

/* ── Staff Head ──────────────────────────────────────────────────────────── */
.staff-head h1 { font-size: 1.6rem !important; font-weight: 800 !important; letter-spacing: -0.025em !important; color: #0f172a !important; }
.eyebrow { font-size: 0.68rem !important; font-weight: 700 !important; letter-spacing: 0.1em !important; color: #059669 !important; }

/* ── Metric Cards ────────────────────────────────────────────────────────── */
.metric-card {
  border-radius: 14px !important;
  border: 1px solid rgba(0,0,0,0.07) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 8px 32px rgba(0,0,0,0.04) !important;
  background: white !important;
  transition: transform 0.18s, box-shadow 0.18s !important;
  overflow: hidden;
  position: relative;
}
.metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #34d399);
  opacity: 0;
  transition: opacity 0.18s;
}
.metric-card:hover { transform: translateY(-3px) !important; box-shadow: 0 8px 32px rgba(0,0,0,0.1) !important; }
.metric-card:hover::before { opacity: 1; }
.metric-card:has(.metric-icon.green)::before { background: linear-gradient(90deg,#059669,#34d399); opacity:1; }
.metric-card:has(.metric-icon.blue)::before { background: linear-gradient(90deg,#2563eb,#60a5fa); opacity:1; }
.metric-card:has(.metric-icon.purple)::before { background: linear-gradient(90deg,#7c3aed,#a78bfa); opacity:1; }
.metric-card:has(.metric-icon.orange)::before { background: linear-gradient(90deg,#ea580c,#fb923c); opacity:1; }
.metric-card:has(.metric-icon.red)::before { background: linear-gradient(90deg,#dc2626,#f87171); opacity:1; }

.metric-card p { color: #64748b !important; font-size: 0.82rem !important; font-weight: 600 !important; text-transform: uppercase !important; letter-spacing: 0 !important; }
.metric-card strong { color: #0f172a !important; font-size: clamp(1.18rem, 1.75vw, 1.7rem) !important; font-weight: 800 !important; letter-spacing: 0 !important; }
.metric-card small { color: #94a3b8 !important; font-size: 0.79rem !important; }
.metric-icon { border-radius: 12px !important; box-shadow: 0 4px 14px rgba(0,0,0,0.18) !important; }
.metric-icon.green { background: linear-gradient(135deg,#059669,#10b981) !important; }
.metric-icon.blue { background: linear-gradient(135deg,#2563eb,#60a5fa) !important; }
.metric-icon.purple { background: linear-gradient(135deg,#7c3aed,#a78bfa) !important; }
.metric-icon.orange { background: linear-gradient(135deg,#ea580c,#fb923c) !important; }
.metric-icon.red { background: linear-gradient(135deg,#dc2626,#f87171) !important; }

/* ── Admin Panels ────────────────────────────────────────────────────────── */
.admin-panel {
  border-radius: 14px !important;
  border: 1px solid rgba(0,0,0,0.07) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 8px 32px rgba(0,0,0,0.03) !important;
  background: white !important;
  padding: 20px !important;
}
.panel-head h2 { font-size: 1rem !important; font-weight: 700 !important; color: #0f172a !important; }
.panel-head a, .panel-head span { color: #059669 !important; font-weight: 600 !important; font-size: 0.82rem !important; }

/* Sales chart upgrade */
.sales-chart { background: linear-gradient(180deg, transparent 0%, #f0fdf4 100%) !important; border-radius: 0 0 8px 8px; }
.bar-col span { background: linear-gradient(180deg, #059669, #6ee7b7) !important; border-radius: 6px 6px 0 0 !important; }
.chart-summary strong { font-size: 1.05rem !important; font-weight: 700 !important; color: #0f172a !important; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap {
  border-radius: 14px !important;
  border: 1px solid rgba(0,0,0,0.07) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
  overflow: hidden !important;
}
th {
  background: #f8fafc !important;
  color: #64748b !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  padding: 13px 16px !important;
  border-bottom: 1px solid #eef2f6 !important;
}
td { padding: 13px 16px !important; border-bottom: 1px solid #f1f5f9 !important; font-size: 0.88rem !important; }
tr:hover td { background: #f8fafc !important; }
tr:last-child td { border-bottom: 0 !important; }
td strong { color: #0f172a; font-weight: 600; }
td small { color: #94a3b8 !important; }
.linkish { color: #059669 !important; font-weight: 600 !important; }
.mini-table th { background: transparent !important; padding: 10px 0 !important; border-bottom: 1px solid #f1f5f9 !important; }
.mini-table td { padding: 11px 0 !important; border-bottom: 1px solid #f1f5f9 !important; }
.mini-table tr:hover td { background: transparent !important; }

/* ── Field Controls (Inputs) ─────────────────────────────────────────────── */
.field-control {
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 10px 13px !important;
  font-size: 0.88rem !important;
  color: #0f172a !important;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s !important;
}
.field-control:focus {
  background: white !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.14) !important;
  outline: 0 !important;
}
.field-control::placeholder { color: #94a3b8 !important; }
select.field-control { cursor: pointer; }
.cust-bar label, .cust-address-row label,
label { color: #64748b !important; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.button {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  box-shadow: 0 2px 10px rgba(5,150,105,0.3) !important;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s !important;
}
.button:hover { opacity: 0.92 !important; box-shadow: 0 4px 18px rgba(5,150,105,0.4) !important; transform: translateY(-1px) !important; }
.button:active { transform: scale(0.97) !important; }
.ghost-button {
  border-radius: 10px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: white !important;
  color: #475569 !important;
  font-weight: 600 !important;
  transition: all 0.15s !important;
}
.ghost-button:hover { border-color: #10b981 !important; color: #059669 !important; background: #f0fdf4 !important; }
.ghost-link {
  border-radius: 10px !important;
  border: 1.5px solid #bbf7d0 !important;
  background: #f0fdf4 !important;
  color: #059669 !important;
  font-weight: 600 !important;
}
.ghost-link:hover { background: linear-gradient(135deg,#059669,#10b981) !important; color: white !important; border-color: transparent !important; }

/* ── Summary Card ────────────────────────────────────────────────────────── */
.summary-card {
  border-radius: 16px !important;
  border: 1px solid rgba(0,0,0,0.07) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08) !important;
  padding: 22px !important;
  background: white !important;
}
.summary-card h2 { font-size: 1rem !important; font-weight: 800 !important; color: #0f172a !important; margin-bottom: 16px !important; letter-spacing: -0.01em !important; }
.summary-card > div { border-bottom-color: #f1f5f9 !important; font-size: 0.86rem !important; }
.summary-card > div span { color: #64748b !important; }
.summary-card > .total { font-size: 1rem !important; }
.summary-card > .total strong { font-size: 1.3rem !important; color: #059669 !important; }

/* ── Form Card ───────────────────────────────────────────────────────────── */
.form-card {
  border-radius: 20px !important;
  border: 1px solid rgba(0,0,0,0.07) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 20px 56px rgba(0,0,0,0.07) !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: relative !important;
}
.form-card .panel-head {
  padding: 20px 24px 18px !important;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
  border-bottom: 1px solid #eef2f6 !important;
  border-radius: 0 !important;
  margin: 0 !important;
}
.form-card .form-grid { padding: 20px 24px 4px !important; }
.form-card .permission-grid { padding: 0 24px !important; margin: 0 0 4px !important; }
.form-card > .button { margin: 16px 24px 24px !important; width: calc(100% - 48px) !important; display: block !important; }
.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #059669, #34d399, #60a5fa);
  z-index: 1;
}

/* ── Form Grid Labels — label wrapping input ─────────────────────────────── */
.form-grid > label {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.09em !important;
  color: #64748b !important;
  cursor: default !important;
}
.form-grid > label > input.field-control,
.form-grid > label > select.field-control,
.form-grid > label > textarea.field-control {
  font-size: 0.88rem !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: #0f172a !important;
}
/* Django as_div output wrapper */
.form-grid > div {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
.form-grid > div > label {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.09em !important;
  color: #64748b !important;
  /* Hide Django's colon via ::after */
}
/* Django appends a colon in label text — hide via pseudo hiding the last char of label text  */
/* This won't remove it from DOM but we can override via label suffix in forms */
.form-grid .full-width { grid-column: 1 / -1 !important; }

/* ── Custom Permission Checkbox Pills ────────────────────────────────────── */
.permission-grid {
  grid-template-columns: 1fr 1fr !important;
}
.form-card .permission-grid {
  grid-template-columns: 1fr !important;
}
.permission-grid label {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: white !important;
  cursor: pointer !important;
  font-size: 0.83rem !important;
  font-weight: 600 !important;
  color: #475569 !important;
  transition: all 0.15s !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.permission-grid label:hover {
  border-color: #10b981 !important;
  background: #f0fdf4 !important;
  color: #059669 !important;
}
.permission-grid label:has(input:checked) {
  border-color: #10b981 !important;
  background: #f0fdf4 !important;
  color: #059669 !important;
}
.permission-grid input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  border: 2px solid #cbd5e1 !important;
  border-radius: 5px !important;
  background: white !important;
  cursor: pointer !important;
  position: relative !important;
  transition: all 0.15s !important;
  flex-shrink: 0 !important;
}
.permission-grid input[type="checkbox"]:checked {
  background: #059669 !important;
  border-color: #059669 !important;
}
.permission-grid input[type="checkbox"]:checked::after {
  content: '' !important;
  position: absolute !important;
  top: 1px !important;
  left: 4px !important;
  width: 5px !important;
  height: 9px !important;
  border: 2px solid white !important;
  border-top: 0 !important;
  border-left: 0 !important;
  transform: rotate(45deg) !important;
}

/* ── Role Badges ─────────────────────────────────────────────────────────── */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.role-badge.admin { background: #dbeafe; color: #1e40af; }
.role-badge.pharmacist { background: #d1fae5; color: #065f46; }
.role-badge.pharmacy_aid { background: #fef3c7; color: #92400e; }
.role-badge.incharge { background: #ede9fe; color: #5b21b6; }
.role-badge.supervisor { background: #e0f2fe; color: #075985; }
.permission-block {
  padding: 0 24px 18px;
}
.permission-block-head {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}
.permission-block-head strong {
  color: #0f172a;
  font-size: 0.92rem;
}
.permission-block-head span {
  color: #64748b;
  font-size: 0.8rem;
}
.permission-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 520px;
}
.permission-summary span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
}
.inline-search-form {
  display: grid;
  grid-template-columns: minmax(180px, 260px) auto;
  gap: 8px;
  align-items: center;
}
.perm-yes { color: #059669; font-weight: 600; }
.perm-no { color: #94a3b8; }

/* ── User Avatar Circle ──────────────────────────────────────────────────── */
.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell-info strong { display: block; font-size: 0.88rem; font-weight: 700; color: #0f172a; }
.user-cell-info small { font-size: 0.78rem; color: #94a3b8; }

/* ── Quick Grid ──────────────────────────────────────────────────────────── */
.quick-grid a {
  border-radius: 12px !important;
  border: 1.5px solid #e2e8f0 !important;
  transition: all 0.18s !important;
  gap: 8px !important;
}
.quick-grid a:hover { border-color: #10b981 !important; background: #f0fdf4 !important; transform: translateY(-2px); box-shadow: 0 4px 14px rgba(16,185,129,0.14) !important; }

/* ── Stock Pills ─────────────────────────────────────────────────────────── */
.stock-pill { border-radius: 8px !important; font-weight: 700 !important; }

/* ── Messages / Toasts ───────────────────────────────────────────────────── */
.messages { padding: 0 0 12px; }
.message {
  border-radius: 10px !important;
  font-weight: 500 !important;
  padding: 12px 16px !important;
  box-shadow: 0 2px 8px rgba(5,150,105,0.12) !important;
}
.message.error { box-shadow: 0 2px 8px rgba(220,38,38,0.12) !important; }

/* ── Login Card ──────────────────────────────────────────────────────────── */
.login-card {
  border-radius: 20px !important;
  box-shadow: 0 8px 48px rgba(0,0,0,0.12) !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
}
.login-shell {
  align-content: center;
  gap: 18px;
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%) !important;
}

/* ── Search Results Dropdown ─────────────────────────────────────────────── */
.search-results {
  border-radius: 14px !important;
  border: 1px solid rgba(0,0,0,0.1) !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.14) !important;
}
.result-row {
  border-radius: 10px !important;
  transition: all 0.12s !important;
}
.result-row:hover { background: #f0fdf4 !important; border-color: #10b981 !important; transform: translateX(2px); }

/* ── Report Filter ───────────────────────────────────────────────────────── */
.report-filter {
  border-radius: 14px !important;
  border: 1px solid rgba(0,0,0,0.07) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

/* ── Admin Search Bar ────────────────────────────────────────────────────── */
.admin-search {
  border-radius: 10px !important;
  border: 1.5px solid #e2e8f0 !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}
.admin-search:focus-within {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12) !important;
}

/* ── Billing Search Input ────────────────────────────────────────────────── */
#medicineSearch, #purchaseSearch {
  border-radius: 12px !important;
  border: 2px solid #e2e8f0 !important;
  padding: 12px 16px !important;
  font-size: 0.92rem !important;
  background: white !important;
}
#medicineSearch:focus, #purchaseSearch:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16,185,129,0.12) !important;
}

/* ── Scroll bars ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE LAYOUT SYSTEM — v17
   Global fix: tables scroll, no double-margins, responsive grids at all
   viewport sizes (1366×768 → 1920×1080). Do NOT add page-specific hacks.
   ══════════════════════════════════════════════════════════════════════════ */

/* 1. Fix the root table-overflow bug.
      Previous rule had overflow:hidden !important which CLIPS table content
      instead of scrolling it. Now tables scroll inside their card. */
.table-wrap {
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

/* 2. Consistent staff-content padding — single source of outer whitespace.
      The inner elements below use margin/padding 0, so this is the only gap. */
.staff-content {
  padding: 16px !important;
}

/* 3. Strip double-margin from inner elements.
      These all had margin/padding: 0 clamp(16px,4vw,64px) which stacked on
      top of staff-content's own padding, wasting ~50-65px on each side. */
.table-wrap    { margin-left: 0 !important; margin-right: 0 !important; }
.admin-search  { margin-left: 0 !important; margin-right: 0 !important; }
.form-card     { margin-left: 0 !important; margin-right: 0 !important; max-width: none !important; }
.metric-grid   { padding-left: 0 !important; padding-right: 0 !important; }
.admin-grid    { padding-left: 0 !important; padding-right: 0 !important; }
.section-pad   { padding-left: 0 !important; padding-right: 0 !important; }
.split-admin   { padding-left: 0 !important; padding-right: 0 !important; }
.billing-layout { padding-left: 0 !important; padding-right: 0 !important; }

/* 4. Dashboard metric grid — compact summary cards.
      The old card gave a 56px icon + 18px gap out of a ~196px card, leaving
      only ~76px for a 24px-font value, so every amount overflowed its card.
      Small icon + smaller value + ellipsis keeps the content inside. */
.dashboard-metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 12px !important;
}
.metric-card {
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 0 11px !important;
  align-items: center !important;
  min-height: 0 !important;
  padding: 13px 14px !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05) !important;
}
/* The summary cards carry no gradient rule in the reference design. */
.metric-card::before { display: none !important; content: none !important; }
.metric-icon {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 9px !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  /* A later rule was tinting the glyph grey, making it vanish on the gradient. */
  color: #fff !important;
}
.metric-copy { gap: 2px !important; min-width: 0 !important; }
.metric-card p {
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric-card strong {
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric-card small {
  font-size: 0.67rem !important;
  line-height: 1.3 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal !important;
}

/* 5. Split-admin — smaller left-panel minimum (was 380px, now 260px) */
.split-admin {
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1fr) !important;
}

/* 6. Add-medicine shell — responsive for narrower screens */
.addmed-shell {
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.4fr) !important;
}

/* 7. admin-search bar — wrap on narrow containers instead of overflowing */
.admin-search {
  flex-wrap: wrap !important;
  height: auto !important;
  min-height: 42px !important;
  align-items: center !important;
}
.admin-search input { min-width: 120px !important; }

/* 8. Responsive breakpoints — cover 1100px–1366px gap that was unaddressed */
@media (max-width: 1300px) {
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
  .dashboard-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
/* Stack form-beside-table layouts early. Side by side at 1366 leaves the
   table ~544px for content that needs ~790px, forcing a scrollbar; stacked,
   every column fits on screen with no scrolling at all. */
@media (max-width: 1400px) {
  .split-admin { grid-template-columns: 1fr !important; }
}
@media (max-width: 1100px) {
  .addmed-shell { grid-template-columns: 1fr !important; }
}
@media (max-width: 900px) {
  .dashboard-bottom {
    grid-template-columns: 1fr !important;
  }
}

/* 9. Sidebar width — 268px was eating a fifth of a 1366px screen.
      The collapsed override must repeat inside each query: these rules carry
      !important, so without it the icon-only sidebar keeps the full width. */
@media (min-width: 781px) {
  .staff-shell { grid-template-columns: 216px minmax(0, 1fr) !important; }
  .staff-shell.sidebar-collapsed { grid-template-columns: 64px minmax(0, 1fr) !important; }
}
@media (max-width: 1280px) and (min-width: 781px) {
  .staff-shell { grid-template-columns: 196px minmax(0, 1fr) !important; }
  .staff-shell.sidebar-collapsed { grid-template-columns: 64px minmax(0, 1fr) !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   CATEGORY-WISE SALES DASHBOARD WIDGET
   ══════════════════════════════════════════════════════════════════════════ */
.cat-sales-panel {
  margin-bottom: 40px;
}
.cat-filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cat-btn {
  padding: 5px 13px;
  border: 1.5px solid #e2e8f0;
  border-radius: 99px;
  background: white;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.12s;
}
.cat-btn:hover { border-color: #10b981; color: #059669; }
.cat-btn.active { background: #059669; border-color: #059669; color: white; }

.cat-loading { padding: 24px; text-align: center; color: #94a3b8; font-size: 0.88rem; }
.cat-err { padding: 16px; color: #94a3b8; font-size: 0.88rem; }

.cat-sales-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr);
  gap: 0;
}
.cat-target-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #e8edf0;
  background: #f8faf9;
}
.cat-target-summary > div { padding: 12px 14px; border-right: 1px solid #e8edf0; }
.cat-target-summary > div:last-child { border-right: 0; }
.cat-target-summary span { display: block; color: #64748b; font-size: .64rem; font-weight: 700; text-transform: uppercase; }
.cat-target-summary strong { display: block; margin-top: 3px; color: #13231a; font-size: 1rem; }
.target-progress { width: 92px; height: 7px; overflow: hidden; border-radius: 2px; background: #e5e7eb; }
.target-progress > div { height: 100%; background: #dc2626; }
.target-progress.target-met > div { background: #059669; }
.cat-table td small { display: block; margin-top: 3px; color: #64748b; }
.category-target-editor { margin-top: -24px; margin-bottom: 40px; }
.category-target-form { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) auto; gap: 10px; align-items: end; }
.category-target-form label { display: grid; gap: 5px; color: #64748b; font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.money-input { display: grid; grid-template-columns: 32px 1fr; min-height: 40px; border: 1px solid #dbe3ea; border-radius: 6px; overflow: hidden; background: #fff; }
.money-input > span { display: grid; place-items: center; background: #f4f7f5; color: #506158; }
.money-input input { min-width: 0; border: 0; padding: 8px; font: inherit; color: #16241b; outline: 0; }
.target-help { margin: 10px 0 0; color: #64748b; font-size: .74rem; }
@media (max-width: 900px) {
  .cat-sales-layout { grid-template-columns: 1fr; }
  .category-target-form { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
}
@media (max-width: 620px) {
  .cat-target-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-target-form { grid-template-columns: 1fr; }
}

.cat-table-wrap { overflow-x: auto; }
.cat-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.cat-table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}
.cat-table td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; font-size: 0.88rem; vertical-align: middle; }
.cat-row:hover td { background: #f0fdf4; cursor: pointer; }
.cat-total-row td { border-top: 2px solid #e2e8f0; border-bottom: 0; background: #f8fafc; }

.cat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  flex-shrink: 0;
}
.cat-trend-up { color: #059669; font-weight: 700; font-size: 0.8rem; }
.cat-trend-down { color: #dc2626; font-weight: 700; font-size: 0.8rem; }
.cat-trend-na { color: #94a3b8; font-size: 0.8rem; }

/* Horizontal bar chart */
.cat-chart {
  padding: 16px 20px;
  border-left: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}
.cat-bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 40px;
  align-items: center;
  gap: 8px;
}
.cat-bar-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-bar-track {
  height: 10px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}
.cat-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}
.cat-bar-pct { font-size: 0.75rem; font-weight: 700; color: #64748b; text-align: right; }

/* Category detail modal */
.cat-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.cat-modal-box {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: min(760px, 100%);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cat-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid #f1f5f9;
}
.cat-modal-head h3 { margin: 0; font-size: 1rem; font-weight: 750; color: #0f172a; }
.cat-modal-close {
  width: 28px; height: 28px;
  border: 0; background: #f1f5f9;
  border-radius: 50%; cursor: pointer;
  font-size: 0.8rem; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
}
.cat-modal-close:hover { background: #e2e8f0; }
#catModalBody { overflow-y: auto; flex: 1; }
.cat-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1px;
  background: #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}
.cat-detail-summary > div {
  background: white;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cat-detail-summary span { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; }
.cat-detail-summary strong { font-size: 1.05rem; font-weight: 750; color: #0f172a; }

/* ══════════════════════════════════════════════════════════════════════════
   USERS / HR — permission matrix, attendance, leave, profile
   ══════════════════════════════════════════════════════════════════════════ */
.user-filter-bar {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(130px, 1fr)) auto auto;
  gap: 10px;
  align-items: center;
  background: white;
  border: 1px solid #e6ebef;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .user-filter-bar { grid-template-columns: 1fr 1fr; }
}
.user-form-card { margin-bottom: 20px !important; }
.user-form-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important; }

.perm-matrix-wrap { margin: 0 !important; max-height: 460px; overflow-y: auto !important; }
.perm-matrix { min-width: 620px; }
.perm-matrix th { position: sticky; top: 0; z-index: 2; }
.perm-matrix td { text-align: center; }
.perm-matrix td:first-child { text-align: left; white-space: nowrap; }
.perm-matrix input[type="checkbox"] { width: 16px; height: 16px; accent-color: #059669; cursor: pointer; }
.perm-na { color: #cbd5e1; font-size: 0.8rem; }
.perm-locked-note {
  margin: 0 24px 16px;
  padding: 11px 15px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.82rem;
  color: #64748b;
}
.permission-block { padding: 0 24px 8px; }
.permission-block-head { margin-bottom: 10px; }
.permission-block-head strong { display: block; font-size: 0.88rem; font-weight: 700; color: #0f172a; }
.permission-block-head span { font-size: 0.78rem; color: #64748b; }
.report-access { margin: 16px 0 20px; padding: 16px 0; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.report-access h3, .permission-table-title { margin: 0 0 6px; font-size: 0.9rem; color: #0f172a; }
.report-access p { margin: 0 0 12px; font-size: 0.82rem; color: #64748b; }
.report-access-options { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 12px; }
.report-access label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.83rem; color: #334155; cursor: pointer; }
.report-access input[type="checkbox"] { width: 16px; height: 16px; accent-color: #059669; cursor: pointer; }
.report-access-sections { display: grid; gap: 0; }
.report-access-section { display: flex; align-items: center; gap: 16px; min-height: 38px; padding: 7px 0; border-top: 1px solid #f1f5f9; }
.report-access-section > span { flex: 1; min-width: 0; font-size: 0.82rem; color: #334155; }
.permission-table-title { margin-bottom: 10px; }

.perm-chip-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 8px; }
.perm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 11px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.78rem;
  background: #f8fafc;
}
.perm-chip strong { color: #0f172a; font-weight: 700; }
.perm-chip em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 5px;
  background: #d1fae5;
  color: #065f46;
}
.perm-chip.all { background: #d1fae5; border-color: #a7f3d0; color: #065f46; font-weight: 700; }

/* Attendance / leave status badges */
.att-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.att-badge.present, .att-badge.approved { background: #d1fae5; color: #065f46; }
.att-badge.absent, .att-badge.rejected { background: #fee2e2; color: #991b1b; }
.att-badge.half_day, .att-badge.pending { background: #fef3c7; color: #92400e; }
.att-badge.leave { background: #ede9fe; color: #5b21b6; }
.att-badge.week_off, .att-badge.holiday { background: #dbeafe; color: #1e40af; }
.att-badge.none, .att-badge.cancelled { background: #f1f5f9; color: #94a3b8; }

.field-control.compact { padding: 6px 9px !important; font-size: 0.82rem !important; min-width: 90px; }
.pill-count {
  padding: 4px 12px;
  border-radius: 99px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 700;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}
.inline-warning {
  padding: 11px 16px;
  background: #fef9c3;
  border: 1.5px solid #fde047;
  border-radius: 12px;
  font-size: 0.85rem;
  color: #854d0e;
  margin-bottom: 16px;
}
.inline-warning a { color: #854d0e; font-weight: 700; text-decoration: underline; }

/* Audit / transfer status pills reused across modules */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill.draft, .status-pill.under_review { background: #f1f5f9; color: #64748b; }
.status-pill.submitted, .status-pill.pending { background: #fef3c7; color: #92400e; }
.status-pill.adjusted, .status-pill.completed { background: #d1fae5; color: #065f46; }
.status-pill.rejected, .status-pill.cancelled { background: #fee2e2; color: #991b1b; }
.status-pill.approved { background: #dbeafe; color: #1e40af; }
.status-pill.dispatched { background: #ede9fe; color: #5b21b6; }

/* ══════════════════════════════════════════════════════════════════════════
   DASHBOARD WIDGETS — payment donut, top-5 list, expiry buckets
   All hand-drawn SVG/CSS: no charting library, nothing loaded from a CDN.
   ══════════════════════════════════════════════════════════════════════════ */
.dashboard-grid.three-up {
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.9fr) minmax(250px, 1fr) !important;
}

.dashboard-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.expiry-action-panel { margin-bottom: 14px; }
.retention-scorecard-grid { grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr); }
.insight-table-wrap { max-height: 360px; overflow: auto; }
.insight-table { min-width: 720px; }
.insight-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7faf8;
}
.insight-table td { vertical-align: middle; font-variant-numeric: tabular-nums; }
.insight-table td small { display: block; margin-top: 3px; color: #829087; font-size: .68rem; }
.table-empty { padding: 28px 16px !important; text-align: center; color: #829087; }
.money-positive { color: #087f5b; font-weight: 700; }
.money-negative { color: #c92a2a; font-weight: 700; }
.insight-flag,
.expiry-action {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}
.insight-flag.loss,
.insight-flag.high,
.expiry-action.return { background: #fee2e2; color: #991b1b; }
.insight-flag.watch,
.expiry-action.review { background: #fef3c7; color: #92400e; }
.insight-flag.healthy,
.expiry-action.move { background: #d1fae5; color: #065f46; }
.retention-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #edf1ee;
  border-left: 1px solid #edf1ee;
}
.retention-metrics > div {
  padding: 14px;
  border-right: 1px solid #edf1ee;
  border-bottom: 1px solid #edf1ee;
}
.retention-metrics span { display: block; color: #66756c; font-size: .66rem; font-weight: 700; text-transform: uppercase; }
.retention-metrics strong { display: block; margin-top: 4px; color: #14251b; font-size: 1.08rem; }
.privacy-note { margin: 12px 0 0; color: #66756c; font-size: .72rem; line-height: 1.5; }
@media (max-width: 1180px) {
  .dashboard-insight-grid,
  .retention-scorecard-grid { grid-template-columns: 1fr; }
}

.billing-consent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin: -2px 0 8px;
}
.refill-consent { display: inline-flex; align-items: center; gap: 7px; color: #33443a; font-size: .78rem; font-weight: 700; }
.refill-consent input[type="checkbox"] { width: 16px; height: 16px; accent-color: #059669; }
.billing-consent-row .field-control { width: auto; min-width: 150px; }
.billing-consent-row small { color: #7b8b82; font-size: .7rem; }
@media (max-width: 620px) {
  .billing-consent-row { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 1500px) {
  .dashboard-grid.three-up { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  .dashboard-grid.three-up .sales-card { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .dashboard-grid.three-up { grid-template-columns: 1fr !important; }
  .dashboard-grid.three-up .sales-card { grid-column: auto; }
}

.panel-empty { padding: 22px 16px; text-align: center; color: #94a3b8; font-size: 0.84rem; }

/* ── Donut ── */
.donut-wrap { display: flex; align-items: center; gap: 16px; padding: 6px 4px 10px; flex-wrap: wrap; }
.donut { width: 122px; height: 122px; flex-shrink: 0; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 13; }
.donut-track { stroke: #f1f5f9; }
.donut-seg { transition: stroke-width 0.15s; }
.donut-seg:hover { stroke-width: 15; }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 150px; display: grid; gap: 8px; }
.donut-legend li { display: grid; grid-template-columns: 10px auto 1fr; align-items: center; gap: 8px; font-size: 0.82rem; }
.donut-legend .dot { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend .lbl { color: #334155; font-weight: 650; }
.donut-legend .val { text-align: right; color: #0f172a; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.donut-legend .val em { font-style: normal; color: #94a3b8; font-weight: 600; font-size: 0.76rem; }

/* ── Top 5 selling items ── */
.top-list { list-style: none; margin: 0; padding: 4px 0 6px; display: grid; gap: 2px; }
.top-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid #f6f8fa;
}
.top-list li:last-child { border-bottom: 0; }
.top-list .rank {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  background: #f1f5f9; color: #475569;
  font-size: 0.72rem; font-weight: 800;
}
.top-list li:nth-child(1) .rank { background: #d1fae5; color: #065f46; }
.top-list li:nth-child(2) .rank { background: #dbeafe; color: #1e40af; }
.top-list li:nth-child(3) .rank { background: #ede9fe; color: #5b21b6; }
.top-list .name { min-width: 0; font-size: 0.84rem; font-weight: 650; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-list .name small { display: block; color: #94a3b8; font-size: 0.7rem; font-weight: 500; }
.top-list .qty { font-size: 0.84rem; font-weight: 700; color: #475569; font-variant-numeric: tabular-nums; }
.top-list .amt { font-size: 0.84rem; font-weight: 700; color: #059669; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Expiry alert buckets ── */
.expiry-buckets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
  padding: 6px 2px 8px;
}
.exp-bucket {
  display: block;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s;
}
.exp-bucket:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15,23,42,.09); }
.exp-label { display: block; font-size: 0.68rem; font-weight: 700; margin-bottom: 6px; }
.exp-count { display: block; font-size: 1.5rem; font-weight: 850; line-height: 1.1; }
.exp-value { display: block; font-size: 0.76rem; font-weight: 650; margin-top: 3px; }
.exp-bucket.warn    { background: #fffbeb; border-color: #fde68a; }
.exp-bucket.warn .exp-label, .exp-bucket.warn .exp-count, .exp-bucket.warn .exp-value { color: #92400e; }
.exp-bucket.caution { background: #fff7ed; border-color: #fed7aa; }
.exp-bucket.caution .exp-label, .exp-bucket.caution .exp-count, .exp-bucket.caution .exp-value { color: #9a3412; }
.exp-bucket.ok      { background: #f0fdf4; border-color: #bbf7d0; }
.exp-bucket.ok .exp-label, .exp-bucket.ok .exp-count, .exp-bucket.ok .exp-value { color: #065f46; }
.exp-bucket.danger  { background: #fef2f2; border-color: #fecaca; }
.exp-bucket.danger .exp-label, .exp-bucket.danger .exp-count, .exp-bucket.danger .exp-value { color: #991b1b; }

/* ===========================================================================
   CLINICAL COMPACT UI
   Shared staff application shell and component treatment.
   ========================================================================== */
.staff-shell,
.staff-shell * {
  letter-spacing: 0 !important;
}

.staff-shell {
  grid-template-columns: 188px minmax(0, 1fr) !important;
  min-height: 100vh;
  background: #f4f6f4 !important;
}

.staff-sidebar {
  position: sticky !important;
  top: 0;
  z-index: 40;
  height: 100vh !important;
  gap: 2px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 16px 10px !important;
  border-right: 1px solid #dfe5e0 !important;
  background: #ffffff !important;
  box-shadow: none !important;
  scrollbar-width: thin;
  scrollbar-color: #cbd5ce transparent;
}

.brand-stack {
  align-items: center !important;
  gap: 9px !important;
  margin: 0 5px 18px !important;
  min-height: 48px;
}

.brand-logo,
.brand-logo img {
  width: 34px !important;
  height: 42px !important;
  min-width: 34px;
  border-radius: 5px !important;
}

.brand-logo img { object-fit: contain !important; }

.brand-stack strong {
  color: #153123 !important;
  font-size: 1rem !important;
  font-weight: 850 !important;
  line-height: 1.03 !important;
}

.brand-stack span {
  margin-top: 4px !important;
  color: #6f7c73 !important;
  font-size: 0.47rem !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
  text-transform: uppercase;
}

.staff-sidebar a {
  gap: 9px !important;
  min-height: 35px !important;
  margin: 0 !important;
  padding: 7px 9px !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: transparent !important;
  color: #526158 !important;
  font-size: 0.78rem !important;
  font-weight: 650 !important;
  transition: background .14s ease, color .14s ease !important;
}

.staff-sidebar a:hover {
  background: #f1f5f2 !important;
  color: #1e3528 !important;
}

.staff-sidebar a.active {
  border-left: 0 !important;
  background: #e8f4ed !important;
  color: #087f4e !important;
  font-weight: 750 !important;
}

.nav-ico {
  display: grid !important;
  width: 18px !important;
  min-width: 18px;
  place-items: center;
  font-size: 0 !important;
}

.nav-ico svg {
  width: 14px !important;
  height: 14px !important;
  stroke: currentColor;
}

.staff-sidebar .sidebar-logout {
  margin-top: auto !important;
  color: #77837b !important;
}

.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  border: 0;
  background: rgba(15, 23, 18, .36);
}

.staff-content {
  min-width: 0;
  min-height: 100vh;
  padding: 0 20px 20px !important;
  background: #f4f6f4 !important;
}

.staff-topbar {
  display: grid !important;
  grid-template-columns: 34px minmax(220px, 420px) minmax(0, 1fr) 31px auto !important;
  gap: 10px !important;
  align-items: center;
  min-height: 58px;
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #dfe5e0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.menu-dot,
.sidebar-toggle {
  display: grid !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px;
  place-items: center;
  padding: 0 !important;
  border: 1px solid #d5ddd7 !important;
  border-radius: 5px !important;
  background: #ffffff !important;
  color: #4d5e53 !important;
  box-shadow: none !important;
}

.menu-dot:hover,
.sidebar-toggle:hover {
  border-color: #9db3a4 !important;
  background: #f5f8f6 !important;
  color: #087f4e !important;
}

.menu-dot svg,
.sidebar-toggle svg { width: 15px; height: 15px; }

.staff-search {
  display: grid !important;
  grid-template-columns: 15px minmax(0, 1fr) !important;
  gap: 7px !important;
  align-items: center;
  width: 100%;
  max-width: 420px !important;
  height: 36px !important;
  padding: 0 10px !important;
  border: 1px solid #d8e0da !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.staff-search:focus-within {
  border-color: #65a982 !important;
  box-shadow: 0 0 0 3px rgba(8, 127, 78, .09) !important;
}

.staff-search span,
.staff-search svg {
  width: 14px;
  height: 14px;
  color: #78867d;
}

.staff-search input {
  width: 100%;
  min-width: 0;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  color: #26342b !important;
  font-size: 0.77rem !important;
}

.admin-chip {
  grid-column: 4;
  width: 31px !important;
  height: 31px !important;
  min-width: 31px;
  border-radius: 5px !important;
  background: #087f4e !important;
  color: #ffffff !important;
  font-size: 0.68rem !important;
  box-shadow: none !important;
}

.admin-name {
  grid-column: 5;
  gap: 1px !important;
  min-width: 0;
  line-height: 1.2 !important;
}

.admin-name strong {
  overflow: hidden;
  color: #233128 !important;
  font-size: 0.76rem !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-name span {
  overflow: hidden;
  max-width: 230px;
  color: #78847c !important;
  font-size: 0.65rem !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-head {
  display: flex;
  align-items: flex-end !important;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 16px !important;
}

.staff-head h1 {
  color: #17231b !important;
  font-size: 1.45rem !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
}

.staff-head p:not(.eyebrow) {
  margin-top: 4px !important;
  color: #748078 !important;
  font-size: 0.76rem !important;
}

.eyebrow {
  margin: 0 0 5px !important;
  color: #087f4e !important;
  font-size: 0.61rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
}

.section-pad { padding: 0 0 30px !important; }
.billing-page .staff-content { padding: 0 16px 20px !important; }
.billing-page .billing-layout { padding: 8px 0 40px !important; }

.admin-panel,
.form-card,
.summary-card,
.metric-card,
.report-filter,
.table-wrap,
.user-filter-bar,
.search-results,
.login-card {
  border: 1px solid #dfe5e0 !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.admin-panel { padding: 14px !important; }
.form-card { overflow: hidden !important; }
.form-card::before,
.metric-card::before { display: none !important; content: none !important; }

.form-card .panel-head {
  padding: 14px 16px !important;
  border-bottom: 1px solid #e4e9e5 !important;
  background: #fafbfa !important;
}

.form-card .form-grid { padding: 15px 16px 4px !important; }
.form-card .permission-grid { padding: 0 16px !important; }
.form-card > .button { width: calc(100% - 32px) !important; margin: 12px 16px 16px !important; }
.permission-block { padding-right: 16px !important; padding-left: 16px !important; }
.perm-locked-note { margin-right: 16px !important; margin-left: 16px !important; }

.panel-head {
  min-height: 34px;
  margin-bottom: 10px !important;
}

.panel-head h2,
.summary-card h2 {
  color: #223027 !important;
  font-size: 0.88rem !important;
  font-weight: 750 !important;
}

.panel-head a,
.panel-head span { color: #68756c !important; font-size: 0.72rem !important; }

.report-filter,
.user-filter-bar {
  gap: 9px !important;
  margin: 0 0 14px !important;
  padding: 12px !important;
}

#stockFilterForm {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(110px, 1fr)) !important;
  gap: 8px !important;
  padding: 11px !important;
}

#stockFilterForm > input[name="q"] { grid-column: span 2; }
#stockFilterForm > .ghost-button { width: 100%; }

.report-filter label,
.form-grid > label,
.form-grid > div > label,
.form-row label,
.staff-content label {
  color: #617066 !important;
  font-size: 0.63rem !important;
  font-weight: 750 !important;
  text-transform: uppercase;
}

.field-control,
.staff-content input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.staff-content select,
.staff-content textarea {
  border: 1px solid #d8e0da !important;
  border-radius: 5px !important;
  background: #fbfcfb !important;
  color: #29362e !important;
  box-shadow: none !important;
  font-size: 0.77rem !important;
}

.field-control,
.staff-content input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.staff-content select {
  min-height: 34px;
  padding: 7px 10px !important;
}

.staff-content textarea { padding: 9px 10px !important; }

.field-control:focus,
.staff-content input:focus,
.staff-content select:focus,
.staff-content textarea:focus {
  border-color: #65a982 !important;
  outline: 0 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(8, 127, 78, .09) !important;
}

#medicineSearch,
#purchaseSearch {
  min-height: 36px !important;
  padding: 8px 11px !important;
  border-width: 1px !important;
  border-radius: 6px !important;
  font-size: 0.78rem !important;
}

.button,
.ghost-button,
.ghost-link,
.danger-button,
.form-actions button,
.row-actions button {
  min-height: 34px;
  padding: 7px 12px !important;
  border-radius: 5px !important;
  font-size: 0.73rem !important;
  font-weight: 750 !important;
  box-shadow: none !important;
  transform: none !important;
}

.button {
  border: 1px solid #087f4e !important;
  background: #087f4e !important;
}

.button:hover { background: #076d44 !important; box-shadow: none !important; }

.ghost-button,
.ghost-link {
  border: 1px solid #d4ddd7 !important;
  background: #ffffff !important;
  color: #435248 !important;
}

.ghost-button:hover,
.ghost-link:hover {
  border-color: #87ad96 !important;
  background: #f2f7f4 !important;
  color: #087f4e !important;
}

.table-wrap {
  margin-bottom: 30px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.admin-panel .table-wrap { margin-bottom: 0 !important; }

.table-wrap table { min-width: 680px; }

.staff-content th {
  padding: 9px 11px !important;
  border-bottom: 1px solid #dfe5e0 !important;
  background: #f5f7f5 !important;
  color: #627067 !important;
  font-size: 0.61rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
}

.staff-content td {
  padding: 10px 11px !important;
  border-bottom: 1px solid #edf0ed !important;
  color: #29352e;
  font-size: 0.76rem !important;
}

.staff-content tbody tr:hover td { background: #f8faf8 !important; }
.staff-content td small { color: #839087 !important; font-size: 0.66rem !important; }
.staff-content td strong { color: #1d2b22; }

.metric-grid,
.dashboard-metrics {
  gap: 10px !important;
  padding-bottom: 14px !important;
}

.metric-card {
  grid-template-columns: 32px minmax(0, 1fr) !important;
  gap: 9px !important;
  padding: 11px 12px !important;
}

.metric-grid .metric-card .metric-copy,
.dashboard-metrics .metric-card .metric-copy {
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.metric-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

.metric-card p { font-size: 0.59rem !important; }
.metric-card strong { font-size: 0.96rem !important; }
.metric-card small { font-size: 0.63rem !important; }

.dashboard-grid,
.dashboard-bottom { gap: 12px !important; margin-bottom: 12px !important; }

.summary-card { padding: 16px !important; }
.summary-card > div { font-size: 0.76rem !important; }
.summary-card > .total strong { font-size: 1.05rem !important; }

.quick-grid { gap: 8px !important; }
.quick-grid a {
  min-height: 78px !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-size: 0.74rem !important;
}

.search-results {
  gap: 4px !important;
  padding: 5px !important;
  box-shadow: 0 10px 28px rgba(25, 45, 33, .12) !important;
}

.result-row {
  padding: 8px 10px !important;
  border-radius: 5px !important;
  font-size: 0.74rem !important;
}

.result-row:hover { transform: none !important; }

.status,
.status-pill,
.att-badge,
.role-badge,
.pill,
.pill-count,
.stock-pill,
.perm-chip {
  border-radius: 5px !important;
}

.software-footer {
  margin-top: 20px !important;
  padding-top: 10px !important;
  border-top-color: #dfe5e0 !important;
  color: #859188 !important;
  font-size: 0.65rem !important;
}

.software-footer strong { color: #087f4e !important; }

.staff-shell.sidebar-collapsed {
  grid-template-columns: 56px minmax(0, 1fr) !important;
}

.sidebar-collapsed .staff-sidebar {
  align-items: stretch !important;
  padding: 14px 7px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.sidebar-collapsed .brand-stack { display: flex !important; justify-content: center; margin-inline: 0 !important; }
.sidebar-collapsed .brand-stack > div:last-child { display: none !important; }
.sidebar-collapsed .staff-sidebar a { justify-content: center !important; padding-inline: 0 !important; font-size: 0 !important; }
.sidebar-collapsed .staff-sidebar a .nav-ico { width: 100% !important; }

@media (max-width: 1100px) {
  .staff-shell { grid-template-columns: 168px minmax(0, 1fr) !important; }
  .staff-content { padding-right: 14px !important; padding-left: 14px !important; }
  #stockFilterForm { grid-template-columns: repeat(3, minmax(120px, 1fr)) !important; }
  .billing-main-row .phone-field-wrap { margin-bottom: 16px; }
}

@media (max-width: 780px) {
  .staff-shell,
  .staff-shell.sidebar-collapsed { display: block; }

  .staff-sidebar,
  .sidebar-collapsed .staff-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0;
    z-index: 45;
    display: flex !important;
    width: min(240px, 84vw);
    height: 100dvh !important;
    padding: 16px 10px !important;
    transform: translateX(-102%);
    transition: transform .18s ease !important;
  }

  .staff-shell.sidebar-open .staff-sidebar { transform: translateX(0); }
  .staff-shell.sidebar-open .sidebar-scrim { display: block; }

  .sidebar-collapsed .brand-stack { justify-content: flex-start; margin: 0 5px 18px !important; }
  .sidebar-collapsed .brand-stack > div:last-child { display: block !important; }
  .sidebar-collapsed .staff-sidebar a {
    justify-content: flex-start !important;
    padding: 7px 9px !important;
    font-size: 0.78rem !important;
  }
  .sidebar-collapsed .staff-sidebar a .nav-ico { width: 18px !important; }

  .staff-content,
  .billing-page .staff-content { padding: 0 10px 16px !important; }

  .staff-topbar {
    grid-template-columns: 34px minmax(0, 1fr) 31px !important;
    min-height: 54px;
  }

  .staff-search { grid-column: 2; min-width: 0; }
  .admin-chip { grid-column: 3; }
  .admin-name { display: none !important; }

  .staff-head {
    align-items: flex-start !important;
    padding-top: 8px !important;
  }

  .staff-head h1 { font-size: 1.24rem !important; }
  .head-actions { width: 100%; }
  .head-actions .button,
  .head-actions .ghost-button { flex: 1 1 auto; }

  .admin-panel { padding: 11px !important; }
  .report-filter,
  .supplier-purchase-filter,
  .user-filter-bar,
  #stockFilterForm { grid-template-columns: 1fr !important; }
  #stockFilterForm > input[name="q"] { grid-column: auto; }
  .report-filter .button,
  .report-filter .ghost-button { width: 100%; }
}

@media (max-width: 460px) {
  .staff-search input::placeholder { color: transparent; }
  .staff-head { flex-direction: column; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .metric-card { grid-template-columns: 28px minmax(0, 1fr) !important; padding: 9px !important; }
  .metric-icon { width: 28px !important; height: 28px !important; min-width: 28px !important; }
}

@media print {
  .sidebar-scrim { display: none !important; }
}

/* Compact transfer folders keep product lines out of the main history view. */
.transfer-folder-list {
  display: grid;
  gap: 8px;
}

.transfer-folder {
  display: grid;
  grid-template-columns: 36px minmax(180px, 1.4fr) minmax(170px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid #dfe5e0;
  border-radius: 6px;
  background: #fff;
  color: #243229;
  text-decoration: none;
}

.transfer-folder:hover {
  border-color: #8fb9a0;
  background: #f8fbf9;
}

.transfer-folder-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 5px;
  background: #e8f5ed;
  color: #087f4e;
}

.transfer-folder-icon svg { width: 18px; height: 18px; }
.transfer-folder-main,
.transfer-folder-meta { display: grid; gap: 3px; min-width: 0; }
.transfer-folder-main span,
.transfer-folder-meta span { color: #78847c; font-size: .7rem; }
.transfer-folder-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-folder-open { display: inline-flex; align-items: center; gap: 3px; color: #087f4e; font-size: .72rem; font-weight: 750; }
.transfer-folder-open svg { width: 14px; height: 14px; }
.transfer-folder-empty { padding: 30px; border: 1px dashed #d7ded9; border-radius: 6px; color: #859188; text-align: center; }

.transfer-detail-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}

.transfer-detail-summary > div { display: grid; gap: 5px; }
.transfer-detail-summary > div > span:first-child { color: #758178; font-size: .65rem; font-weight: 750; text-transform: uppercase; }
.transfer-note,
.transfer-workflow { margin-top: 12px; }
.transfer-note p { margin: 5px 0 0; color: #657269; }

@media (max-width: 920px) {
  .transfer-folder { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .transfer-folder-meta { grid-column: 2; }
  .transfer-folder > .status-pill { grid-column: 3; grid-row: 1; }
  .transfer-folder-open { grid-column: 3; grid-row: 2; }
  .transfer-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .transfer-folder { grid-template-columns: 32px minmax(0, 1fr); }
  .transfer-folder-meta { grid-column: 2; }
  .transfer-folder > .status-pill,
  .transfer-folder-open { grid-column: 2; grid-row: auto; justify-self: start; }
  .transfer-detail-summary { grid-template-columns: 1fr; }
}
