.gara-cf-page,
.gara-cf-modal-backdrop {
  --cf-ink: #102333;
  --cf-navy: #0b2638;
  --cf-teal: #0f766e;
  --cf-teal-dark: #075e57;
  --cf-mint: #dff7f1;
  --cf-paper: #fffefa;
  --cf-line: #d8e2e7;
  --cf-muted: #667784;
  --cf-amber: #b45309;
  --cf-red: #b42318;
  color: var(--cf-ink);
}

.gara-cf-page {
  display: grid;
  gap: 14px;
  max-width: 1680px;
  margin: 0 auto;
}

.gara-cf-action-bar {
  display: flex;
  justify-content: flex-end;
  padding: 0;
}

.gara-cf-eyebrow {
  position: relative;
  z-index: 1;
  color: #81e6d9;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .15em;
}

.gara-cf-action-buttons {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, auto);
  gap: 9px;
}

.gara-cf-primary,
.gara-cf-secondary,
.gara-cf-quiet,
.gara-cf-danger {
  min-height: 40px;
  padding: 9px 14px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.gara-cf-primary:hover,
.gara-cf-secondary:hover,
.gara-cf-quiet:hover,
.gara-cf-danger:hover {
  transform: translateY(-1px);
}

.gara-cf-primary:disabled,
.gara-cf-secondary:disabled,
.gara-cf-quiet:disabled,
.gara-cf-danger:disabled {
  cursor: wait;
  opacity: .55;
  transform: none;
}

.gara-cf-primary {
  color: #fff;
  background: #0f766e;
  box-shadow: 0 8px 20px rgba(15, 118, 110, .22);
}

.gara-cf-action-bar .gara-cf-primary {
  color: #fff;
  background: #0f766e;
  box-shadow: 0 8px 20px rgba(15, 118, 110, .22);
}

.gara-cf-action-bar .gara-cf-secondary {
  border: 1px solid #29495a;
  background: #334f60;
}

.gara-cf-secondary {
  color: #fff;
  background: #334b5c;
}

.gara-cf-quiet {
  color: #285063;
  border: 1px solid #cbd9df;
  background: #fff;
}

.gara-cf-danger {
  color: #fff;
  background: #b42318;
}

.gara-cf-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.gara-cf-kpi {
  position: relative;
  overflow: hidden;
  min-height: 108px;
  padding: 15px 17px;
  border: 1px solid var(--cf-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 35, 51, .05);
}

.gara-cf-kpi::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #0f766e;
}

