/*
 * Bonddy Admin theme — layered over Filament's compiled CSS.
 *
 * Source of truth: bonddy-frontend-cli/src/theme (palettes.ts, tokens.ts).
 *   light: cream page #FFF8DE, card #FFFEF8, pink #D8107F, heading #2A0A20
 *   dark:  plum page  #1B0818, card #23101F, pink #FF2D9B, heading #F8EEF5
 *   radius: card 16, input 16, CTA 28 (pill), font: Manrope
 *
 * The gray ramp and light primary come from App\Support\BonddyPalette; this
 * file handles what the palette API cannot: a different pink in dark mode,
 * off-white surfaces (Filament hard-codes bg-white), radii, the CTA gradient
 * and the login screen.
 */

/* ── Dark mode uses the app's brighter pink ─────────────────────────── */
html.dark {
    --primary-50: 255, 240, 248;
    --primary-100: 255, 221, 239;
    --primary-200: 255, 189, 224;
    --primary-300: 255, 140, 203;
    --primary-400: 255, 95, 182;
    --primary-500: 255, 45, 155;
    --primary-600: 242, 13, 139;
    --primary-700: 209, 10, 119;
    --primary-800: 168, 16, 110;
    --primary-900: 142, 27, 104;
    --primary-950: 108, 20, 80;
}

/* ── Type ───────────────────────────────────────────────────────────── */
body {
    font-feature-settings: 'ss01', 'cv05';
    -webkit-font-smoothing: antialiased;
}

