/* ============================================================
   RetailPOS — Page-specific & Reusable Component Styles
   ============================================================ */

/* ── New Sale Page ─────────────────────────────────────────── */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
  height: calc(100vh - var(--topbar-height) - 48px);
}

.pos-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  height: 100%;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.pos-left::-webkit-scrollbar { display: none; }

.pos-right {
  position: sticky;
  top: 0;
  height: calc(100vh - var(--topbar-height) - 48px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Product Search Bar */
.product-search-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.product-search-bar .input-icon-wrap { flex: 1; }

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.product-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  position: relative;
}

.product-card:hover {
  border-color: var(--brand-muted);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card.out-of-stock {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.product-card.adding {
  animation: cardPulse 250ms var(--ease-out);
}

@keyframes cardPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.96); border-color: var(--brand); box-shadow: 0 0 0 3px rgba(107,92,246,0.2); }
  100% { transform: scale(1); }
}

.product-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 32px;
}

.product-card-img img { width: 100%; height: 100%; object-fit: cover; }

.product-card-body { padding: 10px; }

.product-card-cat {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--r-full);
  background: rgba(0,0,0,0.5);
  color: white;
  backdrop-filter: blur(4px);
}

.product-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand);
}

.product-card-stock {
  margin-top: 6px;
}

/* Cart Table */
.cart-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cart-table th {
  background: var(--surface-alt);
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.cart-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.cart-table tbody tr:last-child td { border-bottom: none; }

.cart-table tbody tr {
  animation: slideInCart 200ms var(--ease-out);
}
@keyframes slideInCart {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.cart-table tbody tr.removing {
  animation: rowDelete 220ms var(--ease) forwards;
}

/* Qty Controls */
.qty-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-secondary);
  transition: all var(--t-fast) var(--ease);
  flex-shrink: 0;
}
.qty-btn:hover { background: var(--brand); border-color: var(--brand); color: white; }

.qty-input {
  width: 50px;
  height: 26px;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  outline: none;
  background: var(--surface);
}
.qty-input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(107,92,246,0.1); }

.price-below-min i { color: var(--warning); }

/* Billing Panel */
.billing-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: visible;
  flex-shrink: 0;
}

.billing-section {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.billing-section:last-child { border-bottom: none; }

.billing-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.billing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}
.billing-row:last-child { margin-bottom: 0; }
.billing-row .label { color: var(--text-secondary); }
.billing-row .value { font-weight: 600; }

.billing-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 0;
  border-top: 2px solid var(--border);
  margin-top: 8px;
}
.billing-total-row .label { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.billing-total-row .value { font-size: 20px; font-weight: 700; color: var(--brand); }

/* Payment Methods */
.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.payment-method-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--t-fast) var(--ease);
}

.payment-method-btn:hover { border-color: var(--brand-muted); color: var(--brand); }

.payment-method-btn.active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

/* Customer Search */
.customer-search-result {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.customer-search-result .cust-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Held Bills */
.held-bills-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--warning-soft);
  border-top: 1px solid #FDE68A;
  font-size: 12px;
  font-weight: 600;
  color: var(--warning);
}

/* Post-sale success */
.sale-success-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  gap: 12px;
  border-radius: var(--r-lg);
  animation: fadeUp var(--t-normal) var(--ease-out);
}

.sale-success-check {
  width: 72px;
  height: 72px;
  background: var(--success-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--success);
  animation: successBounce 400ms var(--ease-out);
}
@keyframes successBounce {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ── Dashboard ─────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 65fr 35fr;
  gap: 20px;
  margin-bottom: 24px;
}

.chart-container {
  position: relative;
  width: 100%;
}

.bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  transition: all var(--t-fast) var(--ease);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.quick-action-btn i {
  font-size: 22px;
  color: var(--brand);
}

.quick-action-btn:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Summary Bar */
.summary-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.summary-bar-item h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.summary-bar-item .item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.summary-bar-item .item-row:last-child { border-bottom: none; }
.summary-bar-item .item-name { color: var(--text-secondary); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; }
.summary-bar-item .item-val  { font-weight: 600; color: var(--text-primary); flex-shrink: 0; }

/* Chart toggle tabs */
.chart-tabs {
  display: flex;
  gap: 4px;
}
.chart-tab {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all var(--t-fast) var(--ease);
}
.chart-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

/* Dashboard range tab buttons */
.chart-tab-btn.active {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
  box-shadow: var(--shadow-brand);
}

/* Dashboard responsive overrides */
@media (max-width: 1100px) {
  .db-charts-top   { grid-template-columns: 1fr !important; }
  .db-charts-mid   { grid-template-columns: 1fr !important; }
  .db-bottom-row   { grid-template-columns: 1fr !important; }
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ── Products Page ─────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.product-list-card {
  position: relative;
  background: var(--grad-brand);
  border-radius: 18px;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  box-shadow: var(--shadow-brand);
  display: flex;
  flex-direction: column;
}
.product-list-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(107,92,246,0.25);
}

