/* ==============================================================
   نظام الكاشير والمخزون المتنقل - POS Mobile System v4.0
   Design: Modern Arabic RTL Mobile-First Interface
   ============================================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --success: #16a34a;
  --success-dark: #15803d;
  --warning: #f59e0b;
  --danger: #dc2626;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --nav-height: 52px;
  --header-height: 52px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

input, select, textarea {
  user-select: auto;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Cairo", "Tahoma", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  direction: rtl;
  overflow: hidden;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--bg-card);
  position: relative;
  box-shadow: 0 0 30px rgba(0,0,0,0.06);
}

/* ==============================================================
   HEADER
   ============================================================== */
.app-header {
  height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  padding-left: 16px;
  padding-right: 16px;
  display: flex;
  align-items: center;
  z-index: 50;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 24px;
}

.brand-info h1 {
  font-size: 17px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  cursor: pointer;
  margin-top: 2px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #64748b;
}

.status-indicator.online .status-dot {
  background-color: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.status-indicator.offline .status-dot {
  background-color: #ef4444;
}

.header-quick-actions {
  display: flex;
  gap: 8px;
}

.btn-hdr-icon {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-hdr-icon:active {
  background: rgba(255,255,255,0.25);
  transform: scale(0.95);
}

/* ==============================================================
   BODY & SCREENS
   ============================================================== */
.app-body {
  flex: 1;
  overflow-y: auto;
  position: relative;
  background-color: #f1f5f9;
  -webkit-overflow-scrolling: touch;
}

.screen-view {
  display: none;
  min-height: 100%;
  padding-bottom: 24px;
  animation: fadeIn 0.2s ease-in-out;
}

.screen-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==============================================================
   SCREEN 1: PRICE CHECKER (شاشة التسعير)
   ============================================================== */
.price-checker-wrapper {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.camera-card {
  background: #0f172a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid #334155;
}

.camera-viewfinder-box {
  position: relative;
  width: 100%;
  height: 250px;
  background-color: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#priceScannerReader {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
}

#priceScannerReader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.camera-overlay-frame {
  position: absolute;
  width: 82%;
  height: 65%;
  border: 2px dashed rgba(255,255,255,0.4);
  border-radius: 12px;
  pointer-events: none;
  z-index: 5;
}

.laser-scanner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #22c55e, #4ade80, transparent);
  box-shadow: 0 0 12px #22c55e;
  animation: scanMove 1.8s infinite ease-in-out;
}

@keyframes scanMove {
  0% { top: 5%; opacity: 0.3; }
  50% { top: 95%; opacity: 1; }
  100% { top: 5%; opacity: 0.3; }
}

.camera-floating-bar {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 10;
}

.cam-ctrl-btn {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.cam-ctrl-btn.active {
  background: #f59e0b;
  color: #000;
  border-color: #f59e0b;
}

.camera-tip {
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
  padding: 8px 12px;
  background: #0f172a;
}

/* Search input with button */
.search-section {
  position: relative;
}

.input-with-action {
  display: flex;
  background: #fff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.input-with-action .input-icon {
  padding: 0 12px;
  display: flex;
  align-items: center;
  font-size: 18px;
  color: var(--text-muted);
}

.input-with-action input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  padding: 12px 0;
  font-family: inherit;
  direction: rtl;
}

.btn-input-go {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.search-auto-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid var(--primary);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  max-height: 260px;
  overflow-y: auto;
  z-index: 99999;
  margin-top: 2px;
}

.auto-res-item {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: #fff;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.15);
}

.auto-res-item:active, .auto-res-item:hover {
  background-color: var(--primary-light);
}

.auto-res-item .item-txt strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
}

.auto-res-item .item-txt small {
  color: var(--text-muted);
  font-size: 12px;
}

.auto-res-item .item-prc {
  font-size: 14px;
  font-weight: 700;
  color: var(--success);
}

/* Result Card */
.price-result-container {
  min-height: 200px;
}

.price-card-placeholder {
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
}

.price-card-placeholder .placeholder-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}

