:root {
  --acc-bg: #f3f6fb;
  --acc-surface: #fff;
  --acc-border: rgba(148, 163, 184, .2);
  --acc-text: #0f172a;
  --acc-muted: #64748b;
  --acc-primary: #2563eb;
  --acc-radius: 18px;
  --acc-shadow: 0 14px 38px rgba(15, 23, 42, .055);
}

.accounts-module .app-content {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 0 !important;
  background: var(--acc-bg);
  overflow-x: clip;
}

.accounts-module .container,
.accounts-module .container-fluid {
  width: 100%;
  max-width: none !important;
  margin-inline: 0;
}

.accounts-module .app-wrapper {
  width: 100%;
  align-items: stretch;
}

.accounts-module .container-fluid.py-3,
.accounts-module .container-fluid.py-4,
.accounts-module .erp-page,
.accounts-module .ledger-page,
.accounts-module .financial-report,
.accounts-module .income-report,
.accounts-module .trial-report,
.accounts-module .coa-page,
.accounts-module .cashbox-page,
.accounts-module .posting-rules-page,
.accounts-module .ai-report-page,
.accounts-module .yec-shell,
.accounts-module .profile-page,
.accounts-module #cashflow-page {
  width: 100%;
  max-width: none !important;
  padding: clamp(14px, 1.6vw, 26px) !important;
}

.accounts-module .card,
.accounts-module .report-card,
.accounts-module .card-ui,
.accounts-module .financial-panel,
.accounts-module .trial-card,
.accounts-module .ledger-card,
.accounts-module .erp-table-card {
  border-color: var(--acc-border);
  border-radius: var(--acc-radius);
  box-shadow: var(--acc-shadow);
  background: rgba(255, 255, 255, .98);
}

.accounts-module .card,
.accounts-module .report-card,
.accounts-module .card-ui,
.accounts-module .accounts-panel,
.accounts-module .accounts-kpi,
.accounts-module .financial-panel,
.accounts-module .trial-card,
.accounts-module .ledger-card,
.accounts-module .erp-table-card {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.accounts-module .card:hover,
.accounts-module .report-card:hover,
.accounts-module .card-ui:hover,
.accounts-module .financial-panel:hover,
.accounts-module .trial-card:hover,
.accounts-module .ledger-card:hover,
.accounts-module .erp-table-card:hover {
  border-color: rgba(96, 165, 250, .26);
  box-shadow: 0 20px 50px rgba(15, 23, 42, .075);
}

.accounts-module .form-control,
.accounts-module .form-select,
.accounts-module .select2-container .select2-selection--single,
.accounts-module .select2-container .select2-selection--multiple {
  min-height: 44px;
  border-color: #d8e0eb;
  border-radius: 12px;
  background-color: var(--acc-surface);
}

.accounts-module .form-control:focus,
.accounts-module .form-select:focus,
.accounts-module .select2-container--focus .select2-selection {
  border-color: var(--acc-primary);
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12);
}

.accounts-module label,
.accounts-module .form-label {
  color: #475569;
  font-weight: 750;
}

.accounts-module .btn {
  min-height: 42px;
  border-radius: 12px;
  font-weight: 750;
}

.accounts-module .btn-primary {
  border-color: var(--acc-primary);
  background: var(--acc-primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .16);
}

.accounts-module .voucher-header,
.accounts-module .voucher-header-gradient {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 112px;
  padding: 24px 26px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% -30%, rgba(96, 165, 250, .65), transparent 38%),
    radial-gradient(circle at 92% 130%, rgba(45, 212, 191, .22), transparent 35%),
    linear-gradient(125deg, #0f172a 0%, #1e3a8a 58%, #1d4ed8 100%) !important;
  box-shadow: 0 22px 52px rgba(30, 58, 138, .2);
}

.accounts-module .voucher-header::after,
.accounts-module .voucher-header-gradient::after {
  content: "";
  position: absolute;
  inset-block-start: -55px;
  inset-inline-end: 8%;
  z-index: -1;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 44px;
  transform: rotate(28deg);
}

.accounts-module .voucher-header h4,
.accounts-module .voucher-header-gradient h4 {
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 900;
}

.accounts-module .erp-toolbar,
.accounts-module .financial-report-hero,
.accounts-module .income-report-hero,
.accounts-module .trial-hero,
.accounts-module .ledger-hero,
.accounts-module .coa-hero,
.accounts-module .cashbox-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 20px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .065);
}

