/* =====================================================
   VARIABLES & RESET
   ===================================================== */
:root {
  --primary: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-dark: #1e40af;
  --secondary: #0891b2;
  --secondary-light: #cffafe;
  --accent: #06b6d4;
  --success: #059669;
  --success-light: #d1fae5;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --info: #7c3aed;
  --info-light: #ede9fe;
  --teal: #0d9488;
  --teal-light: #ccfbf1;
  --bg: #f0f4fa;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #1e293b;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --sidebar-bg: #0f1f3d;
  --sidebar-hover: rgba(255, 255, 255, 0.07);
  --sidebar-active: #1d4ed8;
  --sidebar-txt: #cbd5e1;
  --sw: 260px;
  --hh: 64px;
  --r: 12px;
  --r-sm: 8px;
  --r-lg: 18px;
  --sh: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
  --sh-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --sh-lg: 0 12px 24px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.05);
  --tr: 0.18s ease;
  --font-h: "Outfit", sans-serif;
  --font-b: "DM Sans", sans-serif;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  height: auto;
}
.material-symbols-outlined {
  font-size: 20px;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* =====================================================
   MODULE SYSTEM
   ===================================================== */
.module {
  display: flex;
}
.module.active {
  display: flex;
}
#login-module.active,
#customer-module.active {
  display: flex;
}

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font-b);
  font-size: 13.5px;
  color: var(--text);
  background: #fafafa;
  transition: var(--tr);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}
textarea.form-control {
  resize: vertical;
  min-height: 80px;
}
select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748B' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 16px;
  padding-right: 34px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font-b);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--tr);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.35);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--border-light);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--border);
}
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: #047857;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #b91c1c;
}
.btn-warning {
  background: var(--warning);
  color: #fff;
}
.btn-warning:hover {
  background: #b45309;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
}
.btn-teal {
  background: var(--teal);
  color: #fff;
}
.btn-teal:hover {
  background: #0f766e;
}
.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
  gap: 4px;
}
.btn-block {
  width: 100%;
  justify-content: center;
  padding: 12px;
}
.login-footer {
  text-align: center;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--text-2);
}
.login-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* =====================================================
   APP LAYOUT
   ===================================================== */
.app-layout {
  flex-direction: row;
  height: 100vh;
  overflow: hidden;
  width: 100%;
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar {
  width: var(--sw);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.28s ease;
  position: relative;
  z-index: 100;
}
.sidebar.staff-style {
  background: #0c3547;
}
.sidebar-hdr {
  padding: 18px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  min-height: var(--hh);
  flex-shrink: 0;
}
.sb-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sb-logo .material-symbols-outlined {
  font-size: 22px;
  color: #fff;
}
.sb-brand {
  overflow: hidden;
}
.sb-brand h2 {
  font-family: var(--font-h);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.sb-brand span {
  font-size: 10.5px;
  color: var(--sidebar-txt);
  display: block;
  margin-top: 1px;
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 0;
}
.nav-label {
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(203, 213, 225, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 18px 3px;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 14px;
  margin: 1px 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--sidebar-txt);
  transition: var(--tr);
  border: none;
  background: none;
  width: calc(100% - 16px);
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
}
.nav-item .material-symbols-outlined {
  font-size: 19px;
}
.nav-item-txt {
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-ftr {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.user-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.user-ava {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
.user-role {
  font-size: 10.5px;
  color: var(--sidebar-txt);
}
.logout-btn {
  background: none;
  border: none;
  color: var(--sidebar-txt);
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  margin-left: auto;
  display: flex;
  align-items: center;
  transition: var(--tr);
}
.logout-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.top-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 22px;
  height: var(--hh);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-2);
  display: none;
  align-items: center;
  padding: 6px;
  border-radius: var(--r-sm);
  transition: var(--tr);
  flex-shrink: 0;
}
.menu-toggle:hover {
  background: var(--border-light);
  color: var(--text);
}
.page-title {
  font-family: var(--font-h);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--border-light);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  width: 210px;
}
.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-b);
  font-size: 13px;
  color: var(--text);
  width: 100%;
}
.search-box .material-symbols-outlined {
  font-size: 17px;
  color: var(--text-3);
}
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-2);
  padding: 7px;
  border-radius: var(--r-sm);
  position: relative;
  display: flex;
  align-items: center;
  transition: var(--tr);
}
.icon-btn:hover {
  background: var(--border-light);
  color: var(--text);
}
.notif-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 15px;
  height: 15px;
  background: var(--danger);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
}
.page-view {
  display: none;
}
.page-view.active {
  display: block;
  padding: 20px;
}