.price-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.price-card-header .item-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge-cat {
  align-self: flex-start;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.item-name {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.item-barcode-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-family: monospace;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 8px;
  color: #334155;
  cursor: pointer;
}

/* Price Hero Banner */
.price-hero-banner {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-label {
  font-size: 12px;
  color: #94a3b8;
  display: block;
  margin-bottom: 4px;
}

.price-amount-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price-curr {
  font-size: 16px;
  color: #38bdf8;
  font-weight: 700;
}

.price-value {
  font-size: 34px;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: -0.5px;
}

.stock-badge-block {
  text-align: left;
}

.stock-label {
  font-size: 11px;
  color: #94a3b8;
  display: block;
  margin-bottom: 4px;
}

.stock-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  background: #22c55e;
  color: #fff;
}

.stock-pill.low-stock {
  background: #ef4444;
}

/* Details Grid */
.price-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #f8fafc;
  padding: 12px;
  border-radius: var(--radius-md);
}

.detail-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.detail-cell .cell-lbl {
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.detail-cell .cell-val {
  color: var(--text-main);
  font-size: 14px;
}

.btn-eye-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.cost-hidden {
  letter-spacing: 2px;
  color: #94a3b8 !important;
}

/* Card Action buttons */
.price-card-actions {
  display: flex;
  gap: 8px;
}

.btn-card-act {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-to-cart {
  background: var(--primary);
  color: #fff;
}

.btn-edit-item {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.btn-add-stock {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.btn-card-act:active {
  transform: scale(0.97);
}

/* ==============================================================
   SCREEN 2: SALES / CART
   ============================================================== */
.sales-wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height) - var(--nav-height));
  height: calc(100dvh - var(--header-height) - var(--nav-height));
}

.sales-search-section {
  position: relative;
  z-index: 60;
  background: #fff;
}

.sales-add-bar {
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
}

.sales-add-bar input {
  flex: 1;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  direction: rtl;
}

.btn-scan-trigger {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #bfdbfe;
  width: 44px;
  border-radius: var(--radius-md);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sales-cart-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
}

.cart-items-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item-row {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.cart-item-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.cart-item-ctrls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-qty {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-val {
  font-size: 14px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

.cart-item-total {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  min-width: 60px;
  text-align: left;
}

.btn-del-item {
  color: #ef4444;
  background: none;
  border: none;
  font-size: 18px;
  padding: 4px;
  cursor: pointer;
}

.cart-empty-banner {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
}

.cart-empty-banner .empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}

/* Sales Checkout Dock */
.sales-checkout-dock {
  background: #fff;
  border-top: 1px solid var(--border-color);
  padding: 12px 16px;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.04);
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.discount-box {
  display: flex;
  align-items: center;
  gap: 4px;
}

.discount-box input {
  width: 70px;
  padding: 3px 6px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  text-align: center;
  font-family: inherit;
}

.net-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-color);
  color: var(--text-main);
}

.net-value {
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
}

.sales-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.btn-clear-cart {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.btn-pay-now {
  flex: 1;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.3);
}

.btn-pay-now:disabled {
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
}

/* ==============================================================
   SCREEN 3: INVENTORY
   ============================================================== */
.inventory-wrapper {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inv-header-controls {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inv-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inv-search-input-wrap {
  flex: 2;
  position: relative;
  display: flex;
  align-items: center;
}

.inv-search-input-wrap input {
  width: 100%;
  padding: 8px 38px 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}

.inv-search-input-wrap .btn-scan-trigger {
  position: absolute;
  left: 4px;
  background: var(--primary-color, #0284c7);
  color: #fff;
  border: none;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.inv-search-input-wrap .btn-scan-trigger:active {
  transform: scale(0.92);
}

.inv-search-row select {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: inherit;
  height: 38px;
}

.inv-tab-filters {
  display: flex;
  gap: 6px;
}

.inv-filter-btn {
  flex: 1;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.inv-filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.inv-action-quick-add {
  padding: 6px 10px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.inv-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inv-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.inv-card-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}

.inv-card-info .inv-sub {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.inv-card-stock {
  text-align: left;
}

.inv-stock-badge {
  font-size: 15px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-block;
  background: #dcfce7;
  color: #15803d;
}

.inv-stock-badge.empty {
  background: #fee2e2;
  color: #b91c1c;
}

/* ==============================================================
   SCREEN 4: PURCHASES
   ============================================================== */
.purchases-wrapper {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.purchases-nav {
  display: flex;
  gap: 8px;
}

.p-nav-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.p-nav-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.purchase-subview {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.p-form-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.p-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.p-field input, .p-field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
}

.p-add-item-box {
  display: flex;
  gap: 8px;
  position: relative;
}

.p-add-item-box input {
  flex: 1;
  padding: 10px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
}

.purchase-items-scroll {
  min-height: 120px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
}

.p-empty-state {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.p-table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.purchase-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.p-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
}

.btn-save-purchase {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn-save-purchase:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

/* ==============================================================
   SCREEN 5: MORE HUB
   ============================================================== */
.more-hub-wrapper {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hub-welcome {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hub-icon {
  font-size: 32px;
}

.hub-welcome h3 {
  font-size: 16px;
  font-weight: 800;
}

.hub-welcome p {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.more-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.more-tile {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.more-tile:active {
  background: #f8fafc;
  transform: scale(0.99);
}

.more-tile .tile-icon {
  font-size: 26px;
}

.more-tile .tile-content {
  flex: 1;
}

.more-tile .tile-content strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 2px;
}

.more-tile .tile-content small {
  color: var(--text-muted);
  font-size: 12px;
}

.more-tile .tile-arrow {
  color: #94a3b8;
  font-size: 16px;
}

.tile-settings {
  border-color: #bfdbfe;
  background: #eff6ff;
}

/* ==============================================================
   BOTTOM NAVIGATION
   ============================================================== */
.bottom-nav {
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: relative;
  z-index: 50;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
}

.nav-tab {
  flex: 1;
  height: 100%;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748b;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
}

.nav-tab .nav-icon {
  font-size: 20px;
}

.nav-tab .nav-label {
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
}

.nav-tab.active {
  color: var(--primary);
}

.nav-tab.active .nav-icon {
  transform: translateY(-2px);
}

.nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 16px);
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ==============================================================
   MODALS
   ============================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: zoomIn 0.2s ease-out;
}

.modal-large {
  max-width: 560px;
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header .m-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header .m-title h3 {
  font-size: 15px;
  font-weight: 700;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-footer {
  padding: 12px 16px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.form-control {
  padding: 10px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  direction: rtl;
}

.form-control:focus {
  border-color: var(--primary);
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .form-group {
  flex: 1;
}

.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.input-scan-combo {
  display: flex;
  gap: 6px;
}

.input-scan-combo input {
  flex: 1;
}

.btn-scan-field {
  padding: 0 12px;
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
}

.btn-primary-confirm {
  flex: 1;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

.btn-modal-cancel {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* Payment Modal Specific */
.checkout-amount-display {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkout-amount-display strong {
  font-size: 24px;
  color: var(--primary);
  font-weight: 900;
}

.payment-method-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pm-btn {
  padding: 12px 8px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.pm-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.pm-btn.pm-multi {
  grid-column: 1 / -1;
  background: #f8fafc;
  border: 1.5px dashed #818cf8;
  color: #4338ca;
}

.pm-btn.pm-multi.active {
  background: #eef2ff;
  border: 2px solid #6366f1;
  color: #3730a3;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

/* Multi-Payment Container & Controls */
.multi-pay-container {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
  animation: fadeIn 0.2s ease-in-out;
}

.mp-header-info {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .mp-inputs-grid {
    grid-template-columns: 1fr;
  }
}

.mp-input-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mp-input-box label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mp-input-wrap {
  display: flex;
  gap: 4px;
  align-items: stretch;
}

.mp-input-wrap .mp-control {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  transition: all 0.15s;
}

.mp-input-wrap .mp-control:focus {
  border-color: #6366f1;
  background: #fdf4ff;
  outline: none;
}

.btn-mp-balance {
  background: #e0e7ff;
  color: #4338ca;
  border: none;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-mp-balance:hover {
  background: #c7d2fe;
}

.btn-mp-balance:active {
  transform: scale(0.96);
}

.mp-cash-received-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.mp-cash-received-box label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
  display: block;
}

.mp-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
}

.mp-stat-item {
  display: flex;
  flex-direction: column;
}

.mp-stat-item .lbl {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.mp-stat-item strong {
  font-size: 15px;
  color: #0f172a;
  font-weight: 800;
}

.mp-stat-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 20px;
}

.mp-stat-badge.covered {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.mp-stat-badge.remaining {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.mp-stat-badge.exceeded {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.method-pill.pill-multi {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.kpi-card.highlight-purple {
  background: #f5f3ff;
  border-left: 4px solid #8b5cf6;
}

.inv-badge-multi {
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #c7d2fe;
}

.inv-multi-sub {
  font-size: 11px;
  color: #6366f1;
  font-weight: 700;
  margin-top: 2px;
  direction: rtl;
}

.change-display {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 14px;
  color: var(--success-dark);
}

/* Thermal Receipt */
.thermal-receipt {
  background: #fff;
  border: 1px dashed #cbd5e1;
  padding: 16px;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.rcpt-header h4 {
  font-size: 16px;
  font-weight: 900;
}

.rcpt-divider {
  color: #94a3b8;
  margin: 6px 0;
  overflow: hidden;
  white-space: nowrap;
}

.rcpt-totals .r-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}

.rcpt-totals .r-net {
  font-size: 15px;
  font-weight: 900;
}

.btn-receipt-share {
  background: #25d366;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
  font-family: inherit;
}

.btn-receipt-print {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
  font-family: inherit;
}

/* Server Settings */
.settings-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  background: #f8fafc;
  padding: 10px;
  border-radius: var(--radius-sm);
}

.quick-preset-buttons {
  display: flex;
  gap: 8px;
}

.btn-preset {
  flex: 1;
  padding: 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn-test-conn {
  width: 100%;
  padding: 10px;
  background: #f8fafc;
  border: 1.5px dashed var(--primary);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.test-result-msg {
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-top: 6px;
}

.test-result-msg.success {
  background: #dcfce7;
  color: #15803d;
}

.test-result-msg.error {
  background: #fee2e2;
  color: #b91c1c;
}

/* ==============================================================
   VERTICAL FORM LAYOUT (TEXTBOXES STACKED VERTICALLY DOWN THE PHONE)
   ============================================================== */
.vertical-form .form-group-full {
  width: 100% !important;
  margin-bottom: 14px !important;
  display: flex;
  flex-direction: column;
}

.vertical-form .form-group-full label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.vertical-form .form-control {
  width: 100% !important;
  min-height: 46px;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: #0f172a;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.vertical-form .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.font-large-price {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #15803d !important;
}

/* Duplicate Barcode Warning & Success Banners */
.barcode-duplicate-alert {
  background: #fef2f2;
  border: 1.5px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 8px;
  animation: fadeIn 0.25s ease-out;
}

.bcode-alert-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b91c1c;
  font-size: 13px;
  margin-bottom: 4px;
}

.bcode-alert-body {
  font-size: 13px;
  color: #7f1d1d;
  background: #fee2e2;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-weight: 600;
}

.btn-bcode-action {
  background: #b91c1c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.barcode-success-alert {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
}

/* Fullscreen Modal Variant */
.modal-fullscreen {
  max-width: 100% !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  display: flex;
  flex-direction: column;
}

.modal-fullscreen .modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}

/* ==============================================================
   DAILY SALES & CASH DRAWER MODAL STYLES
   ============================================================== */
.screen-content-padded {
  padding: 12px 14px 28px;
}

.ds-filter-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.ds-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ds-filter-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #1e293b;
}

.ds-filter-title .ds-icon {
  font-size: 16px;
}

.btn-refresh-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-refresh-pill:active {
  background: #e2e8f0;
  transform: scale(0.96);
}

.ds-date-range-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.ds-date-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

.ds-date-group input[type="date"] {
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  font-family: inherit;
  font-weight: 600;
  color: #0f172a;
}

.ds-date-group input[type="date"]:focus {
  border-color: var(--primary);
  background: #fff;
  outline: none;
}

.ds-chips-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.ds-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.ds-chip:active {
  transform: scale(0.95);
}

.ds-chip.active {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
}

/* Invoices Subtab Summary Banner (daily_invoice_sales) */
.invoices-summary-banner {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  margin-top: 6px;
  margin-bottom: 12px;
}

.inv-sum-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.inv-sum-title-col {
  display: flex;
  flex-direction: column;
}

.inv-sum-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-color);
}

.inv-sum-title {
  margin: 2px 0 0 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.inv-badge-pill {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #bfdbfe;
}

.inv-hero-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 12px;
  padding: 14px 16px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.inv-hero-main-stat {
  display: flex;
  flex-direction: column;
}

.inv-hero-label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 4px;
}

.inv-hero-value {
  font-size: 24px;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: -0.5px;
}

.inv-hero-sub-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.inv-sub-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.inv-sub-item .sub-lbl {
  font-size: 10.5px;
  color: #cbd5e1;
}

.inv-sub-item .sub-val {
  font-size: 13px;
  font-weight: 700;
}

.inv-sub-item .text-rose {
  color: #fb7185;
}

.inv-sub-item .text-blue {
  color: #a5f3fc;
}

.inv-methods-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: 6px;
}

.inv-method-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.inv-method-pill .p-icon {
  font-size: 14px;
  margin-bottom: 2px;
}

.inv-method-pill .p-name {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}

.inv-method-pill .p-amt {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
}

.inv-method-pill.pill-cash { border-right: 3px solid #16a34a; }
.inv-method-pill.pill-visa { border-right: 3px solid #2563eb; }
.inv-method-pill.pill-cliq { border-right: 3px solid #0891b2; }
.inv-method-pill.pill-debt { border-right: 3px solid #ea580c; }
.inv-method-pill.pill-multi { border-right: 3px solid #8b5cf6; }

.inv-header-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-sub-disc {
  font-size: 11px;
  background: #fee2e2;
  color: #b91c1c;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.invoices-section-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  margin-top: 6px;
  margin-bottom: 24px;
}

.screen-view#viewDailySales .daily-invoices-list {
  max-height: none;
  overflow: visible;
}

.daily-sales-filter-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: #f8fafc;
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
}

.daily-sales-filter-row .date-input-group {
  flex: 1;
}

.daily-sales-filter-row label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

.daily-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.kpi-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.kpi-card .kpi-icon {
  font-size: 18px;
  margin-bottom: 4px;
}

.kpi-card .kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}

.kpi-card .kpi-val {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.kpi-card.highlight-blue {
  border-top: 3px solid #2563eb;
  background: #f8faff;
}
.kpi-card.highlight-blue .kpi-val { color: #1d4ed8; }

.kpi-card.highlight-green {
  border-top: 3px solid #16a34a;
  background: #f0fdf4;
}
.kpi-card.highlight-green .kpi-val { color: #15803d; }

.kpi-card.highlight-orange {
  border-top: 3px solid #ea580c;
  background: #fff7ed;
}
.kpi-card.highlight-orange .kpi-val { color: #c2410c; }

.kpi-card.highlight-red {
  border-top: 3px solid #dc2626;
  background: #fef2f2;
}
.kpi-card.highlight-red .kpi-val { color: #b91c1c; }

.kpi-card.highlight-teal {
  border-top: 3px solid #0d9488;
  background: #f0fdfa;
}
.kpi-card.highlight-teal .kpi-val { color: #0f766e; }

.drawer-cash-hero {
  grid-column: span 2;
  background: linear-gradient(135deg, #065f46, #047857);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.25);
}

.drawer-cash-hero .kpi-label {
  color: #a7f3d0;
  font-size: 13px;
  font-weight: 700;
}

.drawer-cash-hero .drawer-val {
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  margin: 4px 0;
}

.drawer-cash-hero small {
  color: #d1fae5;
  font-size: 11px;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 10px;
  border-bottom: 1.5px solid #e2e8f0;
  padding-bottom: 6px;
}

.section-divider h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.badge-count {
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.daily-invoices-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.invoice-item-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s;
}

.invoice-item-card:hover, .invoice-item-card:active {
  background: #f8fafc;
}

.inv-info-col strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
}

.inv-info-col span {
  font-size: 11.5px;
  color: #64748b;
}

.inv-val-col {
  text-align: left;
}

.inv-val-col .inv-price {
  font-size: 15px;
  font-weight: 800;
  color: #15803d;
  display: block;
}

.inv-val-col .inv-badge {
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
}

/* ==============================================================
   CUSTOMERS & DEALERS DIRECTORY STYLES
   ============================================================== */
.list-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-add-action {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.customers-directory-list, .dealers-directory-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 220px);
  max-height: calc(100dvh - 220px);
  overflow-y: auto;
}

.person-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.person-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.person-card-top h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.badge-balance-debt {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.badge-balance-clear {
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.person-meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}

.person-meta a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.person-actions-row {
  display: flex;
  gap: 8px;
}

.person-actions-row button {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  cursor: pointer;
}

.btn-cust-pay {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border-color: #a7f3d0 !important;
}

.btn-cust-stmt {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

.btn-cust-edit, .btn-cat-edit {
  background: #f8fafc !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
  flex: 0 0 auto !important;
  padding: 8px 12px !important;
}

.btn-cust-del, .btn-cat-del {
  background: #fff1f2 !important;
  color: #e11d48 !important;
  border-color: #fecdd3 !important;
  flex: 0 0 auto !important;
  padding: 8px 12px !important;
}

.cust-total-debt-banner {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #f8fafc;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #334155;
}

.cust-total-debt-banner strong {
  font-size: 16px;
  color: #f59e0b;
  font-weight: 800;
}

.categories-directory-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 220px);
  max-height: calc(100dvh - 220px);
  overflow-y: auto;
}

.category-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cat-id-badge {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}

.category-card-top h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  flex: 1;
  margin-right: 10px;
}

.cat-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.cat-actions-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.cat-actions-row button {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  cursor: pointer;
}

.statement-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.btn-del-trans {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 14px;
  border-radius: 4px;
}

.btn-del-trans:hover {
  background: #fee2e2;
}
.jard-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.jard-kpi {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}

.jard-kpi .j-lbl {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-bottom: 2px;
  font-weight: 600;
}

.jard-kpi .j-val {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.jard-kpi .j-val.highlight { color: #2563eb; }
.jard-kpi .j-val.text-blue { color: #1d4ed8; }
.jard-kpi .j-val.text-green { color: #15803d; }
.jard-kpi .j-val.text-teal { color: #0f766e; }
.jard-kpi .j-val.text-red { color: #b91c1c; }

.jard-filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.jard-filter-bar input {
  flex: 2;
  min-width: 140px;
}

.jard-filter-bar select {
  flex: 1;
  min-width: 90px;
}

.jard-table-container {
  overflow-y: auto;
  max-height: calc(100vh - 280px);
  max-height: calc(100dvh - 280px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jard-item-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.jard-item-card.shortage {
  border-right: 4px solid #ef4444;
  background: #fffbfb;
}

.jard-item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.jard-item-head .j-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.jard-item-head .j-bcode {
  font-size: 11px;
  color: #64748b;
  font-family: monospace;
}

.jard-moves-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #f1f5f9;
  border-radius: 6px;
  padding: 6px 4px;
  margin-bottom: 8px;
  text-align: center;
  font-size: 11px;
}

.jard-moves-row div strong {
  display: block;
  font-size: 12px;
  color: #0f172a;
}

.jard-moves-row div span {
  font-size: 10px;
  color: #64748b;
}

.jard-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 6px;
}

.jard-stock-badge {
  font-size: 14px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
}

.jard-stock-badge.in-stock {
  background: #dcfce7;
  color: #166534;
}

.jard-stock-badge.out-stock {
  background: #fee2e2;
  color: #991b1b;
}

/* ==============================================================
   DAILY SALES & CATEGORY BREAKDOWN (frmdaily_sales) STYLES
   ============================================================== */
.ds-segmented-tabs {
  display: flex;
  background: #e2e8f0;
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 12px;
}

.ds-seg-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 4px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ds-seg-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ds-tab-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Hero Metrics matching frmdaily_sales */
.ds-summary-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.ds-sum-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.ds-sum-card.card-sales {
  border-right: 4px solid #2563eb;
  background: linear-gradient(135deg, #ffffff 60%, #eff6ff 100%);
}

.ds-sum-card.card-profit {
  border-right: 4px solid #16a34a;
  background: linear-gradient(135deg, #ffffff 60%, #f0fdf4 100%);
}

.ds-sum-card.card-disc {
  border-right: 4px solid #ea580c;
  background: linear-gradient(135deg, #ffffff 60%, #fff7ed 100%);
}

.ds-sum-card.card-ret {
  border-right: 4px solid #dc2626;
  background: linear-gradient(135deg, #ffffff 60%, #fef2f2 100%);
}

.ds-sum-card .sum-icon {
  font-size: 18px;
  margin-bottom: 4px;
}

.ds-sum-card .sum-label {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 2px;
}

.ds-sum-card .sum-val {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.ds-sum-card .profit-val {
  color: #15803d;
}

.ds-sum-card .sum-sub-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #dcfce7;
  color: #166534;
  font-size: 10.5px;
  font-weight: 700;
  width: fit-content;
}

.ds-sum-card small {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

/* Methods Strip */
.ds-methods-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.ds-methods-strip::-webkit-scrollbar { display: none; }

.method-pill {
  flex: 1;
  min-width: 95px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  color: #334155;
  white-space: nowrap;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.method-pill strong {
  display: block;
  font-size: 12.5px;
  color: #0f172a;
  margin-top: 2px;
}

/* Department Sales Table Card */
.classes-report-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.classes-report-header {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cr-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cr-title h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.cr-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}

.classes-table-head {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr 1fr;
  padding: 10px 12px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.classes-table-head .col-name {
  text-align: right;
}

.classes-table-body {
  max-height: 420px;
  overflow-y: auto;
}

.class-table-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr 1fr;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
  font-size: 12px;
  text-align: center;
  transition: background 0.15s;
}

.class-table-row:nth-child(even) {
  background: #fafaf9;
}

.class-table-row:active {
  background: #f1f5f9;
}

.class-table-row .col-name {
  text-align: right;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  flex-direction: column;
}

.class-table-row .col-name small {
  font-size: 10px;
  color: #94a3b8;
  font-weight: normal;
}

.class-table-row .col-sales {
  font-weight: 800;
  color: #0f172a;
}

.class-table-row .col-profit {
  font-weight: 800;
  color: #16a34a;
}

.class-table-row .col-profit.loss {
  color: #dc2626;
}

.class-table-row .col-margin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.margin-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: #dcfce7;
  color: #15803d;
}

.margin-pill.loss {
  background: #fee2e2;
  color: #b91c1c;
}

.margin-bar {
  width: 100%;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}

.margin-bar-fill {
  height: 100%;
  background: #22c55e;
}

.classes-table-footer {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr 1fr;
  padding: 12px;
  background: #f1f5f9;
  border-top: 2px solid #cbd5e1;
  font-size: 12.5px;
  text-align: center;
  align-items: center;
}

.classes-table-footer .col-name {
  text-align: right;
  color: #0f172a;
}

.classes-table-footer .text-profit {
  color: #15803d;
}

.badge-margin {
  padding: 2px 6px;
  border-radius: 4px;
  background: #2563eb;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
}

/* Product Search Box in Modal */
.product-search-box {
  position: relative;
  background: #f8fafc;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px dashed #cbd5e1;
  margin-bottom: 12px;
}

.product-search-box label {
  color: #1e293b;
  font-size: 12.5px;
  display: block;
  margin-bottom: 6px;
}

/* Inventory Card Actions */
.inv-card-actions-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.btn-card-edit-senf {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.btn-card-edit-senf:active {
  background: #dbeafe;
  transform: scale(0.96);
}

/* Items Sales Table Card (frmdaily_senf_sales) */
.items-sales-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.items-sales-header {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ish-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ish-title h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.ish-filters {
  display: flex;
  gap: 8px;
  flex-direction: column;
}

.ish-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: #ffffff;
  font-weight: 700;
  color: #1e293b;
}

.ish-search-group input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}

.items-table-head {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.4fr 1.4fr;
  padding: 10px 10px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 800;
  text-align: center;
}

.items-table-head .col-item-info {
  text-align: right;
  padding-right: 4px;
}

.items-table-body {
  max-height: 440px;
  overflow-y: auto;
}

.item-table-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.4fr 1.4fr;
  padding: 10px 10px;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
  font-size: 11.5px;
  text-align: center;
  transition: background 0.15s;
}

.item-table-row:nth-child(even) {
  background: #fafaf9;
}

.item-table-row:active {
  background: #eff6ff;
}

.item-table-row .col-item-info {
  text-align: right;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-table-row .item-row-name {
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.item-table-row .item-row-meta {
  font-size: 10px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.item-table-row .item-class-badge {
  background: #e0f2fe;
  color: #0369a1;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

.item-table-row .col-item-qty {
  font-weight: 800;
  color: #334155;
  background: #f1f5f9;
  padding: 3px 6px;
  border-radius: 6px;
}

.item-table-row .col-item-sales {
  font-weight: 800;
  color: #0f172a;
}

.item-table-row .col-item-profit {
  font-weight: 800;
  color: #16a34a;
}

.item-table-row .col-item-profit.loss {
  color: #dc2626;
}

.items-table-footer {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.4fr 1.4fr;
  padding: 12px 10px;
  background: #f8fafc;
  border-top: 2px solid #cbd5e1;
  font-size: 12px;
  text-align: center;
  align-items: center;
}

.items-table-footer .col-item-info {
  text-align: right;
  padding-right: 4px;
}



/* =========================================================
   LOGIN SCREEN (Form1.vb PARITY) & POS STATION
   ========================================================= */
.login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.login-overlay.hidden {
  display: none !important;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 24px 20px;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(12px);
}

.login-header {
  text-align: center;
}

.login-logo {
  font-size: 40px;
  margin-bottom: 4px;
  display: inline-block;
  filter: drop-shadow(0 4px 10px rgba(14, 165, 233, 0.4));
}

.login-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.5px;
}

.login-pos-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
}

.login-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}

.login-field label {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}

.login-field input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid #334155;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.login-field input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.login-show-pass {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}

.login-show-pass input {
  accent-color: #0284c7;
  width: 16px;
  height: 16px;
}

/* Touch Keypad */
.login-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.login-key-btn {
  background: rgba(51, 65, 85, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  font-size: 20px;
  font-weight: 800;
  padding: 12px 0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.login-key-btn:active {
  background: #0284c7;
  color: #fff;
  transform: scale(0.96);
}

.login-key-btn.btn-clear {
  color: #f87171;
  font-size: 16px;
}

.btn-do-login {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-do-login:active {
  transform: scale(0.98);
}

.login-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
}

.btn-login-settings {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: underline;
}

/* User Badge Header */
.user-badge-header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-badge-header .badge-role {
  background: #0284c7;
  color: #fff;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 800;
}

.user-badge-header .badge-pos {
  background: #059669;
  color: #fff;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 800;
}

.user-badge-header .btn-hdr-logout {
  background: none;
  border: none;
  color: #f87171;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

/* Permissions & Authorization Modal (frmAuthoriz.vb) */
.authoriz-target-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

.authoriz-codes-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #fdf2f8;
  border: 1px solid #fbcfe8;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
}

.authoriz-codes-box label {
  font-size: 12px;
  font-weight: 700;
  color: #9d174d;
  display: block;
  margin-bottom: 4px;
}

.authoriz-codes-box input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #f472b6;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  box-sizing: border-box;
}

.authoriz-group-box {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}

.authoriz-group-title {
  background: #f1f5f9;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
}

.authoriz-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  background: #fff;
}

@media (max-width: 480px) {
  .authoriz-items-grid {
    grid-template-columns: 1fr;
  }
}

.perm-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  transition: all 0.15s;
  user-select: none;
}

.perm-item-label:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.perm-item-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #059669;
  cursor: pointer;
}

.perm-item-label.active {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.authoriz-template-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-perm-pill {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-perm-pill:hover, .btn-perm-pill:active {
  background: #0284c7;
  color: #fff;
  border-color: #0284c7;
}

/* ==============================================================
   USERS, CASH LOGS & EXCEL REPORT STYLES
   ============================================================== */
.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) {
  .form-grid-2col {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.card-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.custom-pos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: right;
  direction: rtl;
}

.custom-pos-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 9px 10px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.custom-pos-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.custom-pos-table tbody tr:hover {
  background: #f8fafc;
}

.user-role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.role-admin {
  background: #ede9fe;
  color: #6d28d9;
}
.role-supervisor {
  background: #ffedd5;
  color: #c2410c;
}
.role-cashier {
  background: #e0f2fe;
  color: #0369a1;
}

.session-tag-closed {
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.session-tag-open {
  background: #dcfce7;
  color: #15803d;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.excel-seg-btn {
  transition: all 0.2s ease;
}
.excel-seg-btn.active {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12) !important;
}

/* Scanner Mode Banner */
.scanner-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: var(--radius-md, 8px);
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  animation: fadeInDown 0.2s ease;
}

.scanner-mode-banner .sm-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.scanner-mode-banner .btn-sm-cancel {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scanner-mode-banner .btn-sm-cancel:active {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0.95);
}

.btn-opencash-quick:active {
  background: #e2e8f0 !important;
  transform: scale(0.95);
}

#openCashModal,
#openCash1Modal {
  z-index: 100005 !important;
}