.gara-cf-kpi.expense::before { background: #c2410c; }
.gara-cf-kpi.pending::before { background: #d69e2e; }
.gara-cf-kpi.net::before { background: #2563eb; }
.gara-cf-kpi small { color: var(--cf-muted); }
.gara-cf-kpi b {
  display: block;
  margin-top: 12px;
  color: var(--cf-navy);
  font-size: clamp(20px, 2.2vw, 28px);
}
.gara-cf-kpi.expense b { color: #9a3412; }
.gara-cf-kpi.pending b { color: #9a6700; }

.gara-cf-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(135px, .62fr)) auto;
  gap: 9px;
  align-items: end;
  padding: 13px;
  border: 1px solid var(--cf-line);
  border-radius: 12px;
  background: #fff;
}

.gara-cf-field {
  display: grid;
  gap: 5px;
}

.gara-cf-field label {
  margin: 0;
  color: #425866;
  font-size: 12px;
  font-weight: 800;
}

.gara-cf-field input,
.gara-cf-field select,
.gara-cf-field textarea {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #cbd8de;
  border-radius: 8px;
  color: var(--cf-ink);
  background: #fff;
  font: inherit;
}

.gara-cf-field textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.45;
}

.gara-cf-field input:focus,
.gara-cf-field select:focus,
.gara-cf-field textarea:focus {
  outline: 3px solid rgba(20, 184, 166, .15);
  border-color: #0f8a80;
}

.gara-cf-table-card {
  overflow: hidden;
  border: 1px solid var(--cf-line);
  border-radius: 13px;
  background: #fff;
}

.gara-cf-table-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--cf-line);
  background: linear-gradient(90deg, #f6faf9, #fff);
}

.gara-cf-table-head h3 { margin: 0 0 3px; font-size: 19px; }
.gara-cf-table-head p { margin: 0; color: var(--cf-muted); font-size: 12px; }
.gara-cf-table-scroll { overflow: auto; }
.gara-cf-table { min-width: 1140px; }
.gara-cf-table th { color: #425866; font-size: 11px; text-transform: uppercase; letter-spacing: .055em; }
.gara-cf-table td { vertical-align: top; }
.gara-cf-code { color: #075e57; font-weight: 900; white-space: nowrap; }
.gara-cf-money { color: #102f43; font-weight: 900; white-space: nowrap; }
.gara-cf-type { font-weight: 800; white-space: nowrap; }
.gara-cf-type.income { color: #047857; }
.gara-cf-type.expense { color: #b45309; }
.gara-cf-description { max-width: 360px; color: #344b5a; line-height: 1.45; }
.gara-cf-meta { display: block; margin-top: 4px; color: var(--cf-muted); font-size: 11px; }

.gara-cf-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.gara-cf-status.draft { color: #475569; background: #e2e8f0; }
.gara-cf-status.pending { color: #92400e; background: #fef3c7; }
.gara-cf-status.approved { color: #166534; background: #dcfce7; }

.gara-cf-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 250px;
}

.gara-cf-row-actions button {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #cbd8de;
  border-radius: 7px;
  color: #27485a;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.gara-cf-row-actions button.approve { color: #fff; border-color: #0f766e; background: #0f766e; }
.gara-cf-row-actions button.submit { color: #fff; border-color: #b45309; background: #b45309; }
.gara-cf-row-actions button:disabled { cursor: wait; opacity: .55; }

.gara-cf-empty,
.gara-cf-loading {
  padding: 44px 20px;
  text-align: center;
  color: var(--cf-muted);
}

.gara-cf-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
  border-top: 1px solid var(--cf-line);
  color: var(--cf-muted);
  font-size: 12px;
}

.gara-cf-pager div { display: flex; gap: 6px; }

.gara-cf-alert {
  padding: 11px 13px;
  border: 1px solid #f2c98d;
  border-left: 4px solid #d97706;
  border-radius: 9px;
  color: #7c3e08;
  background: #fff9ec;
  line-height: 1.5;
}

.gara-cf-error,
.gara-cf-success {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  max-width: 440px;
  padding: 12px 15px;
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .3);
  animation: gara-cf-toast-in .18s ease-out;
}

.gara-cf-error { background: #a61b1b; }
.gara-cf-success { background: #087a68; }
@keyframes gara-cf-toast-in { from { opacity: 0; transform: translateY(8px); } }

.gara-cf-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 23, 35, .72);
  backdrop-filter: blur(4px);
}

.gara-cf-modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d4e0e5;
  border-radius: 15px;
  color: var(--cf-ink);
  background: #fffefa;
  box-shadow: 0 24px 70px rgba(7, 27, 44, .34);
  isolation: isolate;
}

.gara-cf-modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 17px 19px;
  border-bottom: 1px solid #dbe5e9;
  background: #fffefa;
}

.gara-cf-modal-header h3 { margin: 4px 0 0; font-size: 23px; }
.gara-cf-close {
  width: 34px;
  height: 34px;
  border: 1px solid #d4dee3;
  border-radius: 50%;
  color: #334e5e;
  background: #fff;
  cursor: pointer;
  font-size: 19px;
}

.gara-cf-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 19px 20px;
  background: #fffefa;
}

.gara-cf-form .full { grid-column: 1 / -1; }
.gara-cf-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 5px;
}

.gara-cf-history {
  display: grid;
  gap: 0;
  padding: 4px 18px 20px;
  background: #fffefa;
}

.gara-cf-history-item {
  position: relative;
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 15px;
  padding: 15px 0 15px 20px;
  border-left: 2px solid #cbd9df;
}

.gara-cf-history-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 19px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0f766e;
}

.gara-cf-history-item time { color: var(--cf-muted); font-size: 11px; }
.gara-cf-history-item b { display: block; margin-bottom: 3px; }
.gara-cf-history-item span { color: var(--cf-muted); font-size: 12px; }

.report-toolbar[data-gara-report-enhanced] {
  overflow: hidden;
  padding: 14px 16px;
  border: 1px solid #cedce2;
  border-top: 4px solid #0f766e;
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 12%, rgba(15, 118, 110, .1), transparent 28%),
    linear-gradient(135deg, #fff 0%, #f4f9f8 100%);
  box-shadow: 0 8px 24px rgba(15, 35, 51, .07);
}

.report-toolbar[data-gara-report-enhanced] .section-heading {
  align-items: center;
  gap: 16px;
}

.report-toolbar[data-gara-report-enhanced] .section-heading h3 {
  margin-top: 4px;
  color: #0b2638;
  font-size: clamp(21px, 2vw, 27px);
  letter-spacing: -.02em;
}

.report-toolbar[data-gara-report-enhanced] .eyebrow {
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
}

.report-toolbar[data-gara-report-enhanced] .excel-btn {
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #0b4f4a;
  box-shadow: 0 8px 18px rgba(11, 79, 74, .2);
  font-weight: 850;
  white-space: nowrap;
}

.report-toolbar[data-gara-report-enhanced] > .row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 10px !important;
}

.report-toolbar[data-gara-report-enhanced] > .row > div {
  min-width: 0 !important;
}

.report-toolbar[data-gara-report-enhanced] label {
  display: block;
  margin-bottom: 5px;
  color: #425866;
  font-size: 12px;
  font-weight: 850;
}

.report-toolbar[data-gara-report-enhanced] .input {
  width: 100%;
  min-height: 42px;
  margin: 0;
  border: 1px solid #c4d3da;
  border-radius: 9px;
  color: #102333;
  background: #fff;
}

.report-toolbar[data-gara-report-enhanced] > .row .btn {
  min-height: 42px;
  border-radius: 9px;
}

.report-toolbar[data-gara-report-enhanced] .gara-report-range {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 5px 9px;
  border: 1px solid #cce4df;
  border-radius: 999px;
  color: #285b58;
  background: rgba(229, 246, 242, .75);
  font-size: 12px;
  font-weight: 750;
}

.gara-report-section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin: 14px 2px 7px;
}

.gara-report-section-title h3 {
  margin: 0;
  color: #102333;
  font-size: 19px;
}

.gara-report-section-title span {
  color: #667784;
  font-size: 12px;
  font-weight: 750;
}

.report-kpis[data-gara-report-enhanced] {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-columns: auto;
  gap: 8px;
  overflow: visible;
}

.report-kpis[data-gara-report-enhanced] .kpi-card {
  min-width: 0;
  min-height: 96px;
  padding: 12px 13px;
  border: 1px solid #d5e0e5;
  border-radius: 12px;
  color: #425866;
  background: linear-gradient(145deg, #fff 0%, #f8fafb 100%);
  box-shadow: 0 4px 14px rgba(15, 35, 51, .045);
  text-decoration: none;
}

.report-kpis[data-gara-report-enhanced] .kpi-card:hover {
  border-color: #9fc9c2;
  box-shadow: 0 8px 22px rgba(15, 35, 51, .09);
}

.report-kpis[data-gara-report-enhanced] .kpi-card > div:first-child {
  min-height: 30px;
  color: #526873;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.report-kpis[data-gara-report-enhanced] .kpi-card h3 {
  margin: 5px 0 3px;
  color: #0b2638;
  font-size: clamp(21px, 2.1vw, 27px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.report-kpis[data-gara-report-enhanced] .kpi-card small {
  color: #778894;
  font-size: 11px;
  line-height: 1.35;
}

.report-kpis[data-gara-report-enhanced] .kpi-card.finance {
  border-left: 4px solid #0f766e;
  background: linear-gradient(145deg, #fff 0%, #eff9f6 100%);
}

.gara-report-cash-flow {
  --cf-ink: #102333;
  --cf-navy: #0b2638;
  --cf-teal: #0f766e;
  --cf-line: #d8e2e7;
  --cf-muted: #667784;
  min-width: 0;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #cddde2;
  border-radius: 14px;
  color: var(--cf-ink);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .075), transparent 34%),
    #fff;
  box-shadow: 0 7px 24px rgba(15, 35, 51, .06);
}

.gara-report-cf-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--cf-line);
}

.gara-report-cf-head h3 {
  margin: 0 0 3px;
  color: var(--cf-navy);
  font-size: 20px;
}

.gara-report-cf-head span {
  color: var(--cf-muted);
  font-size: 12px;
  font-weight: 750;
}

.gara-report-cf-head a {
  padding: 8px 11px;
  border: 1px solid #bad5d0;
  border-radius: 8px;
  color: #075e57;
  background: #fff;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.gara-report-cf-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 13px 14px;
}

.gara-report-cf-kpis article {
  position: relative;
  min-width: 0;
  min-height: 98px;
  padding: 14px 15px;
  overflow: hidden;
  border: 1px solid #d7e2e6;
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
}

.gara-report-cf-kpis article::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #0f766e;
}

.gara-report-cf-kpis article.expense::before { background: #c2410c; }
.gara-report-cf-kpis article.net::before { background: #2563eb; }
.gara-report-cf-kpis article.pending::before { background: #d69e2e; }
.gara-report-cf-kpis small { color: var(--cf-muted); font-size: 12px; font-weight: 750; }
.gara-report-cf-kpis b {
  display: block;
  margin-top: 11px;
  color: var(--cf-navy);
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.gara-report-cf-kpis .expense b { color: #9a3412; }
.gara-report-cf-kpis .net.positive b { color: #1d4ed8; }
.gara-report-cf-kpis .net.negative b { color: #b42318; }
.gara-report-cf-kpis .pending b { color: #9a6700; }

.gara-report-cf-table-head {
  padding: 13px 17px 10px;
  border-top: 1px solid var(--cf-line);
}

.gara-report-cf-table-head h4 { margin: 0 0 3px; color: var(--cf-navy); font-size: 16px; }
.gara-report-cf-table-head p { margin: 0; color: var(--cf-muted); font-size: 11px; }
.gara-report-cf-table-scroll { max-width: 100%; overflow: auto; }
.gara-report-cf-table { width: 100%; min-width: 1020px; border-collapse: collapse; }
.gara-report-cf-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  border-top: 1px solid var(--cf-line);
  border-bottom: 1px solid var(--cf-line);
  color: #425866;
  background: #f5f9f8;
  font-size: 10px;
  letter-spacing: .055em;
  text-align: left;
  text-transform: uppercase;
}
.gara-report-cf-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e5ecef;
  vertical-align: top;
  font-size: 12px;
}
.gara-report-cf-table tbody tr:last-child td { border-bottom: 0; }
.gara-report-cf-table tbody tr:hover { background: #fbfdfc; }
.gara-report-cf-description { min-width: 240px; max-width: 390px; color: #344b5a; line-height: 1.45; }
.gara-report-cf-amount { font-weight: 900; white-space: nowrap; }
.gara-report-cf-amount.income { color: #047857; }
.gara-report-cf-amount.expense { color: #b45309; }
.gara-report-cf-error {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 14px;
  padding: 16px;
  border: 1px solid #f1b8b1;
  border-radius: 10px;
  color: #8a241a;
  background: #fff5f4;
}

.gara-report-records {
  min-width: 0;
  margin-top: 12px !important;
  overflow: hidden;
  border: 1px solid #d3dfe4;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(15, 35, 51, .05);
}

.gara-report-records .section-heading { padding: 4px 2px 12px; }
.gara-report-records .table-wrap { max-width: 100%; overflow: auto; }
.gara-report-records table { min-width: 980px; }
.gara-report-records th { color: #425866; background: #f5f8f9; font-size: 10px; letter-spacing: .05em; }
.gara-report-records td { vertical-align: top; }

@media (max-width: 1120px) {
  .gara-cf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gara-cf-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gara-cf-toolbar .search { grid-column: 1 / -1; }
  .report-kpis[data-gara-report-enhanced] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gara-report-cf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .gara-cf-page { gap: 10px; }
  .gara-cf-action-bar { padding: 0; }
  .gara-cf-action-buttons,
  .gara-cf-kpis,
  .gara-cf-toolbar,
  .gara-cf-form { grid-template-columns: 1fr; }
  .gara-cf-action-buttons { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .gara-cf-toolbar .search,
  .gara-cf-form .full { grid-column: auto; }
  .gara-cf-kpi { min-height: 92px; }
  .gara-cf-table-head { align-items: flex-start; flex-direction: column; }
  .gara-cf-modal-backdrop { padding: 0; place-items: stretch; }
  .gara-cf-modal { width: 100%; max-height: 100vh; border-radius: 0; }
  .gara-cf-form-actions { flex-direction: column-reverse; }
  .gara-cf-form-actions button { width: 100%; }
  .report-toolbar[data-gara-report-enhanced] { padding: 15px 14px; }
  .report-toolbar[data-gara-report-enhanced] .section-heading { align-items: stretch; flex-direction: column; }
  .report-toolbar[data-gara-report-enhanced] .excel-btn { width: 100%; }
  .report-toolbar[data-gara-report-enhanced] > .row { grid-template-columns: 1fr; }
  .report-toolbar[data-gara-report-enhanced] .gara-report-range { width: 100%; border-radius: 8px; line-height: 1.4; }
  .gara-report-section-title { align-items: flex-start; flex-direction: column; gap: 3px; }
  .report-kpis[data-gara-report-enhanced] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .report-kpis[data-gara-report-enhanced] .kpi-card { min-height: 92px; padding: 11px; }
  .report-kpis[data-gara-report-enhanced] .kpi-card:last-child { grid-column: 1 / -1; }
  .gara-report-cf-head { align-items: flex-start; flex-direction: column; }
  .gara-report-cf-head a { width: 100%; text-align: center; }
  .gara-report-cf-kpis { grid-template-columns: 1fr; }
  .gara-report-cf-kpis article { min-height: 88px; }
  .gara-report-cf-table-scroll { overflow: visible; }
  .gara-report-cf-table,
  .gara-report-cf-table tbody { display: block; min-width: 0; }
  .gara-report-cf-table thead { display: none; }
  .gara-report-cf-table tbody { padding: 9px; }
  .gara-report-cf-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 9px;
    overflow: hidden;
    border: 1px solid #d9e4e8;
    border-radius: 10px;
    background: #fff;
  }
  .gara-report-cf-table tbody tr:last-child { margin-bottom: 0; }
  .gara-report-cf-table td {
    min-width: 0;
    padding: 10px 11px;
    border-bottom: 1px solid #edf1f3;
    font-size: 11px;
  }
  .gara-report-cf-table td:nth-child(odd) { border-right: 1px solid #edf1f3; }
  .gara-report-cf-table td:nth-child(5),
  .gara-report-cf-table td:nth-child(6),
  .gara-report-cf-table td[colspan] { grid-column: 1 / -1; border-right: 0; }
  .gara-report-cf-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: #71818b;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .045em;
    text-transform: uppercase;
  }
  .gara-report-cf-description { min-width: 0; max-width: none; }
  .gara-report-cf-error { align-items: stretch; flex-direction: column; }
}