/* =====================================================
   CARDS & STATS
   ===================================================== */
.card {
  background: var(--card);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--sh);
  border: 1px solid var(--border);
}
.card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card-title {
  font-family: var(--font-h);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 18px 20px;
  box-shadow: var(--sh);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--tr);
  cursor: default;
}
.stat-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}
.stat-ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-ico .material-symbols-outlined {
  font-size: 22px;
}
.si-blue {
  background: var(--primary-light);
  color: var(--primary);
}
.si-cyan {
  background: var(--secondary-light);
  color: var(--secondary);
}
.si-green {
  background: var(--success-light);
  color: var(--success);
}
.si-orange {
  background: var(--warning-light);
  color: var(--warning);
}
.si-red {
  background: var(--danger-light);
  color: var(--danger);
}
.si-purple {
  background: var(--info-light);
  color: var(--info);
}
.si-teal {
  background: var(--teal-light);
  color: var(--teal);
}
.stat-val {
  font-family: var(--font-h);
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 3px;
}
.stat-lbl {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}
.stat-chg {
  font-size: 11px;
  margin-top: 2px;
}
.chg-up {
  color: var(--success);
}
.chg-dn {
  color: var(--danger);
}

/* =====================================================
   SECTION HEADER
   ===================================================== */
.sec-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.sec-title {
  font-family: var(--font-h);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
}
.sec-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

/* =====================================================
   TABLE
   ===================================================== */
.tbl-wrap-card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--sh);
  border: 1px solid var(--border);
  overflow: hidden;
}
.tbl-toolbar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.tbl-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--border-light);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 11px;
  min-width: 180px;
}
.tbl-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-b);
  font-size: 12.5px;
  color: var(--text);
  width: 100%;
}
.tbl-search .material-symbols-outlined {
  font-size: 16px;
  color: var(--text-3);
}
.filter-sel {
  padding: 7px 30px 7px 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--border-light);
  font-family: var(--font-b);
  font-size: 12.5px;
  color: var(--text);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748B' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}
.tbl-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  background: #f8fafc;
  padding: 11px 15px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 11px 15px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: #fafbfe;
}
.tbl-footer {
  padding: 11px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-2);
  flex-wrap: wrap;
  gap: 7px;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 3px;
}
.pg-btn {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  transition: var(--tr);
}
.pg-btn:hover,
.pg-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* =====================================================
   BADGES
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.b-active,
.b-delivered,
.b-good {
  background: var(--success-light);
  color: var(--success);
}
.b-pending,
.b-open {
  background: var(--warning-light);
  color: var(--warning);
}
.b-inprogress {
  background: var(--info-light);
  color: var(--info);
}
.b-inactive,
.b-cancelled,
.b-paused,
.b-draft {
  background: var(--border-light);
  color: var(--text-2);
}
.b-overdue,
.b-failed,
.b-lowstock {
  background: var(--danger-light);
  color: var(--danger);
}
.b-resolved {
  background: var(--primary-light);
  color: var(--primary);
}
.b-custom {
  background: var(--info-light);
  color: var(--info);
}
.b-subscription {
  background: var(--teal-light);
  color: var(--teal);
}
.b-cash {
  background: var(--success-light);
  color: var(--success);
}
.b-none {
  background: var(--border-light);
  color: var(--text-2);
}

