/* TehillimForAll admin skin.
   Everything here is a Tabler custom property, so components keep their own
   rules and only the palette and surface treatment change. Colours derive from
   the emblem blue (#1c3888) sampled from TehillimForAllAdminLogo.webp. */

:root,
:root[data-bs-theme-primary] {
  --tfa-ink: #101c42;
  --tfa-blue: #1c3888;
  --tfa-blue-lift: #2a4cb4;

  /* Tabler's `primary` setting only accepts its own named palettes, none of
     which are the brand blue, so the primary variables are set directly. The
     second selector outranks [data-bs-theme-primary=...] rather than relying
     on stylesheet order. */
  --tblr-primary: var(--tfa-blue);
  --tblr-primary-rgb: 28, 56, 136;
  --tblr-primary-fg: #ffffff;

  /* Cool near-white canvas so white cards read as raised rather than flush. */
  --tblr-body-bg: #f4f6fb;
  --tblr-link-color: var(--tfa-blue);
  --tblr-link-hover-color: var(--tfa-blue-lift);
}

/* Sidebar carries the same navy field as the login page, so the two read as
   one product rather than a branded login bolted onto stock Tabler. */
.navbar-vertical {
  --tblr-navbar-bg: transparent;
  --tblr-navbar-color: rgba(255, 255, 255, .72);
  --tblr-navbar-hover-color: #fff;
  --tblr-navbar-active-color: #fff;
  --tblr-navbar-active-bg: rgba(255, 255, 255, .1);
  --tblr-navbar-border-color: transparent;
  --tblr-border-color: rgba(255, 255, 255, .12);
  background: linear-gradient(170deg, var(--tfa-blue-lift) 0%, var(--tfa-blue) 38%, var(--tfa-ink) 100%);
}

.navbar-vertical .nav-link-title,
.navbar-vertical .nav-link-icon { color: inherit; }

/* Section headers read as labels, not links: the same uppercase, tracked
   treatment as the login form's field labels. */
.navbar-vertical .dropdown-toggle {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}

/* Cards match the login card: no border, soft elevation. */
.card {
  --tblr-card-border-width: 0;
  box-shadow: 0 1px 2px rgba(16, 28, 66, .06), 0 4px 16px rgba(16, 28, 66, .06);
}

/* Table headers echo the same label treatment, so hierarchy is carried by
   type rather than by rules and fills. */
.table thead th {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5b6684;
  background: transparent;
}

.page-title { letter-spacing: -.02em; }

/* Rhythm: let the canvas show around the cards. */
.page-body { margin-top: 1.25rem; }
.page-header + * { margin-top: 1rem; }

/* Rows: lighter rules, more air, and a brand-tinted hover so scanning a long
   list tracks the cursor without the grid shouting. */
.table > :not(caption) > * > * { padding-top: .75rem; padding-bottom: .75rem; }
.table tbody tr { border-bottom: 1px solid rgba(16, 28, 66, .06); }
.table tbody tr:hover { background: rgba(28, 56, 136, .035); }
.card-table thead th { border-bottom: 1px solid rgba(16, 28, 66, .1); }

/* The search field is the primary way into a long list; give it presence. */
.card-header .input-group .form-control,
.card-header .form-control { background: #f7f9fd; }

/* Breadcrumb recedes so the page title leads. */
.breadcrumb { font-size: .8125rem; opacity: .7; }

/* ---------------------------------------------------------------------------
   Dashboard.
   ~26 stat cards in identical boxes made everything shout at once. The hero is
   the only bold element; the cards recede; colour is reserved for meaning
   (a muted zero, a real warning) rather than decorating every figure.
   --------------------------------------------------------------------------- */

/* One bold moment, in the same navy as the sidebar and the login field. */
.tfa-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem 3rem;
  align-items: end;
  padding: 2rem 2.25rem;
  margin-bottom: 2rem;
  border-radius: 1rem;
  color: #fff;
  background: linear-gradient(140deg, var(--tfa-blue-lift) 0%, var(--tfa-blue) 45%, var(--tfa-ink) 100%);
  box-shadow: 0 1rem 2rem rgba(16, 28, 66, .18);
}
.tfa-hero-aside {
  display: flex;
  gap: 2.5rem;
  text-align: right;
}
.tfa-hero-label {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}
.tfa-hero-figure {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.tfa-hero-sub {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 34rem) {
  .tfa-hero { grid-template-columns: 1fr; align-items: start; }
  .tfa-hero-aside { text-align: left; }
}

/* Section headings become quiet labels with a rule, matching the sidebar and
   table headers, so the figures below them are what the eye lands on. */
.tfa-dash h3 {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #5b6684;
}
.tfa-dash h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(16, 28, 66, .1);
}
/* Tabler colour utilities are !important, so match it to mute the icons. */
.tfa-dash h3 i { color: #97a1b8 !important; font-size: .875rem; }

/* Figures are ink and tabular so columns line up; a zero stays muted, and
   warnings keep their colour. Everything else loses its decorative tint. */
.tfa-dash .card .h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}
.tfa-dash .card .h1.text-primary,
.tfa-dash .card .h1.text-success,
.tfa-dash .card .h1.text-info,
.tfa-dash .card .h1.text-secondary {
  color: var(--tfa-ink) !important;
}
.tfa-dash .card .subheader {
  font-size: .6875rem;
  letter-spacing: .08em;
  color: #7b8499;
}

