:root {
  --ink: #172033;
  --muted: #6b7280;
  --line: #e6e9ef;
  --surface: #fff;
  --page: #f4f6fa;
  --nav: #101827;
  --nav-soft: #1e293b;
  --primary: #7c3fec;
  --primary-dark: #644fe8;
  --success: #047857;
  --success-bg: #ecfdf5;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --warning: #a16207;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.05);
}
* {
  box-sizing: border-box;
}
html {
  font-size: 15px;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
}
.app-shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  background: var(--nav);
  color: #dce4f2;
  padding: 22px 14px;
  overflow-y: auto;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  padding: 0 10px 24px;
}
.brand:hover {
  text-decoration: none;
}
.brand span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand small {
  color: #94a3b8;
  font-size: 0.8rem;
  margin-top: 4px;
  max-width: 165px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}
.brand-mark.large {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 1.35rem;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar nav p {
  margin: 20px 12px 6px;
  color: #64748b;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.sidebar nav a {
  color: #cbd5e1;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 0.9rem;
}
.sidebar nav a:hover,
.sidebar nav a.active {
  background: var(--nav-soft);
  color: #fff;
  text-decoration: none;
}
.sidebar nav a.active {
  box-shadow: inset 3px 0 #60a5fa;
}
.main {
  margin-left: 250px;
  min-height: 100vh;
}
.topbar {
  height: 78px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.topbar h1 {
  font-size: 1.25rem;
  margin: 0;
  letter-spacing: -0.02em;
}
.topbar > div:first-of-type small {
  color: var(--muted);
}
.topbar-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar-user > span {
  display: flex;
  flex-direction: column;
  text-align: right;
  font-size: 0.85rem;
}
.topbar-user small {
  color: var(--muted);
  font-size: 0.8rem;
}
.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f2f4f7;
  border: 1px solid #e4e7eb;
  color: #344054;
  font-size: 0.95rem;
  margin-right: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
  outline: none;
}
.menu-button:hover {
  background-color: #eaecf0;
  border-color: #d0d5dd;
  color: #1d2939;
}
.menu-button:active {
  transform: scale(0.95);
  background-color: #e4e7ec;
}
.menu-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(100, 79, 232, 0.25);
}
.content {
  padding: 18px 22px;
  max-width: 100%;
  margin: 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* Cash Book - Modern & Clean */
#cash-book {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e6e9ef;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

#cash-book .card-head {
    padding: 22px 28px 16px;
    border-bottom: 1px solid #f0f2f6;
    margin-bottom: 0;
}

#cash-book .card-head h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0b1e39;
    letter-spacing: -0.01em;
    margin: 0;
}

#cash-book .card-head p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 2px 0 0;
}

.cash-dashboard-container {
    padding: 0 28px 24px;
}

/* Summary Bar */
.cash-summary-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px 0 18px;
    border-bottom: 1px solid #f0f2f6;
    margin-bottom: 18px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-item .label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.summary-item .value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #172033;
}

.summary-item.highlight {
    background: #f8fafc;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #e6e9ef;
}

.summary-item .value.negative {
    color: #b91c1c;
}

/* Filters */
.cash-filters {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding: 0 0 18px;
    border-bottom: 1px solid #f0f2f6;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group label span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #d5dae3;
    border-radius: 8px;
    font-size: 0.85rem;
    background: #ffffff;
    color: #172033;
    width: 150px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.filter-group input[type="date"]:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
    outline: none;
}

.search-group {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.search-input {
    padding: 8px 14px;
    border: 1px solid #d5dae3;
    border-radius: 8px;
    font-size: 0.85rem;
    background: #ffffff;
    color: #172033;
    width: 220px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
    outline: none;
}

.search-input::placeholder {
    color: #9aa3b5;
}

.btn-view {
    padding: 8px 24px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
    height: 40px;
    white-space: nowrap;
}

.btn-view:hover {
    background: #1d4ed8;
}

/* Table */
.table-container {
    border-radius: 10px;
    border: 1px solid #e6e9ef;
    overflow: hidden;
    margin-bottom: 16px;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.table-container table thead {
    background: #f8fafc;
}

.table-container table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #e6e9ef;
    white-space: nowrap;
}

.table-container table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f6;
    color: #172033;
    vertical-align: middle;
}

