/* ==========================================================================
   STOCK MANAGEMENT SYSTEM - CENTRALIZED STYLESHEET (style.css)
   ========================================================================== */

/* ── 1. GLOBAL VARIABLES & DESIGN TOKENS ── */
:root {
  /* Core Brand Colors */
  --white: #ffffff;
  --off: #f8fafc;
  --surface: #f1f5f9;
  --card: #ffffff;
  --ink: #0f172a;
  --ink2: #334155;
  --ink3: #64748b;
  --ink4: #94a3b8;
  --rule: #cbd5e1;
  --rule2: #cbd5e1;
  --accent: #1a3a5c;
  --accent-hover: #102640;
  --accent2: #2a5298;
  --accent2-hover: #1e3c72;
  --gold: #c8a96e;
  --gold-hover: #b39257;

  /* Semantic Colors */
  --success: #10b981;
  --success-hover: #059669;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-hover: #d97706;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: #fee2e2;
  --info: #0ea5e9;
  --info-hover: #0284c7;
  --info-light: #e0f2fe;

  /* Layout Sizing */
  --sidebar-w: 264px;
  --header-h: 68px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 4px;

  /* Shadows & Elevations */
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 12px rgba(26, 58, 92, 0.08), 0 1px 3px rgba(26, 58, 92, 0.05);
  --shadow-lg:
    0 10px 25px rgba(26, 58, 92, 0.12), 0 4px 10px rgba(26, 58, 92, 0.08);

  /* Modern Theme Module Aliases */
  --p-bg: var(--off);
  --p-surface: var(--white);
  --p-surface2: var(--surface);
  --p-border: var(--rule);
  --p-border2: var(--rule);
  --p-ink: var(--ink);
  --p-ink2: var(--ink2);
  --p-ink3: var(--ink3);
  --p-ink4: var(--ink4);
  --p-accent: var(--accent2);
  --p-accent-hover: var(--accent2-hover);
  --p-accent-light: var(--info-light);
  --p-gold: var(--gold);
  --p-success: var(--success);
  --p-success-light: var(--success-light);
  --p-danger: var(--danger);
  --p-danger-light: var(--danger-light);
  --p-warning: var(--warning);
  --p-warning-light: var(--warning-light);
  --p-info: var(--info);
  --p-info-light: var(--info-light);
  --p-radius: var(--radius);
  --p-radius-sm: var(--radius-sm);
  --p-radius-xs: var(--radius-xs);
  --p-shadow: var(--shadow);
  --p-shadow-md: var(--shadow-md);
  --p-shadow-lg: var(--shadow-lg);

  /* Stock Transfer Sizing & Brand Constants */
  --st-primary: var(--accent);
  --st-primary-hover: var(--accent-hover);
  --st-accent: var(--gold);
  --st-bg: var(--off);
  --st-surface: var(--white);
  --st-surface2: var(--surface);
  --st-border: var(--rule);
  --st-border2: var(--rule);
  --st-ink: var(--ink);
  --st-ink2: var(--ink2);
  --st-ink3: var(--ink3);
  --st-success: var(--success);
  --st-danger: var(--danger);
  --st-warning: var(--warning);
  --st-radius: var(--radius);
  --st-radius-sm: var(--radius-sm);
}

/* ── 2. BASE RESET & MAIN LAYOUT ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Source Sans 3", "Inter", sans-serif;
  background: var(--off);
  color: var(--ink);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── 3. SIDEBAR NAVIGATION ── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--accent);
  display: flex;
  flex-direction: column;
  z-index: 200;
}

.sidebar-logo {
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.logo-mark {
  width: 34px;
  height: 34px;
  border: 2px solid var(--gold);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

.logo-name {
  font-family: "Playfair Display", serif;
  font-size: 19px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.logo-sub {
  display: block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 9.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 2px;
}

.sidebar-nav {
  padding: 20px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-group-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
  padding: 0 12px;
  margin: 14px 0 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.6);
  font-size: 13.5px;
  transition: all 0.2s;
  margin-bottom: 2px;
  text-decoration: none;
  position: relative;
}

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

.nav-item svg,
.nav-item i {
  flex-shrink: 0;
  opacity: 0.7;
  font-size: 16px;
}

.nav-item.active {
  color: #ffffff;
  font-weight: 500;
}

.nav-item.active svg,
.nav-item.active i {
  opacity: 1;
}

.nav-item.active span {
  position: relative;
}

.nav-item.active span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.18s;
}

.user-tile:hover {
  background: rgba(255, 255, 255, 0.07);
}

.uav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.user-tile-info p {
  font-size: 13.5px;
  font-weight: 500;
  color: #ffffff;
}

.user-tile-info span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

/* ── 4. TOP APP HEADER ── */
.header {
  position: fixed;
  left: var(--sidebar-w);
  top: 0;
  right: 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 18px;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.header-title {
  flex: 1;
}

.header-title h1 {
  font-family: "Playfair Display", serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: 0.1px;
}

.header-title p {
  font-size: 11.5px;
  color: var(--ink4);
  letter-spacing: 0.3px;
  margin-top: 1px;
}

.hdr-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--off);
  border: 1px solid var(--rule);
  border-radius: 40px;
  padding: 9px 16px;
  width: 230px;
  transition: all 0.2s;
}

.hdr-search:focus-within {
  border-color: var(--accent2);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.hdr-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: 13.5px;
  font-family: "Source Sans 3", sans-serif;
  width: 100%;
}

.hdr-search input::placeholder {
  color: var(--ink4);
}

.hdr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hdr-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--off);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
  color: var(--ink3);
  position: relative;
}

.hdr-btn:hover {
  border-color: var(--accent2);
  color: var(--accent2);
  background: rgba(42, 82, 152, 0.05);
}

.notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--white);
}

.hdr-div {
  width: 1px;
  height: 28px;
  background: var(--rule);
  margin: 0 4px;
}

.hdr-av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  cursor: pointer;
  border: 2px solid var(--rule);
  transition: border-color 0.18s;
  letter-spacing: 0.5px;
}

.hdr-av:hover {
  border-color: var(--accent2);
}

/* ── 5. MAIN CONTAINER AREA ── */
.main {
  margin-left: var(--sidebar-w);
  padding-top: var(--header-h);
}

.content {
  padding: 32px 32px 56px;
  max-width: 1200px;
  margin: 0 auto;
}

.breadcrumb,
.pur-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink4);
  margin-bottom: 26px;
  letter-spacing: 0.2px;
  font-weight: 500;
}

.breadcrumb span,
.pur-breadcrumb span {
  color: var(--ink3);
}

.breadcrumb .sep,
.pur-breadcrumb .sep {
  color: var(--rule);
}

.breadcrumb a,
.pur-breadcrumb a {
  color: var(--ink3);
  text-decoration: none;
}

.breadcrumb a:hover,
.pur-breadcrumb a:hover {
  color: var(--accent2);
}

/* ── 6. CARDS & PANELS ── */
.panel,
.pur-card,
.st-table-panel,
.st-form-panel {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-head,
.pur-card-head,
.st-panel-head,
.st-table-panel-head {
  padding: 15px 24px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--off);
}

.panel-title,
.pur-card-title,
.st-panel-title,
.st-table-panel-title {
  font-family: "Playfair Display", "Inter", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.p-icon,
.pur-card-icon,
.st-panel-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
  font-size: 14px;
}

