/**
 * Rigi Publication - User Portal Modern Design System
 * Clean, lightweight, responsive UI built on Filament v3 & Tailwind CSS
 * Optimized for Desktop, Tablet, and Mobile devices
 */

:root {
    --primary-50: #fffbeb;
    --primary-100: #fef3c7;
    --primary-200: #fde68a;
    --primary-300: #fcd34d;
    --primary-400: #fbbf24;
    --primary-500: #f59e0b;
    --primary-600: #d97706;
    --primary-700: #b45309;
    --primary-800: #92400e;
    --primary-900: #78350f;
    --primary-950: #451a03;
}

/* ==========================================================================
   1. Global Base & Reset
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

body.fi-body {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden !important;
}

.dark body.fi-body {
    background-color: #090d16 !important;
    color: #f8fafc !important;
}

/* Clean Modern Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ==========================================================================
   2. Top Navigation Bar (User Portal Topbar)
   ========================================================================== */
.fi-topbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 40 !important;
}

.dark .fi-topbar {
    background-color: #0f172a !important;
    border-bottom-color: #1e293b !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Brand Logo */
.fi-logo img {
    height: 2.5rem !important;
    max-height: 2.5rem !important;
    width: auto !important;
    object-fit: contain !important;
    transition: transform 0.2s ease;
}

.fi-logo:hover img {
    transform: scale(1.02);
}

/* Mobile Logo in Topbar: Ensure visible on smaller screens */
@media (max-width: 1023px) {
    .fi-topbar .me-6.hidden.lg\:flex {
        display: flex !important;
        align-items: center !important;
        margin-inline-start: 0.5rem !important;
    }

    .fi-topbar .me-6.hidden.lg\:flex img {
        height: 2rem !important;
        max-height: 2rem !important;
    }
}

/* Navigation Links */
.fi-topbar-nav-groups {
    gap: 0.25rem !important;
}

.fi-topbar-item-btn {
    border-radius: 8px !important;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #475569 !important;
    transition: all 0.15s ease-in-out !important;
}

.fi-topbar-item-btn:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

.dark .fi-topbar-item-btn {
    color: #94a3b8 !important;
}

.dark .fi-topbar-item-btn:hover {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

/* Active Topbar Item */
.fi-topbar-item-active .fi-topbar-item-btn {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    font-weight: 600 !important;
}

.fi-topbar-item-active .fi-topbar-item-btn .fi-topbar-item-icon {
    color: #f59e0b !important;
}

.dark .fi-topbar-item-active .fi-topbar-item-btn {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
}

.dark .fi-topbar-item-active .fi-topbar-item-btn .fi-topbar-item-icon {
    color: #fbbf24 !important;
}

/* Mobile Sidebar (Drawer) */
aside.fi-sidebar {
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.08) !important;
}

.dark aside.fi-sidebar {
    background-color: #0f172a !important;
    border-right-color: #1e293b !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4) !important;
}

.fi-sidebar-item-btn {
    border-radius: 8px !important;
    margin: 2px 8px !important;
    padding: 8px 12px !important;
    font-size: 0.875rem !important;
    color: #475569 !important;
    transition: all 0.15s ease !important;
}

.fi-sidebar-item-btn:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

.dark .fi-sidebar-item-btn {
    color: #94a3b8 !important;
}

.dark .fi-sidebar-item-btn:hover {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

.fi-sidebar-item-active .fi-sidebar-item-btn {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    font-weight: 600 !important;
}

.fi-sidebar-item-active .fi-sidebar-item-btn .fi-sidebar-item-icon {
    color: #f59e0b !important;
}

.dark .fi-sidebar-item-active .fi-sidebar-item-btn {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
}

/* ==========================================================================
   3. Page Layout & Content Container
   ========================================================================== */
.fi-main {
    max-width: 1360px !important;
    margin: 0 auto !important;
    padding: 1rem 0.75rem !important;
    width: 100% !important;
}

@media (min-width: 640px) {
    .fi-main {
        padding: 1.5rem 1.25rem !important;
    }
}

@media (min-width: 1024px) {
    .fi-main {
        padding: 2rem 1.5rem !important;
    }
}

.fi-header {
    margin-bottom: 1.25rem !important;
}

@media (min-width: 640px) {
    .fi-header {
        margin-bottom: 1.75rem !important;
    }
}

.fi-header-heading {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
}

@media (min-width: 640px) {
    .fi-header-heading {
        font-size: 1.625rem !important;
    }
}

.dark .fi-header-heading {
    color: #ffffff !important;
}

.fi-header-subheading {
    font-size: 0.875rem !important;
    color: #64748b !important;
    margin-top: 0.25rem !important;
}

.dark .fi-header-subheading {
    color: #94a3b8 !important;
}

/* Breadcrumbs */
.fi-breadcrumbs {
    margin-bottom: 0.5rem !important;
}

.fi-breadcrumbs-item-label {
    font-size: 0.8125rem !important;
    color: #64748b !important;
}

.fi-breadcrumbs-item-label:hover {
    color: #0f172a !important;
}

/* ==========================================================================
   4. Section & Aside Architecture (Clean Spacing & No Double Borders)
   ========================================================================== */
/* Aside Section outer grid container: transparent, no border */
.fi-section.fi-aside {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 1.75rem !important;
}

@media (min-width: 640px) {
    .fi-section.fi-aside {
        margin-bottom: 2.25rem !important;
    }
}

/* Aside Section Left Header */
.fi-aside > .fi-section-header {
    padding-top: 0.25rem !important;
}

.fi-aside-header-heading,
.fi-section-header-heading {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.015em !important;
    color: #0f172a !important;
    line-height: 1.35 !important;
}

.dark .fi-aside-header-heading,
.dark .fi-section-header-heading {
    color: #f8fafc !important;
}

.fi-aside-header-description,
.fi-section-header-description {
    font-size: 0.85rem !important;
    color: #64748b !important;
    line-height: 1.5 !important;
    margin-top: 0.35rem !important;
}

.dark .fi-aside-header-description,
.dark .fi-section-header-description {
    color: #94a3b8 !important;
}

/* Aside Section Right Content Card */
.fi-aside > .fi-section-content-ctn {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03) !important;
    overflow: visible !important;
}

.dark .fi-aside > .fi-section-content-ctn {
    background-color: #111827 !important;
    border-color: #1f2937 !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.25) !important;
}

/* Standard (non-aside) Section Cards */
.fi-section:not(.fi-aside),
.fi-card {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03) !important;
    margin-bottom: 1.5rem !important;
}

