/*
 * CashBack panel theme: the mockups' look (navy header, tinted money cards, Cairo).
 * Plain CSS on top of Filament's compiled styles, so cPanel needs no Node build.
 * Colours: navy #13294b (brand), green #2eae4e (money in), orange #f7941d (money out),
 * red #e5484d (customer owes), blue #2f6fde (commission / debt payment), violet (new debt).
 */

:root {
    --cb-navy: #13294b;
    --cb-navy-2: #1d3a66;
    --cb-navy-deep: #0b1a31;
    --cb-orange: #f7941d;
    --cb-green: #2eae4e;
    --cb-red: #e5484d;
    --cb-blue: #2f6fde;
    --cb-bg: #f2f5f9;
    --cb-line: #e2e8f0;
    --cb-ink: #0f1d33;
    --cb-muted: #64748b;
    --cb-radius: 14px;
}

/* ---------- base ---------- */
.fi-body {
    background: var(--cb-bg);
    color: var(--cb-ink);
    font-feature-settings: "tnum" 1;
}

:focus-visible {
    outline: 2px solid var(--cb-orange);
    outline-offset: 2px;
}

/* ---------- brand block ---------- */
.cb-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    height: 100%;
}

.cb-brand-mark {
    height: 2.6rem;
    width: auto;
    flex: none;
}

.cb-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.cb-brand-name {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--cb-navy);
    white-space: nowrap;
}

.cb-brand-sub {
    font-size: .72rem;
    font-weight: 600;
    color: var(--cb-muted);
    direction: ltr;
    text-align: right;
}

/* ---------- top bar: the navy header from the app ---------- */
.fi-topbar {
    background: var(--cb-navy);
    border-bottom: 3px solid var(--cb-orange);
    box-shadow: 0 6px 18px -12px rgba(11, 26, 49, .6);
}

