:root {
  --green:   #133a2b;
  --green2:  #1d5c45;
  --green3:  #0b2c20;
  --orange:  #e86730;
  --orange2: #c0531e;
  --orange-light: #fff4ee;
  --bg:      #f5f7fa;
  --sidebar-w: 220px;
  --topbar-h:  52px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', sans-serif; font-size: 14px; background: var(--bg); }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* ── LOGIN ── */
#loginPage { display: flex; height: 100vh; }
.login-left { width: 440px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 52px 44px; box-shadow: 6px 0 32px rgba(0,0,0,.1); z-index: 1; }
.login-right { flex: 1; background: linear-gradient(140deg, #042f2e 0%, #065f46 50%, #0891b2 100%); display: flex; align-items: center; justify-content: center; padding: 40px; position: relative; overflow: hidden; }
.login-right::before { content: ''; position: absolute; top: -120px; right: -120px; width: 450px; height: 450px; background: rgba(255,255,255,.04); border-radius: 50%; }
.login-right::after  { content: ''; position: absolute; bottom: -80px; left: -80px; width: 300px; height: 300px; background: rgba(8,145,178,.15); border-radius: 50%; }
.login-brand { text-align: center; margin-bottom: 32px; }
.login-brand .logo { width: 68px; height: 68px; background: linear-gradient(135deg, #059669, #0891b2); border-radius: 18px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; box-shadow: 0 6px 20px rgba(5,150,105,.35); }
.login-brand .logo i { color: #fff; font-size: 28px; }
.login-brand h1 { font-size: 28px; font-weight: 800; color: #065f46; }
.login-brand p { color: #6b7280; font-size: 13px; margin-top: 4px; }
.field-wrap { margin-bottom: 16px; width: 100%; }
.field-label { font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.field-wrap input { width: 100%; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 10px 13px; font-size: 13px; color: #111827; transition: .15s; }
.field-wrap input:focus { border-color: #059669; outline: none; box-shadow: 0 0 0 3px rgba(5,150,105,.14); }
.btn-login { background: linear-gradient(135deg, #059669, #0891b2); border: none; padding: 12px; font-size: 14px; font-weight: 700; border-radius: 10px; width: 100%; color: #fff; cursor: pointer; transition: .15s; }
.btn-login:hover { opacity: .9; transform: translateY(-1px); }
.login-note { text-align: center; color: #9ca3af; font-size: 11px; margin-top: 12px; }
.alert-error { background: #fff1f2; border: 1px solid #fecdd3; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-size: 12.5px; color: #991b1b; width: 100%; }
.login-tagline { color: rgba(255,255,255,.9); max-width: 450px; text-align: center; position: relative; z-index: 1; }
.login-tagline h2 { font-size: 28px; font-weight: 800; line-height: 1.4; margin-bottom: 16px; }
.login-tagline h2 span { color: #67e8f9; }
.login-tagline p { font-size: 14px; line-height: 1.8; opacity: .8; }
.features-list { margin-top: 32px; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.feat-item { display: flex; align-items: center; gap: 14px; color: rgba(255,255,255,.85); }
.feat-icon { width: 36px; height: 36px; background: rgba(255,255,255,.12); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; color: #67e8f9; }
.otp-row { display: flex; gap: 10px; justify-content: center; }
.otp-box { width: 48px; height: 52px; text-align: center; font-size: 22px; font-weight: 700; border: 2px solid #e5e7eb; border-radius: 8px; }
.otp-box:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px rgba(232,103,48,.14); }

/* ── TOPBAR ── */
.topbar { height: var(--topbar-h); background: linear-gradient(90deg, var(--green3), var(--green)); display: flex; align-items: center; padding: 0 20px; gap: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.2); position: sticky; top: 0; z-index: 100; }
.topbar-icon { color: rgba(255,255,255,.9); font-size: 18px; }
.topbar-brand { font-size: 16px; font-weight: 800; color: #fff; }
.branch-badge { background: rgba(255,255,255,.13); color: #fff; font-size: 11px; padding: 4px 12px; border-radius: 20px; font-weight: 600; border: 1px solid rgba(255,255,255,.2); }
.spacer { flex: 1; }
.topbar-notif { color: rgba(255,255,255,.8); position: relative; padding: 6px 10px; text-decoration: none; }
.notif-dot { position: absolute; top: 4px; right: 8px; width: 7px; height: 7px; background: #ef4444; border-radius: 50%; border: 2px solid var(--green); }
.notif-count { position: absolute; top: 1px; right: 4px; background: #ef4444; color: #fff; font-size: 9px; font-weight: 800; border-radius: 10px; padding: 0 4px; min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--green); line-height: 1; }
.user-avatar { width: 32px; height: 32px; background: var(--orange); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #fff; flex-shrink: 0; }
.user-name { font-weight: 700; font-size: 12px; }
.user-level { font-size: 10px; opacity: .7; }
/* topbar user dropdown */
.topbar-user-btn { display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 22px; padding: 4px 12px 4px 4px; cursor: pointer; color: #fff; transition: background .15s; }
.topbar-user-btn:hover, .topbar-user-btn.show { background: rgba(255,255,255,.16); }
.topbar-user-btn::after { display: none; }
.topbar-user-info { line-height: 1.2; text-align: left; }
.topbar-caret { font-size: 8px; opacity: .6; margin-left: 2px; }
.topbar-user-menu { min-width: 210px; border: none; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.15); padding: 0; overflow: hidden; margin-top: 6px !important; }
.topbar-user-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(135deg, var(--green3), var(--green)); }
.tuh-avatar { width: 36px; height: 36px; background: var(--orange); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #fff; flex-shrink: 0; }
.tuh-name { font-weight: 700; font-size: 13px; color: #fff; }
.tuh-id { font-size: 10.5px; color: rgba(255,255,255,.7); }
.topbar-menu-item { display: flex; align-items: center; gap: 9px; font-size: 12.5px; padding: 8px 14px; color: #374151 !important; }
.topbar-menu-item i { width: 14px; text-align: center; font-size: 12px; color: #6b7280; }
.topbar-menu-item:hover { background: #f8fafc; }
.topbar-menu-item.text-danger i { color: #ef4444; }

/* ── Password eye toggle ── */
.pwd-eye-wrap { position: relative; display: block; width: 100%; }
.pwd-eye-btn  { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: #9ca3af; padding: 2px 5px; line-height: 1; z-index: 2; outline: none; -webkit-user-select: none; user-select: none; }
.pwd-eye-btn:hover { color: #6b7280; }
.pwd-eye-btn i { font-size: 13px; pointer-events: none; }
.pwd-has-eye { padding-right: 34px !important; }

/* ── LAYOUT ── */
.app-body { display: flex; height: calc(100vh - var(--topbar-h)); overflow: hidden; }
.sidebar { width: var(--sidebar-w); background: var(--green3); display: flex; flex-direction: column; overflow-y: auto; flex-shrink: 0; }
.nav-section { padding: 14px 14px 3px; font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,.35); font-weight: 700; }
.sidebar a { display: flex; align-items: center; gap: 9px; padding: 8px 14px; color: #cbd5e1 !important; text-decoration: none !important; font-size: 13px; border-left: 3px solid transparent; transition: .15s; cursor: pointer; }
.sidebar a:hover { background: rgba(255,255,255,.08); color: #fff !important; border-left-color: var(--orange); }
.sidebar a.active { background: rgba(232,103,48,.2); color: #fff !important; border-left-color: var(--orange); font-weight: 600; }
.sidebar a i { width: 15px; text-align: center; font-size: 12px; }
.sidebar .divider { height: 1px; background: rgba(255,255,255,.08); margin: 4px 14px; }
.main-content { flex: 1; overflow-y: auto; padding: 22px 26px; background: var(--bg); }

/* ── DASHBOARD ── */
.dash-welcome { background: linear-gradient(135deg, var(--green3), var(--green2)); border-radius: 14px; padding: 18px 26px; margin-bottom: 18px; color: #fff; display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.dash-welcome::after { content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; background: rgba(255,255,255,.04); border-radius: 50%; }
.dash-welcome h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.dash-welcome p { font-size: 12.5px; opacity: .75; }
.date-box { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 8px 20px; text-align: center; z-index: 1; }
.date-box .dd { font-size: 30px; font-weight: 800; color: #f9c784; line-height: 1; display: block; }
.date-box .dm { font-size: 11px; opacity: .8; margin-top: 3px; }


/* ── CARDS ── */
.card-box { background: #fff; border-radius: 12px; box-shadow: 0 1px 6px rgba(0,0,0,.07); overflow: hidden; margin-bottom: 16px; }
.card-head { padding: 12px 18px; border-bottom: 1px solid #f3f4f6; display: flex; align-items: center; justify-content: space-between; }
.card-head h3 { font-size: 13px; font-weight: 700; color: #111827; display: flex; align-items: center; gap: 7px; }

/* ── DSR/CSR ROWS ── */
.dsr-row { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-bottom: 1px solid #f3f4f6; cursor: pointer; transition: .15s; }
.dsr-row:hover { background: #fafafa; }
.dsr-row:last-child { border-bottom: none; }
.dsr-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dsr-dot.pending   { background: #f59e0b; }
.dsr-dot.completed { background: #10b981; }
.dsr-dot.posted    { background: #3b82f6; }
.dsr-no  { font-size: 12.5px; font-weight: 700; color: #111827; }
.dsr-info{ font-size: 11.5px; color: #6b7280; }
.dsr-amt { font-size: 13px; font-weight: 800; color: #111827; margin-left: auto; white-space: nowrap; }

/* ── CHEQUE ROW ── */
.chq-row { display: flex; align-items: center; gap: 10px; padding: 9px 18px; border-bottom: 1px solid #f3f4f6; }
.chq-row:last-child { border-bottom: none; }

/* ── COLLECTION SUMMARY ── */
.collect-summary { margin: 10px 18px 14px; background: #f0fdf4; border-radius: 8px; padding: 10px 14px; border: 1px solid #bbf7d0; }
.cs-title { font-size: 11px; font-weight: 700; color: #065f46; margin-bottom: 8px; }
.cs-row { display: flex; justify-content: space-between; font-size: 12px; color: #374151; margin-bottom: 4px; }
.cs-row .cash { color: #16a34a; }
.cs-row .gpay { color: #2563eb; }
.cs-row .cheq { color: #7c3aed; }
.cs-total { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: #065f46; border-top: 1px solid #bbf7d0; padding-top: 6px; margin-top: 4px; }

/* ── BADGES ── */
.badge-pending { background: #fef3c7; color: #92400e; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-done    { background: #d1fae5; color: #065f46; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-posted  { background: #dbeafe; color: #1e40af; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-cancel  { background: #fee2e2; color: #991b1b; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; }

/* ── BUTTONS ── */
.btn-sm-o { background: linear-gradient(135deg, var(--orange), var(--orange2)); border: none; color: #fff; padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; text-decoration: none !important; display: inline-flex; align-items: center; gap: 4px; transition: .15s; }
.btn-sm-o:hover { opacity: .9; color: #fff; }
.btn-sm-w { background: #fff; border: 1.5px solid #e5e7eb; color: #374151; padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; text-decoration: none !important; display: inline-flex; align-items: center; gap: 4px; }
.btn-sm-w:hover { border-color: var(--orange); color: var(--orange); }
.btn-primary { background: linear-gradient(135deg, var(--orange), var(--orange2)); border: none; color: #fff; padding: 8px 20px; border-radius: 7px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.btn-success { background: #16a34a; border: none; color: #fff; padding: 8px 20px; border-radius: 7px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.btn-danger  { background: #dc2626; border: none; color: #fff; padding: 8px 20px; border-radius: 7px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.btn-outline { background: #fff; border: 1.5px solid #e5e7eb; color: #374151; padding: 7px 18px; border-radius: 7px; font-size: 12.5px; font-weight: 600; cursor: pointer; }

/* ── FORM STYLES ── */
.form-section { background: #f9fafb; border-radius: 8px; padding: 16px 18px; margin-bottom: 16px; border: 1px solid #e5e7eb; }
.form-section h6 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #6b7280; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.form-section h6 i { color: var(--orange); }
.fld label { font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 4px; display: block; }
.fld input, .fld select, .fld textarea { width: 100%; border: 1.5px solid #e5e7eb; border-radius: 7px; padding: 8px 11px; font-size: 12.5px; color: #111827; background: #fff; transition: .15s; }
.fld input:focus, .fld select:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px rgba(232,103,48,.12); }
.fld input:disabled { background: #f3f4f6; color: #6b7280; cursor: not-allowed; }
.fld-row { display: grid; gap: 14px; }
.fld-row.col2 { grid-template-columns: 1fr 1fr; }
.fld-row.col3 { grid-template-columns: 1fr 1fr 1fr; }
.fld-row.col4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* ── TABLE ── */
table.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data-table th { background: #f9fafb; padding: 9px 14px; text-align: left; font-weight: 600; color: #6b7280; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid #e5e7eb; }
table.data-table td { padding: 9px 14px; border-bottom: 1px solid #f3f4f6; color: #374151; }
table.data-table tr:hover td { background: #fafafa; }

/* ── MODAL ── */
.modal-dialog { display: flex; align-items: center; min-height: calc(100% - 2rem); margin-left: auto; margin-right: auto; }
.modal-content { border: none; border-radius: 12px; box-shadow: 0 24px 64px rgba(0,0,0,.2); width: 100%; }
.modal-header { background: var(--green); border: none; padding: 15px 22px; border-radius: 12px 12px 0 0; }
.modal-header .modal-title { color: #fff; font-size: 14px; font-weight: 700; }
.modal-header .btn-close { filter: invert(1) brightness(2); opacity: .7; }
.modal-body { padding: 22px 24px; }
.modal-footer { background: #f9fafb; border-top: 1px solid #e5e7eb; padding: 14px 22px; border-radius: 0 0 12px 12px; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 32px 20px; color: #9ca3af; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-state i { font-size: 32px; opacity: .4; }
.empty-state p { font-size: 13px; margin: 0; }

/* ── PAGE TITLE / HEADER ── */
.page-title { font-size: 18px; font-weight: 700; color: #111827; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.page-title i { color: var(--orange); }
.page-sub   { font-size: 12.5px; color: #6b7280; margin-bottom: 0; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }

/* ── FILTER BAR ── */
.filter-bar  { background: #fff; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.filter-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-form .form-control, .filter-form .form-select { max-width: 180px; }

/* ── SUMMARY ROW ── */
.summary-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.sum-card { background: #fff; border-radius: 10px; padding: 12px 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); min-width: 150px; border-left: 4px solid #10b981; }
.sum-card.orange { border-left-color: var(--orange); }
.sum-val  { font-size: 20px; font-weight: 800; color: #111827; }
.sum-label{ font-size: 10.5px; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

/* ── TABLE CARD ── */
.table-card { background: #fff; border-radius: 10px; box-shadow: 0 1px 6px rgba(0,0,0,.07); overflow: hidden; margin-bottom: 16px; }
.table-resp-label { padding: 8px 16px; font-size: 11.5px; color: #6b7280; border-bottom: 1px solid #f3f4f6; }
.card-section-title { padding: 11px 16px; font-size: 12px; font-weight: 700; color: #374151; border-bottom: 1px solid #f3f4f6; display: flex; align-items: center; }
.card-section-title i { color: var(--orange); margin-right: 6px; }

/* ── BILL/PARTY ELEMENTS ── */
.bill-no    { font-family: 'Courier New', monospace; font-weight: 700; color: var(--green); font-size: 12px; }
.beat-badge { background: #e0f2fe; color: #0369a1; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 12px; display: inline-block; }
.party-name { font-weight: 500; color: #111827; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #f8fafc; border-bottom: 1px solid #e5e7eb; }
.party-total { font-size: 13px; }
.row-warn td { background: #fffbeb !important; }

/* ── AGE BADGE ── */
.age-badge { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 10px; display: inline-block; }
.age-new   { background: #dcfce7; color: #166534; }
.age-mid   { background: #fef9c3; color: #854d0e; }
.age-old   { background: #fee2e2; color: #991b1b; }

/* ── DASHBOARD V2 ── */
:root {
  --dash-blue:   #6366f1;
  --dash-blue2:  #4f46e5;
  --dash-cyan:   #818cf8;
  --dash-green:  #16a34a;
  --dash-purple: #7c3aed;
  --dash-indigo: #4f46e5;
  --dash-red:    #dc2626;
  --dash-amber:  #d97706;
}
/* KPI cards */
.kpi-v2 { background:#fff; border-radius:14px; padding:16px 18px; box-shadow:0 2px 10px rgba(0,0,0,.08); cursor:pointer; transition:.2s; position:relative; overflow:hidden; }
.kpi-v2:hover { transform:translateY(-3px); box-shadow:0 10px 28px rgba(0,0,0,.12); }
.kpi-v2::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; border-radius:14px 14px 0 0; }
.kpi-v2.kv-blue::before   { background:linear-gradient(90deg,#6366f1,#818cf8); }
.kpi-v2.kv-green::before  { background:linear-gradient(90deg,#16a34a,#34d399); }
.kpi-v2.kv-teal::before   { background:linear-gradient(90deg,#059669,#06b6d4); }
.kpi-v2.kv-purple::before { background:linear-gradient(90deg,#7c3aed,#a78bfa); }
.kpi-v2.kv-indigo::before { background:linear-gradient(90deg,#4f46e5,#818cf8); }
.kpi-v2.kv-red::before    { background:linear-gradient(90deg,#dc2626,#f87171); }
.kpi-v2.kv-darkred::before{ background:linear-gradient(90deg,#991b1b,#dc2626); }
.kpi-v2.kv-amber::before  { background:linear-gradient(90deg,#d97706,#fbbf24); }
.kpi-icon { width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0; }
.kpi-label { font-size:11px; font-weight:700; color:#9ca3af; text-transform:uppercase; letter-spacing:.07em; margin-bottom:5px; }
.kpi-value { font-size:22px; font-weight:900; line-height:1.1; margin:2px 0 4px; }
.kpi-sub   { font-size:10px; color:#9ca3af; }
/* Colored card headers */
.ch-blue   { border-top:3px solid #6366f1 !important; }
.ch-green  { border-top:3px solid #16a34a !important; }
.ch-orange { border-top:3px solid #e86730 !important; }
.ch-red    { border-top:3px solid #dc2626 !important; }
.ch-purple { border-top:3px solid #7c3aed !important; }
.ch-indigo { border-top:3px solid #4f46e5 !important; }
.ch-amber  { border-top:3px solid #d97706 !important; }
.ch-cyan   { border-top:3px solid #0891b2 !important; }
/* Beat bar */
.beat-bar-fill { background:linear-gradient(90deg,var(--dash-blue),var(--dash-cyan)); border-radius:4px; height:6px; transition:.4s; }
.beat-bar-fill-sm { background:linear-gradient(90deg,var(--dash-blue),var(--dash-cyan)); border-radius:6px; height:8px; transition:.4s; }
/* Pulse animation */
@keyframes dash-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.4)} }
@keyframes dash-spin  { to{transform:rotate(360deg)} }
.live-dot { width:7px;height:7px;border-radius:50%;background:#16a34a;animation:dash-pulse 1.5s infinite; }
/* Bill checker */
.billchk-missing { display:inline-flex;align-items:center;background:#fef2f2;border:1px solid #fca5a5;border-radius:6px;padding:3px 9px;font-size:11px;font-weight:700;color:#dc2626;font-family:monospace;margin:2px; }
.billchk-found   { display:inline-flex;align-items:center;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:6px;padding:3px 9px;font-size:11px;font-weight:700;color:#16a34a;font-family:monospace;margin:2px; }

/* ── STATUS BADGE ── */
.status-badge      { font-size: 10.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px; display: inline-block; }
.status-pending           { background: #fef3c7; color: #92400e; }
.status-partial           { background: #e0f2fe; color: #0369a1; }
.status-balance           { background: #fde68a; color: #92400e; }
.status-settled           { background: #dcfce7; color: #166534; }
.status-cancelled         { background: #fee2e2; color: #991b1b; }
.status-outfordelivery    { background: #dbeafe; color: #1e40af; }
.status-outforcollection  { background: #ede9fe; color: #5b21b6; }
.status-saveonly   { background: #fef3c7; color: #92400e; }
.status-done       { background: #e0f2fe; color: #0369a1; }
.status-posted     { background: #dcfce7; color: #166534; }

/* ── INFO CARD (DSR/CSR header) ── */
.info-card  { background: #fff; border-radius: 10px; padding: 16px 20px; box-shadow: 0 1px 6px rgba(0,0,0,.07); }
.info-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.info-item  { }
.info-label { font-size: 10.5px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.info-val   { font-size: 13.5px; font-weight: 600; color: #111827; }

/* ── STEP BAR ── */
.step-bar  { display: flex; align-items: center; }
.step-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.step-num  { width: 30px; height: 30px; border-radius: 50%; background: #e5e7eb; color: #9ca3af; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; transition: .2s; }
.step-label{ font-size: 10.5px; color: #9ca3af; font-weight: 600; white-space: nowrap; }
.step-item.done  .step-num { background: #16a34a; color: #fff; }
.step-item.done  .step-label { color: #16a34a; }
.step-item.active .step-num { background: var(--orange); color: #fff; }
.step-item.active .step-label { color: var(--orange); }
.step-line { flex: 1; height: 2px; background: #e5e7eb; margin: 0 8px; margin-bottom: 18px; }

/* ── COLLECTION TABLE ── */
.collect-table .amt-col { min-width: 90px; }
.collect-table .amt-input { min-width: 80px; max-width: 110px; text-align: right; padding: 4px 8px; font-size: 12px; }

/* ── FORM CARD ── */
.form-card { background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 1px 6px rgba(0,0,0,.07); }

/* ── ACTION BAR ── */
.action-bar { background: #fff; border-radius: 10px; padding: 14px 18px; box-shadow: 0 1px 6px rgba(0,0,0,.07); display: flex; align-items: center; }

/* ── EXTRA SMALL BUTTON ── */
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 5px; cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 3px; text-decoration: none; }
.btn-xs.btn-primary  { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-xs.btn-danger   { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-xs.btn-success  { background: #16a34a; color: #fff; border-color: #16a34a; }
.btn-xs.btn-outline-secondary { background: #fff; color: #6b7280; border-color: #d1d5db; }
.btn-xs:hover { opacity: .85; }

/* ── IMPORT RESULT CARDS ── */
.import-result { display: flex; gap: 14px; flex-wrap: wrap; }
.res-item { background: #fff; border-radius: 10px; padding: 16px 22px; box-shadow: 0 1px 6px rgba(0,0,0,.07); display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 110px; border-top: 4px solid #e5e7eb; }
.res-item span { font-size: 28px; font-weight: 800; color: #111827; line-height: 1; }
.res-item small { font-size: 10.5px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; }
.res-item i { font-size: 18px; margin-bottom: 2px; }
.res-item.green { border-top-color: #16a34a; }
.res-item.green i { color: #16a34a; }
.res-item.blue  { border-top-color: #2563eb; }
.res-item.blue  i { color: #2563eb; }
.res-item.orange{ border-top-color: var(--orange); }
.res-item.orange i { color: var(--orange); }
.res-item.red   { border-top-color: #dc2626; }
.res-item.red   i { color: #dc2626; }

/* ── IMPORT NOTE ── */
.import-note { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 12px 16px; font-size: 12.5px; color: #1e40af; line-height: 1.7; }
.import-note i { color: #2563eb; }

/* ── RESPONSIVE ── */
.topbar-hamburger { display: none; background: none; border: none; color: rgba(255,255,255,.9); font-size: 20px; cursor: pointer; padding: 0 6px; flex-shrink: 0; }
.sidebar-overlay  { display: none; position: fixed; inset: 0; top: var(--topbar-h); background: rgba(0,0,0,.5); z-index: 199; }
.sidebar-overlay.show { display: block; }

/* Tablet: icon-only sidebar */
@media (max-width: 1280px) {
  :root { --sidebar-w: 54px; }
  .nav-section  { display: none; }
  .sidebar .divider { display: none; }
  .sidebar a    { justify-content: center; padding: 10px 0; gap: 0; font-size: 0; border-left: 3px solid transparent; }
  .sidebar a i  { font-size: 16px; width: auto; margin: 0; }
  .sidebar a:hover { background: rgba(255,255,255,.08); border-left-color: var(--orange); }
  .sidebar a.active { border-left-color: var(--orange); }
}

/* Mobile: slide-in sidebar overlay */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .topbar-hamburger { display: block; }
  .sidebar { position: fixed; left: -220px; width: 220px; transition: left .25s; z-index: 200; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); }
  .sidebar.sidebar-open { left: 0; }
  .nav-section  { display: block !important; }
  .sidebar .divider { display: block !important; }
  .sidebar a    { justify-content: flex-start; padding: 8px 14px; gap: 9px; font-size: 13px; border-left: 3px solid transparent; }
  .sidebar a i  { font-size: 12px; width: 15px; }
  .main-content { padding: 14px 16px; }
}