.panel-body,
.pur-card-body,
.st-panel-body {
  padding: 26px 24px;
}

/* ── 7. DASHBOARD STATS CARDS ── */
.stats-row,
.dash-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.stat-card,
.dash-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  position: relative;
  overflow: hidden;
}

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

.stat-top,
.dc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stat-icon,
.dc-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.si-blue {
  background: rgba(42, 82, 152, 0.09);
  color: var(--accent2);
}
.si-gold {
  background: rgba(200, 169, 110, 0.15);
  color: #a0731a;
}
.si-green {
  background: rgba(26, 122, 74, 0.09);
  color: var(--success);
}
.si-red {
  background: rgba(185, 28, 28, 0.08);
  color: var(--danger);
}

.stat-trend {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}

.trend-up {
  background: rgba(26, 122, 74, 0.09);
  color: var(--success);
}
.trend-dn {
  background: rgba(185, 28, 28, 0.08);
  color: var(--danger);
}

.stat-label,
.dc-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink4);
  margin-bottom: 5px;
}

.stat-value,
.dc-amount {
  font-family: "Playfair Display", "Roboto Mono", serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.5px;
}

.stat-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.sc1::after {
  background: linear-gradient(to right, var(--accent), var(--accent2));
}
.sc2::after {
  background: linear-gradient(to right, var(--gold), #d4b483);
}
.sc3::after {
  background: linear-gradient(to right, var(--success), #22c55e88);
}
.sc4::after {
  background: linear-gradient(to right, var(--danger), #ef444488);
}

.dash-card.total {
  border-bottom: 4px solid var(--accent2);
}
.dash-card.paid {
  border-bottom: 4px solid var(--success);
}
.dash-card.due {
  border-bottom: 4px solid var(--danger);
}

/* ── 8. FORM CONTROLS & INPUTS ── */
.form-grid,
.st-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px 28px;
}

.fg,
.st-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fg.full,
.st-field.full {
  grid-column: 1 / -1;
}

.flabel,
.st-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--ink3);
}

.flabel .req,
.st-req {
  color: var(--danger);
  margin-left: 2px;
}

.finput,
.fselect,
.ftextarea,
.td-input-pur,
.st-select,
.st-td-input,
.st-input {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: "Source Sans 3", sans-serif;
  font-size: 14.5px;
  padding: 10px 13px;
  outline: none;
  transition: all 0.18s;
  appearance: none;
}

.finput::placeholder,
.ftextarea::placeholder,
.st-input::placeholder {
  color: var(--ink4);
}

.finput:focus,
.fselect:focus,
.ftextarea:focus,
.td-input-pur:focus,
.st-select:focus,
.st-td-input:focus,
.st-input:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
  background: #fefefe;
}

.ftextarea {
  resize: vertical;
  min-height: 88px;
}

input[type="date"].finput::-webkit-calendar-picker-indicator,
input[type="date"].st-input::-webkit-calendar-picker-indicator {
  opacity: 0.45;
  cursor: pointer;
}

.sel-wrap,
.st-sel-wrap,
.td-sel-wrap,
.st-td-sel-wrap {
  position: relative;
}

.sel-wrap::after,
.st-sel-wrap::after,
.td-sel-wrap::after,
.st-td-sel-wrap::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--ink3);
  pointer-events: none;
}

.fselect,
.st-select {
  padding-right: 32px;
  cursor: pointer;
}

.fselect option,
.st-select option {
  background: #ffffff;
  color: var(--ink);
}

.form-footer,
.st-form-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}

/* ── 9. BUTTONS ── */
.btn,
.btn-pur,
.st-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: "Source Sans 3", "Inter", sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s;
  letter-spacing: 0.3px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary,
.btn-primary-pur,
.st-btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(26, 58, 92, 0.2);
}

.btn-primary:hover,
.btn-primary-pur:hover,
.st-btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(26, 58, 92, 0.3);
  transform: translateY(-1px);
}

.btn-success,
.btn-success-pur {
  background: var(--success);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.btn-success:hover,
.btn-success-pur:hover {
  background: var(--success-hover);
  transform: translateY(-1px);
}

.btn-danger,
.btn-danger-pur {
  background: var(--danger);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover,
.btn-danger-pur:hover {
  background: var(--danger-hover);
  transform: translateY(-1px);
}

.btn-ghost,
.btn-ghost-pur,
.st-btn-ghost {
  background: transparent;
  color: var(--ink3);
  border: 1px solid var(--rule);
}

.btn-ghost:hover,
.btn-ghost-pur:hover,
.st-btn-ghost:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--ink3);
}

.btn-sm,
.st-btn-sm {
  padding: 7px 15px;
  font-size: 12.5px;
}

.btn-logout {
  background: transparent;
  color: #ffffff;
  padding: 6px 12px;
  font-size: 11px;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-logout:hover {
  background: rgba(185, 28, 28, 0.2);
  border-color: rgba(185, 28, 28, 0.5);
  color: #ffcccc;
}

/* ── 10. FILTER AND TOOL BARS ── */
.filter-bar,
.st-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  background: var(--off);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.fb-label,
.st-filter-item label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--ink3);
  margin-bottom: 6px;
  display: block;
}

.date-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.date-pair input {
  width: 155px;
}

.date-arr {
  color: var(--ink4);
  font-size: 18px;
  font-weight: 300;
}

.fb-div {
  width: 1px;
  height: 44px;
  background: var(--rule);
  flex-shrink: 0;
}

.tbl-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tbl-search,
.st-filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  flex: 1;
  min-width: 200px;
  transition: all 0.18s;
}

.tbl-search:focus-within,
.st-filter-search:focus-within {
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.09);
}

.tbl-search input,
.st-filter-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: 13.5px;
  font-family: "Source Sans 3", sans-serif;
  width: 100%;
}

.tbl-search input::placeholder,
.st-filter-search input::placeholder {
  color: var(--ink4);
}

.tbl-sel {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  color: var(--ink2);
  font-family: "Source Sans 3", sans-serif;
  font-size: 13.5px;
  padding: 9px 32px 9px 13px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b6b6b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.18s;
}

.tbl-sel:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.09);
}

.tbl-count,
.st-count-badge {
  font-size: 12.5px;
  color: var(--ink4);
  margin-left: auto;
  white-space: nowrap;
}

/* ── 11. DATA TABLES ── */
.tbl-wrap,
.st-items-wrap {
  overflow-x: auto;
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

table,
.data-table,
.st-items-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

thead {
  background: var(--off);
}

thead tr {
  border-bottom: 2px solid var(--rule);
}

th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink3);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

th:hover {
  color: var(--accent);
}

th.sorted {
  color: var(--accent2);
}

th .arr {
  opacity: 0.35;
  font-size: 10px;
  margin-left: 3px;
}

th.sorted .arr {
  opacity: 1;
}

tbody tr {
  border-bottom: 1px solid var(--rule);
  transition: background 0.12s;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(26, 58, 92, 0.025);
}

td {
  padding: 13px 16px;
  font-size: 14px;
  color: var(--ink2);
  vertical-align: middle;
}

td.prim {
  color: var(--ink);
  font-weight: 600;
}

