/* BizeeOS admin theme — layered over Filament's compiled CSS.
   Tokens match the marketing site: ink #0E0C24, violet #5B3DF5, cyan #22B8F0,
   lavender surfaces, DM Sans headings, Inter body, pill controls. */

:root {
    --bz-ink: #0E0C24;
    --bz-ink-2: #4A4766;
    --bz-muted: #6B6885;
    --bz-accent: #5B3DF5;
    --bz-accent-soft: #EFEBFF;
    --bz-cyan: #22B8F0;
    --bz-page: #F7F6FC;
    --bz-surface: #FFFFFF;
    --bz-line: #ECEAF7;
    --bz-line-strong: #DCD8EE;
    --bz-radius-card: 16px;
    --bz-radius-field: 10px;
    --bz-shadow: 0 1px 2px rgba(14, 12, 36, 0.04), 0 8px 24px -12px rgba(14, 12, 36, 0.10);
    --bz-heading-font: "DM Sans", "Inter Variable", "Inter", ui-sans-serif, system-ui, sans-serif;
}

.dark {
    --bz-ink: #F3F1FD;
    --bz-ink-2: #C9C5E3;
    --bz-muted: #9C98B8;
    --bz-accent-soft: rgba(91, 61, 245, 0.18);
    --bz-page: #0E0C24;
    --bz-surface: #151233;
    --bz-line: #242050;
    --bz-line-strong: #2E2A5E;
    --bz-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
}

/* ---------- Page ---------- */

.fi-body {
    background-color: var(--bz-page);
    color: var(--bz-ink);
}

.fi-header-heading {
    font-family: var(--bz-heading-font);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--bz-ink);
}

.fi-breadcrumbs-item-label {
    color: var(--bz-muted);
}

/* ---------- Top bar ---------- */

.fi-topbar {
    background-color: var(--bz-surface);
    border-bottom: 1px solid var(--bz-line);
    box-shadow: none;
}

.fi-topbar .fi-topbar-item-btn {
    border-radius: 9999px;
}

.fi-topbar .fi-topbar-item-label {
    font-weight: 500;
    color: var(--bz-ink-2);
}

.fi-topbar .fi-topbar-item.fi-active .fi-topbar-item-btn {
    background-color: var(--bz-accent-soft);
}

.fi-topbar .fi-topbar-item.fi-active .fi-topbar-item-label {
    color: var(--bz-accent);
    font-weight: 600;
}

.fi-topbar .fi-input-wrp {
    border-radius: 9999px;
}

.fi-user-menu-trigger .fi-avatar,
.fi-avatar {
    background-color: var(--bz-accent);
}

/* ---------- Sub navigation (left rail inside a module) ---------- */

.fi-page-sub-navigation-sidebar .fi-sidebar-item-btn {
    border-radius: var(--bz-radius-field);
}

.fi-page-sub-navigation-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-btn {
    background-color: var(--bz-accent-soft);
}

.fi-page-sub-navigation-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-page-sub-navigation-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: var(--bz-accent);
    font-weight: 600;
}

/* ---------- Cards: sections, tables, widgets ---------- */

.fi-section,
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-wi-chart .fi-section {
    border-radius: var(--bz-radius-card);
    background-color: var(--bz-surface);
    box-shadow: var(--bz-shadow);
    --tw-ring-color: var(--bz-line);
}

.fi-section-header-heading {
    font-family: var(--bz-heading-font);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--bz-ink);
}

.fi-wi-stats-overview-stat-value {
    font-family: var(--bz-heading-font);
    letter-spacing: -0.02em;
}

/* ---------- Tables ---------- */

.fi-ta-header-cell {
    background-color: var(--bz-page);
    font-weight: 600;
    color: var(--bz-ink-2);
}

.fi-ta-row:hover {
    background-color: color-mix(in srgb, var(--bz-accent) 4%, transparent);
}

.fi-ta-empty-state-icon-bg {
    background-color: var(--bz-accent-soft);
}

.fi-ta-empty-state-icon-bg .fi-icon {
    color: var(--bz-accent);
}

.fi-ta-empty-state-heading {
    font-family: var(--bz-heading-font);
    font-weight: 700;
}

/* ---------- Tabs ---------- */

.fi-tabs {
    gap: 4px;
}

.fi-tabs-item {
    border-radius: 9999px;
}

.fi-tabs-item.fi-active {
    background-color: var(--bz-accent-soft);
}

.fi-tabs-item.fi-active .fi-tabs-item-label,
.fi-tabs-item.fi-active .fi-icon {
    color: var(--bz-accent);
}

/* ---------- Buttons ---------- */

