/* Brilliance Academy ERP global aesthetic layer
   Applies after php-premium.css. Content and data remain unchanged. */
:root {
  --ba-night: #101820;
  --ba-graphite: #1d2a35;
  --ba-graphite-2: #263845;
  --ba-paper: #f5f1e8;
  --ba-paper-2: #edf2f1;
  --ba-card: #fffdf8;
  --ba-card-cool: #f7fbfa;
  --ba-ink: #111a22;
  --ba-muted: #536474;
  --ba-line: rgba(29, 42, 53, 0.15);
  --ba-copper: #b97832;
  --ba-copper-2: #d19a55;
  --ba-copper-dark: #754716;
  --ba-blue: #2f6f88;
  --ba-green: #247a55;
  --ba-red: #b63f39;
  --ba-shadow: 0 18px 44px rgba(16, 24, 32, 0.12);
  --ba-shadow-soft: 0 10px 28px rgba(16, 24, 32, 0.08);
}

html {
  background: var(--ba-paper-2) !important;
}

body.ba-erp:not(.printing) {
  min-height: 100vh;
  color: var(--ba-ink) !important;
  background:
    radial-gradient(circle at 5% 0, rgba(185, 120, 50, 0.16), transparent 310px),
    radial-gradient(circle at 92% 4%, rgba(47, 111, 136, 0.15), transparent 330px),
    linear-gradient(180deg, #fbf7ef 0, #edf2f1 300px, #e7eeee 100%) !important;
}

body.ba-erp:not(.printing)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 24, 32, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 32, 0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

body.ba-erp:not(.printing) .portal-shell,
body.ba-erp:not(.printing) .portal-layout,
body.ba-erp:not(.printing) .portal-main,
body.ba-erp:not(.printing) .portal-content {
  background: transparent !important;
}

body.ba-erp:not(.printing) .portal-navbar {
  border-bottom: 1px solid rgba(16, 24, 32, 0.12) !important;
  background: rgba(250, 247, 240, 0.9) !important;
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(16, 24, 32, 0.08) !important;
}

body.ba-erp:not(.printing) .portal-side {
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 12px !important;
  background:
    radial-gradient(circle at 8% 0, rgba(185, 120, 50, 0.22), transparent 180px),
    linear-gradient(180deg, #162229 0%, #0d151b 100%) !important;
  box-shadow: 0 24px 54px rgba(13, 21, 27, 0.28) !important;
}

body.ba-erp:not(.printing) .portal-side > .portal-brand {
  min-height: 70px !important;
  margin: 8px 8px 12px !important;
  padding: 11px !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 10px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)) !important;
}

body.ba-erp:not(.printing) .portal-brand img {
  border: 1px solid rgba(209, 154, 85, 0.42) !important;
  background: #fffdf8 !important;
  box-shadow: 0 0 0 5px rgba(185, 120, 50, 0.08) !important;
}

body.ba-erp:not(.printing) .menu-group summary {
  color: #9cafaa !important;
  font-size: 0.64rem !important;
  letter-spacing: 0.09em !important;
}

body.ba-erp:not(.printing) .portal-side a:not(.portal-brand) {
  min-height: 39px !important;
  margin: 4px 6px !important;
  padding: 0 10px !important;
  color: #d8e3df !important;
  border-radius: 8px !important;
}

body.ba-erp:not(.printing) .portal-side a:not(.portal-brand)::before {
  background: rgba(255, 255, 255, 0.075) !important;
}

body.ba-erp:not(.printing) .portal-side a:not(.portal-brand):hover {
  color: #fffaf0 !important;
  background: rgba(255, 255, 255, 0.075) !important;
}