/* =====================================================
   ACTION BUTTONS ROW
   ===================================================== */
.act-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.act-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--tr);
}
.act-btn .material-symbols-outlined {
  font-size: 15px;
}
.act-edit {
  background: var(--primary-light);
  color: var(--primary);
}
.act-edit:hover {
  background: var(--primary);
  color: #fff;
}
.act-pay {
  background: var(--success-light);
  color: var(--success);
}
.act-pay:hover {
  background: var(--success);
  color: #fff;
}
.act-del {
  background: var(--danger-light);
  color: var(--danger);
}
.act-del:hover {
  background: var(--danger);
  color: #fff;
}
.act-view {
  background: var(--border-light);
  color: var(--text-2);
}
.act-view:hover {
  background: var(--secondary);
  color: #fff;
}
.act-resolve {
  background: var(--teal-light);
  color: var(--teal);
}
.act-resolve:hover {
  background: var(--teal);
  color: #fff;
}

/* =====================================================
   CHARTS GRID
   ===================================================== */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.chart-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--sh);
  border: 1px solid var(--border);
}
.chart-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.chart-title {
  font-family: var(--font-h);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* =====================================================
   ALERT
   ===================================================== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  margin-bottom: 16px;
}
.alert-warn {
  background: var(--warning-light);
  color: #78350f;
  border: 1px solid #fde68a;
}
.alert-danger {
  background: var(--danger-light);
  color: #7f1d1d;
  border: 1px solid #fecaca;
}
.alert-success {
  background: var(--success-light);
  color: #064e3b;
  border: 1px solid #a7f3d0;
}
.alert-info {
  background: var(--primary-light);
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* =====================================================
   STOCK GRID
   ===================================================== */
.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stock-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--sh);
  border: 1px solid var(--border);
  text-align: center;
  transition: var(--tr);
}
.stock-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}
.stock-ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
}
.stock-val {
  font-family: var(--font-h);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 5px;
}
.stock-lbl {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
  margin-bottom: 8px;
}

/* =====================================================
   REPORT CARDS
   ===================================================== */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}
.report-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--sh);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--tr);
}
.report-card:hover {
  box-shadow: var(--sh-md);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.report-ico {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.report-ico .material-symbols-outlined {
  font-size: 21px;
}
.report-name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 5px;
}
.report-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 12px;
}
.report-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-3);
}

/* =====================================================
   DELIVERY CARDS (Staff)
   ===================================================== */