.table-container table tbody tr:last-child td {
    border-bottom: none;
}

.table-container table tbody tr:hover {
    background: #fafcff;
}

.table-container .number {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center !important;
    padding: 40px 16px !important;
}

.empty-state svg {
    display: block;
    margin: 0 auto 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9rem;
    color: #9aa3b5;
    font-weight: 500;
    margin: 0;
}

/* Table Footer */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.entries-info {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
}

.footer-totals {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-totals .total-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-totals .total-amount {
    font-size: 0.85rem;
    font-weight: 700;
    color: #172033;
    min-width: 70px;
    text-align: right;
}

/* Responsive */
@media (max-width: 1024px) {
    .cash-summary-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 820px) {
    .cash-dashboard-container {
        padding: 0 20px 20px;
    }
    
    .cash-summary-bar {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .cash-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .filter-group {
        flex-wrap: wrap;
    }
    
    .filter-group input[type="date"] {
        width: 100%;
        min-width: 120px;
    }
    
    .search-group {
        flex-wrap: wrap;
    }
    
    .search-input {
        width: 100%;
        flex: 1;
    }
    
    .btn-view {
        width: 100%;
    }
}

@media (max-width: 600px) {
    #cash-book .card-head {
        padding: 18px 18px 12px;
    }
    
    .cash-dashboard-container {
        padding: 0 16px 16px;
    }
    
    .cash-summary-bar {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px 0;
    }
    
    .summary-item.highlight {
        padding: 6px 12px;
    }
    
    .table-container {
        border-radius: 8px;
    }
    
    .table-container table th,
    .table-container table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .table-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .footer-totals {
        width: 100%;
        justify-content: flex-start;
    }
}
.card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.page-actions:has(> .button-group:only-child),
.page-actions.page-actions-end {
  justify-content: flex-end;
}
.button-group {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 14px;
  font-weight: 650;
  font-size: 0.86rem;
  cursor: pointer;
  white-space: nowrap;
}
.button i,
.button .fa,
.button .fas,
.button .far,
.button .fa-solid,
.button .fa-regular,
.button svg {
  font-size: 0.95em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.button:hover {
  text-decoration: none;
}
.button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.button.primary:hover {
  background: var(--primary-dark);
}
.button.ghost {
  background: #fff;
  border-color: #d7dce5;
  color: #344054;
}
.button.wide {
  width: 100%;
  padding: 11px;
}
.button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.button.danger:hover {
  background: #991b1b;
  border-color: #991b1b;
}
.button.success {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.button.success:hover {
  background: #059669;
  border-color: #059669;
}
.link-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}
.icon-button {
  border: 0;
  background: none;
  font-size: 1.35rem;
  cursor: pointer;
}
.danger-text {
  color: var(--danger);
}
.alert {
  padding: 12px 15px;
  border-radius: 10px;
  margin: 0 0 18px;
  border: 1px solid;
}
.alert ul {
  margin: 6px 0 0;
}
.alert.success {
  background: var(--success-bg);
  border-color: #a7f3d0;
  color: #065f46;
}
.alert.danger {
  background: var(--danger-bg);
  border-color: #fecaca;
  color: #991b1b;
}
.alert.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: #667085;
  background: #fafbfc;
  white-space: nowrap;
}
tbody tr:hover {
  background: #fafcff;
}
td strong,
td small {
  display: block;
}
td small {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2px;
}
tfoot th {
  font-size: 0.84rem;
  color: var(--ink);
}
.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.positive-number {
  color: var(--success);
}
.negative-number {
  color: var(--danger);
}
.actions {
  text-align: right;
}
.empty,
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 36px;
}
.empty-state h2 {
  color: var(--ink);
  margin: 0 0 6px;
}
.status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f2f4f7;
  color: #475467;
}
.status.positive {
  background: var(--success-bg);
  color: var(--success);
}
.status.negative {
  background: var(--danger-bg);
  color: var(--danger);
}
.pagination {
  padding: 14px 18px;
}
.pagination nav > div:first-child {
  display: none;
}
.pagination nav > div:last-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pagination nav span,
.pagination nav a {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: #344054;
}
.pagination nav span[aria-current="page"] span {
  background: #eff6ff;
  color: var(--primary);
}
.filters {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}
.filters label {
  font-size: 0.8rem;
}
.filters input,
.filters select {
  min-width: 150px;
}
.form-card {
  padding: 24px;
}
.form-card.compact {
  align-self: start;
}
.form-card.narrow {
  max-width: 850px;
  margin: 0 auto;
}
.form-card > label,
.form-card.compact > label {
  display: flex;
  margin-bottom: 16px;
}
.form-grid {
  padding-bottom: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px 18px;
}
.form-grid .span-2 {
  grid-column: span 2;
}
.form-grid .span-3 {
  grid-column: span 3;
}
.form-grid .span-4 {
  grid-column: span 4;
}
label {
  display: flex;
  flex-direction: column;
  /* align-items: flex-start; */
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 650;
  color: #475467;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #d5dae3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #93b4f8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
input[readonly] {
  background: #f3f4f6;
  color: #667085;
}
.check {
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
}
.check input {
  width: auto;
}
.check small,
label small {
  color: var(--muted);
  font-weight: 400;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}
.split-form {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 20px;
}
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tabs a {
  color: #667085;
  padding: 10px 13px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.stat span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 650;
}
.stat strong {
  font-size: 1.55rem;
  letter-spacing: -0.035em;
  margin: 8px 0 4px;
}
.stat small {
  font-size: 0.8rem;
  color: #98a2b3;
}
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  gap: 20px;
}
.snapshot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 22px;
}
.snapshot div {
  padding: 18px;
  background: #f8fafc;
  border-radius: 11px;
  text-align: center;
}
.snapshot strong,
.snapshot span {
  display: block;
}
.snapshot strong {
  font-size: 1.7rem;
}
.snapshot span {
  color: var(--muted);
  font-size: 0.8rem;
}
.quick-links {
  padding: 0 22px 22px;
  display: flex;
  flex-direction: column;
}
.quick-links a {
  display: flex;
  justify-content: space-between;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}
