/* ==========================================================================
   AB Bill & PVC Printing System - Master CSS (100% Offline Capable)
   ========================================================================== */

:root {
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #0f766e;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --dark: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #cbd5e1;
  --font-family: 'Segoe UI', 'Hind Siliguri', 'Kalpurush', 'SolaimanLipi', -apple-system, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App Container Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-top-header {
  width: 100%;
  background: linear-gradient(90deg, #0b1329 0%, #1e3a8a 60%, #172554 100%);
  color: #ffffff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid #2563eb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 100;
  box-sizing: border-box;
}

.app-branding {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-logo {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.5);
  flex-shrink: 0;
}

.app-title-group h1 {
  font-size: 21px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
  margin: 0;
  line-height: 1.2;
}

.app-title-group p {
  font-size: 12.5px;
  color: #93c5fd;
  margin-top: 3px;
  font-weight: 500;
}

.app-top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.phone-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 7px 16px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #f0fdf4;
}

.phone-pill strong {
  font-size: 16px;
  color: #4ade80;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.clock-pill {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 7px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-body {
  display: flex;
  flex-grow: 1;
  min-height: calc(100vh - 70px);
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: #0f172a;
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.3s ease;
  z-index: 10;
}

.sidebar-header {
  padding: 12px 16px;
  background: #0b1329;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

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

.sidebar-title p {
  font-size: 11px;
  color: #94a3b8;
}

.nav-menu {
  list-style: none;
  padding: 16px 10px;
  flex-grow: 1;
}

.nav-item {
  margin-bottom: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-link.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.4);
}

.nav-badge {
  margin-left: auto;
  background: #ef4444;
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: bold;
}

.sidebar-footer {
  padding: 14px 16px;
  background: #090e17;
  border-top: 1px solid #1e293b;
  font-size: 11.5px;
  color: #64748b;
  text-align: center;
}

/* Main Content Area */
.main-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Top Navbar */
.top-header {
  background: #ffffff;
  border-bottom: 1px solid var(--slate-200);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 9;
}

.shop-banner {
  display: flex;
  flex-direction: column;
}

.shop-banner-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e3a8a;
  letter-spacing: -0.2px;
}

.shop-banner-sub {
  font-size: 12px;
  color: var(--slate-500);
}

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

.date-pill {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: #15803d;
}

.btn-warning {
  background: var(--warning);
  color: #fff;
}
.btn-warning:hover {
  background: #b45309;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #b91c1c;
}

.btn-outline {
  background: #fff;
  border-color: var(--slate-200);
  color: var(--slate-700);
}
.btn-outline:hover {
  background: var(--slate-100);
  border-color: var(--slate-500);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15.5px;
}

