:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --in-green: #10b981;
  --in-green-dark: #059669;
  --out-red: #ef4444;
  --out-red-dark: #dc2626;
  --bg-page: #0f172a;
  --bg-app: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html, body {
  background: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100%;
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Central Mobile Column (100% Width Fit) */
.desktop-wrapper {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background: var(--bg-app);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: clip; /* clip avoids breaking position: sticky in WebKit/Blink */
}

.phone-device {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
}

@media (max-width: 480px) {
  body {
    background: var(--bg-app) !important;
  }
  .desktop-wrapper {
    max-width: 100% !important;
    box-shadow: none !important;
  }
}

/* STICKY TOP APP HEADER */
.app-header {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  background: #ffffff !important;
  border-bottom: 1.5px solid var(--border) !important;
  padding: 10px 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  z-index: 10000 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

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

.brand-badge {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 17px;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

.brand-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.brand-sub {
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}

/* RIGHT-TOP SETTINGS ICON BUTTON */
.header-settings-icon-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  transition: all 0.15s;
}

.header-settings-icon-btn:active {
  transform: scale(0.92);
  background: #e2e8f0;
}

.header-settings-icon-btn.active {
  background: #ede9fe;
  border-color: #8b5cf6;
  color: #7c3aed;
}

.header-settings-icon-btn svg {
  width: 20px;
  height: 20px;
}

/* NOTIFICATION BELL BUTTON */
.header-bell-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  position: relative;
  transition: all 0.15s;
}

.header-bell-btn:active {
  transform: scale(0.92);
  background: #e2e8f0;
}

.header-bell-btn svg {
  width: 20px;
  height: 20px;
}

.header-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #dc2626;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 900;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.4);
  animation: pulse-bell-badge 2s infinite;
}

@keyframes pulse-bell-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* BIG PROMINENT SAVE BUTTON */
.header-save-btn {
  border: none;
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s;
}

.header-save-btn:active {
  transform: scale(0.96);
}

.header-save-btn.btn-in {
  background: linear-gradient(135deg, #10b981, #059669);
}

.header-save-btn.btn-out {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.header-counter-pill {
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* App Main Body */
.app-body {
  flex: 1;
  padding: 10px;
  padding-bottom: 85px !important;
  background: var(--bg-app);
}

/* View Switcher */
.tab-view {
  display: none;
  animation: fadeIn 0.15s ease-out;
}
.tab-view.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Clean Cards */
.clean-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  padding: 10px 12px;
  margin-bottom: 10px;
}

/* IN / OUT Big Segmented Switch (Where Date was) */
.entry-type-segment {
  display: flex;
  background: #f1f5f9;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
  margin-bottom: 10px;
}

.seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.seg-btn.active-in {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.35);
}

.seg-btn.active-out {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.35);
}

.seg-btn.active-all {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.35);
}

/* Form Inputs */
.form-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  min-width: 0;
}

.form-item:last-child {
  margin-bottom: 0;
}

.form-item label {
  font-size: 10.5px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.form-item input, .form-item select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}

.form-item input:focus, .form-item select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.form-grid-2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 8px;
  width: 100%;
}

.form-grid-2col:last-child {
  margin-bottom: 0;
}

/* Custom Theme-Native Select Trigger */
.custom-select-trigger {
  width: 100%;
  height: 36px;
  padding: 0 8px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  outline: none;
  transition: all 0.15s;
  text-align: left;
}

.custom-select-trigger:focus,
.custom-select-trigger:active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.custom-select-trigger .placeholder {
  color: #94a3b8;
  font-weight: 600;
}

.trigger-chevron {
  color: #64748b;
  flex-shrink: 0;
  transition: transform 0.2s;
}

/* Frames / Covers 2-Button Segment Inside Grid */
.cat-toggle-segment {
  display: flex;
  height: 36px;
  background: #f1f5f9;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 3px;
}

.cat-seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0 2px;
  white-space: nowrap;
}

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

/* Theme-Native Model Picker Modal */
.model-picker-dialog {
  max-width: 410px;
  border-radius: 16px;
}

.model-picker-grid {
  padding: 10px 12px;
  max-height: 55vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.model-picker-item {
  padding: 10px 10px;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  transition: all 0.12s;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.model-picker-item:hover,
.model-picker-item:active {
  border-color: #059669;
  background: #f1f5f9;
}

.model-picker-item.selected {
  border-color: #059669 !important;
  background: #ecfdf5 !important;
  color: #065f46 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.18) !important;
}

.model-picker-check {
  font-size: 13px;
  font-weight: 900;
  color: #059669;
  display: none;
}

.model-picker-item.selected .model-picker-check {
  display: inline-block;
}

/* QUICK TOOLBAR */
.bulk-fill-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 8px;
  font-size: 11px;
}

.bulk-fill-btns {
  display: flex;
  gap: 5px;
}

.quick-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.1s;
}

.quick-btn:active {
  background: #e2e8f0;
}

/* 🌟 3 COLUMNS PER LINE GRID (CLEAN & DIRECT INPUTS) 🌟 */
.tiles-grid-3col,
.direct-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.direct-input-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 4px 2px !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  text-align: center;
  overflow: hidden !important;
  transition: all 0.15s;
}

.direct-input-card:focus-within {
  border-color: var(--primary);
  background: #f8fafc;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.direct-input-card.has-qty-in {
  border-color: #10b981;
  background: #f0fdf4;
}

.direct-input-card.has-qty-out {
  border-color: #ef4444;
  background: #fef2f2;
}

.direct-item-label {
  font-size: 10px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
  text-align: center;
}

/* 🌟 INTEGRATED STEPPER (- / Input / +) 🌟 */
.stepper-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100% !important;
  min-width: 0 !important;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  height: 30px !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s;
}

.stepper-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 1.5px rgba(37, 99, 235, 0.2);
}

.step-btn {
  width: 22px !important;
  height: 100% !important;
  border: none;
  background: #f1f5f9;
  color: #1e293b;
  font-size: 15px !important;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.1s;
  flex-shrink: 0 !important;
  padding: 0 !important;
  line-height: 1;
}

.step-btn:active {
  background: #e2e8f0;
  transform: scale(0.92);
}