.line-editor {
  margin-bottom: 20px;
}
.line-table select {
  min-width: 260px;
}
.line-table .number-input {
  min-width: 100px;
}
.line-editor > .button {
  margin-top: 12px;
}
.document-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.document-footer {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 16px;
  margin: 20px 0;
}
.document-footer label {
  max-width: 150px;
}
.grand-total {
  background: #eff6ff;
  color: #1e40af;
  border-radius: 11px;
  padding: 12px 18px;
  min-width: 190px;
  text-align: right;
}
.grand-total span,
.grand-total strong {
  display: block;
}
.grand-total span {
  font-size: 0.8rem;
}
.grand-total strong {
  font-size: 1.35rem;
}
.invoice,
.voucher {
  max-width: 1100px;
  margin: 0 auto;
  padding: 34px;
}
.invoice-head,
.voucher header {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 24px;
}
.invoice-head h2,
.voucher h2 {
  margin: 0;
}
.invoice-head p,
.voucher p {
  margin: 4px 0;
  color: var(--muted);
}
.invoice-head > div:last-child,
.voucher header > div:last-child {
  text-align: right;
}
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: var(--primary);
}
.invoice-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 26px 0;
}
.invoice-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}
.invoice-meta strong {
  display: block;
  margin: 5px 0;
}
.invoice-meta p {
  margin: 2px 0;
  color: var(--muted);
}
dl {
  margin: 0;
}
.invoice-meta dl,
.details {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 7px 18px;
}
.invoice-meta dt,
.details dt {
  color: var(--muted);
}
.invoice-meta dd,
.details dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}
.invoice-bottom {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 420px);
  gap: 40px;
  padding-top: 26px;
}
.totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 20px;
}
.totals dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.totals .grand {
  font-size: 1.05rem;
  font-weight: 800;
  border-top: 2px solid var(--ink);
  padding-top: 10px;
}
.voucher {
  max-width: 850px;
}
.voucher-amount {
  margin: 28px 0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.voucher-amount strong {
  font-size: 1.5rem;
}
.details {
  gap: 13px 24px;
}
.signature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 70px;
}
.signature-row span {
  border-top: 1px solid #98a2b3;
  text-align: center;
  padding-top: 8px;
  color: var(--muted);
}
.document-heading {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 22px;
}
.document-heading span,
.document-heading strong {
  display: block;
}
.document-heading span {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
}
.document-note {
  padding: 0 20px 16px;
}
.report-heading {
  text-align: center;
  padding: 24px;
}
.report-heading h2 {
  margin: 0;
}
.report-heading p {
  margin: 4px 0;
  color: var(--muted);
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}
.muted {
  color: var(--muted);
  margin: 0;
}
.guest-body {
  position: relative;
  min-height: 100vh;
  background-color: #0b1329;
  background-image: 
    linear-gradient(135deg, rgba(10, 18, 38, 0.86) 0%, rgba(15, 23, 42, 0.80) 50%, rgba(8, 12, 22, 0.92) 100%),
    var(--login-bg, url('images/login-hero.jpg'));
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr minmax(360px, 480px);
  align-items: center;
  max-width: 1100px;
  margin: auto;
  padding: 40px;
  gap: 80px;
}
.login-brand {
  color: #fff;
}
.login-brand h1 {
  font-size: 3rem;
  letter-spacing: -0.05em;
  margin: 22px 0 10px;
}
.login-brand p {
  font-size: 1.1rem;
  color: #bfdbfe;
  max-width: 520px;
}
.login-card {
  background: #fff;
  padding: 34px;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.login-card h2 {
  margin: 0;
  font-size: 1.5rem;
}
.login-card p {
  margin: -10px 0 2px;
}
.login-card .alert {
  margin: 0;
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-column {
    grid-template-columns: 1fr;
  }
  .login-wrap {
    gap: 35px;
  }
}
@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid .span-3,
  .form-grid .span-4 {
    grid-column: span 2;
  }
}
@media (max-width: 820px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .menu-open .sidebar {
    transform: none;
  }
  .main {
    margin-left: 0;
  }
  .menu-button {
    display: inline-flex;
  }
  .topbar {
    padding: 0 16px;
  }
  .content {
    padding: 18px;
  }
  .topbar-user > span {
    display: none;
  }
  .page-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .filters {
    align-items: stretch;
  }
  .filters input,
  .filters select {
    min-width: 0;
  }
  .split-form,
  .invoice-bottom {
    grid-template-columns: 1fr;
  }
  .invoice {
    padding: 20px;
  }
  .login-wrap {
    display: flex;
    justify-content: center;
    padding: 22px;
  }
  .login-brand {
    display: none;
  }
  .login-card {
    width: 100%;
    max-width: 460px;
  }
  .report-tabs {
    max-width: calc(100vw - 36px);
  }
}

