:root {
  --navy-950: #061a38;
  --navy-900: #08234b;
  --navy-800: #0b3268;
  --blue-700: #1557d0;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --green-700: #15803d;
  --green-600: #16a34a;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;
  --red-700: #c2412d;
  --red-600: #e14c32;
  --red-100: #fee2e2;
  --red-50: #fff5f2;
  --amber-600: #d97706;
  --amber-100: #fef3c7;
  --slate-950: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #fff;
  --shadow: 0 8px 30px rgba(15, 23, 42, .07);
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, .05);
  --radius: 14px;
  --sidebar-width: 252px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--slate-800);
  background: var(--slate-50);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--slate-50); }
body { margin: 0; min-height: 100vh; background: var(--slate-50); color: var(--slate-800); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
input, select, textarea { width: 100%; min-height: 43px; border: 1px solid var(--slate-300); border-radius: 9px; padding: 10px 12px; background: var(--white); color: var(--slate-800); outline: none; transition: .18s ease; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(59, 130, 246, .13); }
input::placeholder, textarea::placeholder { color: var(--slate-400); }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); background: linear-gradient(180deg, var(--navy-950), var(--navy-900)); color: #dce8ff; padding: 18px 13px; display: flex; flex-direction: column; box-shadow: 6px 0 22px rgba(6, 26, 56, .12); }
.brand { display: flex; align-items: center; gap: 11px; padding: 5px 8px 22px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand strong { display: block; color: var(--white); font-size: 15px; }
.brand small { color: #9fb5dc; display: block; font-size: 10px; letter-spacing: .04em; }
.brand-mark { display: inline-grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #4f8cff, #1c58d9); color: white; font-weight: 800; font-size: 12px; box-shadow: 0 6px 16px rgba(37, 99, 235, .3); }
.brand-mark.large { width: 50px; height: 50px; border-radius: 14px; font-size: 16px; }
.nav-list { display: grid; gap: 5px; padding-top: 20px; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 9px 11px; border-radius: 9px; color: #bfd0ef; font-weight: 550; transition: .18s ease; }
.nav-item:hover { color: white; background: rgba(255,255,255,.07); }
.nav-item.active { background: linear-gradient(90deg, #1e64df, #2563eb); color: white; box-shadow: 0 7px 18px rgba(37, 99, 235, .22); }
.nav-icon { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 6px; font-size: 18px; }
.nav-icon.positive { color: #75e89b; }.nav-icon.negative { color: #ff9d8e; }
.sidebar-user { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 16px 7px 2px; display: flex; gap: 10px; align-items: center; }
.sidebar-user-copy { min-width: 0; }.sidebar-user-copy strong, .sidebar-user-copy small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.sidebar-user-copy strong { color: white; font-size: 12px; }.sidebar-user-copy small { color: #92add8; font-size: 10px; }
.avatar { display: inline-grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto; border-radius: 50%; background: linear-gradient(135deg, var(--blue-100), #c7d2fe); color: var(--blue-700); font-weight: 800; font-size: 12px; }
.avatar.small { width: 34px; height: 34px; }.large-avatar { width: 62px; height: 62px; font-size: 17px; }

.app-main { width: calc(100% - var(--sidebar-width)); min-height: 100vh; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; min-height: 72px; padding: 12px 28px; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--slate-200); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar-heading h1 { margin: 0; font-size: 20px; color: var(--slate-950); }.topbar-heading span { color: var(--slate-500); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.quick-add { padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 750; }.quick-add.credit { background: var(--green-50); color: var(--green-700); border: 1px solid #bbf7d0; }.quick-add.debit { background: var(--red-50); color: var(--red-700); border: 1px solid #fed7cf; }
.profile-menu { position: relative; margin-left: 7px; }.profile-trigger { border: 0; background: transparent; display: flex; align-items: center; gap: 8px; color: var(--slate-700); padding: 4px; border-radius: 9px; }.profile-trigger:hover { background: var(--slate-100); }
.profile-copy { text-align: left; min-width: 100px; }.profile-copy strong, .profile-copy small { display: block; }.profile-copy strong { font-size: 12px; }.profile-copy small { font-size: 10px; color: var(--slate-500); }
.dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 9px); width: 170px; padding: 7px; background: white; border: 1px solid var(--slate-200); border-radius: 10px; box-shadow: var(--shadow); }.dropdown-menu.open { display: block; }.dropdown-menu a, .dropdown-menu button { display: block; width: 100%; padding: 9px 10px; color: var(--slate-700); border: 0; background: transparent; border-radius: 7px; text-align: left; }.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--slate-100); }
.mobile-menu { display: none; }
.content { width: 100%; max-width: 1560px; margin: 0 auto; flex: 1; padding: 26px 28px 38px; }
.footer { padding: 18px 28px; border-top: 1px solid var(--slate-200); color: var(--slate-500); font-size: 11px; display: flex; justify-content: space-between; }
.sidebar-backdrop { display: none; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 2px 0 22px; }.page-heading h2 { margin: 1px 0 4px; color: var(--slate-950); font-size: 25px; letter-spacing: -.025em; }.page-heading p { margin: 0; color: var(--slate-500); }.eyebrow { display: block; color: var(--blue-600); font-size: 9px; font-weight: 850; letter-spacing: .14em; margin-bottom: 3px; }.heading-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.button { min-height: 41px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 9px; padding: 9px 15px; font-weight: 700; font-size: 12px; transition: .18s ease; white-space: nowrap; }.button:hover { transform: translateY(-1px); }.button.primary { color: white; background: linear-gradient(135deg, var(--blue-600), var(--blue-700)); box-shadow: 0 5px 13px rgba(37, 99, 235, .2); }.button.primary.debit { background: linear-gradient(135deg, #f05a3c, #cf3c26); }.button.secondary { color: var(--slate-700); background: white; border-color: var(--slate-300); }.button.secondary:hover { background: var(--slate-50); }.button.ghost { color: var(--slate-600); background: transparent; }.button.credit-outline { color: var(--green-700); background: var(--green-50); border-color: #bbf7d0; }.button.danger-outline { color: var(--red-700); background: white; border-color: #fecaca; }.button.large { min-height: 48px; font-size: 14px; }.button.small { min-height: 35px; padding: 7px 11px; }.button.full { width: 100%; }
.icon-button { border: 1px solid var(--slate-200); background: white; color: var(--slate-700); border-radius: 8px; width: 40px; height: 40px; }
.text-link { color: var(--blue-600); font-weight: 700; font-size: 12px; }

.alert { margin: 0 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid; border-radius: 10px; box-shadow: var(--shadow-sm); }.alert.success { background: var(--green-50); border-color: #bbf7d0; color: var(--green-700); }.alert.error { background: var(--red-50); border-color: #fecaca; color: var(--red-700); }.alert.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }.alert button { border: 0; background: transparent; color: inherit; font-size: 18px; }
.panel { background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 20px; overflow: hidden; }.panel-header { min-height: 65px; padding: 16px 18px; border-bottom: 1px solid var(--slate-200); display: flex; align-items: center; justify-content: space-between; gap: 15px; }.panel-header h3 { margin: 0 0 2px; color: var(--slate-950); font-size: 15px; }.panel-header p { margin: 0; color: var(--slate-500); font-size: 11px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }.stat-card { background: white; border: 1px solid var(--slate-200); border-radius: 12px; min-height: 114px; padding: 17px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm); }.stat-icon { width: 49px; height: 49px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; font-size: 23px; font-weight: 700; }.stat-card small, .stat-card span { color: var(--slate-500); font-size: 11px; }.stat-card strong { display: block; margin: 3px 0 1px; font-size: clamp(17px, 1.45vw, 23px); line-height: 1.25; color: var(--slate-950); white-space: nowrap; }.stat-card.credit .stat-icon { background: var(--green-100); color: var(--green-600); }.stat-card.credit strong { color: var(--green-700); }.stat-card.debit .stat-icon { background: var(--red-100); color: var(--red-600); }.stat-card.debit strong { color: var(--red-700); }.stat-card.balance .stat-icon { background: var(--blue-100); color: var(--blue-600); }.stat-card.balance strong { color: var(--blue-700); }.stat-card.activity .stat-icon { background: var(--amber-100); color: var(--amber-600); }.compact-stats .stat-card { min-height: 98px; }.text-debit { color: var(--red-700) !important; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr); gap: 20px; }.bar-chart { min-height: 270px; height: 270px; padding: 24px 24px 11px; display: flex; align-items: stretch; justify-content: space-around; gap: 15px; background-image: linear-gradient(to top, var(--slate-100) 1px, transparent 1px); background-size: 100% 25%; }.bar-group { flex: 1; min-width: 35px; max-width: 74px; display: flex; flex-direction: column; justify-content: flex-end; text-align: center; }.bars { height: 220px; display: flex; justify-content: center; align-items: flex-end; gap: 5px; }.bar { width: 18px; border-radius: 5px 5px 2px 2px; min-height: 3px; transition: .2s ease; }.bar:hover { filter: brightness(.95); }.bar.credit { background: linear-gradient(#4ade80, #16a34a); }.bar.debit { background: linear-gradient(#fb806d, #e14c32); }.bar-group small { margin-top: 8px; color: var(--slate-500); }.legend { display: flex; gap: 13px; color: var(--slate-500); font-size: 10px; }.legend span { display: flex; align-items: center; gap: 5px; }.legend i { width: 8px; height: 8px; border-radius: 3px; }.legend i.green { background: var(--green-600); }.legend i.red { background: var(--red-600); }.empty-chart { margin: auto; color: var(--slate-400); }
.donut-wrap { min-height: 270px; padding: 24px 18px; display: grid; grid-template-columns: 155px 1fr; align-items: center; gap: 22px; }.donut { width: 150px; height: 150px; border-radius: 50%; background: var(--slate-200); display: grid; place-items: center; position: relative; }.donut::after { content: ''; position: absolute; width: 90px; height: 90px; background: white; border-radius: 50%; }.donut div { position: relative; z-index: 1; text-align: center; }.donut small, .donut strong { display: block; }.donut small { font-size: 10px; color: var(--slate-500); }.donut strong { font-size: 11px; color: var(--slate-950); }.category-legend { display: grid; gap: 11px; min-width: 0; }.category-legend div { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; }.category-legend span { display: flex; gap: 7px; min-width: 0; color: var(--slate-600); }.category-legend strong { color: var(--slate-800); white-space: nowrap; }.category-legend i, .category-dot { display: inline-block; width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; margin-right: 6px; }

.table-wrap { width: 100%; overflow-x: auto; }table { border-collapse: collapse; width: 100%; min-width: 780px; }th, td { padding: 11px 13px; border-bottom: 1px solid var(--slate-200); text-align: left; vertical-align: middle; }th { color: var(--slate-600); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; background: var(--slate-50); }td { color: var(--slate-700); font-size: 11px; }tbody tr:last-child td { border-bottom: 0; }tbody tr:hover td { background: #fbfdff; }td strong { color: var(--slate-900); }td small { display: block; color: var(--slate-500); max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.align-right { text-align: right; }.amount { font-weight: 800; white-space: nowrap; }.amount.credit { color: var(--green-700); }.amount.debit { color: var(--red-700); }.muted-row { opacity: .62; }.badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 850; letter-spacing: .04em; }.badge.large { padding: 6px 10px; font-size: 10px; }.badge.credit { color: var(--green-700); background: var(--green-100); }.badge.debit { color: var(--red-700); background: var(--red-100); }.status { display: inline-flex; border: 0; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 750; }.status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; }.status.posted { color: var(--green-700); background: var(--green-100); }.status.posted::before { background: var(--green-600); }.status.reversed { color: var(--red-700); background: var(--red-100); }.status.reversed::before { background: var(--red-600); }.table-action, .row-actions a, .row-actions button { color: var(--blue-600); font-weight: 750; font-size: 10px; }.row-actions { display: flex; align-items: center; gap: 10px; }.row-actions form { display: inline; }.row-actions button { background: transparent; border: 0; padding: 0; }.user-cell { display: flex; align-items: center; gap: 9px; }.role-badge { padding: 4px 7px; color: var(--blue-700); background: var(--blue-50); border-radius: 6px; font-size: 9px; font-weight: 750; }.pagination { padding: 13px 16px; border-top: 1px solid var(--slate-200); display: flex; align-items: center; justify-content: space-between; color: var(--slate-500); font-size: 11px; }.pagination div { display: flex; gap: 8px; }.pagination a { color: var(--blue-600); border: 1px solid var(--slate-200); padding: 6px 9px; border-radius: 7px; background: white; }
.empty-state { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px; text-align: center; color: var(--slate-500); }.empty-state > span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: var(--slate-100); color: var(--blue-600); font-size: 21px; font-weight: 800; }.empty-state h4, .empty-state h2 { margin: 12px 0 4px; color: var(--slate-900); }.empty-state p { margin: 0 0 15px; }.empty-state.compact { min-height: 175px; }.page-empty { min-height: 65vh; }

.filter-panel { overflow: visible; }.filters { padding: 14px; display: grid; grid-template-columns: minmax(210px, 2fr) repeat(4, minmax(130px, 1fr)) auto; align-items: end; gap: 10px; }.filters.reports { grid-template-columns: repeat(6, minmax(115px, 1fr)) auto; }.filters.user-filters { grid-template-columns: minmax(250px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) auto; }.filters label span, .field > span { display: block; color: var(--slate-600); font-size: 10px; font-weight: 750; margin: 0 0 5px; }.filters input, .filters select { min-height: 40px; padding: 8px 10px; font-size: 11px; }.filter-actions { display: flex; align-items: center; gap: 4px; }
.form-panel { overflow: visible; }.form-grid { padding: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 19px; }.field small { display: block; margin-top: 4px; color: var(--slate-500); font-size: 9px; }.field.full { grid-column: 1 / -1; }.amount-input { font-size: 18px; font-weight: 750; }.file-input { padding: 8px; }.form-actions { border-top: 1px solid var(--slate-200); padding: 14px 20px; display: flex; justify-content: flex-end; gap: 9px; }.narrow-form { max-width: 900px; }.permission-summary { margin: 0 20px 20px; padding: 16px; background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 10px; }.permission-summary h4 { margin: 0 0 9px; color: var(--slate-900); }.permission-summary div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 5px 0; font-size: 11px; }.permission-summary span { color: var(--slate-600); }
.transaction-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(350px, .8fr); gap: 20px; align-items: start; }.receipt-preview-panel { position: sticky; top: 92px; }.mini-receipt { margin: 20px; padding: 24px 22px; border: 1px solid var(--slate-200); border-top: 4px solid var(--blue-600); box-shadow: 0 10px 25px rgba(15,23,42,.08); background: white; }.receipt-brand { display: flex; align-items: center; gap: 9px; color: var(--slate-900); }.receipt-preview-title { margin: 25px 0 17px; text-align: center; }.receipt-preview-title small, .receipt-preview-title strong { display: block; }.receipt-preview-title small { margin: 8px 0 2px; color: var(--slate-500); text-transform: uppercase; font-size: 9px; letter-spacing: .1em; }.receipt-preview-title strong { font-size: 17px; color: var(--slate-950); }.receipt-preview-amount { padding: 15px; background: var(--slate-50); border-radius: 10px; text-align: center; }.receipt-preview-amount small, .receipt-preview-amount strong { display: block; }.receipt-preview-amount small { color: var(--slate-500); font-size: 9px; }.receipt-preview-amount strong { color: var(--blue-700); font-size: 25px; }.mini-receipt dl { margin: 18px 0 0; }.mini-receipt dl div { display: grid; grid-template-columns: 115px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--slate-200); }.mini-receipt dt { color: var(--slate-500); font-size: 9px; text-transform: uppercase; }.mini-receipt dd { margin: 0; color: var(--slate-800); font-size: 10px; text-align: right; overflow-wrap: anywhere; }.receipt-note { margin: 18px 0 0; text-align: center; color: var(--slate-400); font-size: 8px; }

.receipt-document { width: min(900px, 100%); margin: 0 auto 18px; padding: 42px 50px; background: white; border: 1px solid var(--slate-200); border-radius: 4px; box-shadow: var(--shadow); }.receipt-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 24px; border-bottom: 2px solid var(--navy-900); }.receipt-office { display: flex; gap: 14px; }.receipt-office h2 { margin: 0 0 5px; color: var(--slate-950); }.receipt-office p { margin: 0; color: var(--slate-500); font-size: 10px; line-height: 1.6; }.receipt-meta { text-align: right; }.receipt-meta strong, .receipt-meta small { display: block; }.receipt-meta strong { margin-top: 7px; font-size: 17px; color: var(--slate-950); }.receipt-meta small { color: var(--slate-500); }.receipt-reversed { margin: 17px 0; padding: 9px; border: 2px dashed var(--red-600); color: var(--red-700); text-align: center; font-weight: 900; letter-spacing: .08em; transform: rotate(-1deg); }.receipt-amount { margin: 28px 0; padding: 25px; background: var(--slate-50); text-align: center; }.receipt-amount small, .receipt-amount strong, .receipt-amount span { display: block; }.receipt-amount small { color: var(--slate-500); font-size: 9px; letter-spacing: .1em; }.receipt-amount strong { color: var(--blue-700); font-size: 34px; margin: 4px 0; }.receipt-amount span { color: var(--slate-500); font-size: 10px; }.receipt-details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--slate-200); }.receipt-details dl div { padding: 13px 15px; border-bottom: 1px solid var(--slate-200); }.receipt-details dl div:nth-child(odd) { border-right: 1px solid var(--slate-200); }.receipt-details dt { color: var(--slate-500); font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }.receipt-details dd { margin: 3px 0 0; color: var(--slate-900); font-weight: 650; }.receipt-details dd small { display: block; color: var(--slate-500); font-weight: 400; }.receipt-notes { margin-top: 17px; padding: 14px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; }.receipt-notes p { margin: 5px 0 0; color: var(--slate-600); }.receipt-footer { margin-top: 31px; padding-top: 17px; border-top: 1px solid var(--slate-300); color: var(--slate-500); font-size: 9px; text-align: center; }.receipt-footer div { margin-top: 14px; display: flex; justify-content: space-between; }.receipt-actions { max-width: 900px; margin: 0 auto; display: flex; justify-content: flex-end; gap: 9px; }

.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }.print-only { display: none; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }.settings-grid > .panel { margin: 0; }.master-list-panel { overflow: visible; }.inline-create { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(90px, .7fr) auto; gap: 8px; padding: 14px; border-bottom: 1px solid var(--slate-200); }.inline-create.category-create, .inline-create.account-create { grid-template-columns: minmax(0, 1.7fr) minmax(90px, .7fr) 48px auto; }.inline-create input, .inline-create select { min-height: 39px; padding: 8px 10px; font-size: 11px; }.inline-create input[type="color"] { padding: 3px; }.master-list { max-height: 430px; overflow: auto; }.master-list > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 15px; border-bottom: 1px solid var(--slate-200); }.master-list > div:last-child { border-bottom: 0; }.master-list strong, .master-list small { display: block; }.master-list strong { color: var(--slate-800); font-size: 11px; }.master-list small { color: var(--slate-500); font-size: 9px; }
.audit-list article { display: flex; gap: 12px; padding: 14px 17px; border-bottom: 1px solid var(--slate-200); }.audit-list article:last-child { border-bottom: 0; }.audit-icon { width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--blue-50); color: var(--blue-700); font-weight: 850; text-transform: uppercase; }.audit-copy { min-width: 0; }.audit-copy div { display: flex; gap: 9px; align-items: baseline; }.audit-copy strong { color: var(--slate-900); }.audit-copy span { color: var(--slate-600); }.audit-copy small { color: var(--slate-500); font-size: 9px; }.profile-hero { padding: 20px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--slate-200); }.profile-hero h3 { margin: 0; color: var(--slate-950); }.profile-hero p { margin: 2px 0 0; color: var(--slate-500); }

/* Sales invoice and receipt-book components */
.legend i.blue { background: var(--blue-600); }
.bar.sales { background: linear-gradient(#60a5fa, #2563eb); }
.badge.sale { color: var(--blue-700); background: var(--blue-100); }
.status.cleared { color: var(--green-700); background: var(--green-100); }.status.cleared::before { background: var(--green-600); }
.status.partially_paid { color: #9a6200; background: var(--amber-100); }.status.partially_paid::before { background: var(--amber-600); }
.status.unpaid { color: var(--red-700); background: var(--red-100); }.status.unpaid::before { background: var(--red-600); }
.status.returned, .status.cancelled { color: var(--slate-600); background: var(--slate-200); }.status.returned::before, .status.cancelled::before { background: var(--slate-500); }
.invoice-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(330px, .72fr); gap: 20px; align-items: start; }
.invoice-layout > * { min-width: 0; }
.invoice-summary-panel { position: sticky; top: 92px; }
.form-grid.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.invoice-items-panel { overflow: visible; }
.invoice-items-table { overflow-x: auto; padding: 0 18px 18px; }
.invoice-item-head, .invoice-item-row { min-width: 900px; display: grid; grid-template-columns: minmax(175px, 1.4fr) minmax(170px, 1.3fr) 80px 115px 80px 130px 32px; gap: 8px; align-items: center; }
.invoice-item-head { padding: 11px 3px 7px; color: var(--slate-500); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
.invoice-item-row { padding: 10px 3px; border-top: 1px solid var(--slate-200); }
.invoice-item-row input, .invoice-item-row select { min-height: 40px; padding: 8px 9px; font-size: 11px; }
.invoice-item-row output { display: block; color: var(--slate-900); font-size: 11px; font-weight: 800; text-align: right; white-space: nowrap; }
.remove-item { width: 30px; height: 30px; border: 0; border-radius: 7px; background: var(--red-50); color: var(--red-700); font-size: 18px; }
.item-alert { margin: 0 18px 18px; }
.invoice-preview { margin: 16px; padding: 21px 18px; }
.invoice-preview-meta div { grid-template-columns: 90px 1fr !important; }
.summary-lines { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--slate-200); }
.summary-lines > div { display: flex; justify-content: space-between; gap: 15px; padding: 6px 0; color: var(--slate-600); font-size: 10px; }
.summary-lines .grand { margin-top: 6px; padding: 13px 0; border-top: 2px solid var(--slate-900); color: var(--slate-950); font-size: 13px; }
.summary-lines .grand strong { color: var(--blue-700); font-size: 18px; }
.summary-lines .due { margin-top: 5px; padding: 10px; border-radius: 8px; background: var(--red-50); color: var(--red-700); }
.filters.invoice-filters, .filters.sales-report-filters { grid-template-columns: minmax(190px, 1.6fr) repeat(5, minmax(115px, 1fr)) auto; }
.invoice-document { max-width: 980px; }
.invoice-party-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; margin: 27px 0; }
.invoice-party-grid small { color: var(--blue-600); font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.invoice-party-grid h3 { margin: 4px 0; color: var(--slate-950); font-size: 17px; }
.invoice-party-grid p { margin: 0; color: var(--slate-500); font-size: 10px; }
.invoice-party-grid dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.invoice-party-grid dl div { padding: 8px 10px; background: var(--slate-50); border-radius: 7px; }
.invoice-party-grid dt { color: var(--slate-500); font-size: 8px; text-transform: uppercase; }
.invoice-party-grid dd { margin: 2px 0 0; color: var(--slate-800); font-size: 10px; font-weight: 650; overflow-wrap: anywhere; }
.invoice-lines { margin: 5px 0 24px; border: 1px solid var(--slate-200); }
.invoice-lines table { min-width: 700px; }
.invoice-total-area { display: grid; grid-template-columns: 1fr 310px; gap: 35px; align-items: start; }
.invoice-comments { min-height: 80px; color: var(--slate-600); font-size: 10px; }.invoice-comments p { margin-top: 5px; }
.invoice-total-area dl { margin: 0; padding: 13px 16px; background: var(--slate-50); }
.invoice-total-area dl div { display: flex; justify-content: space-between; gap: 15px; padding: 6px 0; }.invoice-total-area dt { color: var(--slate-600); }.invoice-total-area dd { margin: 0; color: var(--slate-900); font-weight: 750; }
.invoice-total-area .grand { margin-top: 6px; padding: 12px 0; border-top: 2px solid var(--slate-900); font-size: 15px; }.invoice-total-area .grand dd { color: var(--blue-700); }
.invoice-total-area .due { color: var(--red-700); }.invoice-total-area .due dd { color: var(--red-700); }
.payment-receipt-block { margin-top: 38px; padding-top: 2px; }
.receipt-tear-line { position: relative; margin: 0 0 24px; border-top: 1px dashed var(--slate-400); text-align: center; }.receipt-tear-line span { position: relative; top: -9px; padding: 0 12px; background: white; color: var(--slate-500); font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.payment-receipt-head { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 18px; background: var(--blue-50); border: 1px solid var(--blue-100); }.payment-receipt-head div:last-child { text-align: right; }.payment-receipt-head small, .payment-receipt-head strong { display: block; }.payment-receipt-head small { color: var(--slate-500); font-size: 8px; }.payment-receipt-head strong { color: var(--blue-700); font-size: 19px; }
.payment-receipt-block > dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid var(--slate-200); border-top: 0; }.payment-receipt-block > dl div { padding: 10px 14px; border-bottom: 1px solid var(--slate-200); }.payment-receipt-block > dl div:nth-child(odd) { border-right: 1px solid var(--slate-200); }.payment-receipt-block dt { color: var(--slate-500); font-size: 8px; text-transform: uppercase; }.payment-receipt-block dd { margin: 2px 0 0; color: var(--slate-900); font-weight: 650; font-size: 10px; }
.receipt-actions form { display: flex; align-items: center; gap: 8px; }.return-reason { width: 240px; min-height: 41px; }
.sales-settings-grid .company-settings { grid-column: 1 / -1; }
.master-create-form { border-bottom: 1px solid var(--slate-200); }.compact-form { padding: 14px; gap: 11px; }.master-create-form .form-actions { padding: 10px 14px; }
.detailed-master-list { max-height: 360px; }

.auth-page { background: white; }.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(420px, .95fr); }.auth-aside { position: relative; overflow: hidden; background: linear-gradient(145deg, #061a38 0%, #0b3268 65%, #1658b3 100%); color: white; }.auth-aside::before, .auth-aside::after { content: ''; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.11); }.auth-aside::before { width: 520px; height: 520px; right: -230px; top: -130px; }.auth-aside::after { width: 400px; height: 400px; left: -220px; bottom: -150px; }.auth-aside-inner { position: relative; z-index: 1; max-width: 580px; min-height: 100%; padding: 55px clamp(40px, 6vw, 90px); display: flex; flex-direction: column; justify-content: center; }.auth-logo { position: absolute; top: 38px; left: clamp(40px, 6vw, 90px); display: flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 750; }.auth-aside h1 { font-size: clamp(38px, 4.8vw, 67px); line-height: 1.05; letter-spacing: -.045em; margin: 0 0 22px; }.auth-aside p { color: #bfd3f5; font-size: 16px; max-width: 500px; }.auth-features { display: grid; gap: 12px; margin-top: 28px; color: #d9e7ff; }.auth-card-wrap { display: grid; place-items: center; padding: 35px; background: white; }.auth-card { width: min(430px, 100%); }.auth-card h2 { margin: 3px 0 4px; font-size: 30px; color: var(--slate-950); }.auth-card > p { margin: 0 0 22px; color: var(--slate-500); }.auth-mobile-logo { display: none; }.stack-form { display: grid; gap: 16px; }.stack-form label { color: var(--slate-700); font-weight: 700; font-size: 11px; }.stack-form label input { margin-top: 6px; }.password-field { position: relative; display: block; }.password-field button { position: absolute; right: 7px; top: 13px; border: 0; background: transparent; color: var(--blue-600); font-size: 10px; font-weight: 750; }.password-field input { padding-right: 55px; }.demo-note { margin-top: 18px; padding: 11px; background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 8px; color: var(--slate-500); font-size: 10px; }.demo-note strong { color: var(--slate-700); }

@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .report-grid { grid-template-columns: 1fr; }
  .category-panel .donut-wrap { grid-template-columns: 180px 1fr; }
  .filters, .filters.reports, .filters.invoice-filters, .filters.sales-report-filters { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .filters.user-filters { grid-template-columns: 2fr 1fr 1fr; }.filters.user-filters .filter-actions { grid-column: 1 / -1; }
  .transaction-layout, .invoice-layout { grid-template-columns: 1fr; }.receipt-preview-panel, .invoice-summary-panel { position: static; }.mini-receipt, .invoice-preview { max-width: 570px; margin-inline: auto; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-102%); transition: transform .2s ease; }.sidebar-open .sidebar { transform: translateX(0); }.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(15,23,42,.45); }.app-main { width: 100%; margin-left: 0; }.mobile-menu { display: grid; place-items: center; }.topbar { padding: 10px 16px; }.content { padding: 22px 17px 35px; }.quick-add { display: none; }.profile-copy { display: none; }.settings-grid { grid-template-columns: 1fr; }.sales-settings-grid .company-settings { grid-column: auto; }.auth-shell { grid-template-columns: 1fr; }.auth-aside { display: none; }.auth-mobile-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 33px; color: var(--slate-900); font-weight: 750; }.auth-card-wrap { padding: 30px 20px; }
}

@media (max-width: 650px) {
  body { font-size: 13px; }.topbar-heading span { display: none; }.topbar-heading h1 { font-size: 16px; }.content { padding-inline: 12px; }.page-heading { flex-direction: column; gap: 13px; }.page-heading h2 { font-size: 22px; }.heading-actions, .heading-actions .button { width: 100%; }.stat-grid { grid-template-columns: 1fr; }.stat-card { min-height: 100px; }.filters, .filters.reports, .filters.user-filters, .filters.invoice-filters, .filters.sales-report-filters { grid-template-columns: 1fr; }.filters.user-filters .filter-actions { grid-column: auto; }.filter-actions .button { flex: 1; }.form-grid, .form-grid.three-columns { grid-template-columns: 1fr; padding: 15px; }.field.full { grid-column: auto; }.form-actions { padding: 13px 15px; flex-direction: column-reverse; }.form-actions .button { width: 100%; }.donut-wrap, .category-panel .donut-wrap { grid-template-columns: 1fr; justify-items: center; }.category-legend { width: 100%; }.bar-chart { padding-inline: 10px; }.bar { width: 13px; }.mini-receipt { margin: 12px; padding: 18px 14px; }.receipt-document { padding: 25px 18px; }.receipt-header { flex-direction: column; }.receipt-meta { text-align: left; }.receipt-details dl { grid-template-columns: 1fr; }.receipt-details dl div:nth-child(odd) { border-right: 0; }.invoice-party-grid, .invoice-total-area { grid-template-columns: 1fr; }.invoice-party-grid dl { grid-template-columns: 1fr; }.payment-receipt-block > dl { grid-template-columns: 1fr; }.payment-receipt-block > dl div:nth-child(odd) { border-right: 0; }.payment-receipt-head { grid-template-columns: 1fr; }.payment-receipt-head div:last-child { text-align: left; }.receipt-footer div { flex-direction: column; gap: 4px; }.receipt-actions { flex-direction: column; }.receipt-actions .button, .receipt-actions form, .receipt-actions button { width: 100%; }.receipt-actions form { flex-direction: column; }.return-reason { width: 100%; }.inline-create, .inline-create.category-create, .inline-create.account-create { grid-template-columns: 1fr; }.audit-copy div { display: block; }.footer { flex-direction: column; gap: 5px; }.permission-summary div { grid-template-columns: 1fr; gap: 0; }.profile-trigger > span:last-child { display: none; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: white; color: #111; }
  .sidebar, .topbar, .footer, .no-print, .sidebar-backdrop, .alert { display: none !important; }
  .app-main { width: 100%; margin: 0; }.content { max-width: none; padding: 0; }.panel, .stat-card { box-shadow: none; break-inside: avoid; }.print-only { display: block; }.report-title { margin-bottom: 16px; }.report-title h1 { margin-bottom: 3px; }.report-title p { margin: 0; }.receipt-document { border: 0; box-shadow: none; margin: 0; width: 100%; padding: 0; }.receipt-amount strong { color: #111; }.report-grid { grid-template-columns: 1fr; }.stat-grid { grid-template-columns: repeat(4, 1fr); }.stat-card { min-height: 85px; padding: 10px; }.stat-card .stat-icon { display: none; }.stat-card strong { font-size: 14px; }table { min-width: 0; }th, td { padding: 6px; font-size: 8px; }
}
