/*
 * Soul brand layer on top of Filament's default theme, registered as an
 * additional stylesheet (see AdminPanelProvider::boot()) so the panel's
 * own theme is never replaced -- only adjusted.
 *
 * Mirrors the soul.com.co design tokens (C:\dev\soul-web\src\styles\tokens.css):
 * lime only as an accent, black / bone surfaces, Archivo for display,
 * Geist Mono uppercase for labels and buttons, pill buttons, hairline
 * borders instead of shadows, and the manual's 120/240 ms motion tokens.
 * The panel is forced to dark mode (AdminPanelProvider), so every rule
 * here targets the dark theme only.
 */

:root {
    --soul-lime: var(--primary-500);
    --soul-black: #0D0E10;
    --soul-bone: #F2F1EA;
    --soul-line: rgba(242, 241, 234, 0.12);
    --soul-line-2: rgba(242, 241, 234, 0.22);

    --soul-f-display: 'Archivo', system-ui, sans-serif;
    --soul-f-mono: 'Geist Mono', ui-monospace, monospace;
    --soul-f-accent: 'Fraunces', Georgia, serif;

    --soul-dur-micro: 120ms;
    --soul-dur-ui: 240ms;
    --soul-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. Canvas: brand black with the same barely-there lime gradient the
      website uses toward the bottom-right corner. */
body.fi-body {
    background-color: var(--soul-black);
    color: var(--soul-bone);
}

body.fi-body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(120deg,
        transparent 38%,
        color-mix(in oklab, var(--soul-lime) 3.5%, transparent) 72%,
        color-mix(in oklab, var(--soul-lime) 7.5%, transparent) 100%);
}

.fi-topbar,
.fi-sidebar {
    background-color: var(--soul-black) !important;
}

.fi-topbar {
    border-bottom: 1px solid var(--soul-line);
    box-shadow: none !important;
}

.fi-sidebar {
    border-right: 1px solid var(--soul-line);
}

:focus-visible {
    outline-color: var(--soul-lime);
}

/* 2. Typography: Archivo for page titles, headings and stat values. */
.fi-header-heading,
.fi-section-header-heading,
.fi-modal-heading,
.fi-simple-header-heading,
.fi-wi-stats-overview-stat-value {
    font-family: var(--soul-f-display);
    font-weight: 620;
    letter-spacing: -0.03em;
    color: var(--soul-bone);
}

.fi-header-heading {
    font-size: clamp(1.75rem, 2.4vw, 2.25rem);
    line-height: 1.05;
}

/* Geist Mono uppercase for every "metadata" label: field labels, nav
   groups, breadcrumbs, table headers, stat labels and badges. */
.fi-fo-field-label-content,
.fi-sidebar-group-label,
.fi-breadcrumbs-item-label,
.fi-ta-header-cell,
.fi-ta-header-cell button,
.fi-wi-stats-overview-stat-label,
.fi-badge {
    font-family: var(--soul-f-mono);
    font-weight: 500;
    font-size: 0.6875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.fi-fo-field-label-content,
.fi-sidebar-group-label,
.fi-breadcrumbs-item-label,
.fi-ta-header-cell,
.fi-ta-header-cell button,
.fi-wi-stats-overview-stat-label {
    color: var(--gray-400);
}

/* 3. Buttons: pill-shaped, Geist Mono uppercase -- like the website's .btn. */
.fi-btn {
    border-radius: 999px;
    font-family: var(--soul-f-mono);
    font-weight: 500;
    font-size: 0.6875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    min-height: 2.5rem;
    padding-inline: 1.25rem;
    transition: background-color var(--soul-dur-ui) var(--soul-ease-out),
        border-color var(--soul-dur-ui) var(--soul-ease-out),
        color var(--soul-dur-ui) var(--soul-ease-out),
        box-shadow var(--soul-dur-ui) var(--soul-ease-out);
}

/* Primary filled buttons: exact lime with black text; bone on hover,
   exactly like the website's primary CTA. */
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link) {
    background-color: var(--soul-lime) !important;
    color: var(--soul-black) !important;
}

.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link) > .fi-icon {
    color: var(--soul-black) !important;
}

.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link):hover {
    background-color: var(--soul-bone) !important;
}

/* Gray (secondary) buttons: transparent with a hairline, like .btn.secondary. */
.fi-btn.fi-color-gray:not(.fi-link) {
    background-color: transparent !important;
    box-shadow: inset 0 0 0 1px var(--soul-line-2) !important;
    color: var(--soul-bone) !important;
}