/* Color variants */
.product-list-card.success { background: var(--grad-success); box-shadow: var(--shadow-success); }
.product-list-card.warning { background: var(--grad-warning); box-shadow: var(--shadow-warning); }
.product-list-card.danger  { background: var(--grad-danger);  box-shadow: var(--shadow-danger); }
.product-list-card.info    { background: var(--grad-info);    box-shadow: var(--shadow-info); }
.product-list-card.pink    { background: var(--grad-pink);    box-shadow: 0 6px 20px rgba(236,72,153,0.30); }
.product-list-card.teal    { background: var(--grad-teal);    box-shadow: 0 6px 20px rgba(20,184,166,0.30); }
.product-list-card.orange  { background: var(--grad-orange);  box-shadow: 0 6px 20px rgba(249,115,22,0.30); }

.product-list-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 36px;
  position: relative;
  overflow: hidden;
}
.product-list-card-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

.product-list-card-body { padding: 12px; }

.product-list-card-actions {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  justify-content: flex-end;
}

/* Barcode preview */
.barcode-preview {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
  text-align: center;
  font-size: 18px;
  letter-spacing: 3px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--text-primary);
  margin-top: 8px;
}

/* ── Supplier / Customer Cards Grid ────────────────────────── */
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.people-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--t-fast) var(--ease);
}
.people-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.people-card-header { display: flex; align-items: center; gap: 12px; }

.people-card-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.people-card-info .name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.people-card-info .sub  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.people-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.people-stat { background: var(--surface-alt); border-radius: var(--r-md); padding: 8px 12px; }
.people-stat .stat-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); }
.people-stat .stat-value { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-top: 2px; }

.people-card-actions { display: flex; gap: 8px; }
.people-card-actions .btn { flex: 1; justify-content: center; }