td.mono,
.td-mono {
  font-family: "Roboto Mono", monospace;
  font-size: 13px;
  color: var(--ink2);
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── 12. STATUS BADGES ── */
.badge,
.badge-paid,
.badge-partial,
.badge-unpaid,
.st-qty-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.b-active,
.badge-paid {
  background: var(--success-light);
  color: var(--success-hover);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.b-active::before,
.badge-paid::before {
  background: var(--success);
}

.b-pending,
.badge-partial {
  background: var(--warning-light);
  color: var(--warning-hover);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.b-pending::before,
.badge-partial::before {
  background: var(--warning);
}

.b-inactive,
.b-review,
.badge-unpaid {
  background: var(--danger-light);
  color: var(--danger-hover);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.b-inactive::before,
.b-review::before,
.badge-unpaid::before {
  background: var(--danger);
}

.st-qty-badge {
  background: var(--info-light);
  color: var(--info-hover);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.st-loc-to,
.st-loc-from {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.st-loc-to-dot,
.st-loc-from-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.st-loc-to-dot {
  background: var(--info);
}
.st-loc-from-dot {
  background: var(--accent2);
}

/* ── 13. PAGINATION ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 0;
  border-top: 1px solid var(--rule);
  margin-top: 4px;
}

.pag-info {
  font-size: 12.5px;
  color: var(--ink3);
}

.pag-btns {
  display: flex;
  gap: 3px;
}

.pag-btn {
  min-width: 33px;
  height: 33px;
  padding: 0 6px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--rule);
  background: var(--white);
  font-size: 13.5px;
  color: var(--ink3);
  font-family: "Source Sans 3", sans-serif;
  transition: all 0.16s;
}

.pag-btn:hover {
  border-color: var(--accent2);
  color: var(--accent2);
  background: rgba(42, 82, 152, 0.06);
}

.pag-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

.pag-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* ── 14. ROW ACTIONS ── */
.ra,
.act-group {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  align-items: center;
}

.rab,
.act-btn {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--rule);
  background: var(--white);
  transition: all 0.16s;
  color: var(--ink3);
  font-size: 13px;
  text-decoration: none;
}

.rab:hover,
.act-btn:hover {
  border-color: var(--accent2);
  color: var(--accent2);
  background: rgba(42, 82, 152, 0.06);
}

.rab.del:hover,
.act-btn.del:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(185, 28, 28, 0.05);
}

/* ── 15. MODAL POPUPS & LIGHTBOX ── */
.modal-pur,
.st-modal-pur {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-pur.open,
.modal-pur.show,
.st-modal-pur.open,
.st-modal-pur.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content-pur,
.st-modal-content-pur {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 540px;
  padding: 30px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--rule);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-pur.open .modal-content-pur,
.modal-pur.show .modal-content-pur {
  transform: scale(1);
}

.modal-head-pur {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px;
}

.modal-title-pur {
  font-family: "Playfair Display", "Inter", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.modal-desc-pur {
  font-size: 14.5px;
  color: var(--ink2);
  line-height: 1.6;
}

.modal-foot-pur {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}

/* Lightbox Modal overrides for invoice view */
.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

/* ── 16. TOAST ALERTS ── */
.toast,
.toast-pur,
.st-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--success);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--ink2);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
  z-index: 9999;
  max-width: 340px;
  box-shadow: var(--shadow-md);
}

.toast.show,
.toast-pur.show,
.st-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.t-icon,
.toast-icon-pur {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.t-ok,
.t-ok-pur {
  background: rgba(26, 122, 74, 0.12);
  color: var(--success);
}
.t-err,
.t-err-pur {
  background: rgba(185, 28, 28, 0.1);
  color: var(--danger);
}

/* Scrollbars styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--off);
}
::-webkit-scrollbar-thumb {
  background: var(--rule2);
  border-radius: 10px;
}

/* ── 17. RESPONSIVE MEDIA QUERIES ── */
@media (max-width: 1024px) {
  .content {
    padding: 24px;
  }
}

@media (max-width: 960px) {
  .stats-row,
  .dash-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid,
  .st-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  :root {
    --sidebar-w: 0px;
  }
  .sidebar {
    display: none;
  }
  .header {
    left: 0;
    padding: 0 16px;
  }
  .main {
    margin-left: 0;
  }
  .stats-row,
  .dash-cards-grid {
    grid-template-columns: 1fr;
  }
  .filter-bar,
  .st-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .date-pair {
    width: 100%;
  }
  .date-pair input {
    flex: 1;
    width: 100%;
  }
  .fb-div {
    display: none;
  }
  .tbl-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .tbl-search,
  .st-filter-search {
    width: 100%;
  }
  .tbl-sel {
    width: 100%;
  }
  .tbl-count {
    margin-left: 0;
    margin-top: 4px;
  }
  .pagination {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
}

/* ── 18. PRINT OPTIMIZATIONS ── */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 15mm;
  }

  body,
  html {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 12px !important;
  }

  body > *:not(.main) {
    display: none !important;
  }

  .main {
    margin: 0 !important;
    padding: 0 !important;
  }

  .no-print,
  .btn,
  .btn-pur,
  .st-btn,
  .sidebar,
  .header,
  .breadcrumb,
  .filter-bar,
  .tbl-toolbar,
  .pagination {
    display: none !important;
  }

  .pur-card,
  .panel,
  .st-table-panel {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  table,
  th,
  td {
    border: 1px solid #000000 !important;
  }
}

/* ── 19. DASHBOARD SPECIFIC CLASSES ── */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  background: var(--success-light);
  color: var(--success-hover);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.qty-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Roboto Mono", monospace;
  font-weight: 700;
  font-size: 12px;
  color: var(--accent2);
  background: var(--info-light);
  padding: 4px 12px;
  border-radius: 6px;
  min-width: 50px;
}
.ai-log {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.log-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.log-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.log-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: var(--surface);
  color: var(--ink2);
  flex-shrink: 0;
}
.log-content h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.log-content p {
  margin: 0;
  font-size: 11px;
  color: var(--ink4);
}

@media (max-width: 900px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   20. PROCUREMENT MODULE SHARED STYLES (SaaS UI)
   ========================================================================== */
.pur-page {
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  padding: 28px 32px;
  max-width: 1440px;
  margin: 0 auto;
  color: var(--p-ink2);
}
.pur-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--p-ink3);
  margin-bottom: 28px;
  font-weight: 500;
}
.pur-breadcrumb span {
  color: var(--p-ink4);
}
.pur-breadcrumb a {
  color: var(--p-ink3);
  text-decoration: none;
  transition: color 0.15s;
}
.pur-breadcrumb a:hover {
  color: var(--p-accent);
}

.pur-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.pur-header-left h1 {
  font-family: "Inter", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--p-ink);
  line-height: 1.2;
  margin: 0 0 5px;
  letter-spacing: -0.5px;
}
.pur-header-left p {
  font-size: 13.5px;
  color: var(--p-ink3);
  margin: 0;
}
.pur-header-right {
  display: flex;
  gap: 10px;
}

.dc-subtext {
  font-size: 13px;
  color: var(--p-ink4);
  font-weight: 500;
}
.card-primary .dc-icon {
  background: var(--p-accent-light);
  color: var(--p-accent);
}
.card-success .dc-icon {
  background: var(--p-success-light);
  color: var(--p-success);
}
.card-warning .dc-icon {
  background: var(--p-warning-light);
  color: var(--p-warning);
}

.dash-card.total {
  border-bottom: 4px solid var(--p-accent);
}
.dash-card.paid {
  border-bottom: 4px solid var(--p-success);
}
.dash-card.due {
  border-bottom: 4px solid var(--p-danger);
}
.dash-card.cat:nth-child(4n + 1) {
  border-bottom: 4px solid var(--p-warning);
}
.dash-card.cat:nth-child(4n + 2) {
  border-bottom: 4px solid var(--p-info);
}
.dash-card.cat:nth-child(4n + 3) {
  border-bottom: 4px solid #be4bdb;
}
.dash-card.cat:nth-child(4n + 4) {
  border-bottom: 4px solid var(--p-gold);
}

.section-divider,
.sec-div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--p-ink2);
  margin: 28px 0 18px;
  grid-column: 1 / -1;
}
.section-divider::after,
.sec-div::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--p-border2), transparent);
}
.section-divider-dot,
.sec-div-dot {
  width: 7px;
  height: 7px;
  background: var(--p-accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.form-grid-pur {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid-pur .full,
.fg-pur.span2 {
  grid-column: 1 / -1;
}
@media (max-width: 768px) {
  .form-grid-pur {
    grid-template-columns: 1fr;
  }
}
.fg-pur {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.flabel-pur {
  font-size: 12px;
  font-weight: 600;
  color: var(--p-ink3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.req-pur {
  color: var(--p-accent);
}

.finput-pur,
.fselect-pur,
.ftextarea-pur {
  border: 1.5px solid var(--p-border);
  border-radius: var(--p-radius-xs);
  padding: 10px 14px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--p-ink);
  background: var(--p-surface);
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.finput-pur:focus,
.fselect-pur:focus,
.ftextarea-pur:focus {
  border-color: var(--p-accent);
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.1);
}
.finput-pur::placeholder,
.ftextarea-pur::placeholder {
  color: var(--p-ink4);
}
.finput-pur[readonly] {
  background: var(--p-surface2);
  color: var(--p-ink3);
  cursor: not-allowed;
}
.ftextarea-pur {
  resize: vertical;
  min-height: 80px;
}
.fselect-pur {
  appearance: none;
  -webkit-appearance: none;
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.filter-bar-pur {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 18px 24px;
  background: var(--p-surface2);
  border-bottom: 1px solid var(--p-border);
}
.fb-label-pur {
  font-size: 11px;
  font-weight: 700;
  color: var(--p-ink4);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.fb-sep {
  width: 1px;
  background: var(--p-border2);
  align-self: stretch;
  margin: 0 4px;
}
.search-wrap-pur {
  position: relative;
}
.search-wrap-pur input {
  padding-left: 34px;
}
.search-wrap-pur::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.tbl-wrap-pur {
  overflow-x: auto;
}
.td-accent {
  font-weight: 700;
  color: var(--p-accent);
}
.vendor-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.vendor-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--p-accent) 0%, #312e81 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
  font-family: "Inter", sans-serif;
}
.vendor-name {
  font-weight: 600;
  color: var(--p-ink);
  font-size: 14px;
}

.badge-active {
  background: var(--p-success-light);
  color: var(--p-success);
}
.badge-active::before {
  background: var(--p-success);
}
.badge-pending {
  background: var(--p-gold-light);
  color: #946900;
}
.badge-pending::before {
  background: var(--p-gold);
}
.badge-inactive {
  background: var(--p-danger-light);
  color: var(--p-danger);
}
.badge-inactive::before {
  background: var(--p-danger);
}

.act-btn.act-pay {
  border-color: rgba(12, 166, 120, 0.3);
  color: var(--p-success);
  background: var(--p-success-light);
}
.act-btn.act-pay:hover {
  background: var(--p-success);
  color: #fff;
  border-color: var(--p-success);
}
.act-btn.act-del {
  border-color: rgba(224, 49, 49, 0.2);
  color: var(--p-danger);
  background: var(--p-danger-light);
}
.act-btn.act-del:hover {
  background: var(--p-danger);
  color: #fff;
  border-color: var(--p-danger);
}

.file-zone {
  border: 1.5px dashed var(--p-border2);
  background: var(--p-accent-light);
  border-radius: var(--p-radius-sm);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  color: var(--p-accent);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.18s;
}
.file-zone:hover {
  background: rgba(59, 91, 219, 0.08);
  border-color: var(--p-accent);
}
.file-zone.file-ok {
  border-color: var(--p-success);
  background: var(--p-success-light);
  color: var(--p-success);
}

.items-wrap {
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-sm);
  overflow: hidden;
  margin-bottom: 6px;
}
.items-table {
  width: 100%;
  border-collapse: collapse;
}
.items-table thead th {
  background: var(--p-surface2);
  padding: 11px 13px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--p-ink3);
  text-align: left;
  border-bottom: 1px solid var(--p-border);
  white-space: nowrap;
}
.items-table tbody td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--p-border);
  vertical-align: middle;
}
.items-table tbody tr:last-child td {
  border-bottom: none;
}
.items-table tbody tr:hover {
  background: var(--p-accent-light);
}

.td-input-pur {
  width: 100%;
  border: 1.5px solid transparent;
  border-radius: var(--p-radius-xs);
  padding: 8px 10px;
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  color: var(--p-ink);
  background: transparent;
  outline: none;
  transition: all 0.15s;
  box-sizing: border-box;
}
.td-input-pur:focus {
  border-color: var(--p-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.08);
}
.td-input-pur[readonly] {
  color: var(--p-accent);
  font-weight: 700;
  font-family: "Roboto Mono", monospace;
  background: var(--p-accent-light);
  cursor: not-allowed;
}
.td-sel-wrap {
  position: relative;
}

.btn-row-del {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--p-danger-light);
  color: var(--p-danger);
  border: 1px solid rgba(224, 49, 49, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
}
.btn-row-del:hover {
  background: var(--p-danger);
  color: #fff;
  transform: scale(1.05);
}

.summary-card {
  background: linear-gradient(135deg, var(--p-accent) 0%, #2f4bc7 100%);
  border-radius: var(--p-radius-sm);
  padding: 20px 24px;
  color: #fff;
  min-width: 270px;
  margin-left: auto;
  box-shadow: 0 8px 24px rgba(59, 91, 219, 0.28);
}
.sum-row-pur {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}
.sum-row-pur.grand-pur {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 8px;
  padding-top: 12px;
  font-family: "Roboto Mono", monospace;
}

.invoice-title-wrap {
  text-align: right;
}
.invoice-title {
  font-family: "Inter", sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--p-ink);
  margin: 0 0 2px;
  letter-spacing: -0.5px;
}
.invoice-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--p-ink3);
  margin: 0;
}
.bill-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.bill-info-box {
  background: var(--p-surface);
  border: 1.5px solid var(--p-border);
  border-radius: var(--p-radius-sm);
  padding: 18px;
}
.bill-info-box h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--p-ink3);
  font-weight: 700;
  margin: 0 0 12px;
  border-bottom: 1.5px solid var(--p-border);
  padding-bottom: 6px;
}
.bill-info-box p {
  font-size: 13.5px;
  color: var(--p-ink2);
  margin: 0 0 6px;
  line-height: 1.5;
}
.bill-info-box p strong {
  color: var(--p-ink);
}
.invoice-info-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-row {
  display: flex;
  font-size: 13.5px;
  color: var(--p-ink2);
}