/* Page Container */
.page-container {
  padding: 24px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.page-view {
  display: none;
  padding: 24px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.page-view.active {
  display: block;
}

/* Roll Tabs */
.roll-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--slate-200);
  padding-bottom: 12px;
}
.roll-tab-btn {
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--slate-100);
  color: var(--slate-600);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.roll-tab-btn:hover {
  background: var(--slate-200);
}
.roll-tab-btn.active {
  background: #eff6ff;
  color: #1e40af;
  border-color: #3b82f6;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--slate-100);
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Grid Layouts */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-blue { background: #dbeafe; color: #1d4ed8; }
.stat-green { background: #dcfce7; color: #15803d; }
.stat-purple { background: #f3e8ff; color: #7e22ce; }
.stat-amber { background: #fef3c7; color: #b45309; }
.stat-red { background: #fee2e2; color: #b91c1c; }

.stat-info {
  flex-grow: 1;
}

.stat-label {
  font-size: 12.5px;
  color: var(--slate-500);
  font-weight: 500;
  margin-bottom: 2px;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
}

.stat-sub {
  font-size: 11px;
  color: var(--slate-500);
  margin-top: 2px;
}

/* Ledger Pad Table Styling (Matches user photo) */
.ledger-pad-container {
  background: #ffffff;
  border: 2px solid #1e3a8a;
  border-radius: 6px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  overflow-x: auto;
}

.ledger-pad-header {
  border-bottom: 2px solid #1e3a8a;
  padding-bottom: 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.ledger-shop-info {
  text-align: center;
  flex-grow: 1;
}

.ledger-shop-title {
  font-size: 20px;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.5px;
}

.ledger-shop-sub {
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.ledger-date-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #1e3a8a;
}

.ledger-date-input {
  border: 1px solid #1e3a8a;
  border-radius: 4px;
  padding: 4px 8px;
  font-weight: 700;
  font-size: 14px;
  color: #1e3a8a;
}

/* Master Table */
.ledger-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 13.5px;
}

.ledger-table th,
.ledger-table td {
  border: 1px solid #64748b;
  padding: 7px 8px;
  text-align: center;
  vertical-align: middle;
}

.ledger-table th {
  background-color: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  font-size: 13px;
}

.ledger-table td.text-left {
  text-align: left;
}
.ledger-table td.text-right {
  text-align: right;
}

.ledger-table tr:hover td {
  background-color: #f8fafc;
}

.ledger-table tr.total-row td {
  background-color: #e2e8f0;
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
}

/* Bottom Dual Summary Tables (Photo Replica) */
.ledger-bottom-summary {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.summary-box-table {
  width: 100%;
  border-collapse: collapse;
}

.summary-box-table th,
.summary-box-table td {
  border: 1px solid #64748b;
  padding: 6px 8px;
  font-size: 13px;
  text-align: center;
}

.summary-box-table th {
  background-color: #e2e8f0;
  font-weight: 700;
}

.summary-fin-table {
  width: 100%;
  border-collapse: collapse;
}

.summary-fin-table td {
  border: 1px solid #64748b;
  padding: 6px 10px;
  font-size: 13.5px;
}

.summary-fin-table td.label-col {
  font-weight: 700;
  background-color: #f1f5f9;
  width: 50%;
}

.summary-fin-table td.val-col {
  font-weight: 800;
  text-align: right;
}

.signature-line {
  margin-top: 32px;
  text-align: right;
  padding-right: 24px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

/* Roll Cards Grid */
.rolls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.roll-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 4px solid var(--primary);
  transition: all 0.2s;
}

.roll-card:hover {
  box-shadow: var(--shadow-md);
}

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

.roll-badge-type {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-pvc { background: #dbeafe; color: #1e40af; }
.badge-sticker { background: #fef3c7; color: #92400e; }
.badge-reflect { background: #f3e8ff; color: #6b21a8; }
.badge-clear { background: #ccfbf1; color: #0f766e; }

.roll-number-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.roll-size-sub {
  font-size: 12.5px;
  color: var(--slate-500);
}

.roll-progress-container {
  margin: 14px 0;
}

.roll-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.progress-bar-bg {
  height: 9px;
  background: var(--slate-200);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.3s ease;
}

.fill-green { background: #22c55e; }
.fill-amber { background: #f59e0b; }
.fill-red { background: #ef4444; }

.roll-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--slate-100);
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(2px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.modal-box {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 650px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-radius: 12px 12px 0 0;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--slate-500);
  cursor: pointer;
  padding: 4px;
}
.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 20px;
  flex-grow: 1;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
  border-radius: 0 0 12px 12px;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: #fff;
  color: var(--dark);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

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

.form-row {
  display: flex;
  gap: 12px;
}
.form-row > * {
  flex: 1;
}

.form-hint {
  font-size: 11.5px;
  color: var(--slate-500);
  margin-top: 4px;
}

.live-calc-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.live-calc-item {
  text-align: center;
}
.live-calc-item .lbl {
  font-size: 11.5px;
  color: #1e40af;
  font-weight: 600;
}
.live-calc-item .val {
  font-size: 18px;
  font-weight: 800;
  color: #1e3a8a;
}

/* Printable Roll Sticker Preview */
.sticker-preview-box {
  border: 2px dashed #334155;
  background: #fff;
  padding: 16px;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.sticker-shop-name {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.sticker-roll-no {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #000;
  line-height: 1;
  margin: 8px 0;
}

.sticker-badge {
  display: inline-block;
  font-size: 16px;
  font-weight: 800;
  padding: 3px 16px;
  background: #000;
  color: #fff;
  border-radius: 4px;
  margin-bottom: 8px;
}

.sticker-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  background: #f8fafc;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  margin-bottom: 8px;
}

.barcode-sim {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  letter-spacing: 4px;
  margin-top: 6px;
  font-size: 13px;
  border-top: 1px solid #cbd5e1;
  padding-top: 6px;
}

/* Printable Cash Memo */
.memo-sheet {
  background: #fff;
  border: 1px solid #cbd5e1;
  padding: 24px;
  max-width: 600px;
  margin: 0 auto;
}

/* Print Only Styles */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12pt;
  }

  .sidebar,
  .top-header,
  .btn,
  .no-print,
  .modal-footer,
  .modal-close,
  .header-actions {
    display: none !important;
  }

  .app-layout,
  .main-wrapper,
  .page-container {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }

  .ledger-pad-container {
    border: 2px solid #000 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    page-break-inside: avoid;
  }

  .ledger-table th,
  .ledger-table td,
  .summary-box-table th,
  .summary-box-table td,
  .summary-fin-table td {
    border: 1px solid #000 !important;
    color: #000 !important;
  }

  /* Printable sticker specific */
  .print-sticker-only {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 10px;
  }
}

/* ==========================================================================
   OPERATOR MODE & WHATSAPP NOTIFICATION STYLES
   ========================================================================== */
.btn-whatsapp {
  background-color: #25D366;
  color: #ffffff;
  font-weight: 700;
}
.btn-whatsapp:hover {
  background-color: #1ebc59;
  color: #ffffff;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.status-printing {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.status-printing::before {
  content: "●";
  color: #d97706;
  font-size: 12px;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

.status-ready {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.status-delivered {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* Operator Big Touch Input Box */
.operator-card {
  background: linear-gradient(to bottom, #ffffff, #f8fafc);
  border: 2px solid #2563eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
  margin-bottom: 24px;
}

/* Multi-Item Operator Cards */
.op-item-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.op-item-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.op-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
}

.op-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #1e40af;
}

.op-item-pill {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

.op-item-body {
  display: grid;
  grid-template-columns: 1.4fr 1.6fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 768px) {
  .op-item-body {
    grid-template-columns: 1fr;
  }
}

.op-calc-strip {
  margin-top: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
}

.op-calc-strip .stat-block {
  display: flex;
  flex-direction: column;
}

.op-calc-strip .stat-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}

.op-calc-strip .stat-val {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.op-calc-warning {
  margin-top: 10px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  display: none;
}

.operator-input-lg {
  font-size: 22px !important;
  font-weight: 800 !important;
  height: 52px !important;
  text-align: center;
}

.operator-btn-huge {
  padding: 16px 28px;
  font-size: 18px;
  font-weight: 800;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.active-jobs-queue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.queue-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 5px solid #d97706;
}

.queue-card.is-ready {
  border-left-color: #16a34a;
}

/* ==========================================================================
   READY FOR DELIVERY CARDS & SECTION
   ========================================================================== */
.ready-delivery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.ready-card {
  background: #ffffff;
  border: 2px solid #bbf7d0;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ready-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.15);
}

.ready-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 10px;
}

.ready-customer-name {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.ready-customer-phone {
  font-size: 13px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.ready-time-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ready-details-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  font-size: 13.5px;
}

.ready-bill-badge {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
}

.ready-bill-badge.has-due {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.ready-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-deliver-huge {
  background: #16a34a;
  color: white;
  font-size: 16px;
  font-weight: 800;
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 3px 8px rgba(22, 163, 74, 0.3);
  transition: all 0.2s;
}

.btn-deliver-huge:hover {
  background: #15803d;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