.del-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.del-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 15px 18px;
  box-shadow: var(--sh);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--tr);
  border-left: 4px solid var(--border);
}
.del-card:hover {
  box-shadow: var(--sh-md);
}
.del-card.status-Pending {
  border-left-color: var(--warning);
}
.del-card.status-Delivered {
  border-left-color: var(--success);
}
.del-card.status-Failed {
  border-left-color: var(--danger);
}
.del-num {
  font-family: var(--font-h);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  white-space: nowrap;
  min-width: 52px;
}
.del-cust {
  flex: 1;
  min-width: 0;
}
.del-cust h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.del-cust p {
  font-size: 11.5px;
  color: var(--text-2);
}
.del-meta {
  text-align: right;
  flex-shrink: 0;
}
.del-amt {
  font-family: var(--font-h);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.del-btl {
  font-size: 11.5px;
  color: var(--text-2);
}

/* =====================================================
   CUSTOMER MODULE HEADER / NAV
   ===================================================== */
#customer-module {
  flex-direction: row;
  width: 100%;
  min-height: 100vh;
}
.cust-hdr {
  background: linear-gradient(135deg, #0a1628, #1d4ed8);
  color: #fff;
  padding: 0 24px;
  height: var(--hh);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}
.cust-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cust-brand-logo {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cust-brand h2 {
  font-family: var(--font-h);
  font-size: 15px;
  font-weight: 800;
}
.cust-user {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.cust-ava {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.cust-nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  flex-shrink: 0;
}
.cust-nav::-webkit-scrollbar {
  height: 0;
}
.cust-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 52px;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: var(--tr);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-b);
}
.cust-nav-item:hover {
  color: var(--primary);
}
.cust-nav-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.cust-nav-item .material-symbols-outlined {
  font-size: 17px;
}
.cust-body {
  flex: 1;
  padding: 22px;
  overflow-y: auto;
}

/* =====================================================
   CUSTOMER PROFILE BANNER
   ===================================================== */
.cust-profile-banner {
  background: linear-gradient(
    135deg,
    var(--primary-light),
    var(--secondary-light)
  );
  border-radius: var(--r);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  border: 1px solid #bfdbfe;
}
.cpb-avatar {
  width: 54px;
  height: 54px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
}
.cpb-info h3 {
  font-family: var(--font-h);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.cpb-info p {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 1px;
}
.cpb-dues {
  margin-left: auto;
  text-align: right;
  flex-shrink: 0;
}
.cpb-dues-amt {
  font-family: var(--font-h);
  font-size: 20px;
  font-weight: 800;
  color: var(--warning);
}
.cpb-dues-lbl {
  font-size: 10.5px;
  color: var(--text-2);
}

/* =====================================================
   MODALS
   ===================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.18s ease;
}
.modal {
  background: var(--card);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--sh-lg);
  animation: popIn 0.2s ease;
}
.modal-lg {
  max-width: 660px;
}
.modal-hdr {
  padding: 18px 22px 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.modal-title {
  font-family: var(--font-h);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
}
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-2);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: var(--tr);
}
.modal-close:hover {
  background: var(--border-light);
  color: var(--text);
}
.modal-body {
  padding: 18px 22px;
}
.modal-footer {
  padding: 15px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  position: sticky;
  bottom: 0;
  background: var(--card);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* =====================================================
   PROFILE PAGE
   ===================================================== */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.profile-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 3px;
}
.profile-field .pf-val {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  padding: 2px 0;
}

/* =====================================================
   MISC UTILITIES
   ===================================================== */
.mb-0 {
  margin-bottom: 0;
}
.mb-16 {
  margin-bottom: 16px;
}
.mb-20 {
  margin-bottom: 20px;
}
.mt-20 {
  margin-top: 20px;
}
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-2);
}
.empty-state .material-symbols-outlined {
  font-size: 48px;
  color: var(--text-3);
  display: block;
  margin-bottom: 10px;
}
.empty-state h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.empty-state p {
  font-size: 12.5px;
}
.info-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--border-light);
  border-radius: 99px;
  font-size: 11.5px;
  color: var(--text-2);
}

/* =====================================================
   MOBILE OVERLAY
   ===================================================== */
.sb-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99;
}
.sb-backdrop.show {
  display: block;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    transition: left 0.28s ease;
    z-index: 200;
    width: 260px !important;
  }
  .sidebar.open {
    left: 0;
  }
  .menu-toggle {
    display: flex !important;
  }
  .search-box {
    display: none;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .page-content,
  .cust-body {
    padding: 14px;
  }
  .top-bar {
    padding: 0 14px;
  }
  .tbl-toolbar {
    padding: 11px 14px;
    flex-direction: column;
    align-items: stretch;
  }
  .tbl-search {
    width: 100%;
  }
  .modal {
    max-width: 100%;
    margin: 0;
    border-radius: var(--r) var(--r) 0 0;
  }
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-overlay.open {
    animation: slideUp 0.22s ease;
  }
  .reports-grid {
    grid-template-columns: 1fr;
  }
  .stock-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sec-hdr {
    flex-direction: column;
    align-items: flex-start;
  }
  .cust-hdr,
  .cust-nav {
    padding-left: 14px;
    padding-right: 14px;
  }
  .del-card {
    flex-wrap: wrap;
    gap: 10px;
  }
  .charts-grid {
    gap: 12px;
  }
}
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .login-card {
    padding: 30px 22px 26px;
  }
  .stock-grid {
    grid-template-columns: 1fr 1fr;
  }
}