/* ---- ATTACHMENT PREVIEW STYLES ──── */
.invoice-thumb-wrap {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  background: var(--p-surface);
  border: 1.5px solid var(--p-border);
  border-radius: var(--p-radius-sm);
  padding: 12px;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  max-width: 220px;
}
.invoice-thumb-wrap:hover {
  transform: translateY(-2px);
  box-shadow: var(--p-shadow);
}
.invoice-thumb-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--p-radius-xs);
  border: 1px solid var(--p-border);
}
.invoice-thumb-caption {
  font-size: 11px;
  color: var(--p-ink3);
  text-align: center;
  font-weight: 500;
}
.invoice-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff5f5;
  color: #c92a2a;
  border: 1.5px solid #ffa8a8;
  padding: 10px 16px;
  border-radius: var(--p-radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.invoice-pdf-btn:hover {
  background: #ffe3e3;
  border-color: #f03e3e;
}

/* ==========================================================================
   21. MISSING & FIXED CLASSES — UI AUDIT PATCH (Full Fix Pass)
   ========================================================================== */

/* ── Utility Helpers ── */
.mt-4 {
  margin-top: 4px !important;
}
.mt-8 {
  margin-top: 8px !important;
}
.mt-16 {
  margin-top: 16px !important;
}
.mb-0 {
  margin-bottom: 0 !important;
}
.text-right {
  text-align: right;
}
.text-center {
  text-align: center;
}
.fw-600 {
  font-weight: 600;
}
.fw-700 {
  font-weight: 700;
}

/* Bootstrap-compatible color text utilities (used across pages) */
.text-success {
  color: var(--success) !important;
}
.text-danger {
  color: var(--danger) !important;
}
.text-warning {
  color: var(--warning) !important;
}
.text-info {
  color: var(--info) !important;
}
.text-muted {
  color: var(--ink4) !important;
}

/* Bootstrap-compatible bg utilities */
.bg-success {
  background-color: var(--success) !important;
}
.bg-danger {
  background-color: var(--danger) !important;
}
.bg-warning {
  background-color: var(--warning) !important;
}
.bg-info {
  background-color: var(--info) !important;
}

/* ── td-amount: right-aligned monospace amount cells ── */
.td-amount {
  text-align: right;
  font-family: "Roboto Mono", monospace;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

/* ── td-strong: bold primary text in table cells ── */
.td-strong {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}

/* ── wide: full-width utility for form fields ── */
.wide {
  width: 100%;
}

/* ── Button Size Variants ── */
.btn-sm-pur {
  padding: 6px 14px;
  font-size: 12.5px;
  gap: 6px;
}

/* ── btn-link-pur: inline link-style button ── */
.btn-link-pur {
  background: none;
  border: none;
  color: var(--p-accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "Inter", sans-serif;
}
.btn-link-pur:hover {
  color: var(--accent);
}

/* ── btn-qr-pur / btn-pdf-qr: QR and PDF action buttons ── */
.btn-qr-pur,
.btn-pdf-qr {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--rule);
  background: var(--white);
  color: var(--ink3);
  transition: all 0.16s;
  font-family: "Source Sans 3", "Inter", sans-serif;
  text-decoration: none;
}
.btn-qr-pur:hover {
  border-color: var(--accent2);
  color: var(--accent2);
  background: rgba(42, 82, 152, 0.06);
}
.btn-pdf-qr:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-light);
}