body.ba-erp:not(.printing) .portal-side a.active:not(.portal-brand) {
  color: #fffaf0 !important;
  -webkit-text-fill-color: #fffaf0 !important;
  background:
    linear-gradient(90deg, #c98a43 0%, #93591e 100%) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24) !important;
}

body.ba-erp:not(.printing) .portal-top,
body.ba-erp:not(.printing) .fee-collection-hero,
body.ba-erp:not(.printing) .teacher-dashboard-hero,
body.ba-erp:not(.printing) .bulk-import-hero {
  position: relative;
  overflow: hidden;
  min-height: 178px !important;
  border: 1px solid rgba(185, 120, 50, 0.20) !important;
  border-radius: 12px !important;
  background:
    radial-gradient(circle at 92% 16%, rgba(185, 120, 50, 0.18), transparent 180px),
    linear-gradient(135deg, rgba(255, 253, 248, 0.96) 0%, #f6efe5 58%, #eef6f4 100%) !important;
  box-shadow: var(--ba-shadow) !important;
}

body.ba-erp:not(.printing) .portal-top::after,
body.ba-erp:not(.printing) .fee-collection-hero::after,
body.ba-erp:not(.printing) .teacher-dashboard-hero::after,
body.ba-erp:not(.printing) .bulk-import-hero::after {
  content: "";
  position: absolute;
  right: 26px;
  bottom: 22px;
  width: 88px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ba-copper), var(--ba-blue));
  opacity: 0.62;
}

body.ba-erp:not(.printing) .portal-top h1,
body.ba-erp:not(.printing) .fee-collection-hero h2,
body.ba-erp:not(.printing) .teacher-dashboard-hero h2,
body.ba-erp:not(.printing) .bulk-import-hero h2 {
  color: var(--ba-ink) !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

body.ba-erp:not(.printing) .eyebrow {
  color: var(--ba-copper-dark) !important;
  letter-spacing: 0.15em !important;
}

body.ba-erp:not(.printing) .panel,
body.ba-erp:not(.printing) .premium-form,
body.ba-erp:not(.printing) .module-grid article,
body.ba-erp:not(.printing) .metrics article,
body.ba-erp:not(.printing) .finance-kpis article,
body.ba-erp:not(.printing) .teacher-stat-strip article,
body.ba-erp:not(.printing) .bulk-file-drop,
body.ba-erp:not(.printing) .bulk-help-card,
body.ba-erp:not(.printing) .document-preview,
body.ba-erp:not(.printing) .portal-dialog,
body.ba-erp:not(.printing) .student-photo-upload,
body.ba-erp:not(.printing) .id-photo-sync,
body.ba-erp:not(.printing) .bulk-id-helper,
body.ba-erp:not(.printing) .report-kpi-grid p,
body.ba-erp:not(.printing) .finance-summary-cards p,
body.ba-erp:not(.printing) .print-summary-cards p {
  color: var(--ba-ink) !important;
  border: 1px solid var(--ba-line) !important;
  border-radius: 10px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 253, 248, 0.98)),
    linear-gradient(135deg, var(--ba-card), var(--ba-card-cool)) !important;
  box-shadow: var(--ba-shadow-soft) !important;
}

body.ba-erp:not(.printing) .form-heading {
  gap: 14px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(29, 42, 53, 0.10) !important;
}

body.ba-erp:not(.printing) h2,
body.ba-erp:not(.printing) h3,
body.ba-erp:not(.printing) h4,
body.ba-erp:not(.printing) strong {
  color: var(--ba-ink) !important;
}

body.ba-erp:not(.printing) p,
body.ba-erp:not(.printing) small,
body.ba-erp:not(.printing) .metrics span,
body.ba-erp:not(.printing) .finance-kpis span,
body.ba-erp:not(.printing) .teacher-stat-strip span {
  color: var(--ba-muted) !important;
}

body.ba-erp:not(.printing) label {
  color: #556574 !important;
  font-weight: 800 !important;
}

body.ba-erp:not(.printing) input,
body.ba-erp:not(.printing) select,
body.ba-erp:not(.printing) textarea {
  color: var(--ba-ink) !important;
  -webkit-text-fill-color: var(--ba-ink) !important;
  border: 1px solid rgba(29, 42, 53, 0.17) !important;
  border-radius: 8px !important;
  background: #fffdf9 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75) !important;
}

body.ba-erp:not(.printing) input::placeholder,
body.ba-erp:not(.printing) textarea::placeholder {
  color: #7b8794 !important;
  -webkit-text-fill-color: #7b8794 !important;
  opacity: 1 !important;
}