.fi-btn.fi-color-gray:not(.fi-link):hover {
    box-shadow: inset 0 0 0 1px var(--soul-bone) !important;
}

.fi-icon-btn {
    border-radius: 999px;
}

/* 4. Cards and sections: hairline border instead of Filament's ring+shadow,
      12px radius like the website's cards. */
.fi-section,
.fi-wi-stats-overview-stat,
.fi-ta-ctn,
.fi-wi-widget > .fi-section,
.fi-simple-main {
    background-color: color-mix(in oklab, var(--gray-800) 55%, transparent) !important;
    border-radius: 12px !important;
    box-shadow: inset 0 0 0 1px var(--soul-line) !important;
}

.fi-section-header {
    border-bottom: 1px solid var(--soul-line);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

.fi-section-header-heading {
    font-size: 1.125rem;
}

/* Stat cards: lime hairline accent on top instead of a thick colored bar. */
.fi-wi-stats-overview-stat {
    position: relative;
    overflow: hidden;
}

.fi-wi-stats-overview-stat::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--soul-lime), transparent);
    opacity: 0.6;
}

.fi-wi-stats-overview-stat-value {
    font-size: 2rem;
}

/* 5. Form fields: 8px radius, defined hairline at rest, lime ring on focus. */
.fi-input-wrp,
.fi-select-input,
.fi-textarea {
    border-radius: 0.5rem !important;
}

.fi-input-wrp {
    background-color: color-mix(in oklab, var(--gray-800) 70%, transparent) !important;
    box-shadow: inset 0 0 0 1px var(--soul-line-2) !important;
    transition: box-shadow var(--soul-dur-micro) var(--soul-ease-out);
}

.fi-input-wrp:hover {
    box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--soul-bone) 40%, transparent) !important;
}

.fi-input-wrp:focus-within {
    box-shadow: inset 0 0 0 1px var(--soul-lime),
        0 0 0 3px color-mix(in oklab, var(--soul-lime) 18%, transparent) !important;
}

.fi-input-wrp-prefix svg {
    color: var(--gray-400);
    transition: color var(--soul-dur-micro) var(--soul-ease-out);
}

.fi-input-wrp:focus-within .fi-input-wrp-prefix svg {
    color: var(--soul-lime);
}

/* 6. Sidebar navigation: muted items, active item with a lime rail and
      a faint lime wash (the website's accent-only rule). */
.fi-sidebar-item-btn {
    border-radius: 0.5rem;
    transition: background-color var(--soul-dur-micro) var(--soul-ease-out);
}

.fi-sidebar-item-label {
    color: var(--gray-300);
}

.fi-sidebar-item-icon {
    color: var(--gray-400) !important;
}

.fi-sidebar-item-btn:hover {
    background-color: rgba(242, 241, 234, 0.05);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: color-mix(in oklab, var(--soul-lime) 8%, transparent) !important;
    box-shadow: inset 2px 0 0 var(--soul-lime);
    border-radius: 0 0.5rem 0.5rem 0;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-label {
    color: var(--soul-bone) !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: var(--soul-lime) !important;
}

/* 7. Tables: hairline rows, mono headers (see 2), row hover wash. */
.fi-ta-header-cell {
    background-color: transparent !important;
}

.fi-ta-row {
    transition: background-color var(--soul-dur-micro) var(--soul-ease-out);
}

.fi-ta-row:hover {
    background-color: rgba(242, 241, 234, 0.03) !important;
}

.fi-ta-table > tbody > tr,
.fi-ta-table > thead > tr {
    border-color: var(--soul-line) !important;
}

/* 8. Badges: pill with tighter mono label (see 2). */
.fi-badge {
    border-radius: 999px;
    padding-inline: 0.625rem;
}

/* 9. Login: brand heading in Archivo with a Fraunces italic accent color. */
.fi-simple-main {
    padding-block: 2.5rem !important;
}

.fi-simple-header-heading {
    font-size: 1.875rem;
}

/* 10. Modals and dropdowns: same hairline-on-black language. */
.fi-modal-window,
.fi-dropdown-panel {
    background-color: var(--gray-900) !important;
    box-shadow: inset 0 0 0 1px var(--soul-line), 0 24px 48px rgba(0, 0, 0, 0.5) !important;
}

.fi-modal-window {
    border-radius: 16px !important;
}

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