/* ── btn-scan-add: QR scanner launch button (stock_transfer.php) ── */
.btn-scan-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: "Source Sans 3", "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--accent2);
  background: rgba(42, 82, 152, 0.07);
  color: var(--accent2);
  transition: all 0.18s;
}
.btn-scan-add:hover {
  background: var(--accent2);
  color: #fff;
}

/* ── Pagination wrapper used on vendor/branch/product pages ── */
.pagination-pur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
  gap: 10px;
}
.pag-wrap-pur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 0;
  border-top: 1px solid var(--rule);
  margin-top: 4px;
  flex-wrap: wrap;
  gap: 10px;
}
.pag-info-pur {
  font-size: 12.5px;
  color: var(--ink3);
  font-weight: 500;
}
.pag-btns-pur {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.pag-btn-pur {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--rule);
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink3);
  font-family: "Source Sans 3", sans-serif;
  transition: all 0.16s;
}
.pag-btn-pur:hover {
  border-color: var(--accent2);
  color: var(--accent2);
  background: rgba(42, 82, 152, 0.06);
}
.pag-btn-pur.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 700;
}
.pag-btn-pur:disabled,
.pag-btn-pur[disabled] {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* ── Dashboard Card Colour Variants ── */
.card-info .dc-icon {
  background: var(--info-light);
  color: var(--info);
}
.card-info {
  border-bottom: 3px solid var(--info);
}
.card-purple .dc-icon {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}
.card-danger .dc-icon {
  background: var(--danger-light);
  color: var(--danger);
}
.card-danger {
  border-bottom: 3px solid var(--danger);
}
.card-purple {
  border-bottom: 3px solid #8b5cf6;
}
.card-primary {
  border-bottom: 3px solid var(--accent2);
}
.card-success {
  border-bottom: 3px solid var(--success);
}
.card-warning {
  border-bottom: 3px solid var(--warning);
}

/* ── Modal Backdrop & Card (used by branch/category/vendor delete modals) ── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-bg.show {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  padding: 28px 30px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--rule);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-bg.show .modal-card {
  transform: scale(1);
}
.modal-title-pur {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Playfair Display", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.modal-desc-pur {
  font-size: 14px;
  color: var(--ink2);
  line-height: 1.65;
}
.modal-foot-pur {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  margin-top: 4px;
}

/* Generic modal head/body/foot/close for purchase_entry modals */
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 4px;
}
.modal-body {
  padding: 4px 0;
  overflow-y: auto;
  max-height: 60vh;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  margin-top: 4px;
}
.modal-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: none;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink3);
  font-size: 16px;
  transition: all 0.15s;
}
.modal-close-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-light);
}

/* ── Branch Profile Cell ── */
.branch-profile {
  display: flex;
  align-items: center;
  gap: 11px;
}
.branch-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  font-family: "Source Sans 3", sans-serif;
}
.branch-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}

/* ── Product Profile Cell ── */
.product-profile {
  display: flex;
  align-items: center;
  gap: 11px;
}
.product-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.product-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}
.product-meta {
  font-size: 12px;
  color: var(--ink4);
}

/* ── Status Badge Unified Aliases ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  background: var(--info-light);
  color: var(--info);
  border: 1px solid rgba(14, 165, 233, 0.2);
}
.status-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-badge.badge-active,
.badge-active {
  background: var(--success-light);
  color: var(--success-hover);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-badge.badge-inactive,
.badge-inactive {
  background: var(--danger-light);
  color: var(--danger-hover);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.status-badge.badge-pending,
.badge-pending {
  background: var(--warning-light);
  color: var(--warning-hover);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ── stock-badge: stock quantity indicator (product_register, stock_report) ── */