@media (max-width: 560px) {
  .stats-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span-2,
  .form-grid .span-3,
  .form-grid .span-4 {
    grid-column: span 1;
  }
  .content {
    padding: 12px;
  }
  .card {
    border-radius: 10px;
  }
  .topbar {
    height: 66px;
    padding: 0 12px;
  }
  .topbar h1 {
    font-size: 1.05rem;
  }
  .document-footer,
  .invoice-head,
  .voucher header {
    align-items: stretch;
    flex-direction: column;
  }
  .invoice-head > div:last-child,
  .voucher header > div:last-child {
    text-align: left;
  }
  .invoice-meta {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .document-heading {
    grid-template-columns: 1fr 1fr;
  }
  .signature-row {
    gap: 12px;
  }
  .button-group {
    flex-wrap: wrap;
  }
}
@media print {
  body {
    background: #fff;
  }
  .sidebar,
  .topbar,
  .no-print,
  .alert,
  .tabs,
  .page-actions {
    display: none !important;
  }
  .main {
    margin: 0;
  }
  .content {
    padding: 0;
  }
  .card {
    border: 0;
    box-shadow: none;
  }
  .invoice,
  .voucher {
    max-width: none;
    padding: 0;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  th {
    background: #fff;
  }
  .report-tabs {
    display: none;
  }
}

/* Keep every listing filter bar on one desktop row. */
.page-actions {
  flex-wrap: nowrap;
}
.page-actions > .filters {
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
}
.filters > input,
.filters > select,
.filters > label {
  flex: 1;
  min-width: 0;
}
.filters input,
.filters select {
  min-width: 0;
}
@media (max-width: 820px) {
  .page-actions > .filters {
    flex-wrap: wrap;
  }
  .filters > input,
  .filters > select,
  .filters > label {
    flex: 1 1 100%;
  }
}

/* Product form based on the compact reference layout. */
.form-section-head {
  margin: -24px -24px 20px;
  padding: 16px 24px;
  background: #f8fafc;
  border-radius: 14px 14px 0 0;
}
.field-with-action {
  display: flex;
  gap: 0;
}
.field-with-action select {
  border-radius: 8px 0 0 8px;
}
.field-with-action .field-add {
  flex: 0 0 42px;
  border-radius: 0 8px 8px 0;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
}
.form-details {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
}
.form-details summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  color: #344054;
}
.form-details[open] summary {
  border-bottom: 1px solid var(--line);
}
.form-details .form-grid {
  padding: 18px;
}
.button.warning {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}
.button.warning:hover {
  background: #d97706;
}
.product-form-actions {
  padding-top: 4px;
}
.product-image-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.product-image-preview img {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
}
.product-modal-open { overflow: hidden; }
.product-quick-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(3px);
}
.product-quick-modal[hidden] { display: none; }
.product-quick-dialog {
  width: min(520px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .24);
}
.product-quick-head,
.product-quick-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}
.product-quick-head { border-bottom: 1px solid var(--line); }
.product-quick-head h2 { margin: 0; font-size: 1.05rem; }
.product-quick-head p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.product-quick-close {
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.product-quick-body { display: grid; gap: 15px; padding: 20px; }
.product-quick-body label { display: grid; gap: 7px; font-weight: 650; }
.product-quick-body [hidden] { display: none; }
.product-quick-actions { justify-content: flex-end; border-top: 1px solid var(--line); background: #f8fafc; }
.product-quick-actions .button { min-width: 92px; }
.select2-container { width: 100% !important; font-size: .86rem; }
.select2-container .select2-selection--single {
  height: 38px !important;
  min-height: 38px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}
.select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 36px !important;
  padding-left: 12px !important;
  padding-right: 32px !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}
.select2-container .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
  width: 30px !important;
  right: 2px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border: none !important;
  width: 12px !important;
  height: 12px !important;
  margin-left: -6px !important;
  margin-top: -6px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: #813CEB !important;
  box-shadow: 0 0 0 3px rgba(129, 60, 235, .15) !important;
}
.select2-dropdown {
  z-index: 1100;
  overflow: hidden;
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .16);
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--primary); }
.field-with-action .select2-container,
.so-customer-control .select2-container {
  flex: 1 1 auto;
  width: 1% !important;
}
.field-with-action .select2-container .select2-selection--single,
.so-customer-control .select2-container .select2-selection--single {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
.inline-form {
  display: inline;
  margin-left: 10px;
}
.account-active-field {
  align-self: end;
  min-height: 42px;
}
.journal-voucher-entry {
  padding-bottom: 18px;
}
.journal-add-action {
  margin-top: 14px;
}
.journal-voucher-detail .card-head {
  padding: 16px 20px;
  background: #f8fafc;
  border-radius: 14px 14px 0 0;
}
.journal-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 20px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
  border-radius: 0 0 14px 14px;
}
.journal-totals input {
  font-weight: 750;
  text-align: right;
  background: #fff;
}
@media (max-width: 820px) {
  .journal-totals {
    grid-template-columns: 1fr;
  }
}