body.ba-erp:not(.printing) input:focus,
body.ba-erp:not(.printing) select:focus,
body.ba-erp:not(.printing) textarea:focus {
  border-color: rgba(185, 120, 50, 0.72) !important;
  box-shadow: 0 0 0 4px rgba(185, 120, 50, 0.14) !important;
}

body.ba-erp:not(.printing) .filter-bar,
body.ba-erp:not(.printing) .restore-fee-panel,
body.ba-erp:not(.printing) .reminder-editor,
body.ba-erp:not(.printing) .bulk-preview-toolbar {
  border: 1px solid rgba(185, 120, 50, 0.24) !important;
  border-radius: 10px !important;
  background:
    radial-gradient(circle at top left, rgba(185, 120, 50, 0.13), transparent 180px),
    linear-gradient(135deg, #fff8ee 0%, #f6fbfa 100%) !important;
  box-shadow: 0 12px 28px rgba(16, 24, 32, 0.08) !important;
}

body.ba-erp:not(.printing) .btn,
body.ba-erp:not(.printing) button,
body.ba-erp:not(.printing) .mini-action,
body.ba-erp:not(.printing) input[type="submit"],
body.ba-erp:not(.printing) input[type="button"],
body.ba-erp:not(.printing) [role="button"] {
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: 8px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

body.ba-erp:not(.printing) button[type="submit"],
body.ba-erp:not(.printing) .btn.gold,
body.ba-erp:not(.printing) .portal-search button,
body.ba-erp:not(.printing) .filter-bar button,
body.ba-erp:not(.printing) .restore-fee-panel .btn,
body.ba-erp:not(.printing) .form-actions button[type="submit"],
body.ba-erp:not(.printing) .form-actions .btn.gold,
body.ba-erp:not(.printing) .button-row .btn.gold,
body.ba-erp:not(.printing) .form-heading .btn.gold,
body.ba-erp:not(.printing) #downloadStudentTemplate,
body.ba-erp:not(.printing) #bulkFileName,
body.ba-erp:not(.printing) #bulkPdfFileName,
body.ba-erp:not(.printing) #saveBulkStudents,
body.ba-erp:not(.printing) #saveReminder,
body.ba-erp:not(.printing) input[type="submit"] {
  color: #fffdf7 !important;
  -webkit-text-fill-color: #fffdf7 !important;
  border: 1px solid rgba(117, 71, 22, 0.46) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #c98a43 0%, #a76625 50%, #6f4214 100%) !important;
  box-shadow: 0 12px 22px rgba(111, 66, 20, 0.24) !important;
}

body.ba-erp:not(.printing) .btn.glass,
body.ba-erp:not(.printing) .btn.secondary,
body.ba-erp:not(.printing) .form-heading .btn:not(.gold),
body.ba-erp:not(.printing) .button-row .btn:not(.gold),
body.ba-erp:not(.printing) .form-actions .btn:not(.gold),
body.ba-erp:not(.printing) .profile-menu > button,
body.ba-erp:not(.printing) .profile-menu > a,
body.ba-erp:not(.printing) #selectAllBulkRows,
body.ba-erp:not(.printing) #bulkPhotoFileName,
body.ba-erp:not(.printing) input[type="button"] {
  color: #653d13 !important;
  -webkit-text-fill-color: #653d13 !important;
  border: 1px solid rgba(185, 120, 50, 0.42) !important;
  background:
    linear-gradient(180deg, #fff7ea 0%, #ead8bd 100%) !important;
  box-shadow: 0 10px 20px rgba(111, 66, 20, 0.12) !important;
}

body.ba-erp:not(.printing) .table-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
}

body.ba-erp:not(.printing) .table-actions .mini-action,
body.ba-erp:not(.printing) a.mini-action,
body.ba-erp:not(.printing) label.mini-action {
  min-height: 36px !important;
  padding: 0 13px !important;
  color: #fffdf7 !important;
  -webkit-text-fill-color: #fffdf7 !important;
  border: 1px solid rgba(29, 42, 53, 0.32) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #2d4352, #15232d) !important;
  box-shadow: 0 8px 18px rgba(16, 24, 32, 0.16) !important;
}

body.ba-erp:not(.printing) .table-actions .mini-action:nth-child(even) {
  border-color: rgba(117, 71, 22, 0.38) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #bd7b35, #794817) !important;
}

body.ba-erp:not(.printing) .danger-btn,
body.ba-erp:not(.printing) .mini-action.danger,
body.ba-erp:not(.printing) button[name="delete_student"],
body.ba-erp:not(.printing) [data-delete-photo] {
  color: #fffdf7 !important;
  -webkit-text-fill-color: #fffdf7 !important;
  border-color: rgba(182, 63, 57, 0.42) !important;
  background: linear-gradient(135deg, #d96c62, #a9332c) !important;
}

body.ba-erp:not(.printing) button:disabled,
body.ba-erp:not(.printing) .btn:disabled,
body.ba-erp:not(.printing) .btn.disabled,
body.ba-erp:not(.printing) [aria-disabled="true"] {
  color: #52606d !important;
  -webkit-text-fill-color: #52606d !important;
  border-color: rgba(29, 42, 53, 0.16) !important;
  background: linear-gradient(180deg, #e9eeef, #dbe3e5) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

body.ba-erp:not(.printing) .btn:hover,
body.ba-erp:not(.printing) button:hover,
body.ba-erp:not(.printing) .mini-action:hover,
body.ba-erp:not(.printing) .quick-actions a:hover,
body.ba-erp:not(.printing) .teacher-tool-grid a:hover {
  transform: translateY(-1px) !important;
  filter: saturate(1.08) contrast(1.02) !important;
}

body.ba-erp:not(.printing) .student-table,
body.ba-erp:not(.printing) .professional-print-table,
body.ba-erp:not(.printing) .spacious-print-table,
body.ba-erp:not(.printing) .receipt-table,
body.ba-erp:not(.printing) .marks-table,
body.ba-erp:not(.printing) .finance-ledger-table,
body.ba-erp:not(.printing) .bulk-student-table {
  overflow: hidden !important;
  border: 1px solid rgba(29, 42, 53, 0.16) !important;
  border-radius: 10px !important;
  background: #fffdf8 !important;
  box-shadow: 0 16px 34px rgba(16, 24, 32, 0.08) !important;
}

body.ba-erp:not(.printing) .student-table th,
body.ba-erp:not(.printing) .professional-print-table th,
body.ba-erp:not(.printing) .spacious-print-table th,
body.ba-erp:not(.printing) .receipt-table th,
body.ba-erp:not(.printing) .marks-table th,
body.ba-erp:not(.printing) .finance-ledger-table th,
body.ba-erp:not(.printing) .bulk-student-table th {
  color: #fffaf0 !important;
  -webkit-text-fill-color: #fffaf0 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  background:
    linear-gradient(180deg, #263845 0%, #111a22 100%) !important;
}

body.ba-erp:not(.printing) .student-table td,
body.ba-erp:not(.printing) .professional-print-table td,
body.ba-erp:not(.printing) .spacious-print-table td,
body.ba-erp:not(.printing) .receipt-table td,
body.ba-erp:not(.printing) .marks-table td,
body.ba-erp:not(.printing) .finance-ledger-table td,
body.ba-erp:not(.printing) .bulk-student-table td {
  color: #1d2a35 !important;
  border-color: rgba(29, 42, 53, 0.08) !important;
  background: #fffdf8 !important;
}

body.ba-erp:not(.printing) .student-table tbody tr:nth-child(even) td,
body.ba-erp:not(.printing) .professional-print-table tbody tr:nth-child(even) td,
body.ba-erp:not(.printing) .spacious-print-table tbody tr:nth-child(even) td,
body.ba-erp:not(.printing) .receipt-table tbody tr:nth-child(even) td,
body.ba-erp:not(.printing) .marks-table tbody tr:nth-child(even) td,
body.ba-erp:not(.printing) .finance-ledger-table tbody tr:nth-child(even) td,
body.ba-erp:not(.printing) .bulk-student-table tbody tr:nth-child(even) td {
  background: #f3f8f7 !important;
}

body.ba-erp:not(.printing) .student-table tbody tr:hover td,
body.ba-erp:not(.printing) .professional-print-table tbody tr:hover td,
body.ba-erp:not(.printing) .spacious-print-table tbody tr:hover td,
body.ba-erp:not(.printing) .finance-ledger-table tbody tr:hover td {
  background: #fff4e5 !important;
}

body.ba-erp:not(.printing) .quick-actions,
body.ba-erp:not(.printing) .teacher-tool-grid {
  gap: 14px !important;
}

body.ba-erp:not(.printing) .quick-actions a,
body.ba-erp:not(.printing) .teacher-tool-grid a {
  min-height: 76px !important;
  justify-content: flex-start !important;
  color: var(--ba-ink) !important;
  -webkit-text-fill-color: var(--ba-ink) !important;
  border: 1px solid rgba(29, 42, 53, 0.13) !important;
  border-radius: 10px !important;
  background:
    linear-gradient(180deg, #fffdf8, #f4f8f7) !important;
  box-shadow: var(--ba-shadow-soft) !important;
}

body.ba-erp:not(.printing) .quick-actions a::before,
body.ba-erp:not(.printing) .teacher-tool-grid a::before {
  background: var(--ba-copper) !important;
  box-shadow: 0 0 0 5px rgba(185, 120, 50, 0.12) !important;
}

body.ba-erp:not(.printing) .finance-kpis article,
body.ba-erp:not(.printing) .metrics article {
  position: relative;
  overflow: hidden;
}

body.ba-erp:not(.printing) .finance-kpis article::after,
body.ba-erp:not(.printing) .metrics article::after,
body.ba-erp:not(.printing) .module-grid article::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ba-copper), var(--ba-blue));
  opacity: 0.72;
}

/* Feature 1: class/status cards get a clear premium signal without changing text */
body.ba-erp:not(.printing) .module-grid article,
body.ba-erp:not(.printing) .compact-grid article,
body.ba-erp:not(.printing) .report-kpi-grid p {
  position: relative;
  overflow: hidden;
}

body.ba-erp:not(.printing) .module-grid article::before,
body.ba-erp:not(.printing) .compact-grid article::before,
body.ba-erp:not(.printing) .report-kpi-grid p::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--ba-copper), var(--ba-blue));
  opacity: 0.9;
}

/* Feature 2: student photo/upload areas become review cards */
body.ba-erp:not(.printing) .student-photo-upload,
body.ba-erp:not(.printing) .signature-upload-panel,
body.ba-erp:not(.printing) .id-photo-sync,
body.ba-erp:not(.printing) .bulk-file-drop {
  border-style: solid !important;
  background:
    radial-gradient(circle at 0 0, rgba(47, 111, 136, 0.10), transparent 180px),
    linear-gradient(135deg, #fffdf8, #f2f8f6) !important;
}

body.ba-erp:not(.printing) .student-photo-preview,
body.ba-erp:not(.printing) .br-photo {
  border: 1px solid rgba(185, 120, 50, 0.34) !important;
  background: #fff7ea !important;
}

/* Feature 3: charts/analytics get a stronger dashboard feel */
body.ba-erp:not(.printing) .soft-chart {
  border: 1px solid rgba(29, 42, 53, 0.14) !important;
  border-radius: 10px !important;
  background:
    linear-gradient(180deg, #fffdf8, #edf4f3) !important;
  box-shadow: var(--ba-shadow-soft) !important;
}

body.ba-erp:not(.printing) .soft-chart span {
  background: linear-gradient(180deg, #d19a55, #2f6f88) !important;
  box-shadow: 0 10px 22px rgba(47, 111, 136, 0.18) !important;
}

body.ba-erp:not(.printing) .legend span {
  color: var(--ba-muted) !important;
}

body.ba-erp:not(.printing) .notice {
  color: #1f5a42 !important;
  border: 1px solid rgba(36, 122, 85, 0.24) !important;
  background: #edf8f2 !important;
}

body.ba-erp:not(.printing) .notice.danger {
  color: #9c2f28 !important;
  border-color: rgba(182, 63, 57, 0.24) !important;
  background: #fff0ef !important;
}

body.ba-erp:not(.printing) .print-document.is-preview,
body.ba-erp:not(.printing) .print-sheet-designed,
body.ba-erp:not(.printing) .report-print,
body.ba-erp:not(.printing) .fee-receipt-print,
body.ba-erp:not(.printing) .fee-records-print,
body.ba-erp:not(.printing) .exam-paper,
body.ba-erp:not(.printing) .report-card {
  color: var(--ba-ink) !important;
  border: 1px solid rgba(29, 42, 53, 0.16) !important;
  border-radius: 10px !important;
  background: #fffdf8 !important;
  box-shadow: 0 24px 58px rgba(16, 24, 32, 0.16) !important;
}

body.ba-erp:not(.printing) .print-header,
body.ba-erp:not(.printing) #feesPrint .print-header,
body.ba-erp:not(.printing) .report-print .print-header {
  color: #fffaf0 !important;
  border-bottom: 3px solid var(--ba-copper-2) !important;
  background:
    radial-gradient(circle at 92% 0, rgba(209, 154, 85, 0.24), transparent 130px),
    linear-gradient(135deg, #101820, #263845) !important;
}

body.ba-erp:not(.printing) .print-header h2,
body.ba-erp:not(.printing) .print-header p,
body.ba-erp:not(.printing) .print-header span {
  color: #fffaf0 !important;
  -webkit-text-fill-color: #fffaf0 !important;
}

body.ba-erp:not(.printing) .print-section h3,
body.ba-erp:not(.printing) .print-note b,
body.ba-erp:not(.printing) .print-fields b,
body.ba-erp:not(.printing) .receipt-grid b {
  color: var(--ba-copper-dark) !important;
}

@media print {
  body.ba-erp.printing {
    background: #ffffff !important;
  }

  body.ba-erp.printing .print-document,
  body.ba-erp.printing .print-sheet-designed,
  body.ba-erp.printing .report-print {
    color: #101820 !important;
    border: 1px solid #d8c7a8 !important;
    background: #fffdf8 !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.ba-erp.printing .print-header {
    color: #fffaf0 !important;
    background: #101820 !important;
    border-bottom: 3px solid #d19a55 !important;
  }

  body.ba-erp.printing table th {
    color: #fffaf0 !important;
    background: #101820 !important;
  }

  body.ba-erp.printing table td {
    color: #101820 !important;
    background: #ffffff !important;
  }
}

@media (max-width: 980px) {
  body.ba-erp:not(.printing) .portal-side,
  body.ba-erp:not(.printing) .panel,
  body.ba-erp:not(.printing) .premium-form,
  body.ba-erp:not(.printing) .document-preview {
    border-radius: 10px !important;
  }
}

/* Finance print: daily statement layout inspired by the reference PDF */
body.ba-erp:not(.printing) #financePrint.finance-statement-print {
  max-width: 1120px !important;
  padding: 34px 42px !important;
  background: #ffffff !important;
}

#financePrint.finance-statement-print .statement-header {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 22px;
  text-align: center;
}

#financePrint.finance-statement-print .statement-header img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  justify-self: center;
}

#financePrint.finance-statement-print .statement-header h2 {
  margin: 0 0 7px;
  color: #0f4b40 !important;
  font-size: 2.1rem;
  font-weight: 900;
  text-transform: uppercase;
}

#financePrint.finance-statement-print .statement-header p {
  margin: 0;
  color: #111827 !important;
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
}