.stock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Roboto Mono", monospace;
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  min-width: 44px;
  background: var(--info-light);
  color: var(--info-hover);
  border: 1px solid rgba(14, 165, 233, 0.2);
}
.stock-badge.stock-ok {
  background: var(--success-light);
  color: var(--success-hover);
  border-color: rgba(16, 185, 129, 0.25);
}
.stock-badge.stock-low {
  background: var(--danger-light);
  color: var(--danger-hover);
  border-color: rgba(239, 68, 68, 0.25);
}

/* ── data-table-wrap: responsive scrollable wrapper for report tables ── */
.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── filter-grid & filter-group (stock_report.php) ── */
.filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}
.filter-group label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--ink3);
}
@media (max-width: 768px) {
  .filter-grid {
    flex-direction: column;
  }
  .filter-group {
    width: 100%;
  }
}

/* ── type-toggle: radio button group styled as toggle tabs ── */
.type-toggle {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--off);
}
.type-toggle input[type="radio"] {
  display: none;
}
.type-toggle label {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink3);
  cursor: pointer;
  transition: all 0.18s;
  border-radius: 0;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.type-toggle input[type="radio"]:checked + label {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.type-toggle label:hover:not(.checked) {
  background: var(--surface);
  color: var(--ink);
}

/* ── fb-group: filter bar group wrapper ── */
.fb-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ==========================================================================
   22. LOGIN PAGE STYLES
   ========================================================================== */
.login-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--off);
}
@media (max-width: 768px) {
  .login-wrapper {
    grid-template-columns: 1fr;
  }
}

.brand-panel {
  background: var(--accent);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 48px 52px;
  position: relative;
  overflow: hidden;
}
.brand-panel::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}
.brand-panel::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}
@media (max-width: 768px) {
  .brand-panel {
    display: none;
  }
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-panel .logo-mark {
  width: 44px;
  height: 44px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}
.brand-panel .logo-name {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}
.brand-panel .logo-sub {
  display: block;
  font-size: 9.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 2px;
  font-family: "Source Sans 3", sans-serif;
}

.brand-msg {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0 32px;
}
.brand-msg h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(30px, 3.5vw, 46px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 18px;
}
.brand-msg p {
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  max-width: 360px;
}

.form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 64px;
  background: #ffffff;
  overflow-y: auto;
}
@media (max-width: 960px) {
  .form-panel {
    padding: 40px 32px;
  }
}
@media (max-width: 480px) {
  .form-panel {
    padding: 32px 20px;
  }
}

.form-header {
  margin-bottom: 36px;
}
.form-header h1 {
  font-family: "Playfair Display", serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.15;
}
.form-header p {
  font-size: 14.5px;
  color: var(--ink3);
  line-height: 1.5;
}

#loginForm .fg {
  margin-bottom: 20px;
}
#loginForm .fg:last-of-type {
  margin-bottom: 0;
}
#loginForm .btn {
  width: 100%;
  margin-top: 24px;
  padding: 13px 22px;
  font-size: 15px;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-sm);
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.cb-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--ink3);
  user-select: none;
}
.cb-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--rule);
  cursor: pointer;
  accent-color: var(--accent);
}
.cb-wrap span {
  font-size: 13px;
  color: var(--ink3);
}

.forgot-link {
  font-size: 13px;
  color: var(--accent2);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.forgot-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.sso-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--ink4);
  font-weight: 500;
  margin-top: 28px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.sso-divider::before,
.sso-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

body:not(:has(.sidebar)) .toast {
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(80px);
}
body:not(:has(.sidebar)) .toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   23. STOCK TRANSFER PAGE — ALL MISSING CLASSES
   ========================================================================== */

/* Page header row (title + New Transfer button) */
.st-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.st-page-title {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.2;
}
.st-page-sub {
  font-size: 13.5px;
  color: var(--ink3);
  margin: 0;
}

/* Section divider inside the form */
.st-section-div {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink3);
  padding: 14px 0 10px;
  border-top: 1px solid var(--rule);
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.st-section-div::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* Empty state block */
.st-empty {
  padding: 52px 24px;
  text-align: center;
  color: var(--ink4);
}
.st-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
  color: var(--ink3);
}
.st-empty h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink2);
  margin: 0 0 6px;
}
.st-empty p {
  font-size: 13.5px;
  color: var(--ink4);
  margin: 0;
}

/* Product row inside items table */
.st-item-row-product {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Stock availability indicator */
.st-avail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  min-height: 18px;
}
.st-avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink4);
  flex-shrink: 0;
}

/* Overflow fix on form panel */
.st-table-panel {
  overflow: visible;
}
.st-items-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Print / Challan Modal Overlay ── */
.st-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.st-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.st-modal-box {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--rule);
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.st-modal-overlay.show .st-modal-box {
  transform: scale(1);
}

/* ── Challan / Delivery Note Styles ── */
.challan-wrapper {
  padding: 32px 36px;
  font-family: "Inter", "Source Sans 3", sans-serif;
}
.challan-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--accent);
}
.challan-brand {
}
.challan-company {
  font-family: "Playfair Display", serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 3px;
  letter-spacing: 0.5px;
}
.challan-tagline {
  font-size: 11px;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}
.challan-doc-info {
  text-align: right;
}
.challan-doc-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink4);
  margin: 0 0 4px;
}
.challan-doc-num {
  font-family: "Roboto Mono", monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.challan-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--off);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
}
@media (max-width: 600px) {
  .challan-meta {
    grid-template-columns: 1fr 1fr;
  }
}
.challan-meta-cell {
}
.challan-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink4);
  margin: 0 0 4px;
}
.challan-meta-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.challan-meta-value.accent {
  color: var(--accent2);
}

.challan-items-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink3);
  margin: 0 0 10px;
}

.challan-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 13.5px;
}
.challan-table thead tr {
  background: var(--accent);
}
.challan-table thead th {
  padding: 10px 14px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.85);
  text-align: left;
  border: none;
  cursor: default;
}
.challan-table tbody tr {
  border-bottom: 1px solid var(--rule);
}
.challan-table tbody td {
  padding: 10px 14px;
  color: var(--ink2);
  vertical-align: middle;
}
.challan-table tfoot tr {
  background: var(--off);
  border-top: 2px solid var(--rule);
}
.challan-table tfoot td {
  padding: 12px 14px;
  font-weight: 700;
}
.challan-total-label {
  text-align: right;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink3);
}
.challan-total-value {
  font-family: "Roboto Mono", monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.challan-product-name {
  display: block;
  font-weight: 600;
  color: var(--ink);
}
.challan-product-hsn {
  display: block;
  font-size: 11.5px;
  color: var(--ink4);
  margin-top: 2px;
}

.challan-sigs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px dashed var(--rule);
}
.challan-sig {
}
.challan-sig-line {
  height: 1px;
  background: var(--ink3);
  margin-bottom: 8px;
}
.challan-sig-label {
  font-size: 11px;
  color: var(--ink4);
  text-align: center;
  margin: 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.challan-footer-note {
  font-size: 10.5px;
  color: var(--ink4);
  text-align: center;
  margin-top: 20px;
  font-style: italic;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
}

.challan-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 36px 24px;
  border-top: 1px solid var(--rule);
}

/* ── QR Scanner Overlay ── */
#qrScannerOverlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
#qrScannerOverlay.active {
  opacity: 1;
  pointer-events: auto;
}