.step-btn.btn-minus {
  color: #ef4444;
  border-right: 1px solid #e2e8f0;
}

.step-btn.btn-plus {
  color: #2563eb;
  background: #eff6ff;
  border-left: 1px solid #e2e8f0;
}

.step-btn.btn-plus:active {
  background: #dbeafe;
}

.step-input {
  flex: 1;
  min-width: 0 !important;
  height: 100%;
  border: none;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px !important;
  font-weight: 800;
  color: #0f172a;
  outline: none;
  background: transparent;
  padding: 0 1px !important;
  -moz-appearance: textfield;
  appearance: textfield;
}

.step-input:focus {
  background: #f8fafc;
}

/* 🚫 REMOVE DEFAULT BROWSER UP/DOWN SPINNER ARROWS 🚫 */
.step-input::-webkit-outer-spin-button,
.step-input::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
  display: none !important;
}

input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.direct-field-wrap {
  width: 100%;
  min-width: 0;
}

.direct-field {
  width: 100%;
  height: 36px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  padding: 0 2px;
  box-sizing: border-box;
  transition: all 0.15s;
}

.direct-field:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* 🌟 RE-DECORATED SLEEK & COMPACT RECORDS FILTER BAR 🌟 */
.rec-filter-pills {
  display: flex;
  background: #f1f5f9;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}

.rec-pill-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px 2px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
  min-width: 0;
  white-space: nowrap;
  user-select: none;
}

.rec-pill-count {
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 800;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
}

/* Active Pill States - Modern Crisp Elevated Cards */
.rec-pill-btn.active-all {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #bfdbfe;
}
.rec-pill-btn.active-all .rec-pill-count {
  background: #dbeafe;
  color: #1e40af;
}

.rec-pill-btn.active-in {
  background: #ffffff;
  color: #059669;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #a7f3d0;
}
.rec-pill-btn.active-in .rec-pill-count {
  background: #d1fae5;
  color: #065f46;
}

.rec-pill-btn.active-out {
  background: #ffffff;
  color: #dc2626;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #fecaca;
}
.rec-pill-btn.active-out .rec-pill-count {
  background: #fee2e2;
  color: #991b1b;
}

/* Compact Integrated Filter Row (Model & Date) */
.rec-filter-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}

.rec-filter-select-wrap,
.rec-filter-date-wrap {
  flex: 1;
  min-width: 0;
}

.rec-filter-select {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: #1e293b;
  font-size: 11.5px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.rec-filter-select:focus {
  border-color: var(--primary);
}

.rec-filter-date-box {
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 4px 0 8px;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.rec-filter-date-box:focus-within {
  border-color: var(--primary);
}

.rec-filter-date-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
  outline: none;
  min-width: 0;
  height: 100%;
  padding: 0;
}

.rec-filter-clear-btn {
  background: #f1f5f9;
  border: none;
  color: #64748b;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 2px;
  transition: all 0.15s;
}

.rec-filter-clear-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.rec-search-input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  outline: none;
  background: #ffffff;
  color: #0f172a;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.rec-search-input:focus {
  border-color: var(--primary);
}