/* ── Customer Ledger ───────────────────────────────────────── */
.ledger-header {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius: var(--r-xl);
  padding: 28px;
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.ledger-header::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.ledger-header-info h2 { color: white; font-size: 22px; }
.ledger-header-info p  { color: rgba(255,255,255,0.75); font-size: 13px; }

.ledger-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.ledger-stat { background: rgba(255,255,255,0.1); border-radius: var(--r-lg); padding: 12px 16px; backdrop-filter: blur(8px); }
.ledger-stat .stat-label { font-size: 11px; color: rgba(255,255,255,0.6); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.ledger-stat .stat-value { font-size: 18px; font-weight: 700; color: white; margin-top: 4px; }

/* Running balance coloring */
.balance-positive { color: var(--danger) !important; font-weight: 600; }
.balance-negative { color: var(--success) !important; font-weight: 600; }
.balance-zero     { color: var(--text-muted) !important; }

/* ── Reports Page ──────────────────────────────────────────── */
.report-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

/* ── Warehouse Stock ───────────────────────────────────────── */
.stock-status-icon { display: flex; align-items: center; gap: 6px; }
.stock-adequate  { color: var(--success); }
.stock-low       { color: var(--warning); }
.stock-critical  { color: var(--danger); animation: pulse-shadow 2s infinite; }
.stock-out       { color: #7F1D1D; }

/* ── Purchase Orders ───────────────────────────────────────── */
.po-status-draft              { background: var(--surface-alt);   color: var(--text-muted); }
.po-status-ordered            { background: var(--info-soft);     color: var(--info); }
.po-status-partially_received { background: var(--warning-soft);  color: var(--warning); }
.po-status-received           { background: var(--success-soft);  color: var(--success); }
.po-status-cancelled          { background: var(--danger-soft);   color: var(--danger); }

/* ── Step Wizard (Install) ─────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.wizard-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-normal) var(--ease);
  position: relative;
  z-index: 1;
}

.wizard-step.active .wizard-step-num {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
  box-shadow: var(--shadow-brand);
}

.wizard-step.done .wizard-step-num {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.wizard-step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.wizard-step.active .wizard-step-label { color: var(--brand); }
.wizard-step.done   .wizard-step-label { color: var(--success); }

.wizard-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
  margin-bottom: 22px;
  min-width: 30px;
  transition: background var(--t-normal) var(--ease);
}
.wizard-connector.done { background: var(--success); }

/* Password Strength */
.pw-strength-bar {
  height: 4px;
  border-radius: var(--r-full);
  background: var(--border);
  margin-top: 6px;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  border-radius: var(--r-full);
  transition: width var(--t-normal) var(--ease), background var(--t-normal) var(--ease);
}
.pw-strength-fill.weak   { width: 25%; background: var(--danger); }
.pw-strength-fill.fair   { width: 50%; background: var(--warning); }
.pw-strength-fill.good   { width: 75%; background: var(--info); }
.pw-strength-fill.strong { width: 100%; background: var(--success); }

.pw-strength-label {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}
.pw-strength-label.weak   { color: var(--danger); }
.pw-strength-label.fair   { color: var(--warning); }
.pw-strength-label.good   { color: var(--info); }
.pw-strength-label.strong { color: var(--success); }

/* ── Login Page ────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  animation: fadeUp var(--t-slow) var(--ease-out);
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
  gap: 12px;
}

.login-logo-icon {
  width: 56px;
  height: 56px;
  background: var(--brand);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: white;
  box-shadow: var(--shadow-brand);
}

.login-logo h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.login-logo p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -4px;
}

/* ── Settings Page ─────────────────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

.settings-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  height: fit-content;
  position: sticky;
  top: 80px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--t-fast) var(--ease);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.settings-nav-item:last-child { border-bottom: none; }
.settings-nav-item:hover { background: var(--surface-alt); color: var(--text-primary); }
.settings-nav-item.active { background: var(--brand-soft); color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.settings-nav-item i { width: 16px; text-align: center; font-size: 14px; }

.settings-section { display: none; }
.settings-section.active { display: block; }

/* Receipt Preview */
.receipt-preview {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  max-width: 320px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  box-shadow: var(--shadow-md);
}
.receipt-preview-header { text-align: center; margin-bottom: 10px; }
.receipt-preview-divider { border: none; border-top: 1px dashed #999; margin: 8px 0; }
.receipt-preview-row { display: flex; justify-content: space-between; padding: 2px 0; }
.receipt-preview-total { font-weight: 700; font-size: 14px; }

/* ── Notifications Page ────────────────────────────────────── */
.notif-page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 8px;
  display: flex;
  gap: 0;
  transition: all var(--t-fast) var(--ease);
}
.notif-page-card:hover { box-shadow: var(--shadow-sm); }
.notif-page-card.unread { border-left: 3px solid var(--brand); }

.notif-page-icon-col {
  width: 64px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18px;
  flex-shrink: 0;
}

.notif-page-content { flex: 1; padding: 16px 16px 16px 0; }
.notif-page-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.notif-page-body  { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.notif-page-time  { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

.notif-page-actions { padding: 16px; display: flex; align-items: flex-start; gap: 6px; flex-shrink: 0; }

/* ── Loyalty Page ──────────────────────────────────────────── */
.loyalty-settings-card {
  background: linear-gradient(135deg, var(--brand) 0%, #8B5CF6 100%);
  border-radius: var(--r-xl);
  padding: 28px;
  color: white;
  margin-bottom: 24px;
}
.loyalty-settings-card h2 { color: white; }
.loyalty-settings-card p  { color: rgba(255,255,255,0.75); }

/* ── Drag Handle ───────────────────────────────────────────── */
.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  padding: 4px;
  font-size: 14px;
}
.drag-handle:active { cursor: grabbing; }

/* ── Image Upload ──────────────────────────────────────────── */
.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  background: var(--surface-alt);
}
.image-upload-area:hover, .image-upload-area.dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.image-upload-area i { font-size: 32px; color: var(--text-muted); margin-bottom: 8px; }
.image-upload-area p { font-size: 13px; color: var(--text-muted); }

.image-preview {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: var(--r-md);
  margin-top: 12px;
  display: none;
}

/* ── Color Picker ──────────────────────────────────────────── */
.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Inline Action Dropdown ────────────────────────────────── */
.action-dropdown {
  position: relative;
  display: inline-block;
}
.action-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  min-width: 160px;
  animation: modalIn var(--t-fast) var(--ease-out);
}
.action-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
}
.action-dropdown-item:hover { background: var(--surface-alt); color: var(--text-primary); }
.action-dropdown-item.danger { color: var(--danger); }
.action-dropdown-item.danger:hover { background: var(--danger-soft); }

/* ── Responsive adjustments ────────────────────────────────── */
@media (max-width: 1200px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .pos-layout { grid-template-columns: 1fr 340px; }
}

@media (max-width: 1024px) {
  .charts-row    { grid-template-columns: 1fr; }
  .bottom-row    { grid-template-columns: 1fr 1fr; }
  .people-grid   { grid-template-columns: 1fr 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid  { grid-template-columns: repeat(2, 1fr); }
  .pos-layout    { grid-template-columns: 1fr; height: auto; }
  .pos-right     { position: static; height: auto; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav  { position: static; }
  .summary-bar   { grid-template-columns: 1fr; }
  .ledger-stats  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .bottom-row    { grid-template-columns: 1fr; }
  .people-grid   { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .report-summary-cards { grid-template-columns: 1fr 1fr; }
  .ledger-stats  { grid-template-columns: 1fr 1fr; }
  .payment-methods { grid-template-columns: repeat(2, 1fr); }
}

/* ── DataTables Custom Styling ─────────────────────────────── */
.dataTables_wrapper {
  font-size: 13px;
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: 500;
}
.dataTables_wrapper .dataTables_length {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dataTables_wrapper .dataTables_length label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.dataTables_wrapper .dataTables_length select {
  appearance: auto;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  min-width: 60px;
}
.dataTables_wrapper .dataTables_length select:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(107,92,246,0.12);
}
.dataTables_wrapper .dataTables_filter input {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 12px;
  margin-left: 6px;
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color var(--t-fast) var(--ease);
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(107,92,246,0.12);
}
.dataTables_wrapper .dataTables_info {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.dataTables_wrapper .dataTables_paginate {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  transition: all var(--t-fast) var(--ease);
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(107,92,246,0.3);
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.dt-top, .dt-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
}
.dt-top { border-top: none; border-bottom: 1px solid var(--border); }