/* Revenue was a second, green hero competing with the navy one. Same family,
   one step quieter, so it reads as a subtotal rather than a rival headline. */
.tfa-dash .tfa-subhero {
  border: 0;
  background: linear-gradient(140deg, rgba(42, 76, 180, .09), rgba(28, 56, 136, .06));
}
.tfa-dash .tfa-subhero .display-4,
.tfa-dash .tfa-subhero .h1,
.tfa-dash .tfa-subhero [class*="display-"] {
  color: var(--tfa-blue) !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}

/* Sub-section headers get the same label treatment as the section headers. */
.tfa-dash h5 {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7b8499;
}
.tfa-dash h5::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(16, 28, 66, .07);
}
.tfa-dash h5 i { color: #97a1b8 !important; }

/* Blocks vary by what the data is: a lead figure carries a trend, a strip
   carries supporting scalars without a box each, a composition shows parts of
   a whole. That variation is the differentiation the uniform card grid lacked. */
.tfa-block {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.tfa-block-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tfa-block-wide { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); }
.tfa-block-2 .tfa-strip { grid-column: 1 / -1; }
@media (max-width: 62rem) {
  .tfa-block-2,
  .tfa-block-wide { grid-template-columns: minmax(0, 1fr); }
}

.tfa-lead {
  padding: 1.25rem 1.375rem;
  background: #fff;
  border-radius: .75rem;
  box-shadow: 0 1px 2px rgba(16, 28, 66, .06), 0 4px 16px rgba(16, 28, 66, .06);
}
.tfa-lead-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--tfa-ink);
  font-variant-numeric: tabular-nums;
}
.tfa-lead-money .tfa-lead-value { color: var(--tfa-blue); }
.tfa-lead-foot {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin-top: .25rem;
  font-size: .8125rem;
  color: #7b8499;
}

/* Supporting scalars: a row of label/value pairs, no box each. */
/* Flex, not a fixed grid: the strip takes 2 or 6 stats without leaving an
   empty cell, and wraps on narrow screens. */
.tfa-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: rgba(16, 28, 66, .07);
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 28, 66, .06);
}
.tfa-stat {
  flex: 1 1 9rem;
  padding: .875rem 1.125rem;
  background: #fff;
}
.tfa-stat-label {
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7b8499;
}
.tfa-stat-value {
  margin-top: .125rem;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--tfa-ink);
  font-variant-numeric: tabular-nums;
}
.tfa-stat-note { font-size: .75rem; color: #97a1b8; }

.tfa-delta { font-weight: 600; color: #7b8499; }
.tfa-delta.is-up { color: #2f855a; }
.tfa-delta.is-down { color: #c05621; }
.tfa-delta-note { margin-left: .375rem; font-weight: 400; color: #97a1b8; }

.tfa-spark { margin-top: .5rem; }
.tfa-spark .apexcharts-tooltip {
  border: 0 !important;
  border-radius: .5rem !important;
  box-shadow: 0 .5rem 1.5rem rgba(16, 28, 66, .18) !important;
  font-size: .75rem;
}
/* The card's own label sits right above the chart, so repeating it in the
   popover is noise: show the date and the number, nothing else. The series
   name stays in the markup for the accessible description. */
.tfa-spark .apexcharts-tooltip-text-y-label,
.tfa-spark .apexcharts-tooltip-marker { display: none; }
.tfa-spark .apexcharts-tooltip-text-y-value { margin-left: 0; font-weight: 700; }
.tfa-spark .apexcharts-tooltip-title {
  background: var(--tfa-blue) !important;
  color: #fff !important;
  border: 0 !important;
  font-weight: 600;
}

/* Parts of a whole, shown as such. */
.tfa-compose {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem 1.375rem;
  background: #fff;
  border-radius: .75rem;
  box-shadow: 0 1px 2px rgba(16, 28, 66, .06), 0 4px 16px rgba(16, 28, 66, .06);
}
.tfa-bar {
  display: flex;
  height: .75rem;
  border-radius: .375rem;
  overflow: hidden;
  background: rgba(16, 28, 66, .06);
}
.tfa-bar-a { background: var(--tfa-blue); }
.tfa-bar-b { background: var(--tfa-blue-lift); }
.tfa-bar-c { background: #8fa3d9; }
.tfa-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .8125rem;
  color: #5b6684;
}
.tfa-legend li { display: flex; align-items: center; gap: .5rem; }
.tfa-legend b {
  color: var(--tfa-ink);
  font-variant-numeric: tabular-nums;
}
.tfa-key {
  width: .625rem;
  height: .625rem;
  border-radius: .1875rem;
}