/* Records Mini KPI Bar */
.records-kpi-bar {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.rec-kpi-item {
  flex: 1;
  min-width: 0;
  padding: 6px 4px;
  text-align: center;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-sizing: border-box;
}

.rec-kpi-item:last-child {
  border-right: none;
}

.rec-kpi-lbl {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-kpi-val {
  font-size: 12px;
  font-weight: 900;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-kpi-item.in .rec-kpi-val { color: #059669; }
.rec-kpi-item.out .rec-kpi-val { color: #dc2626; }
.rec-kpi-item.bal .rec-kpi-val { color: #2563eb; }

/* 🌟 EXCEL SHEET SPREADSHEET TABLE (100% FIT-TO-VIEW - NO HORIZONTAL SCROLL) 🌟 */
#historyTableContainer {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.excel-table-container {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  overflow-x: hidden !important;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  box-sizing: border-box !important;
}

.excel-table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  font-size: 11px;
  text-align: left;
  box-sizing: border-box !important;
}

.excel-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 800;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  padding: 7px 3px !important;
  border-bottom: 1.5px solid #cbd5e1;
  border-right: 1px solid #e2e8f0;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box !important;
}

.excel-table th:last-child {
  border-right: none;
}

.excel-table td {
  padding: 7px 3px !important;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #f8fafc;
  color: #1e293b;
  font-size: 10.5px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box !important;
}

.excel-table td:last-child {
  border-right: none;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.excel-table tbody tr {
  transition: background 0.1s;
  cursor: pointer;
}

.excel-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.excel-table tbody tr:hover {
  background: #eff6ff !important;
}

.excel-table tfoot td {
  background: #f1f5f9;
  font-weight: 800;
  border-top: 2px solid #cbd5e1;
  border-bottom: none;
  padding: 7px 3px !important;
  box-sizing: border-box !important;
}

/* Excel Badges & Pills */
.excel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.excel-badge.in {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.excel-badge.out {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* 🌟 RE-DECORATED MODERN PAGINATION BAR 🌟 */
.excel-pagination-card {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.pagination-status-pill {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 700;
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.pagination-nav-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.page-nav-btn {
  height: 32px;
  padding: 0 10px;
  border: 1.5px solid var(--border);
  background: #ffffff;
  color: #1e293b;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s;
}

.page-nav-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: #eff6ff;
}

.page-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: #f8fafc;
  box-shadow: none;
}

.page-number-chips {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-chip {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border: 1.5px solid var(--border);
  background: #ffffff;
  color: #334155;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.page-chip:hover:not(.active) {
  border-color: #94a3b8;
  background: #f8fafc;
}

.page-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

.page-chip.dots {
  border: none;
  background: transparent;
  cursor: default;
  color: #94a3b8;
  min-width: 20px;
}

/* Records List fallback */
.record-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.record-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
}

.record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.record-type-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  text-transform: uppercase;
}

.record-type-badge.in {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.record-type-badge.out {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.record-model-name {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.record-date-str {
  font-size: 11px;
  color: #94a3b8;
  font-family: var(--font-mono);
}

.record-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 4px;
}

.record-qty-text {
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 800;
}

/* KPI Tri Grid */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.kpi-val {
  font-size: 17px;
  font-weight: 900;
  font-family: var(--font-mono);
}

.kpi-val.in { color: #10b981; }
.kpi-val.out { color: #ef4444; }
.kpi-val.bal { color: #2563eb; }

.kpi-txt {
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Clean Stock Table */
.stock-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.stock-summary-table th {
  padding: 7px 6px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  font-size: 10px;
  border-bottom: 1.5px solid var(--border);
}

.stock-summary-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 600;
}

.stock-summary-table td.clickable-cell {
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
}
.stock-summary-table td.clickable-cell:hover,
.stock-summary-table td.clickable-cell:active {
  background: #f1f5f9;
}
.stock-summary-table td.cell-in {
  color: #059669;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #a7f3d0;
  text-underline-offset: 3px;
}
.stock-summary-table td.cell-out {
  color: #dc2626;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #fecaca;
  text-underline-offset: 3px;
}
.stock-summary-table td.cell-balance {
  color: #2563eb;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: #bfdbfe;
  text-underline-offset: 3px;
}

/* ==========================================================================
   🌟 PRO DECORATED STOCK PAGE & DATE FILTER STYLING
   ========================================================================== */

/* Pro Date Filter Card */
.stock-date-filter-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.stock-preset-pills {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.stock-preset-btn {
  flex: 1;
  min-width: 0;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  border-radius: 6px;
  padding: 5px 2px;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-preset-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.stock-preset-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

.stock-date-field {
  width: 100%;
  height: 33px;
  padding: 0 8px;
  border: 1.5px solid #cbd5e1;
  border-radius: 7px;
  font-size: 11.5px;
  color: #1e293b;
  box-sizing: border-box;
  outline: none;
}

.stock-date-field:focus {
  border-color: #2563eb;
}

/* Pro KPI Cards - Sleek Rectangular Shape */
.stock-kpi-pro-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

.pro-kpi-card {
  border-radius: 8px;
  padding: 4px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 42px;
  max-height: 46px;
  box-sizing: border-box;
  transition: transform 0.15s ease;
  position: relative;
  overflow: hidden;
}

.pro-kpi-card:active {
  transform: scale(0.98);
}

.pro-kpi-card.in-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08);
}

.pro-kpi-card.out-card {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border: 1px solid #fca5a5;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.08);
}

.pro-kpi-card.bal-card {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #93c5fd;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.pro-kpi-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1;
  margin-bottom: 2px;
}

.pro-kpi-card.in-card .pro-kpi-title { color: #15803d; }
.pro-kpi-card.out-card .pro-kpi-title { color: #b91c1c; }
.pro-kpi-card.bal-card .pro-kpi-title { color: #1d4ed8; }

.pro-kpi-val-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  line-height: 1;
}

.pro-kpi-number {
  font-size: 16px;
  font-weight: 900;
  font-family: var(--font-mono);
  line-height: 1;
}

.pro-kpi-card.in-card .pro-kpi-number { color: #16a34a; }
.pro-kpi-card.out-card .pro-kpi-number { color: #dc2626; }
.pro-kpi-card.bal-card .pro-kpi-number { color: #2563eb; }

.pro-kpi-unit {
  font-size: 8.5px;
  font-weight: 800;
  opacity: 0.8;
}

.pro-kpi-card.in-card .pro-kpi-unit { color: #15803d; }
.pro-kpi-card.out-card .pro-kpi-unit { color: #b91c1c; }
.pro-kpi-card.bal-card .pro-kpi-unit { color: #1d4ed8; }

/* Settings 3-Tab Segment Navigation */
.settings-nav-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
  margin-bottom: 10px;
  border: 1px solid #cbd5e1;
}

.settings-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 4px;
  font-size: 11.5px;
  font-weight: 800;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.settings-nav-btn:hover {
  color: #1e293b;
}

.settings-nav-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
}

.settings-tab-pane {
  display: block;
}

/* PRO Action Buttons (Print & Share) */
.pro-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1.5px solid transparent;
  text-decoration: none;
}

.pro-action-btn.print {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.15);
}

.pro-action-btn.print:active {
  background: #1e293b;
  transform: scale(0.97);
}

.pro-action-btn.share {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.15);
}

.pro-action-btn.share:active {
  background: #047857;
  transform: scale(0.97);
}

/* Redesigned Model-wise Stock Table */
.stock-pro-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.stock-pro-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 800;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  padding: 7px 5px;
  border-bottom: 1.5px solid #cbd5e1;
}

.stock-pro-table td {
  padding: 7px 5px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.stock-pro-table tr:nth-child(even) td {
  background: #fafbfc;
}

.stock-pro-table tr:hover td {
  background: #f0f9ff;
}

.stock-pro-table th,
.stock-pro-table td {
  padding: 5px 3px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.stock-cell-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2.5px;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
  padding: 2.5px 4.5px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1.15;
  box-sizing: border-box;
  max-width: 100%;
  transition: all 0.15s;
}

.stock-cell-pill .pill-val {
  display: inline-block;
  white-space: nowrap !important;
  letter-spacing: -0.2px;
}

.stock-cell-pill .pill-icon {
  font-size: 8px;
  line-height: 1;
  display: inline-block;
  flex-shrink: 0;
  opacity: 0.8;
  margin-left: 1px;
  vertical-align: middle;
}

.stock-cell-pill .pill-unit {
  font-size: 7.5px;
  font-weight: 700;
  opacity: 0.85;
  margin-left: 1.5px;
  letter-spacing: 0;
}

.stock-cell-pill:hover,
.stock-cell-pill:active {
  transform: scale(1.04);
}

.stock-cell-pill.in {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.stock-cell-pill.out {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.stock-cell-pill.bal-pos {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.stock-cell-pill.bal-neg {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #f87171;
}

.stock-cell-pill.bal-zero {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

/* ==========================================================================
   🌟 DENSE EXCEL CHART / SPREADSHEET TABLE FOR BREAKDOWN POPUP
   ========================================================================== */
.excel-breakdown-grid-wrapper {
  width: 100%;
  background: transparent;
}

.excel-category-block {
  width: 100%;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  margin-bottom: 16px;
}

.excel-category-header {
  background: #f1f5f9;
  border-bottom: 1.5px solid #cbd5e1;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.excel-grandtotal-card {
  background: #f8fafc;
  border: 2px solid #0f172a;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.excel-grandtotal-header {
  font-size: 11px;
  font-weight: 900;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

.excel-grandtotal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 6px;
  text-align: center;
  font-family: var(--font-mono);
}

.excel-grandtotal-pill {
  border-radius: 6px;
  padding: 6px 4px;
}
.excel-grandtotal-pill.in {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.excel-grandtotal-pill.out {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.excel-grandtotal-pill.net {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.excel-dense-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
  line-height: 1.25;
}

.excel-dense-grid th {
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 900;
  font-size: 9px;
  text-transform: uppercase;
  padding: 5px 5px;
  border: 1px solid #cbd5e1;
  position: sticky;
  top: 0;
  z-index: 2;
  letter-spacing: 0.2px;
}

.excel-dense-grid td {
  padding: 3.5px 5px;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  vertical-align: middle;
}

.excel-dense-grid tr:nth-child(even) td {
  background: #f8fafc;
}

.excel-dense-grid tr:hover td {
  background: #eff6ff !important;
}

.excel-group-header-row td {
  background: #f1f5f9 !important;
  font-weight: 800;
  color: #334155;
  font-size: 10px;
  padding: 5px 6px;
  border-top: 1.5px solid #94a3b8 !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

/* 🖼️ FRAMES SECTION HEADER - Deep Blue Gradient */
.excel-group-header-row.frames td {
  background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 100%) !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  letter-spacing: 0.5px;
  padding: 6px 8px !important;
  border-top: 1.5px solid #1e3a8a !important;
  border-bottom: 1px solid #1d4ed8 !important;
}

/* 🔘 COVERS SECTION HEADER - Royal Purple Gradient */
.excel-group-header-row.covers td {
  background: linear-gradient(90deg, #581c87 0%, #7c3aed 100%) !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  letter-spacing: 0.5px;
  padding: 6px 8px !important;
  border-top: 1.5px solid #581c87 !important;
  border-bottom: 1px solid #6b21a8 !important;
}

.excel-subtotal-row td {
  background: #f8fafc !important;
  font-weight: 800;
  border-top: 1.5px solid #cbd5e1 !important;
  border-bottom: 1.5px solid #cbd5e1 !important;
  padding: 5px 6px;
  font-size: 10.5px;
}

.excel-subtotal-row.frames td {
  background: #eff6ff !important;
  font-weight: 800;
  color: #1e3a8a !important;
  border-top: 1.5px solid #bfdbfe !important;
  border-bottom: 1.5px solid #bfdbfe !important;
}

.excel-subtotal-row.covers td {
  background: #faf5ff !important;
  font-weight: 800;
  color: #581c87 !important;
  border-top: 1.5px solid #e9d5ff !important;
  border-bottom: 1.5px solid #e9d5ff !important;
}

.excel-grand-total-row td {
  background: #e2e8f0 !important;
  font-weight: 900;
  font-size: 11px;
  border-top: 2px solid #0f172a !important;
  border-bottom: 3px double #0f172a !important;
  padding: 5px 6px;
}

.excel-cat-badge {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.excel-cat-badge.frame {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.excel-cat-badge.cover {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.excel-cat-badge.change-over {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #d8b4fe;
}

.excel-cat-badge.breaker,
.excel-cat-badge.breakers {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.excel-cat-badge.chrome {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.excel-cat-badge.strip {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.excel-cat-badge.general {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

/* 🌟 MODEL STOCK BREAKDOWN POPUP - ENHANCED RESPONSIVE WIDTH & CLEAN TABS 🌟 */
#stockBreakdownModal.app-modal-overlay {
  padding: 8px 6px !important;
}

.stock-breakdown-dialog {
  width: 98% !important;
  max-width: min(98vw, 560px) !important;
  height: 94vh !important;
  max-height: 96vh !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 auto !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35) !important;
}

@media (min-width: 640px) {
  #stockBreakdownModal.app-modal-overlay {
    padding: 12px !important;
  }
  .stock-breakdown-dialog {
    max-width: 420px !important;
  }
}

/* Redesigned 4-Button Filter Bar (Clean 2-tier layout, no ugly line wraps) */
.breakdown-tab-bar {
  display: flex;
  gap: 5px;
  padding: 6px 8px;
  background: #f8fafc;
  border-bottom: 1.5px solid var(--border);
  box-sizing: border-box;
}

.breakdown-tab-btn {
  flex: 1;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  padding: 6px 2px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.15s ease;
  min-width: 0;
  user-select: none;
}

.breakdown-tab-btn:active {
  transform: scale(0.96);
}

.breakdown-tab-btn .tab-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1;
  white-space: nowrap;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 3px;
}

.breakdown-tab-btn .tab-num {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

/* Inactive button number colors */
.breakdown-tab-btn.btn-tab-all:not(.active-all) .tab-num {
  color: #0f172a;
}
.breakdown-tab-btn.btn-tab-in:not(.active-in) .tab-num {
  color: #059669;
}
.breakdown-tab-btn.btn-tab-out:not(.active-out) .tab-num {
  color: #dc2626;
}
.breakdown-tab-btn.btn-tab-bal:not(.active-bal) .tab-num {
  color: #2563eb;
}

/* Active ALL */
.breakdown-tab-btn.active-all {
  background: #0f172a !important;
  border-color: #0f172a !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}
.breakdown-tab-btn.active-all .tab-title,
.breakdown-tab-btn.active-all .tab-num {
  color: #ffffff !important;
}

/* Active IN */
.breakdown-tab-btn.active-in {
  background: #059669 !important;
  border-color: #059669 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}
.breakdown-tab-btn.active-in .tab-title,
.breakdown-tab-btn.active-in .tab-num {
  color: #ffffff !important;
}

/* Active OUT */
.breakdown-tab-btn.active-out {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}
.breakdown-tab-btn.active-out .tab-title,
.breakdown-tab-btn.active-out .tab-num {
  color: #ffffff !important;
}

/* Active BALANCE */
.breakdown-tab-btn.active-bal {
  background: #2563eb !important;
  border-color: #2563eb !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}
.breakdown-tab-btn.active-bal .tab-title,
.breakdown-tab-btn.active-bal .tab-num {
  color: #ffffff !important;
}

/* Row Action Buttons for Ledger (Edit & Delete) */
.rec-row-btn {
  border: none;
  background: #f1f5f9;
  padding: 2.5px 5px;
  border-radius: 4px;
  font-size: 10.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  line-height: 1;
}

.rec-row-btn:hover {
  transform: scale(1.1);
}

.rec-row-btn.edit {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.rec-row-btn.edit:active {
  background: #bae6fd;
}

.rec-row-btn.del {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.rec-row-btn.del:active {
  background: #fca5a5;
}


/* Buttons */
.app-btn {
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.app-btn-primary { background: #2563eb; color: #ffffff; }
.app-btn-outline { background: #ffffff; border: 1.5px solid #cbd5e1; color: #334155; }
.app-btn-danger { background: #ef4444; color: #ffffff; }
.app-btn-block { width: 100%; }
.app-btn-sm { padding: 5px 9px; font-size: 11px; }

/* 🌟 100% FIXED STICKY BOTTOM NAVIGATION BAR 🌟 */
.app-bottom-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 440px !important;
  height: 64px !important;
  background: #ffffff !important;
  border-top: 1.5px solid var(--border) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  z-index: 900 !important;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08) !important;
  padding: 0 12px !important;
}

@media (max-width: 480px) {
  .app-bottom-nav {
    left: 0 !important;
    transform: none !important;
    max-width: 100% !important;
  }
}

.nav-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 0;
  transition: all 0.15s;
}

.nav-tab-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.nav-tab-btn.active {
  color: #2563eb;
  font-weight: 800;
}

.nav-tab-btn.active svg {
  stroke: #2563eb;
  transform: translateY(-2px);
}

/* NAVIGATION SAVE BUTTON (MIDDLE OF BOTTOM NAV) */
.nav-save-btn {
  flex: 1.5;
  height: 44px;
  margin: 0 6px;
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
  transition: transform 0.1s, box-shadow 0.15s;
  padding: 0 8px;
}

.nav-save-btn:active {
  transform: scale(0.96);
}

.nav-save-btn.btn-in {
  background: linear-gradient(135deg, #10b981, #059669);
}

.nav-save-btn.btn-out {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.nav-save-btn.btn-disabled {
  background: #94a3b8 !important;
  color: #f1f5f9 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 0.65 !important;
}

.seg-btn.active-bal {
  background: #2563eb !important;
  color: #ffffff !important;
}

.nav-save-btn .header-counter-pill {
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 800;
  white-space: nowrap;
}

/* Modal */
.app-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 16px;
}

.app-modal-overlay.hidden { display: none; }

.app-modal-dialog {
  width: 100%;
  max-width: 390px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 80vh;
}

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

.app-modal-body {
  padding: 16px;
  overflow-y: auto;
}

.app-modal-footer {
  padding: 10px 16px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* 🧙 WORDPRESS-STYLE 1-CLICK SETUP WIZARD 🧙 */
.wizard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 14px;
}

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

.wizard-dialog {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  animation: wizardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wizardPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.wizard-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wizard-brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.wizard-stepper-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.wizard-step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  z-index: 2;
}

.step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.wizard-step-node.active .step-circle {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.wizard-step-node.done .step-circle {
  background: #10b981;
  color: #ffffff;
}

.step-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
}

.wizard-step-node.active .step-label {
  color: #0f172a;
  font-weight: 800;
}

.wizard-stepper-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 6px 14px 6px;
  transition: background 0.2s;
}

.wizard-stepper-line.active {
  background: #10b981;
}

.wizard-body {
  padding: 20px;
  overflow-y: auto;
  max-height: 65vh;
}

.wizard-step-page {
  display: none;
}

.wizard-step-page.active {
  display: block;
}

.google-connect-btn {
  width: 100%;
  height: 46px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.google-connect-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.wizard-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.wizard-check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wizard-footer {
  padding: 12px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Toast Notification System */
.clean-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-24px) scale(0.96);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 28px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.12);
  z-index: 2000000;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
  text-align: left;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.clean-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.clean-toast.toast-success {
  border-left: 3.5px solid #10b981;
  box-shadow: 0 12px 32px -4px rgba(16, 185, 129, 0.25), 0 0 0 1px rgba(16, 185, 129, 0.3);
}

.clean-toast.toast-danger,
.clean-toast.toast-error {
  border-left: 3.5px solid #ef4444;
  box-shadow: 0 12px 32px -4px rgba(239, 68, 68, 0.25), 0 0 0 1px rgba(239, 68, 68, 0.3);
}

.clean-toast.toast-warning {
  border-left: 3.5px solid #f59e0b;
  box-shadow: 0 12px 32px -4px rgba(245, 158, 11, 0.25), 0 0 0 1px rgba(245, 158, 11, 0.3);
}

.clean-toast.toast-info {
  border-left: 3.5px solid #3b82f6;
  box-shadow: 0 12px 32px -4px rgba(59, 130, 246, 0.25), 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.clean-toast .toast-icon {
  font-size: 13.5px;
  flex-shrink: 0;
  display: inline-flex;
}

.clean-toast .toast-text {
  flex: 1;
  white-space: normal;
  line-height: 1.35;
}

/* 🖨️ DEDICATED PRINTABLE EXCEL SPREADSHEET SHEET & 📤 SHARE CONTAINER 🖨️ */
#printableLedgerSheet {
  display: none;
}

#shareRenderContainer {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 794px; /* Standard A4 width at 96 DPI */
  min-height: 1123px; /* Standard A4 height at 96 DPI */
  background: #ffffff;
  padding: 36px 40px;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  color: #000000;
  z-index: -9999;
  pointer-events: none;
}

/* Common Styles for A4 Sheets (Used by both Print and Image Share) */
.print-sheet-header {
  text-align: center;
  border-bottom: 2px solid #000000;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.print-sheet-title {
  font-size: 14pt;
  font-weight: 800;
  text-transform: uppercase;
  color: #0f172a;
  margin-bottom: 4px;
}

.print-meta-grid {
  display: flex;
  justify-content: space-between;
  font-size: 9pt;
  color: #444444;
  margin-top: 4px;
  font-weight: 600;
}

.print-kpi-summary {
  display: flex;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 10pt;
  font-weight: 700;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.print-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 9.5pt !important;
}

.print-table th,
.print-table td {
  border: 1px solid #94a3b8 !important;
  padding: 6px 8px !important;
  text-align: left;
}

.print-table th {
  background: #0f172a;
  color: #ffffff;
  font-weight: 800;
  font-size: 8.5pt;
  text-transform: uppercase;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.print-table tfoot td {
  background: #f8fafc !important;
  font-weight: 900 !important;
  border-top: 2px solid #000000 !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* 🖨️ & 📤 PRINT / SHARE BREAKDOWN - FRAMES & COVERS STYLES */
.print-table .print-group-header.frames td {
  background: #1e3a8a !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 10pt !important;
  letter-spacing: 0.5px;
  padding: 6px 8px !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.print-table .print-group-header.covers td {
  background: #581c87 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 10pt !important;
  letter-spacing: 0.5px;
  padding: 6px 8px !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.print-table .print-subtotal.frames td {
  background: #eff6ff !important;
  color: #1e3a8a !important;
  font-weight: 800 !important;
  border-top: 1.5px solid #93c5fd !important;
  border-bottom: 1.5px solid #93c5fd !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.print-table .print-subtotal.covers td {
  background: #faf5ff !important;
  color: #581c87 !important;
  font-weight: 800 !important;
  border-top: 1.5px solid #d8b4fe !important;
  border-bottom: 1.5px solid #d8b4fe !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.print-sign-row {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  font-size: 10pt;
  font-weight: 700;
  padding: 0 20px;
}

.print-sign-line {
  border-top: 1px solid #000000;
  width: 160px;
  text-align: center;
  padding-top: 4px;
}

.print-doc-footer {
  margin-top: 28px;
  padding-top: 6px;
  border-top: 1px solid #cbd5e1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 8.5pt;
  color: #64748b;
  font-family: Arial, sans-serif;
}

/* 🧙 WORDPRESS-STYLE 1-CLICK SETUP WIZARD 🧙 */
.wizard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

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

.wizard-dialog {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: wizardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wizardPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.wizard-header {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wizard-brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.wizard-stepper-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.wizard-step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.wizard-step-node .step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.wizard-step-node.active .step-circle {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.wizard-step-node.done .step-circle {
  background: #10b981;
  color: #ffffff;
}

.wizard-step-node .step-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
}

.wizard-step-node.active .step-label {
  color: #2563eb;
}

.wizard-step-node.done .step-label {
  color: #10b981;
}

.wizard-stepper-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 4px 14px 4px;
  transition: all 0.25s ease;
}

.wizard-stepper-line.active {
  background: #10b981;
}

.wizard-body {
  padding: 20px;
  flex: 1;
  max-height: 60vh;
  overflow-y: auto;
}

.wizard-step-page {
  display: none;
}

.wizard-step-page.active {
  display: block;
  animation: wizardFade 0.25s ease;
}

@keyframes wizardFade {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.google-connect-btn {
  width: 100%;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  padding: 11px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  font-size: 13.5px;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.google-connect-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.google-connect-btn:active {
  transform: scale(0.98);
}

.wizard-check-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
}

.wizard-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
}

.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* --- 📱 PULL TO REFRESH SYSTEM --- */
.pull-refresh-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 0;
  overflow: hidden;
  background: #f8fafc;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 800;
  transition: height 0.12s ease, opacity 0.12s ease;
  border-bottom: 1px solid #e2e8f0;
  width: 100%;
}
.pull-refresh-bar.pulling {
  display: flex !important;
}
.pull-refresh-bar.refreshing {
  display: flex !important;
  height: 38px !important;
  background: #ecfdf5;
  color: #065f46;
  border-bottom-color: #a7f3d0;
}
.pull-icon {
  display: inline-block;
  font-size: 13px;
  font-weight: 900;
  transition: transform 0.2s ease;
}
.pull-icon.rotate {
  transform: rotate(180deg);
}
.pull-icon.spin {
  animation: spinPull 0.8s linear infinite;
}
@keyframes spinPull {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0; /* Strips browser auto-headers (date, hostname, URL) on Chrome/Safari */
  }
  
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* Hide entire web app UI, headers, navigation, modals, buttons, auth */
  .desktop-wrapper,
  .app-header,
  .app-bottom-nav,
  .clean-toast,
  .app-modal-overlay,
  .wizard-overlay,
  .tab-view,
  #view-entry,
  #view-history,
  #view-reports,
  #view-settings,
  #shareRenderContainer,
  #authLoginOverlay {
    display: none !important;
    visibility: hidden !important;
  }

  /* Show only the formatted Excel-like sheet with page margin padding */
  #printableLedgerSheet {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12mm 14mm 12mm 14mm !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-family: Arial, Helvetica, sans-serif !important;
  }

  #printableLedgerSheet * {
    visibility: visible !important;
  }
}

/* 🌟 AUTHENTICATION & LOGIN OVERLAY (PAKISTANI PHONE & PASSWORD) 🌟 */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  z-index: 999999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

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

.auth-card {
  background: #ffffff;
  width: 100%;
  max-width: 380px;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.auth-brand {
  text-align: center;
  margin-bottom: 20px;
}

.auth-logo-icon {
  font-size: 38px;
  margin-bottom: 4px;
}

.auth-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.5px;
}

.auth-subtitle {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: #64748b;
  font-weight: 700;
}

.auth-field-group {
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: #334155;
  margin-bottom: 4px;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  position: relative;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.auth-input-wrap:focus-within {
  border-color: #2563eb;
  background: #ffffff;
}

.auth-input-icon {
  padding: 0 10px;
  font-size: 14px;
  flex-shrink: 0;
  color: #64748b;
}

.auth-input {
  flex: 1;
  height: 42px;
  border: none;
  background: transparent;
  padding: 0 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}

.auth-field-hint {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 3px;
  font-weight: 600;
}

.auth-toggle-pass {
  background: transparent;
  border: none;
  padding: 0 12px;
  cursor: pointer;
  font-size: 14px;
  color: #64748b;
}

.auth-error-box {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

.auth-submit-btn {
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
  transition: transform 0.1s;
}

.auth-submit-btn:active {
  transform: scale(0.98);
}

.auth-demo-hint {
  margin-top: 14px;
  padding: 8px 10px;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 10.5px;
  color: #475569;
  text-align: center;
  line-height: 1.4;
}

/* Header User Profile & Logout */
.header-user-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 4px;
}

.header-user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}

.header-role-badge {
  font-size: 8.5px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.header-role-badge.super_admin,
.header-role-badge.role-admin {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.header-role-badge.editor,
.header-role-badge.role-editor {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.header-role-badge.view_only,
.header-role-badge.role-view {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.header-user-name {
  font-size: 10.5px;
  font-weight: 800;
  color: #0f172a;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-logout-btn {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 6px;
  padding: 5px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-logout-btn:active {
  background: #fee2e2;
  transform: scale(0.95);
}

/* Settings Users List */
.settings-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
}

.settings-user-role-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.settings-user-role-badge.role-admin {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.settings-user-role-badge.role-editor {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.settings-user-role-badge.role-view {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}


/* ==========================================================================
   🌟 STOCK PAGE 3-PILL COMPACT FILTERS & POPOVERS
   ========================================================================== */
.stock-filters-bar-card {
  position: relative;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 10px;
}

.stock-filters-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.stock-filter-col {
  min-width: 0;
}

.stock-filter-pill-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 3px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 7px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  color: #0f172a;
  transition: all 0.15s;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

.stock-filter-pill-btn:active,
.stock-filter-pill-btn.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

.pill-btn-icon {
  font-size: 11px;
  margin-right: 3px;
  flex-shrink: 0;
}

.pill-btn-label {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill-btn-arrow {
  font-size: 8px;
  color: #64748b;
  margin-left: 2px;
  flex-shrink: 0;
}

/* Popover Panels */
.stock-popover-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1050;
}

.stock-popover-backdrop.show {
  display: block;
}

.stock-popover-panel {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
  max-width: 360px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 1060;
  overflow: hidden;
  max-height: 85vh;
  flex-direction: column;
}

.stock-popover-panel.show {
  display: flex;
}

.stock-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 900;
  color: #0f172a;
}

.stock-popover-close {
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  padding: 2px 6px;
}

.stock-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 6px 12px;
  background: #fafbfc;
  border-bottom: 1px solid #f1f5f9;
}

.stock-action-chip {
  background: #e2e8f0;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 9.5px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
}

.stock-action-chip:active {
  background: #cbd5e1;
}

.stock-popover-body {
  padding: 10px 12px;
  overflow-y: auto;
}

.stock-popover-list {
  padding: 6px 12px;
  overflow-y: auto;
  max-height: 240px;
}

.stock-popover-opt-btn {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  margin-bottom: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
}

.stock-popover-opt-btn.active {
  background: #ecfdf5 !important;
  border-color: #059669 !important;
  color: #065f46 !important;
  font-weight: 800;
}

.stock-check-item {
  display: flex;
  align-items: center;
  padding: 7px 4px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
}

.stock-check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  accent-color: #2563eb;
  cursor: pointer;
}

.stock-popover-footer {
  padding: 8px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* ==========================================================================
   🌟 STOCK BOTTOM PAGINATION CONTROLS
   ========================================================================== */
.stock-pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px solid #f1f5f9;
  font-size: 11px;
}

.stock-page-info {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
}

.stock-page-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stock-page-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}

.stock-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stock-page-btn:not(:disabled):active {
  background: #2563eb;
  color: #ffffff;
}

.stock-page-num {
  font-weight: 800;
  color: #0f172a;
  font-size: 10.5px;
}

/* Multi-Model Print & Share Section Dividers */
.print-multi-model-block {
  margin-bottom: 24px;
  page-break-inside: avoid;
}

.print-multi-model-banner {
  background: #1e3a8a;
  color: #ffffff;
  padding: 6px 10px;
  font-size: 11pt;
  font-weight: 900;
  border-radius: 4px 4px 0 0;
  margin-bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Reset All Filters Button */
.pro-action-btn.reset {
  background: #f8fafc;
  color: #475569;
  border: 1.5px solid #cbd5e1;
}

.pro-action-btn.reset:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #94a3b8;
}

.pro-action-btn.reset:active {
  transform: scale(0.96);
}

/* ==========================================================================
   🔒 DEVELOPER CLOUD LICENSE & REMOTE LOCK SCREEN STYLING
   ========================================================================== */
.license-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999999 !important;
  background: rgba(10, 15, 29, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  animation: licenseFadeIn 0.3s ease-out;
}

@keyframes licenseFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.license-lock-card {
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  padding: 30px 24px 24px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.license-lock-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #ef4444);
}

.license-lock-icon-wrap {
  position: relative;
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fef2f2;
  border: 2px solid #fee2e2;
  border-radius: 50%;
}

.license-lock-icon {
  font-size: 34px;
  animation: licensePulse 2s infinite ease-in-out;
}

@keyframes licensePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.license-lock-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: #fee2e2;
  color: #b91c1c;
  margin-bottom: 12px;
}

.license-lock-tag.offline-tag {
  background: #fef3c7;
  color: #b45309;
}

.license-lock-title {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.25;
}

.license-lock-message {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 18px;
}

.license-info-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.license-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.license-info-lbl {
  color: #64748b;
  font-weight: 600;
}

.license-info-val {
  color: #0f172a;
  font-weight: 800;
}

.license-retry-btn {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s, opacity 0.15s;
}

.license-retry-btn:active {
  transform: scale(0.97);
}

.license-retry-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.license-spinner {
  display: inline-block;
  animation: licenseSpin 1s linear infinite;
}

@keyframes licenseSpin {
  100% { transform: rotate(360deg); }
}

.license-feedback {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  min-height: 18px;
}

.license-feedback.error {
  color: #dc2626;
}

.license-feedback.success {
  color: #16a34a;
}

.license-lock-footer {
  margin-top: 16px;
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 600;
}



/* ==========================================================================
   🏢 MULTI-FLOOR & SECTION STYLES (1-LINE 3-COL ON MOBILE)
   ========================================================================== */
.form-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 8px;
  width: 100%;
}

.form-grid-3col .form-item {
  min-width: 0;
}

.form-grid-3col .form-item label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 3px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-grid-3col .custom-select-trigger {
  height: 36px;
  padding: 0 4px;
  font-size: 11px;
}

.form-grid-3col .custom-select-trigger span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10.5px;
}

.form-grid-3col .trigger-chevron {
  width: 12px;
  height: 12px;
  margin-left: 2px;
  flex-shrink: 0;
}

/* Location Picker Grid (2 Columns: Section A | Section B) */
.location-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  max-height: 60vh;
  overflow-y: auto;
}

.location-pick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.location-pick-btn:hover,
.location-pick-btn:active {
  background: #f1f5f9;
  border-color: #059669;
  transform: translateY(-1px);
}

.location-pick-btn.active {
  background: #ecfdf5 !important;
  border-color: #059669 !important;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.22) !important;
}

.location-pick-btn .loc-badge {
  font-size: 13px;
  font-weight: 900;
  color: #1e293b;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.3px;
}

.location-pick-btn.active .loc-badge {
  color: #065f46 !important;
}

.location-pick-btn .loc-name {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  margin-top: 2px;
}

.location-pick-btn.active .loc-name {
  color: #047857 !important;
}

/* Stock Location Filter Popover Buttons */
.stock-loc-pill-btn {
  padding: 8px 6px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.stock-loc-pill-btn:hover,
.stock-loc-pill-btn:active {
  background: #f1f5f9;
  border-color: #059669;
  color: #065f46;
}

.stock-loc-pill-btn.active {
  background: #ecfdf5 !important;
  border-color: #059669 !important;
  color: #065f46 !important;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2) !important;
}

.excel-badge.location {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-weight: 800;
  font-size: 9px;
  padding: 1px 4px;
}

/* ========================================================
   🔔 STOCK ALERTS & NOTIFICATIONS DRAWER / MODAL STYLES
   ======================================================== */
.notification-modal-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: slide-up-notif 0.22s ease-out;
}

@media (min-width: 481px) {
  .notification-modal-sheet {
    border-radius: 20px;
    max-height: 85vh;
  }
}

@keyframes slide-up-notif {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.notif-header {
  padding: 14px 16px;
  background: #ffffff;
  border-bottom: 1.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notif-header-icon {
  width: 38px;
  height: 38px;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  border: 1.5px solid #fee2e2;
  flex-shrink: 0;
}

.notif-header-title {
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
}

.notif-header-sub {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
}

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

.notif-action-icon-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  transition: all 0.15s;
}

.notif-action-icon-btn:active {
  transform: scale(0.92);
  background: #e2e8f0;
}

.notif-action-icon-btn.close-btn {
  font-weight: 900;
  font-size: 13.5px;
}

/* Tabs */
.notif-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 1.5px solid #e2e8f0;
  padding: 8px 12px;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.notif-tabs::-webkit-scrollbar { display: none; }

.notif-tab {
  flex: 1;
  white-space: nowrap;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 6px;
  font-size: 10.5px;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
}

.notif-tab.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.15);
}

.notif-tab-badge {
  font-size: 9.5px;
  font-weight: 900;
  background: #e2e8f0;
  color: #334155;
  border-radius: 6px;
  padding: 1px 5px;
}

.notif-tab-badge.danger {
  background: #fee2e2;
  color: #dc2626;
}

.notif-tab-badge.warning {
  background: #fef3c7;
  color: #d97706;
}

/* Toolbar */
.notif-toolbar {
  padding: 10px 12px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
}

.notif-search-wrap input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  width: 100%;
}

.notif-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.notif-select-all-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
}

.notif-select-all-label input {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.notif-btn {
  border: none;
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.notif-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.notif-btn-secondary {
  background: #eff6ff;
  color: #2563eb;
  border: 1.5px solid #bfdbfe;
}

.notif-btn-outline {
  background: #f8fafc;
  color: #475569;
  border: 1.5px solid #cbd5e1;
}

/* Scrollable List Body */
.notif-list-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
  max-height: 52vh;
}

/* Compact Re-decorated Notification Rows */
.notif-row {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}

.notif-row:hover {
  background: #f8fafc;
}

.notif-row.unread {
  background: #fffdf5;
  border-color: #fcd34d;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.08);
}

.notif-row.is-out {
  border-left: 4.5px solid #dc2626 !important;
}

.notif-row.is-low {
  border-left: 4.5px solid #f59e0b !important;
}

.notif-row-cb {
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #2563eb;
  margin: 0;
}

.notif-row-main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.notif-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.notif-row-model {
  font-size: 11.5px;
  font-weight: 900;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-row-status {
  font-size: 8.5px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

.notif-row-status.out {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.notif-row-status.low {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.notif-row-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.notif-row-item {
  font-size: 10.5px;
  font-weight: 700;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-row-balance {
  font-size: 10.5px;
  font-weight: 900;
  font-family: var(--font-mono);
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-row-balance.out {
  color: #dc2626;
}

.notif-row-balance.low {
  color: #b45309;
}

.notif-quick-btn {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
  font-size: 10px;
  font-weight: 900;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  white-space: nowrap;
}

.notif-quick-btn:hover, .notif-quick-btn:active {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}

.notif-action-icon-btn.muted {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #dc2626 !important;
}

/* Pagination Footer */
.notif-pagination-footer {
  padding: 10px 14px;
  background: #f8fafc;
  border-top: 1.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-page-status {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
}

.notif-page-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif-nav-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
}

.notif-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.notif-page-indicator {
  font-size: 11px;
  font-weight: 900;
  color: #1e293b;
  font-family: var(--font-mono);
  padding: 0 4px;
}

/* TILE STOCK BADGES IN DIRECT INPUTS */
.tile-stock-badge {
  display: block;
  font-size: 9px;
  font-weight: 800;
  padding: 1.5px 5px;
  border-radius: 5px;
  margin-top: 3px;
  letter-spacing: 0.2px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-stock-badge.stock-zero {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.tile-stock-badge.stock-low {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.tile-stock-badge.stock-ok {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.tile-stock-badge.stock-in-info {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.direct-input-card.card-stock-empty {
  border-color: #fca5a5 !important;
  background: #fffafa !important;
}

.direct-input-card.card-stock-empty .direct-item-label {
  color: #991b1b !important;
}