.qr-scan-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.qr-scan-topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.qr-scan-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 18px;
  transition: background 0.15s;
}
.qr-scan-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.qr-video-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
#qrVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qr-reticle {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.qr-reticle-box {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 240px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.qr-dim-top,
.qr-dim-bottom,
.qr-dim-left,
.qr-dim-right {
  position: absolute;
  background: rgba(0, 0, 0, 0.5);
}
.qr-dim-top {
  top: 0;
  left: 0;
  right: 0;
  bottom: calc(50% + 120px);
}
.qr-dim-bottom {
  top: calc(50% + 120px);
  left: 0;
  right: 0;
  bottom: 0;
}
.qr-dim-left {
  top: calc(50% - 120px);
  bottom: calc(50% - 120px);
  left: 0;
  width: calc(50% - 120px);
}
.qr-dim-right {
  top: calc(50% - 120px);
  bottom: calc(50% - 120px);
  right: 0;
  width: calc(50% - 120px);
}

.qr-laser {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, #00eaff, transparent);
  animation: qrScan 2s ease-in-out infinite;
}
@keyframes qrScan {
  0% {
    top: 10%;
  }
  50% {
    top: 90%;
  }
  100% {
    top: 10%;
  }
}

.qr-success-flash {
  position: absolute;
  inset: 0;
  background: rgba(0, 234, 255, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
}
.qr-success-flash.flash {
  opacity: 1;
}

.qr-scan-bottombar {
  padding: 20px 24px 32px;
  background: rgba(0, 0, 0, 0.75);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.qr-scan-status {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}
.qr-scan-hint {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
}
.qr-manual-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  font-family: "Source Sans 3", sans-serif;
}
.qr-manual-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ==========================================================================
   24. STOCK REPORT PAGE — ALL MISSING CLASSES
   ========================================================================== */

/* Date group header in history ledger */
.date-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink3);
  background: var(--off);
  padding: 10px 16px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 8px;
}
.date-group-header:first-child {
  margin-top: 0;
  border-top: none;
}

/* Direction indicator dot/arrow */
.direction-indicator {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.direction-indicator.dir-in {
  background: var(--success-light);
  color: var(--success-hover);
}
.direction-indicator.dir-out {
  background: var(--danger-light);
  color: var(--danger-hover);
}

/* Quantity in/out colored cells */
.qty-in {
  color: var(--success-hover);
  font-weight: 600;
  font-family: "Roboto Mono", monospace;
}
.qty-out {
  color: var(--danger-hover);
  font-weight: 600;
  font-family: "Roboto Mono", monospace;
}

/* Reference tag pill */
.ref-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-family: "Roboto Mono", monospace;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface);
  color: var(--accent2);
  border: 1px solid var(--rule);
} /* ==========================================================================
   25. PURCHASE ENTRY & INVOICE MODAL UI (ULTRA PREMIUM)
   ========================================================================== */

/* Company header block */
.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--rule);
}
.company-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.company-name {
  font-family: "Inter", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}
.company-sub {
  font-size: 13px;
  color: var(--ink3);
  margin: 0;
}

/* Invoice Title */
.invoice-title-wrap {
  text-align: right;
}
.invoice-title {
  font-family: "Inter", sans-serif;
  font-size: 36px;
  font-weight: 300;
  color: var(--ink4);
  margin: 0 0 8px;
  letter-spacing: 4px;
  text-transform: uppercase;
}
.invoice-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--p-ink3);
  margin: 0;
  font-weight: 600;
  background: var(--off);
  padding: 4px 12px;
  border-radius: 4px;
  display: inline-block;
}

/* Info Grid (Vendor & Invoice Details) */
.bill-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}
.bill-info-box {
  background: transparent;
  border: none;
  padding: 0;
}
.bill-info-box h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink4);
  font-weight: 700;
  margin: 0 0 16px;
  border-bottom: 2px solid var(--rule);
  padding-bottom: 8px;
}
.bill-info-box p {
  font-size: 14px;
  color: var(--ink2);
  margin: 0 0 8px;
  line-height: 1.6;
}
.bill-info-box p strong {
  color: var(--ink);
  font-weight: 600;
}

.invoice-info-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.info-row {
  display: flex;
  font-size: 14px;
  color: var(--ink2);
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--rule);
  padding-bottom: 8px;
}
.info-row:last-child {
  border-bottom: none;
}
.info-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink3);
}

/* Mini invoice table (Clean & Professional) */
.bill-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-bottom: 32px;
}
.bill-mini-table th {
  background: transparent;
  padding: 12px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink3);
  border-bottom: 2px solid var(--ink);
  text-align: left;
}
.bill-mini-table td {
  padding: 16px 8px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink2);
  vertical-align: top;
}
.bill-mini-table tbody tr:last-child td {
  border-bottom: 2px solid var(--rule);
}

/* Bill finance summary box */
.bill-fin-box {
  display: flex;
  flex-direction: column;
  width: 380px;
  margin-left: auto;
  margin-bottom: 40px;
  background: transparent;
  border: none;
  padding: 0;
}
.bfb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--ink2);
  padding: 10px 8px;
  border-bottom: 1px solid var(--rule);
}
.bfb-row span:last-child {
  font-family: "Roboto Mono", monospace;
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
}
.bfb-paid span:last-child {
  color: var(--success);
}
.bfb-due span:last-child {
  color: var(--danger);
}

.bfb-grand {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  border-bottom: 3px double var(--ink);
  border-top: 2px solid var(--ink);
  background: transparent;
  padding: 16px 8px;
  margin-top: 4px;
}
.bfb-grand span:first-child {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
}
.bfb-grand span:last-child {
  font-size: 20px;
}

/* Empty states & input fields below */
.empty-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--ink4);
}
.empty-state-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 26px;
  color: var(--ink3);
}
.empty-state h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink2);
  margin: 0 0 6px;
}
.empty-state p {
  font-size: 13.5px;
  color: var(--ink4);
  margin: 0;
}
.invoice-pdf-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.i-qty,
.i-price,
.i-gst,
.i-total {
  width: 100%;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--p-radius-xs);
  padding: 7px 9px;
  font-size: 13.5px;
  color: var(--p-ink);
  outline: none;
  transition: all 0.15s;
  box-sizing: border-box;
  font-family: "Roboto Mono", monospace;
  text-align: right;
}
.i-qty:focus,
.i-price:focus,
.i-gst:focus {
  border-color: var(--p-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.08);
}
.i-total {
  color: var(--p-accent);
  font-weight: 700;
  background: var(--p-accent-light);
  cursor: not-allowed;
}
.product-select {
  width: 100%;
  background: var(--white);
  border: 1.5px solid transparent;
  border-radius: var(--p-radius-xs);
  padding: 8px 10px;
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  color: var(--p-ink);
  outline: none;
  transition: all 0.15s;
  box-sizing: border-box;
  appearance: none;
}
.product-select:focus {
  border-color: var(--p-accent);
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.08);
  background: #fff;
}
/* ==========================================================================
   26. PRODUCT REGISTER — QR MODAL CLASSES
   ========================================================================== */

.qr-modal-card {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--rule);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}
.modal-bg.show .qr-modal-card {
  transform: scale(1);
}