#financePrint.finance-statement-print .statement-rule {
  height: 3px;
  margin: 30px 0 10px;
  background: #168a7b;
}

#financePrint.finance-statement-print .statement-date {
  margin: 0 0 18px;
  color: #111827;
  font-weight: 900;
  text-align: right;
}

#financePrint.finance-statement-print .statement-summary-strip,
#financePrint.finance-statement-print .statement-total-band {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid #b9dcd7;
  background: #ebfbf8;
}

#financePrint.finance-statement-print .statement-summary-strip p,
#financePrint.finance-statement-print .statement-total-band strong {
  margin: 0;
  padding: 17px 12px;
  color: #111827 !important;
  border-right: 1px solid #b9dcd7;
  font-size: 0.95rem;
  font-weight: 900;
  text-align: center;
}

#financePrint.finance-statement-print .statement-summary-strip p:last-child,
#financePrint.finance-statement-print .statement-total-band strong:last-child {
  border-right: 0;
}

#financePrint.finance-statement-print .statement-ledgers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 26px 0 32px;
}

#financePrint.finance-statement-print .statement-ledgers > div {
  border: 1px solid #b9dcd7;
  background: #ffffff;
}

#financePrint.finance-statement-print .statement-ledgers h3 {
  margin: 0;
  padding: 13px;
  color: #ffffff !important;
  background: #12897b;
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