.fi-topbar .cb-brand-name { color: #fff; }
.fi-topbar .cb-brand-sub { color: #9fb2cf; }

.fi-topbar .fi-icon-btn,
.fi-topbar .fi-topbar-item-btn,
.fi-topbar .fi-topbar-open-sidebar-btn,
.fi-topbar .fi-topbar-close-sidebar-btn {
    color: #dbe5f3;
}

.fi-topbar .fi-icon-btn:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.fi-topbar .fi-global-search-field .fi-input-wrp {
    background: rgba(255, 255, 255, .08);
    border-color: transparent;
    box-shadow: none;
}

.fi-topbar .fi-global-search-field .fi-input-wrp:focus-within {
    background: rgba(255, 255, 255, .14);
    box-shadow: 0 0 0 2px var(--cb-orange);
}

.fi-topbar .fi-global-search-field input,
.fi-topbar .fi-global-search-field .fi-input-wrp-prefix svg {
    color: #fff;
}

.fi-topbar .fi-global-search-field input::placeholder { color: #9fb2cf; }

.fi-topbar .fi-user-avatar {
    box-shadow: 0 0 0 2px var(--cb-orange);
}

/* ---------- sidebar ---------- */
.fi-sidebar {
    background: #fff;
    border-inline-start: 1px solid var(--cb-line);
}

.fi-sidebar-nav { padding-top: 1.25rem; }

.fi-sidebar-group-label {
    font-size: .78rem;
    font-weight: 700;
    color: #94a3b8;
}

.fi-sidebar-item-btn {
    border-radius: 10px;
    padding-block: .55rem;
    font-weight: 600;
    transition: background-color .15s ease, color .15s ease;
}

.fi-sidebar-item-btn:hover { background: #f1f5fb; }

.fi-sidebar-item-label { color: #334155; }
.fi-sidebar-item-icon { color: #94a3b8; }

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: var(--cb-navy);
    box-shadow: inset -4px 0 0 var(--cb-orange);
}

[dir="ltr"] .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    box-shadow: inset 4px 0 0 var(--cb-orange);
}

.fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: #fff;
}

/* ---------- page header ---------- */
.fi-header-heading {
    font-weight: 800;
    color: var(--cb-navy);
    letter-spacing: 0;
}

.fi-header-subheading {
    color: var(--cb-muted);
    font-size: 1rem;
}

/* ---------- surfaces: sections, tables, widgets ---------- */
.fi-section:not(.fi-section-not-contained),
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-in-entry-wrp .fi-section {
    border-radius: var(--cb-radius);
    border: 1px solid var(--cb-line);
    box-shadow: 0 1px 2px rgba(15, 29, 51, .04);
}

.fi-section-header-heading,
.fi-ta-header-heading {
    color: var(--cb-navy);
    font-weight: 700;
}

.fi-ta-header-cell {
    background: #f7f9fc;
    color: #475569;
    font-weight: 700;
}

.fi-ta-row:hover { background: #fafcff; }

/* ---------- buttons ---------- */
.fi-btn {
    border-radius: 10px;
    font-weight: 700;
}

/* ---------- stat cards: the tinted money cards from the mockups ---------- */
.fi-wi-stats-overview-stat {
    padding: 1.15rem 1.25rem;
}

.fi-wi-stats-overview-stat-label {
    font-weight: 700;
    color: #475569;
}

.fi-wi-stats-overview-stat-value {
    font-weight: 800;
    font-size: 1.65rem;
    line-height: 1.3;
    color: var(--cb-ink);
}

.fi-wi-stats-overview-stat-label-ctn .fi-icon {
    width: 2rem;
    height: 2rem;
    padding: .35rem;
    border-radius: 999px;
    background: #fff;
    color: var(--cb-tone, var(--cb-navy));
    box-shadow: 0 0 0 1px var(--cb-tone-line, var(--cb-line));
}

.cb-tint {
    background: var(--cb-tone-bg);
    border-color: var(--cb-tone-line);
}

.cb-tint .fi-wi-stats-overview-stat-value { color: var(--cb-tone-ink); }

/* A card whose value is words (who holds the shift), not money. */
.cb-text-value .fi-wi-stats-overview-stat-value {
    font-size: 1.2rem;
    line-height: 1.5;
}

.cb-tint-green  { --cb-tone: #1f9a40; --cb-tone-ink: #15803d; --cb-tone-bg: #ecf9f0; --cb-tone-line: #c9ecd4; }
.cb-tint-orange { --cb-tone: #e07f06; --cb-tone-ink: #c2410c; --cb-tone-bg: #fff4e6; --cb-tone-line: #fbdcb4; }
.cb-tint-red    { --cb-tone: #d93036; --cb-tone-ink: #c81e24; --cb-tone-bg: #fdeeee; --cb-tone-line: #f6cfd0; }
.cb-tint-blue   { --cb-tone: #2f6fde; --cb-tone-ink: #1d4fb8; --cb-tone-bg: #eef4ff; --cb-tone-line: #cfdefb; }
.cb-tint-amber  { --cb-tone: #c58a00; --cb-tone-ink: #8a5a00; --cb-tone-bg: #fff9e5; --cb-tone-line: #f4e3a6; }
.cb-tint-navy   { --cb-tone: #13294b; --cb-tone-ink: #13294b; --cb-tone-bg: #eef2f8; --cb-tone-line: #d3dcea; }
.cb-tint-slate  { --cb-tone: #475569; --cb-tone-ink: #1e293b; --cb-tone-bg: #ffffff; --cb-tone-line: #e2e8f0; }

/* ---------- badges ---------- */
.fi-badge {
    border-radius: 999px;
    font-weight: 700;
}

/* ---------- login page: the navy splash from the app ---------- */
.fi-simple-layout {
    background:
        radial-gradient(1200px 500px at 50% 115%, rgba(47, 111, 222, .35), transparent 60%),
        linear-gradient(160deg, var(--cb-navy-2) 0%, var(--cb-navy) 45%, var(--cb-navy-deep) 100%);
}

.fi-simple-main {
    border-radius: 20px;
    border: 0;
    box-shadow: 0 30px 60px -20px rgba(3, 10, 24, .55);
}

.fi-simple-header .fi-logo { height: auto !important; }

.fi-simple-header .cb-brand {
    flex-direction: column;
    gap: .5rem;
}

.fi-simple-header .cb-brand-mark { height: 4.5rem; }

.fi-simple-header .cb-brand-text { align-items: center; }

.fi-simple-header .cb-brand-name { font-size: 1.5rem; }

.fi-simple-header .cb-brand-sub { text-align: center; }

.fi-simple-header-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cb-muted);
}

@media (prefers-reduced-motion: reduce) {
    .fi-sidebar-item-btn { transition: none; }
}