.qr-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--rule);
  background: var(--off);
}
.qr-modal-body {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  overflow-y: auto;
}
.qr-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--rule);
}

.qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--off);
  cursor: pointer;
  transition: all 0.16s;
}
.qr-item:hover {
  border-color: var(--accent2);
  background: rgba(42, 82, 152, 0.04);
}
.qr-item canvas,
.qr-item img {
  width: 120px;
  height: 120px;
  border-radius: 4px;
}
.qr-product-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  line-height: 1.3;
}
.qr-product-id {
  font-family: "Roboto Mono", monospace;
  font-size: 11px;
  color: var(--ink4);
  text-align: center;
}

/* ==========================================================================
   27. PRODUCT REGISTER PAGE — THUMBNAIL & LIGHTBOX
   ========================================================================== */
.thumb-cell {
  width: 44px;
  text-align: center;
}
.thumb-cell img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--rule);
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  display: block;
}
.thumb-cell img:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.thumb-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px dashed var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink4);
  font-size: 16px;
}

.edit-thumb-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--off);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}
.edit-thumb-wrap img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--rule);
  cursor: pointer;
}
.edit-thumb-wrap img:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.edit-thumb-meta {
  font-size: 12px;
  color: var(--ink3);
}
.edit-thumb-meta strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 2px;
}

/* ==========================================================================
   28. COMPREHENSIVE RESPONSIVE IMPROVEMENTS
   ========================================================================== */

.main > .pur-page {
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .pur-page {
    padding: 22px 24px;
  }
}
@media (max-width: 768px) {
  .pur-page {
    padding: 18px 16px;
  }
  .pur-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .pur-header h1,
  .pur-header-left h1 {
    font-size: 22px;
  }
  .dash-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .dc-amount {
    font-size: 22px !important;
  }
  .bill-info-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .summary-card {
    min-width: unset;
    width: 100%;
    margin-left: 0;
  }
  .st-page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 480px) {
  .dash-cards-grid {
    grid-template-columns: 1fr;
  }
  .pur-card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .filter-bar-pur {
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }
  .modal-card,
  .modal-content-pur {
    max-width: calc(100vw - 32px);
    padding: 22px 18px;
  }
  .items-table thead th,
  .items-table tbody td {
    font-size: 12px;
    padding: 7px 8px;
  }
  .pag-btns-pur {
    justify-content: center;
  }
  .challan-sigs {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .challan-wrapper {
    padding: 20px 18px;
  }
}

.pur-card .tbl-wrap-pur,
.pur-card .data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1px;
}

@media (max-width: 640px) {
  .form-grid-pur {
    grid-template-columns: 1fr;
  }
  .form-grid-pur .full,
  .fg-pur.span2 {
    grid-column: 1;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    z-index: 500;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .header {
    left: 0;
    padding: 0 16px;
  }
  .main {
    margin-left: 0;
  }
  .hdr-search {
    display: none;
  }
}

.btn:focus-visible,
.btn-pur:focus-visible,
.finput:focus-visible,
.finput-pur:focus-visible,
.fselect:focus-visible,
.fselect-pur:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .hdr-search {
    display: none;
  }
}

@media (max-width: 900px) {
  .filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .filter-group {
    min-width: unset;
  }
}
@media (max-width: 560px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

#form-attachment-preview-container {
  padding: 10px 0;
}
#form-attachment-preview-container .invoice-thumb-wrap {
  max-width: 160px;
}

.modal-content-pur.modal-lg {
  max-width: 760px;
}
@media (max-width: 800px) {
  .modal-content-pur.modal-lg {
    max-width: calc(100vw - 32px);
  }
}

@media print {
  .pur-page {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .pur-breadcrumb,
  .pur-header,
  .filter-bar-pur,
  .act-group,
  .no-print {
    display: none !important;
  }
  .pur-card {
    border: none !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .data-table-wrap,
  .tbl-wrap-pur {
    overflow: visible !important;
  }
  .challan-modal-actions {
    display: none !important;
  }
  #qrScannerOverlay {
    display: none !important;
  }
}

/* Additional button styles for purchase_entry */
.act-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--rule);
  background: var(--white);
  transition: all 0.16s;
  color: var(--ink3);
  font-size: 14px;
  text-decoration: none;
}

.act-btn:hover {
  border-color: var(--accent2);
  color: var(--accent2);
  background: rgba(42, 82, 152, 0.06);
  transform: translateY(-1px);
}

.act-btn.act-pay {
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--success);
  background: var(--success-light);
}

.act-btn.act-pay:hover {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.act-btn.act-del {
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  background: var(--danger-light);
}

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

/* Animation for save button */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Empty state styling */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink4);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink2);
  margin: 0 0 8px;
}

.empty-state p {
  font-size: 13px;
  color: var(--ink4);
  margin: 0;
}

.modal-card {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  padding: 28px 30px;
  /* ... existing styles ... */
}

/* ADD THIS NEW CLASS */
.modal-card.wide {
  max-width: 800px;
}/* ── Print Specifics for Modals (Invoices) ── */
@media print {
  /* Hide standard background components */
  body.print-modal-active .pur-page,
  body.print-modal-active .header,
  body.print-modal-active .sidebar,
  body.print-modal-active .toast,
  .modal-close-btn,
  .no-print {
    display: none !important;
  }
  
  /* Reset modal to cover full print page perfectly */
  body.print-modal-active .modal-bg.show,
  body.print-modal-active .modal-bg.open {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: auto !important;
    background: #fff !important; display: block !important;
    padding: 0 !important;
  }

  body.print-modal-active .modal-card {
    max-width: 100% !important; width: 100% !important;
    border: none !important; box-shadow: none !important;
    margin: 0 !important; padding: 10px 30px !important;
    transform: none !important;
  }

  body.print-modal-active .modal-body {
    max-height: none !important; overflow: visible !important;
    padding: 0 !important;
  }

  /* Force exact colors for typography in print */
  body.print-modal-active .invoice-title { color: #94a3b8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.print-modal-active .invoice-subtitle { background: #f8fafc !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Strip default browser table borders and match screen UI exactly */
  body.print-modal-active table, 
  body.print-modal-active th, 
  body.print-modal-active td {
    border: none !important;
  }
  
  body.print-modal-active .bill-mini-table th { border-bottom: 2px solid #0f172a !important; color: #0f172a !important;}
  body.print-modal-active .bill-mini-table td { border-bottom: 1px solid #cbd5e1 !important; }
  body.print-modal-active .bill-mini-table tbody tr:last-child td { border-bottom: 2px solid #cbd5e1 !important; }
  
  body.print-modal-active .bfb-row { border-bottom: 1px solid #cbd5e1 !important; }
  body.print-modal-active .bfb-grand { border-bottom: 3px double #0f172a !important; border-top: 2px solid #0f172a !important; }

  /* Keep totals cleanly together at bottom right */
  body.print-modal-active .bill-fin-box {
    page-break-inside: avoid !important;
    width: 380px !important;
  }
}

/* ==========================================================================
   29. MOBILE SIDEBAR & OVERLAY FIXES
   ========================================================================== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  z-index: 400; /* Sidebar ke peeche */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block !important;
  }
  .sidebar {
    display: flex !important;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 500;
    width: 260px;
  }
  .sidebar.open {
    transform: translateX(0);
  }
}