.dark .fi-section:not(.fi-aside),
.dark .fi-card {
    background-color: #111827 !important;
    border-color: #1f2937 !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.25) !important;
}

/* Section Card Content Padding */
.fi-section-content {
    padding: 1.125rem 1rem !important;
}

@media (min-width: 640px) {
    .fi-section-content {
        padding: 1.5rem !important;
    }
}

/* ==========================================================================
   5. Wizard & Stepper Navigation (Responsive Mobile Stepper)
   ========================================================================== */
.fi-fo-wizard {
    gap: 1.5rem !important;
}

.fi-fo-wizard-header {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 0.375rem !important;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.03) !important;
    margin-bottom: 1.5rem !important;
}

.dark .fi-fo-wizard-header {
    background-color: #111827 !important;
    border-color: #1f2937 !important;
}

.fi-fo-wizard-header-step {
    border-radius: 10px !important;
    transition: all 0.15s ease !important;
}

.fi-fo-wizard-header-step-button {
    padding: 0.625rem 1rem !important;
    gap: 0.625rem !important;
    border-radius: 10px !important;
    transition: background-color 0.15s ease !important;
}

.fi-fo-wizard-header-step-icon-ctn {
    border-radius: 9999px !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    height: 2rem !important;
    width: 2rem !important;
}

/* Active Step */
.fi-fo-wizard-header-step-current {
    background-color: #fffbeb !important;
}

.fi-fo-wizard-header-step-current .fi-fo-wizard-header-step-label {
    color: #b45309 !important;
    font-weight: 700 !important;
}