#financePrint.finance-statement-print .statement-ledgers > div:nth-child(2) h3 {
  background: #e5242a;
}

#financePrint.finance-statement-print table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

#financePrint.finance-statement-print th,
#financePrint.finance-statement-print td {
  padding: 10px 12px;
  color: #111827 !important;
  border: 1px solid #b9dcd7;
  background: #ffffff;
  font-size: 0.88rem;
}

#financePrint.finance-statement-print th {
  background: #eefbf8;
  font-weight: 900;
  text-align: center;
}

#financePrint.finance-statement-print td:last-child {
  text-align: right;
  font-weight: 800;
}

#financePrint.finance-statement-print .statement-total-band {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  background: #ffffff;
}

#financePrint.finance-statement-print .statement-total-band strong {
  font-size: 1.12rem;
}

#financePrint.finance-statement-print .statement-signatures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 42px;
  margin-top: 70px;
}

#financePrint.finance-statement-print .statement-signatures span {
  padding-top: 16px;
  color: #111827;
  border-top: 2px solid #111827;
  font-weight: 900;
  text-align: center;
}

@page financeStatement {
  size: A4 landscape;
  margin: 9mm;
}

@media print {
  body.ba-erp.printing.direct-printing > *:not(.print-direct-root) {
    display: none !important;
    visibility: hidden !important;
  }

  body.ba-erp.printing.direct-printing > .print-direct-root#financePrint.finance-statement-print {
    display: block !important;
    visibility: visible !important;
    position: static !important;
  }

  body.ba-erp.printing.direct-printing > .print-direct-root#financePrint.finance-statement-print,
  body.ba-erp.printing.direct-printing > .print-direct-root#financePrint.finance-statement-print * {
    visibility: visible !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print {
    page: financeStatement;
    width: 279mm !important;
    min-height: 190mm !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 12mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print::before,
  body.ba-erp.printing #financePrint.finance-statement-print::after {
    content: none !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-header {
    grid-template-columns: 34mm minmax(0, 1fr) 34mm !important;
    gap: 7mm !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-header img {
    width: 22mm !important;
    height: 22mm !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-header h2 {
    margin-bottom: 1.5mm !important;
    color: #0f4b40 !important;
    font-size: 21pt !important;
    line-height: 1.05 !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-header p {
    color: #111827 !important;
    font-size: 13pt !important;
    line-height: 1.1 !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-rule {
    height: 0.8mm !important;
    margin: 11mm 0 3mm !important;
    background: #168a7b !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-date {
    margin-bottom: 6mm !important;
    font-size: 10pt !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-summary-strip p,
  body.ba-erp.printing #financePrint.finance-statement-print .statement-total-band strong {
    padding: 4mm 2mm !important;
    color: #111827 !important;
    background: transparent !important;
    font-size: 9.2pt !important;
    line-height: 1.15 !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-summary-strip {
    background: #ebfbf8 !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-ledgers {
    gap: 7mm !important;
    margin: 9mm 0 12mm !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-ledgers h3 {
    padding: 3mm !important;
    color: #ffffff !important;
    background: #12897b !important;
    font-size: 10.5pt !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-ledgers > div:nth-child(2) h3 {
    background: #e5242a !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print th,
  body.ba-erp.printing #financePrint.finance-statement-print td {
    padding: 2.5mm 2mm !important;
    color: #111827 !important;
    border-color: #b9dcd7 !important;
    background: #ffffff !important;
    font-size: 8.3pt !important;
    line-height: 1.15 !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print th {
    background: #eefbf8 !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-total-band {
    background: #ffffff !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-total-band strong {
    font-size: 12pt !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-signatures {
    gap: 38mm !important;
    margin-top: 19mm !important;
  }

  body.ba-erp.printing #financePrint.finance-statement-print .statement-signatures span {
    padding-top: 4mm !important;
    color: #111827 !important;
    border-top: 0.45mm solid #111827 !important;
    font-size: 9.5pt !important;
  }
}