/* Professional application sidebar */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.sidebar {
  width: 264px;
  padding: 18px 12px 14px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0b1e39 0%, #07172d 100%);
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 8px 0 30px rgba(2, 8, 23, 0.08);
}
.main {
  margin-left: 264px;
}
.sidebar-head {
  display: flex;
  align-items: center;
}
.brand {
  min-width: 0;
  padding: 4px 8px 20px;
}
.brand strong {
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}
.brand span:last-child {
  min-width: 0;
}
.brand small {
  color: #8fa3bf;
  font-size: 0.8rem;
}
.brand-mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow:
    0 8px 20px rgba(14, 165, 233, 0.25),
    inset 0 1px rgba(255, 255, 255, 0.25);
}
.sidebar-close {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #a8b7cc;
  font-size: 1.6rem;
  cursor: pointer;
}
.sidebar nav {
  flex: 1;
  gap: 5px;
  padding-top: 7px;
  border-top: 1px solid rgba(148, 163, 184, 0.11);
}
.sidebar nav svg,
.profile-avatar svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.sidebar nav > a {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 620;
}
.sidebar nav a {
  color: #b9c6d8;
  padding: 10px 11px;
  border-radius: 9px;
  font-size: 0.86rem;
  transition:
    background 0.16s,
    color 0.16s,
    transform 0.16s;
}
.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.065);
}
.sidebar nav a.active {
  background: linear-gradient(
    90deg,
    rgba(37, 99, 235, 0.32),
    rgba(37, 99, 235, 0.14)
  );
  box-shadow: inset 3px 0 #60a5fa;
}
.nav-group {
  border-radius: 10px;
}
.nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 11px;
  border-radius: 9px;
  color: #b9c6d8;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  transition:
    background 0.16s,
    color 0.16s;
}
.nav-group summary::-webkit-details-marker {
  display: none;
}
.nav-group summary:hover,
.nav-group[open] > summary {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}
.nav-title {
  display: flex;
  align-items: center;
  gap: 11px;
}
.nav-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s;
  margin: -3px 3px 0 0;
}
.nav-group[open] .nav-chevron {
  transform: rotate(225deg);
  margin-top: 4px;
}
.nav-group-links {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0 5px 18px;
  padding-left: 18px;
}
.nav-group-links:before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 1px;
  background: rgba(148, 163, 184, 0.18);
}
.nav-group-links a {
  position: relative;
  padding: 8px 10px;
  font-size: 0.82rem;
}
.nav-group-links a.active:before {
  content: "";
  position: absolute;
  left: -19px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 0 3px #102849;
  transform: translate(-50%, -50%);
}
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 9px 2px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(96, 165, 250, 0.14);
  color: #93c5fd;
}
.profile-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}
.profile-copy strong,
.profile-copy small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-copy strong {
  color: #f8fafc;
  font-size: 0.8rem;
}
.profile-copy small {
  color: #7f94b1;
  font-size: 0.8rem;
}
.sidebar-profile form button {
  border: 0;
  background: transparent;
  color: #8fa3bf;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 5px;
}
.sidebar-profile form button:hover {
  color: #fff;
}
.sidebar-overlay {
  display: none;
}
@media (max-width: 820px) {
  .main {
    margin-left: 0;
  }
  .sidebar-close {
    display: block;
  }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 19;
    border: 0;
    background: rgba(2, 8, 23, 0.55);
    backdrop-filter: blur(2px);
  }
  .menu-open .sidebar-overlay {
    display: block;
  }
  .menu-open {
    overflow: hidden;
  }
}
/* Cash Book — polished dashboard component */
.cash-book-card {
  --cash-primary: #2563eb;
  --cash-primary-dark: #1d4ed8;
  --cash-text: #172033;
  --cash-muted: #667085;
  --cash-border: #e4e9f1;
  --cash-soft: #f8fafc;
  overflow: hidden;
  border: 1px solid var(--cash-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}

.cash-book-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--cash-border);
  background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
}