.fi-fo-wizard-header-step-current .fi-fo-wizard-header-step-icon-ctn {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
}

.dark .fi-fo-wizard-header-step-current {
    background-color: rgba(245, 158, 11, 0.15) !important;
}

.dark .fi-fo-wizard-header-step-current .fi-fo-wizard-header-step-label {
    color: #fbbf24 !important;
}

/* Completed Step */
.fi-fo-wizard-header-step-completed .fi-fo-wizard-header-step-icon-ctn {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #059669 !important;
}

/* Mobile Stepper (screens < 768px): Sleek Horizontal Scrollable Chips */
@media (max-width: 767px) {
    .fi-fo-wizard-header {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        gap: 0.375rem !important;
        padding: 0.375rem !important;
        border-radius: 12px !important;
    }

    .fi-fo-wizard-header::-webkit-scrollbar {
        display: none !important;
    }

    .fi-fo-wizard-header-step {
        flex-shrink: 0 !important;
        border: none !important;
    }

    .fi-fo-wizard-header-step-button {
        padding: 0.45rem 0.75rem !important;
        gap: 0.5rem !important;
        border-radius: 8px !important;
    }

    .fi-fo-wizard-header-step-icon-ctn {
        height: 1.625rem !important;
        width: 1.625rem !important;
        font-size: 0.75rem !important;
    }

    .fi-fo-wizard-header-step-label {
        font-size: 0.8125rem !important;
        white-space: nowrap !important;
    }

    .fi-fo-wizard-header-step-separator {
        display: none !important;
    }
}

/* Wizard Step Footer Actions */
.fi-fo-wizard-footer-actions {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding-top: 1.5rem !important;
    margin-top: 1.5rem !important;
    border-top: 1px solid #e2e8f0 !important;
}

.dark .fi-fo-wizard-footer-actions {
    border-top-color: #1f2937 !important;
}