.fi-header-heading,
.fi-simple-header-heading {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.fi-section-header-heading,
.fi-wi-stats-overview-stat-value,
.fi-modal-heading,
.fi-ta-header-heading {
    font-weight: 800;
    letter-spacing: -0.01em;
}

.fi-sidebar-group-label {
    font-family: ui-monospace, 'Space Mono', SFMono-Regular, Menlo, monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* ── Surfaces (light mode): off-white cards on the cream page ───────── */
html:not(.dark) .fi-section,
html:not(.dark) .fi-ta-ctn,
html:not(.dark) .fi-wi-stats-overview-stat,
html:not(.dark) .fi-wi-chart,
html:not(.dark) .fi-wi-widget > .fi-section,
html:not(.dark) .fi-tabs,
html:not(.dark) .fi-fo-tabs,
html:not(.dark) .fi-in-tabs,
html:not(.dark) .fi-dropdown-panel,
html:not(.dark) .fi-modal-window,
html:not(.dark) .fi-simple-main,
html:not(.dark) .fi-sidebar,
html:not(.dark) .fi-topbar nav,
html:not(.dark) .fi-no-notification,
html:not(.dark) .fi-fo-repeater-item,
html:not(.dark) .fi-fo-builder-item {
    background-color: #FFFEF8;
}

html:not(.dark) .fi-input-wrp,
html:not(.dark) .fi-fo-rich-editor .trix-editor,
html:not(.dark) .fi-fo-markdown-editor .EasyMDEContainer .CodeMirror,
html:not(.dark) .fi-fo-file-upload .filepond--panel-root {
    background-color: #FFFDF5;
}

html:not(.dark) .fi-ta-table thead,
html:not(.dark) .fi-ta-row:hover {
    background-color: #FFF8DE;
}

html:not(.dark) .fi-topbar nav,
html:not(.dark) .fi-sidebar-header {
    backdrop-filter: saturate(1.2) blur(10px);
}

/* ── Shape ──────────────────────────────────────────────────────────── */
.fi-section,
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-wi-chart,
.fi-tabs,
.fi-fo-tabs,
.fi-in-tabs,
.fi-modal-window,
.fi-dropdown-panel,
.fi-fo-repeater-item,
.fi-fo-builder-item,
.fi-no-notification {
    border-radius: 1rem; /* radius.card */
}

.fi-simple-main {
    border-radius: 1.5rem;
}

.fi-input-wrp,
.fi-fo-file-upload .filepond--root,
.fi-fo-rich-editor .trix-editor,
.fi-fo-select .choices__inner {
    border-radius: 0.875rem; /* radius.input, slightly tighter for 2.5rem controls */
}

.fi-btn,
.fi-ac-btn-action,
.fi-badge,
.fi-tabs-item,
.fi-ta-filter-indicator,
.fi-dropdown-list-item,
.fi-sidebar-item-button,
.fi-topbar-item-button {
    border-radius: 999px; /* radius.pill */
}

.fi-sidebar-item-button,
.fi-dropdown-list-item {
    border-radius: 0.75rem;
}

.fi-icon-btn {
    border-radius: 0.875rem; /* radius.iconButton */
}

/* ── Primary CTA: the app's vertical pink gradient ──────────────────── */
.fi-btn.fi-color-primary,
.fi-btn.fi-btn-color-primary {
    background-image: linear-gradient(180deg, #E8108A 0%, #C40C7A 100%);
    box-shadow: 0 10px 24px -12px rgba(216, 16, 127, 0.55);
    font-weight: 700;
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

html.dark .fi-btn.fi-color-primary,
html.dark .fi-btn.fi-btn-color-primary {
    background-image: linear-gradient(180deg, #FF4DAF 0%, #F20D8B 100%);
    box-shadow: 0 12px 28px -12px rgba(255, 45, 155, 0.6);
}

.fi-btn.fi-color-primary:hover,
.fi-btn.fi-btn-color-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.fi-btn.fi-color-primary:active,
.fi-btn.fi-btn-color-primary:active {
    transform: translateY(0);
}

/* Outlined / link buttons keep the pill but no glow */
.fi-btn.fi-btn-outlined {
    box-shadow: none;
}

/* ── Navigation ─────────────────────────────────────────────────────── */
.fi-sidebar-item-active .fi-sidebar-item-button {
    background-color: rgba(216, 16, 127, 0.10); /* primarySoft */
}

html.dark .fi-sidebar-item-active .fi-sidebar-item-button {
    background-color: rgba(255, 45, 155, 0.14);
}

.fi-sidebar-item-active .fi-sidebar-item-label {
    font-weight: 700;
}

/* Brand: wordmark + "Admin" tag (resources/views/filament/brand.blade.php) */
.bonddy-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.bonddy-brand__wordmark {
    height: 2.25rem;
    width: auto;
}

.bonddy-brand__tag {
    font-size: 0.625rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background-color: rgba(216, 16, 127, 0.12);
    color: #D8107F;
    transform: translateY(1px);
}

html.dark .bonddy-brand__tag {
    background-color: rgba(255, 45, 155, 0.16);
    color: #FF5FB6;
}

/* ── Stats tiles: a pink accent line like the app's progress bar ────── */
.fi-wi-stats-overview-stat {
    position: relative;
    overflow: hidden;
}

.fi-wi-stats-overview-stat::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #E8108A, #C40C7A);
    opacity: 0.9;
}

html.dark .fi-wi-stats-overview-stat::before {
    background: linear-gradient(180deg, #FF4DAF, #F20D8B);
}

/* ── Badges: app chip look (filled, rounded, bold) ──────────────────── */
.fi-badge {
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ── Login / password screens: cream or plum page with a pink glow ──── */
.fi-simple-layout {
    background-color: #FFF8DE;
    background-image:
        radial-gradient(60% 50% at 50% -10%, rgba(216, 16, 127, 0.18) 0%, rgba(216, 16, 127, 0) 70%),
        radial-gradient(40% 35% at 100% 100%, rgba(245, 138, 91, 0.16) 0%, rgba(245, 138, 91, 0) 70%);
}

html.dark .fi-simple-layout {
    background-color: #1B0818;
    background-image:
        radial-gradient(60% 50% at 50% -10%, rgba(255, 45, 155, 0.28) 0%, rgba(255, 45, 155, 0) 70%),
        radial-gradient(40% 35% at 100% 100%, rgba(242, 13, 139, 0.18) 0%, rgba(242, 13, 139, 0) 70%);
}

.fi-simple-main {
    box-shadow: 0 24px 60px -24px rgba(42, 10, 32, 0.35);
    border: 1px solid #EADDE0;
}

html.dark .fi-simple-main {
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
    border-color: #3F2540;
}

.fi-simple-header .bonddy-brand__wordmark {
    height: 3rem;
}

/* ── Focus ring in brand pink everywhere ────────────────────────────── */
.fi-input-wrp:focus-within {
    box-shadow: 0 0 0 3px rgba(216, 16, 127, 0.18);
}

html.dark .fi-input-wrp:focus-within {
    box-shadow: 0 0 0 3px rgba(255, 45, 155, 0.22);
}