.cash-book-title { display: flex; align-items: center; gap: 13px; }
.cash-book-title-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 7px 16px rgba(37, 99, 235, .22);
}
.cash-book-title-icon svg { width: 23px; height: 23px; }
.cash-book-title h2 { margin: 0; color: #101828; font-size: 1.1rem; font-weight: 750; letter-spacing: -.02em; }
.cash-book-title p { margin: 3px 0 0; color: var(--cash-muted); font-size: .82rem; }
.cash-book-body { padding: 22px 24px 24px; }

.cash-book-filters {
  display: grid;
  grid-template-columns: minmax(150px, .75fr) minmax(150px, .75fr) minmax(220px, 1.5fr) auto;
  align-items: end;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--cash-border);
  border-radius: 13px;
  background: var(--cash-soft);
}
.cash-filter-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.cash-filter-field label {
  color: #475467;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.cash-filter-field > input,
.cash-search-control {
  width: 100%;
  height: 42px;
  border: 1px solid #d5dce7;
  border-radius: 9px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cash-filter-field > input { padding: 0 12px; color: var(--cash-text); font-size: .84rem; }
.cash-filter-field > input:focus,
.cash-search-control:focus-within { border-color: var(--cash-primary); outline: 0; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.cash-search-control { display: flex; align-items: center; padding: 0 12px; }
.cash-search-control svg { flex: 0 0 17px; width: 17px; height: 17px; color: #98a2b3; }
.cash-search-control input { min-width: 0; width: 100%; height: 100%; padding: 0 0 0 9px; border: 0; outline: 0; background: transparent; color: var(--cash-text); font-size: .84rem; }
.cash-search-control input::placeholder { color: #98a2b3; }
.cash-view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--cash-primary);
  box-shadow: 0 5px 12px rgba(37, 99, 235, .18);
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.cash-view-button svg { width: 17px; height: 17px; }
.cash-view-button:hover { background: var(--cash-primary-dark); box-shadow: 0 7px 16px rgba(37, 99, 235, .24); transform: translateY(-1px); }
.cash-view-button:focus-visible { outline: 3px solid rgba(37, 99, 235, .22); outline-offset: 2px; }

.cash-balance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.cash-balance-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 15px 17px;
  border: 1px solid var(--cash-border);
  border-radius: 13px;
  background: #fff;
}
.cash-balance-card.opening { border-left: 3px solid #3b82f6; }
.cash-balance-card.closing { border-left: 3px solid #10b981; }
.cash-balance-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: 1.05rem; font-weight: 800; }
.cash-balance-card.opening .cash-balance-icon { color: #2563eb; background: #eff6ff; }
.cash-balance-card.closing .cash-balance-icon { color: #059669; background: #ecfdf5; }
.cash-balance-card div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.cash-balance-card div span { color: var(--cash-muted); font-size: 0.8rem; font-weight: 600; }
.cash-balance-card strong { color: #101828; font-size: 1.08rem; font-weight: 750; font-variant-numeric: tabular-nums; }

.cash-table-shell { overflow: hidden; border: 1px solid var(--cash-border); border-radius: 13px; background: #fff; }
.cash-table-scroll { overflow-x: auto; }
.cash-book-table { width: 100%; min-width: 650px; border-collapse: collapse; }
.cash-book-table th { padding: 0; border-bottom: 1px solid var(--cash-border); background: #f8fafc; text-align: left; }
.cash-book-table th button { display: inline-flex; align-items: center; gap: 7px; width: 100%; padding: 13px 15px; border: 0; background: transparent; color: #667085; font-size: 0.8rem; font-weight: 750; letter-spacing: .055em; text-align: inherit; text-transform: uppercase; cursor: pointer; }
.cash-book-table th button span { color: #b0b8c5; font-size: 0.8rem; }
.cash-book-table th.number button { justify-content: flex-end; }
.cash-book-table td { padding: 13px 15px; border-bottom: 1px solid #eef1f5; color: var(--cash-text); font-size: .82rem; }
.cash-book-table .number { text-align: right; font-variant-numeric: tabular-nums; }
.cash-book-table tbody tr:not(:has(.cash-empty-state)):hover { background: #fbfdff; }
.cash-empty-state { height: 176px; text-align: center !important; }
.cash-empty-state > * { display: block; margin-right: auto; margin-left: auto; }
.cash-empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 10px; border-radius: 12px; color: #7c8da5; background: #f1f5f9; }
.cash-empty-icon svg { width: 23px; height: 23px; }
.cash-empty-state strong { margin-bottom: 3px; color: #344054; font-size: .86rem; font-weight: 700; }
.cash-empty-state small { color: #98a2b3; font-size: 0.8rem; }
.cash-book-table tfoot td { border: 0; background: #f8fafc; color: #344054; font-size: 0.8rem; font-weight: 750; text-transform: uppercase; }
.cash-table-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; border-top: 1px solid var(--cash-border); color: var(--cash-muted); font-size: 0.8rem; }
.cash-pagination { display: flex; gap: 5px; }
.cash-pagination button { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #d9e0e9; border-radius: 8px; background: #fff; color: #475467; font-size: 0.8rem; cursor: pointer; }
.cash-pagination button.active { border-color: var(--cash-primary); color: #fff; background: var(--cash-primary); }
.cash-pagination button:disabled { color: #c3cad4; background: #f8fafc; cursor: not-allowed; }

@media (max-width: 1100px) {
  .cash-book-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cash-search-field { grid-column: 1 / 2; }
  .cash-view-button { grid-column: 2 / 3; }
}
@media (max-width: 640px) {
  .cash-book-heading { padding: 18px; }
  .cash-book-title-icon { flex-basis: 38px; width: 38px; height: 38px; }
  .cash-book-title p { font-size: 0.8rem; }
  .cash-book-body { padding: 15px; }
  .cash-book-filters { grid-template-columns: 1fr; padding: 13px; }
  .cash-search-field, .cash-view-button { grid-column: 1; }
  .cash-balance-grid { grid-template-columns: 1fr; gap: 10px; }
  .cash-balance-card { min-height: 72px; }
  .cash-table-footer { align-items: flex-start; flex-direction: column; }
}

/* Black Invoice Number Links */
.doc-no,
.doc-no strong,
.invoice-no-link,
.invoice-no-link strong {
  color: #0f172a !important;
  font-weight: 400 !important;
}

.table-wrap table td a:not(.button),
.document-list-card table td a:not(.button) {
  color: #0f172a !important;
  font-weight: 400 !important;
}

.doc-no:hover,
.invoice-no-link:hover,
.table-wrap table td a:hover {
  color: #813CEB !important;
  text-decoration: underline !important;
}

/* Exact Design System for Compact Line Table matching user screenshot media_1788419475220.png */
.compact-line-table {
  table-layout: auto !important;
  width: 100% !important;
  border-collapse: collapse !important;
}

.compact-line-table th {
  text-align: center !important;
  vertical-align: middle !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  letter-spacing: 0.03em !important;
  padding: 10px 6px !important;
  border: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background-color: #f8fafc !important;
}

.compact-line-table td {
  vertical-align: middle !important;
  text-align: center !important;
  padding: 8px 5px !important;
  border: none !important;
}

/* Product Name Column Width & Alignment */
.compact-line-table th:first-child,
.compact-line-table td:first-child,
.compact-line-table th:nth-child(1),
.compact-line-table td:nth-child(1) {
  min-width: 280px !important;
  width: auto !important;
}

/* Hide WebKit calendar picker indicators (datalist arrow) for clean input fields */
input::-webkit-calendar-picker-indicator,
input::-webkit-list-button {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  -webkit-appearance: none !important;
}

/* Clean Input Field Design System matching user screenshot media_1788420091471.png */
.compact-line-table input[type="text"],
.compact-line-table input[type="number"],
.compact-line-table .number-input,
.compact-line-table .product-input-text,
.read-only-box {
  height: 38px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  outline: none !important;
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
}

.compact-line-table input.product-input-text {
  padding: 0 12px !important;
  text-align: left !important;
}

.compact-line-table input[type="number"],
.compact-line-table .number-input,
.read-only-box {
  padding: 0 8px !important;
  text-align: center !important;
}

.compact-line-table input:focus,
.compact-line-table select:focus {
  border-color: #813CEB !important;
  box-shadow: 0 0 0 3px rgba(129, 60, 235, 0.15) !important;
}

/* All Inputs & Readonly Boxes (Pure White Background) */
.compact-line-table .number-input[readonly],
.compact-line-table input[readonly] {
  background-color: #ffffff !important;
  color: #1e293b !important;
  font-weight: 500 !important;
  border: 1px solid #cbd5e1 !important;
}

.read-only-box {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 38px !important;
  width: 100% !important;
  padding: 0 8px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background-color: #ffffff !important;
  color: #1e293b !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  box-sizing: border-box !important;
}

.compact-line-action {
  text-align: center !important;
}

.compact-line-action .icon-button {
  color: #dc2626 !important;
  font-size: 18px !important;
  font-weight: bold !important;
  cursor: pointer !important;
}

.button.sidebar-btn {
  background: var(--nav);
  color: #fff;
  border: 1px solid var(--nav);
}
.button.sidebar-btn:hover {
  background: var(--nav-soft);
  border-color: var(--nav-soft);
}