@media (max-width: 480px) {
    .fi-fo-wizard-footer-actions {
        flex-direction: column-reverse !important;
        width: 100% !important;
    }

    .fi-fo-wizard-footer-actions > * {
        width: 100% !important;
    }

    .fi-fo-wizard-footer-actions button,
    .fi-fo-wizard-footer-actions a {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ==========================================================================
   6. Form Inputs, Selects & Textareas (Touch Friendly & Crisp)
   ========================================================================== */
.fi-fo-field-wrp {
    margin-bottom: 0.25rem !important;
}

.fi-fo-field-wrp-label {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-bottom: 0.35rem !important;
    display: inline-block !important;
}

.dark .fi-fo-field-wrp-label {
    color: #f1f5f9 !important;
}

.fi-fo-field-wrp-helper-text {
    font-size: 0.8125rem !important;
    color: #64748b !important;
    line-height: 1.4 !important;
    margin-top: 0.35rem !important;
}

.dark .fi-fo-field-wrp-helper-text {
    color: #94a3b8 !important;
}

/* Input Containers */
.fi-input-wrp {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.03) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    min-height: 42px !important;
}

.dark .fi-input-wrp {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

.fi-input-wrp:focus-within {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18) !important;
}

/* Input & Textarea Elements */
.fi-input-wrp input,
.fi-input-wrp textarea {
    padding: 0.55rem 0.875rem !important;
    font-size: 0.9375rem !important;
    color: #0f172a !important;
    border: none !important;
    background: transparent !important;
}

.dark .fi-input-wrp input,
.dark .fi-input-wrp textarea {
    color: #f8fafc !important;
}

.fi-input-wrp input::placeholder,
.fi-input-wrp textarea::placeholder {
    color: #94a3b8 !important;
}

/* Native Select Elements */
.fi-input-wrp select,
select.fi-select-input {
    width: 100% !important;
    height: 42px !important;
    padding: 0.55rem 2.25rem 0.55rem 0.875rem !important;
    font-size: 0.9375rem !important;
    cursor: pointer !important;
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 0.75rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.25em 1.25em !important;
    border: none !important;
    color: #0f172a !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.dark .fi-input-wrp select,
.dark select.fi-select-input {
    color: #f8fafc !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
}

.fi-input-wrp select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
    padding: 8px !important;
}

.dark .fi-input-wrp select option {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

/* File Upload Controls */
.fi-fo-file-upload {
    border-radius: 12px !important;
}

.filepond--root {
    border-radius: 12px !important;
}

.filepond--panel-root {
    background-color: #f8fafc !important;
    border: 2px dashed #cbd5e1 !important;
    border-radius: 12px !important;
}

.dark .filepond--panel-root {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

/* ==========================================================================
   7. Toggle Buttons & Segmented Options
   ========================================================================== */
.fi-fo-toggle-buttons {
    width: 100% !important;
    max-width: 100% !important;
    gap: 0.625rem !important;
}

.fi-fo-toggle-buttons > div {
    width: 100% !important;
    min-width: 0 !important;
}

.fi-fo-toggle-buttons .fi-btn,
.fi-fo-toggle-buttons label.fi-btn {
    border-radius: 10px !important;
    padding: 0.625rem 0.875rem !important;
    min-height: 44px !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    line-height: 1.35 !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: break-word !important;
    border: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    color: #334155 !important;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.03) !important;
    transition: all 0.15s ease-in-out !important;
}

.fi-fo-toggle-buttons .fi-btn:hover,
.fi-fo-toggle-buttons label.fi-btn:hover {
    border-color: #cbd5e1 !important;
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

/* Selected Toggle Button */
.fi-fo-toggle-buttons input:checked + label.fi-btn,
.fi-fo-toggle-buttons label.fi-btn[data-state="checked"] {
    background-color: #f59e0b !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.28) !important;
}

.fi-fo-toggle-buttons input:checked + label.fi-btn small,
.fi-fo-toggle-buttons label.fi-btn[data-state="checked"] small {
    color: rgba(255, 255, 255, 0.85) !important;
}

.dark .fi-fo-toggle-buttons .fi-btn,
.dark .fi-fo-toggle-buttons label.fi-btn {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

.dark .fi-fo-toggle-buttons .fi-btn:hover,
.dark .fi-fo-toggle-buttons label.fi-btn:hover {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

.dark .fi-fo-toggle-buttons input:checked + label.fi-btn {
    background-color: #f59e0b !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   8. Buttons & Action Styles
   ========================================================================== */
.fi-btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    min-height: 40px !important;
    transition: all 0.15s ease-in-out !important;
}

.fi-btn-color-primary {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.05), 0 2px 4px 0 rgba(245, 158, 11, 0.25) !important;
}

.fi-btn-color-primary:hover {
    background-color: #d97706 !important;
    box-shadow: 0 3px 8px 0 rgba(245, 158, 11, 0.35) !important;
    transform: translateY(-1px) !important;
}

.fi-btn-color-gray {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.03) !important;
}

.fi-btn-color-gray:hover {
    background-color: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

.dark .fi-btn-color-gray {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

.dark .fi-btn-color-gray:hover {
    background-color: #334155 !important;
}

/* ==========================================================================
   9. Tables & Data Display (Full Responsive Horizontal Scrolling)
   ========================================================================== */
.fi-ta-ctn {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03) !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.dark .fi-ta-ctn {
    background-color: #111827 !important;
    border-color: #1f2937 !important;
}

.fi-ta-header-cell {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.dark .fi-ta-header-cell {
    background-color: #0f172a !important;
    color: #94a3b8 !important;
    border-bottom-color: #1f2937 !important;
}

.fi-ta-cell {
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
}

.fi-ta-row {
    transition: background-color 0.15s ease !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.fi-ta-row:hover {
    background-color: #f8fafc !important;
}

.dark .fi-ta-row {
    border-bottom-color: #1f2937 !important;
}

.dark .fi-ta-row:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.fi-ta-pagination {
    border-top: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    padding: 0.75rem 1rem !important;
}

.dark .fi-ta-pagination {
    border-top-color: #1f2937 !important;
    background-color: #111827 !important;
}

/* Tabs (Publishing Filter Tabs, etc.) */
.fi-tabs {
    border-bottom: 1px solid #e2e8f0 !important;
    gap: 0.375rem !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
}

.fi-tabs::-webkit-scrollbar {
    display: none !important;
}

.dark .fi-tabs {
    border-bottom-color: #1f2937 !important;
}

.fi-tabs-item-btn {
    border-radius: 8px 8px 0 0 !important;
    padding: 0.55rem 0.875rem !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    color: #64748b !important;
    white-space: nowrap !important;
    transition: all 0.15s ease !important;
}

.fi-tabs-item-btn:hover {
    color: #0f172a !important;
}

.fi-tabs-item-active .fi-tabs-item-btn {
    color: #b45309 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #f59e0b !important;
}

.dark .fi-tabs-item-active .fi-tabs-item-btn {
    color: #fbbf24 !important;
    border-bottom-color: #f59e0b !important;
}

/* ==========================================================================
   10. Badges & Status Pills
   ========================================================================== */
.fi-badge {
    border-radius: 9999px !important;
    padding: 0.25rem 0.625rem !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.025em !important;
}

/* ==========================================================================
   11. Dashboard Overview Stats & Referral Card
   ========================================================================== */
.fi-wi-stats-overview {
    gap: 0.875rem !important;
}

@media (min-width: 640px) {
    .fi-wi-stats-overview {
        gap: 1.25rem !important;
    }
}

.fi-wi-stats-overview-stat {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 1.125rem !important;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

@media (min-width: 640px) {
    .fi-wi-stats-overview-stat {
        padding: 1.35rem !important;
    }
}

.dark .fi-wi-stats-overview-stat {
    background-color: #111827 !important;
    border-color: #1f2937 !important;
}

.fi-wi-stats-overview-stat:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px 0 rgba(15, 23, 42, 0.06) !important;
}

.dark .fi-wi-stats-overview-stat:hover {
    border-color: #334155 !important;
}

.fi-wi-stats-overview-stat-value {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.025em !important;
}

@media (min-width: 640px) {
    .fi-wi-stats-overview-stat-value {
        font-size: 1.75rem !important;
    }
}

.dark .fi-wi-stats-overview-stat-value {
    color: #ffffff !important;
}

.fi-wi-stats-overview-stat-label {
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
}

.dark .fi-wi-stats-overview-stat-label {
    color: #94a3b8 !important;
}

/* Referral Banner Widget Styling */
.referral-banner-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border: 1px solid #334155 !important;
    border-radius: 16px !important;
    padding: 1.25rem 1rem !important;
    position: relative !important;
    overflow: hidden !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.15) !important;
}

@media (min-width: 640px) {
    .referral-banner-container {
        padding: 1.75rem !important;
    }
}

.referral-banner-badge {
    background-color: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    padding: 3px 8px !important;
    border-radius: 9999px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.referral-banner-title {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: -0.02em !important;
    line-height: 1.3 !important;
}

@media (min-width: 640px) {
    .referral-banner-title {
        font-size: 1.35rem !important;
    }
}

.referral-banner-title span {
    color: #fbbf24 !important;
}

.referral-banner-desc {
    color: #94a3b8 !important;
    font-size: 0.85rem !important;
    line-height: 1.55 !important;
    max-width: 600px !important;
}

.referral-copy-box label {
    font-size: 0.725rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #cbd5e1 !important;
    margin-bottom: 4px !important;
    display: block !important;
}

.referral-input-group {
    display: flex !important;
    align-items: center !important;
    background-color: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid #475569 !important;
    border-radius: 10px !important;
    padding: 3px 4px 3px 10px !important;
}

.referral-input-value {
    flex-grow: 1 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #fbbf24 !important;
    letter-spacing: 0.05em !important;
}

.referral-copy-btn {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    border: none !important;
    padding: 5px 12px !important;
    border-radius: 7px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
}

.referral-copy-btn:hover {
    background-color: #d97706 !important;
}

.referral-stats-panel {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
    background-color: rgba(15, 23, 42, 0.5) !important;
    border: 1px solid #334155 !important;
    border-radius: 12px !important;
    padding: 0.75rem !important;
}

@media (min-width: 640px) {
    .referral-stats-panel {
        gap: 0.75rem !important;
        padding: 1rem !important;
    }
}

.referral-stat-item {
    text-align: center !important;
}

.referral-stat-label {
    font-size: 0.65rem !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    font-weight: 600 !important;
    display: block !important;
}

.referral-stat-value {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin-top: 2px !important;
    display: block !important;
}

@media (min-width: 640px) {
    .referral-stat-value {
        font-size: 1.15rem !important;
    }
}

.referral-stat-value.earned {
    color: #10b981 !important;
}

.referral-stat-value.balance {
    color: #38bdf8 !important;
}

/* ==========================================================================
   12. Modals & Dialogs (Responsive Viewports)
   ========================================================================== */
.fi-modal-window {
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.15) !important;
    overflow: hidden !important;
}

.dark .fi-modal-window {
    border-color: #1f2937 !important;
    background-color: #111827 !important;
}

.fi-modal-header {
    padding: 1.125rem 1.25rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.dark .fi-modal-header {
    border-bottom-color: #1f2937 !important;
}

.fi-modal-heading {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.dark .fi-modal-heading {
    color: #ffffff !important;
}

.fi-modal-content {
    padding: 1.25rem !important;
    max-height: 75vh !important;
    overflow-y: auto !important;
}

.fi-modal-footer {
    padding: 0.875rem 1.25rem !important;
    border-top: 1px solid #e2e8f0 !important;
    background-color: #f8fafc !important;
}

.dark .fi-modal-footer {
    border-top-color: #1f2937 !important;
    background-color: #0f172a !important;
}

/* ==========================================================================
   13. Add-on Packages Checkbox List
   ========================================================================== */
.fi-fo-checkbox-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

.fi-fo-checkbox-list .fi-fo-checkbox-list-option-label {
    border: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    border-radius: 12px !important;
    padding: 0.875rem 1rem !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
}

.fi-fo-checkbox-list .fi-fo-checkbox-list-option-label:hover {
    border-color: #f59e0b !important;
    background-color: #fffbeb !important;
}

.dark .fi-fo-checkbox-list .fi-fo-checkbox-list-option-label {
    background-color: #111827 !important;
    border-color: #1f2937 !important;
}

.dark .fi-fo-checkbox-list .fi-fo-checkbox-list-option-label:hover {
    border-color: #d97706 !important;
    background-color: rgba(245, 158, 11, 0.08) !important;
}

/* ==========================================================================
   14. Mobile Responsive Refinements (max-width: 640px)
   ========================================================================== */
@media (max-width: 640px) {
    .fi-main {
        padding: 0.875rem 0.625rem !important;
    }

    .fi-header-heading {
        font-size: 1.25rem !important;
    }

    .fi-section-content {
        padding: 0.875rem 0.75rem !important;
    }

    /* Toggle buttons full width & no horizontal overflow */
    .fi-fo-toggle-buttons {
        gap: 0.5rem !important;
    }

    .fi-fo-toggle-buttons .fi-btn,
    .fi-fo-toggle-buttons label.fi-btn {
        padding: 0.55rem 0.625rem !important;
        font-size: 0.8125rem !important;
        min-height: 42px !important;
    }

    .fi-btn-group {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    .fi-btn-group > * {
        width: 100% !important;
    }

    /* Modals on mobile */
    .fi-modal-window {
        max-width: calc(100vw - 1rem) !important;
        margin: 0.5rem auto !important;
    }

    .fi-modal-header {
        padding: 0.875rem 1rem !important;
    }

    .fi-modal-content {
        padding: 0.875rem 1rem !important;
        max-height: 60vh !important;
    }

    .fi-modal-footer {
        padding: 0.75rem 1rem !important;
    }

    .fi-modal-footer-actions {
        flex-direction: column-reverse !important;
        width: 100% !important;
        gap: 0.5rem !important;
    }

    .fi-modal-footer-actions button {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Add-on Summary Card Mobile */
    .fi-fo-checkbox-list .fi-fo-checkbox-list-option-label > div {
        flex-wrap: wrap !important;
        gap: 0.25rem !important;
    }
}