.accounts-module .erp-toolbar,
.accounts-module .financial-report-hero,
.accounts-module .income-report-hero,
.accounts-module .trial-hero {
  background:
    linear-gradient(90deg, rgba(37, 99, 235, .08), transparent 32%),
    rgba(255, 255, 255, .98);
}

.accounts-module .erp-toolbar::before,
.accounts-module .financial-report-hero::before,
.accounts-module .income-report-hero::before,
.accounts-module .trial-hero::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 5px;
  background: linear-gradient(180deg, #2563eb, #14b8a6);
}

.accounts-module .financial-toolbar,
.accounts-module .income-toolbar,
.accounts-module .trial-filter-card,
.accounts-module .gl-filter-card,
.accounts-module .coa-toolbar,
.accounts-module .cashbox-toolbar {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 34px rgba(15, 23, 42, .045);
}

.accounts-module .erp-table-card,
.accounts-module .financial-panel,
.accounts-module .trial-card {
  overflow: hidden;
}

.accounts-module .table-responsive {
  scrollbar-color: #b8c5d8 transparent;
}

.accounts-module .table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.accounts-module .table > thead > tr > th {
  padding: 13px 14px;
  color: #475569;
  border-color: var(--acc-border);
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  font-size: .82rem;
  font-weight: 850;
  white-space: nowrap;
}

.accounts-module .table > tbody > tr > td {
  padding: 13px 14px;
  border-color: rgba(148, 163, 184, .14);
  vertical-align: middle;
}

.accounts-module .table > tbody > tr:hover > * {
  background: #f7faff;
}

.accounts-module .modal-content {
  border: 0;
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .2);
}

.accounts-module .badge {
  border-radius: 999px;
  font-weight: 800;
}

.accounts-module .dataTables_wrapper .dataTables_paginate .paginate_button,
.accounts-module .pagination .page-link {
  border-radius: 10px !important;
}

html[data-theme="dark"] .accounts-module {
  --acc-bg: #0b1220;
  --acc-surface: #111b2e;
  --acc-border: rgba(100, 116, 139, .3);
  --acc-text: #e5edf8;
  --acc-muted: #9aabc1;
}

html[data-theme="dark"] .accounts-module .card,
html[data-theme="dark"] .accounts-module .report-card,
html[data-theme="dark"] .accounts-module .card-ui,
html[data-theme="dark"] .accounts-module .accounts-panel,
html[data-theme="dark"] .accounts-module .accounts-kpi,
html[data-theme="dark"] .accounts-module .financial-panel,
html[data-theme="dark"] .accounts-module .trial-card,
html[data-theme="dark"] .accounts-module .ledger-card,
html[data-theme="dark"] .accounts-module .erp-table-card,
html[data-theme="dark"] .accounts-module .erp-toolbar,
html[data-theme="dark"] .accounts-module .financial-report-hero,
html[data-theme="dark"] .accounts-module .income-report-hero,
html[data-theme="dark"] .accounts-module .trial-hero,
html[data-theme="dark"] .accounts-module .financial-toolbar,
html[data-theme="dark"] .accounts-module .income-toolbar,
html[data-theme="dark"] .accounts-module .trial-filter-card,
html[data-theme="dark"] .accounts-module .gl-filter-card {
  color: var(--acc-text);
  background-color: var(--acc-surface);
}

@media (max-width: 767px) {
  .accounts-module .container-fluid,
  .accounts-module .container {
    padding-inline: 12px !important;
  }

  .accounts-module .card,
  .accounts-module .report-card,
  .accounts-module .card-ui,
  .accounts-module .financial-panel,
  .accounts-module .trial-card,
  .accounts-module .ledger-card,
  .accounts-module .erp-table-card {
    border-radius: 15px;
  }

  .accounts-module .btn {
    min-height: 44px;
  }

  .accounts-module .voucher-header,
  .accounts-module .voucher-header-gradient {
    align-items: flex-start !important;
    flex-direction: column;
    min-height: 0;
    padding: 20px;
  }

  .accounts-module .voucher-header > .d-flex,
  .accounts-module .voucher-header-gradient > .d-flex {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media print {
  .accounts-module .app-content { background: #fff !important; }
  .accounts-module .card,
  .accounts-module .report-card,
  .accounts-module .card-ui,
  .accounts-module .financial-panel,
  .accounts-module .trial-card,
  .accounts-module .ledger-card { box-shadow: none !important; }
}