.fi-btn:not(.state > .fi-btn) {
    border-radius: 9999px;
    font-weight: 600;
    padding-inline: 1.1rem;
    transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* Primary: ink pill that turns violet on hover (as on the website) */
.fi-btn.fi-color-primary:not(.fi-outlined, .state > .fi-btn) {
    background-color: var(--bz-ink);
    color: #FFFFFF;
}

.fi-btn.fi-color-primary:not(.fi-outlined, .state > .fi-btn):hover,
.fi-btn.fi-color-primary:not(.fi-outlined, .state > .fi-btn):focus-visible {
    background-color: var(--bz-accent);
}

.dark .fi-btn.fi-color-primary:not(.fi-outlined, .state > .fi-btn) {
    background-color: var(--bz-accent);
}

.dark .fi-btn.fi-color-primary:not(.fi-outlined, .state > .fi-btn):hover {
    background-color: #7A62FF;
}

.fi-btn.fi-color-primary:not(.fi-outlined, .state > .fi-btn) .fi-icon {
    color: currentColor;
}

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

/* ---------- Badges ---------- */

.fi-badge {
    border-radius: 9999px;
    font-weight: 600;
}

/* ---------- Form fields ---------- */

.fi-input-wrp {
    border-radius: var(--bz-radius-field);
}

.fi-input-wrp:focus-within {
    --tw-ring-color: var(--bz-accent);
}

.fi-fo-field-label-content {
    font-weight: 600;
    color: var(--bz-ink);
}

.fi-checkbox-input {
    border-radius: 5px;
}

/* ---------- Overlays ---------- */

.fi-modal-window {
    border-radius: 20px;
}

.fi-modal-window .fi-modal-heading {
    font-family: var(--bz-heading-font);
    font-weight: 700;
}

.fi-dropdown-panel {
    border-radius: 14px;
    box-shadow: 0 12px 40px -12px rgba(14, 12, 36, 0.25);
}

.fi-dropdown-list-item {
    border-radius: 8px;
}

.fi-no-notification {
    border-radius: 14px;
}

/* Saved views bar sitting directly above a table: join them into one card */
.fi-tabs.w-full {
    border-radius: var(--bz-radius-card) var(--bz-radius-card) 0 0;
    background-color: var(--bz-surface);
}

:has(> .fi-tabs.w-full) .fi-ta-ctn {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}


/* ---------- Home: quick actions ---------- */

.bz-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.bz-quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--bz-radius-card);
    background-color: var(--bz-surface);
    box-shadow: var(--bz-shadow);
    outline: 1px solid var(--bz-line);
    color: var(--bz-ink);
    font-weight: 600;
    transition: outline-color 0.2s ease, transform 0.2s ease;
}

.bz-quick-action:hover,
.bz-quick-action:focus-visible {
    outline-color: var(--bz-accent);
    transform: translateY(-1px);
}

.bz-quick-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: var(--bz-accent-soft);
    color: var(--bz-accent);
}

.bz-quick-action-icon svg {
    width: 20px;
    height: 20px;
}

@media (prefers-reduced-motion: reduce) {
    .bz-quick-action {
        transition: none;
    }
}

/* Numbers read best in Inter (DM Sans has no ₹ glyph) */
.fi-wi-stats-overview-stat-value {
    font-family: "Inter Variable", "Inter", ui-sans-serif, system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}

/* ---------- Top bar: module title + single-row menu ---------- */

.bz-topbar-module {
    display: inline-block;
    font-family: var(--bz-heading-font);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--bz-ink);
    white-space: nowrap;
}

.fi-topbar-nav-groups {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.fi-topbar-nav-groups::-webkit-scrollbar {
    display: none;
}

.fi-topbar-nav-groups > li {
    flex-shrink: 0;
}

.fi-topbar .fi-topbar-item-btn {
    padding-inline: 0.8rem;
    white-space: nowrap;
}

/* ---------- App launcher (module switcher) ---------- */

.bz-launcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 12px;
    max-height: 80vh;
    overflow-y: auto;
}

.bz-launcher-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px 12px;
    border-radius: 14px;
    text-align: center;
    color: var(--bz-ink);
    transition: background-color 0.15s ease;
}

.bz-launcher-item:hover,
.bz-launcher-item:focus-visible {
    background-color: var(--bz-page);
}

.bz-launcher-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background-color: var(--bz-accent-soft);
    color: var(--bz-accent);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.bz-launcher-icon svg {
    width: 24px;
    height: 24px;
}

.bz-launcher-item:hover .bz-launcher-icon {
    background-color: var(--bz-accent);
    color: #FFFFFF;
}

.bz-launcher-item-active .bz-launcher-icon {
    background-color: var(--bz-accent);
    color: #FFFFFF;
}

.bz-launcher-label {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.bz-launcher-item-active .bz-launcher-label {
    color: var(--bz-accent);
}

/* ---------- WhatsApp share button (record header) ---------- */

.bz-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border-radius: 9999px;
    background-color: #E7F8EE;
    color: #128C4B;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.bz-share-btn:hover,
.bz-share-btn:focus-visible {
    background-color: #25D366;
    color: #FFFFFF;
}

.dark .bz-share-btn {
    background-color: rgba(37, 211, 102, 0.15);
    color: #4ADE80;
}

/* Phones: two stats per row need a smaller figure */
@media (max-width: 639px) {
    .fi-wi-stats-overview-stat-value {
        font-size: 1.35rem;
    }

    .bz-quick-action {
        padding: 12px;
        gap: 10px;
        font-size: 0.85rem;
    }

    .bz-quick-action-icon {
        width: 34px;
        height: 34px;
    }
}
