.fi-sidebar {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05),
    0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
}

.dark .fi-sidebar {
    background-color: rgb(24, 24, 27) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5),
    0 4px 12px 0px rgba(255, 255, 255, 0.02) !important;
}

.fi-sidebar nav a {
    border-radius: 10px !important;
    margin-left: 8px !important;
    margin-right: 8px !important;
    transition: transform 0.2s ease-in-out !important;
}

.fi-sidebar nav a:hover {
    background-color: rgba(0, 0, 0, 0.03) !important;
    transform: translateX(4px);
}

.dark .fi-sidebar nav a:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.fi-sidebar-item-active a {
    background: linear-gradient(135deg, rgb(var(--primary-600)), rgb(var(--primary-500))) !important;
    color: white !important;
    box-shadow: 0 4px 12px -2px rgba(var(--primary-500), 0.3) !important;
}

.fi-sidebar-item-active a svg {
    color: white !important;
}

.fi-sidebar-nav::-webkit-scrollbar {
    width: 5px;
    height: 5px;
    background-color: transparent;
}

.fi-sidebar-nav::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.0);
    border-radius: 100px !important;
}

.dark .fi-sidebar-nav::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.0);
}

.fi-sidebar-nav:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15) !important;
}

.dark .fi-sidebar-nav:hover::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.fi-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3) !important;
}

.dark .fi-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

.fi-tenant-menu {
    border-radius: 12px !important;
    margin-bottom: 8px !important;
}

.fi-tenant-menu button {
    border-radius: 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: 0 4px 12px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    background-color: rgba(0, 0, 0, 0.01) !important;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out !important;
}

.dark .fi-tenant-menu button {
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 4px 12px -1px rgba(0, 0, 0, 0.3),
    0 2px 4px -1px rgba(255, 255, 255, 0.01) !important;
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.fi-tenant-menu button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -1px rgba(0, 0, 0, 0.08) !important;
}

.dark .fi-tenant-menu button:hover {
    box-shadow: 0 6px 16px -1px rgba(0, 0, 0, 0.4) !important;
}

.fi-tenant-menu-options,
div[class*="fi-dropdown-panel"] {
    border-radius: 14px !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.dark div[class*="fi-dropdown-panel"] {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6),
    0 10px 10px -5px rgba(0, 0, 0, 0.4) !important;
}
.fiwa-processing {
    text-align: center;
    padding: 32px;
    animation: fiwaCardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fiwa-processing-icon {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    animation: fiwaIconPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.15s;
}

.fiwa-processing-glow {
    position: absolute;
    inset: -8px;
    border-radius: 9999px;
    background: radial-gradient(
        circle,
        color-mix(in srgb, #3b82f6 28%, transparent) 0%,
        transparent 70%
    );
    animation: fiwaProcessingGlow 1.8s ease-in-out infinite;
}

.dark .fiwa-processing-glow {
    background: radial-gradient(
        circle,
        color-mix(in srgb, #60a5fa 32%, transparent) 0%,
        transparent 70%
    );
}

.fiwa-spinner-svg {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    color: #3b82f6;
    animation: fiwaSpinnerRotate 1.1s linear infinite;
}

.dark .fiwa-spinner-svg {
    color: #60a5fa;
}

.fiwa-spinner-track {
    opacity: 0.22;
}

.fiwa-spinner-arc {
    stroke-dasharray: 42 21;
    stroke-dashoffset: 0;
    transform-origin: center;
    animation: fiwaSpinnerDash 1.1s ease-in-out infinite;
}

.fiwa-processing-heading {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 24px;
    letter-spacing: -0.025em;
    animation: fiwaStatSlideUp 0.4s ease both 0.45s;
}

.dark .fiwa-processing-heading {
    color: #f3f4f6;
}

.fiwa-processing-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 16px;
}

.fiwa-processing-stats .fiwa-stat-animated {
    animation: fiwaStatSlideUp 0.4s ease both 0.6s;
}

.fiwa-processing-subtext {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    animation: fiwaStatSlideUp 0.4s ease both 0.75s;
}

.dark .fiwa-processing-subtext {
    color: #9ca3af;
}

@keyframes fiwaSpinnerRotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fiwaSpinnerDash {
    0% {
        stroke-dasharray: 1 62;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 42 21;
        stroke-dashoffset: -12;
    }

    100% {
        stroke-dasharray: 1 62;
        stroke-dashoffset: -63;
    }
}

@keyframes fiwaProcessingGlow {
    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.92);
    }

    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

/* Menu builder: keep drag handles compact even if theme utilities miss */
.fi-menu-builder-handle svg,
.fi-menu-builder-item-row svg {
    width: 1rem !important;
    height: 1rem !important;
    max-width: 1rem !important;
    max-height: 1rem !important;
}

.fi-menu-builder-handle {
    width: 2rem;
    height: 2rem;
}

.fi-menu-builder-item-row {
    min-height: 2.75rem;
}

[x-cloak] {
    display: none !important;
}

.fiwa-stepper-caption,
.fiwa-actions-hint {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

.fiwa-actions-hint {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.dark .fiwa-stepper-caption,
.dark .fiwa-actions-hint {
    color: #9ca3af;
}

.fiwa-steps button.fiwa-step {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
}

.fiwa-step-check {
    width: 16px;
    height: 16px;
}

.fiwa-upload-zone.is-busy,
.fiwa-upload-zone.is-dragging {
    border-color: #3b82f6;
}

.fiwa-upload-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.92);
}

.fiwa-upload-progress {
    width: 100%;
    height: 8px;
    margin-bottom: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.fiwa-upload-progress-bar {
    height: 100%;
    background: #3b82f6;
    transition: width 0.2s ease;
}

.fiwa-upload-parse {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.92);
}

.dark .fiwa-upload-overlay,
.dark .fiwa-upload-parse {
    background: rgba(17, 24, 39, 0.92);
}

.dark .fiwa-upload-progress {
    background: #374151;
}

.fiwa-background-hint {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 13px;
    line-height: 1.5;
}

.fiwa-background-hint svg,
.fiwa-background-hint-icon {
    flex-shrink: 0;
    width: 20px !important;
    height: 20px !important;
    max-width: 20px;
    max-height: 20px;
    margin-top: 1px;
}

.fiwa-step-import .fiwa-processing-icon {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px;
    max-height: 64px;
    margin: 0 auto 12px;
}

.fiwa-step-import .fiwa-spinner-svg {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px;
    max-height: 64px;
    display: block;
}

.fiwa-step-import .fiwa-completed-icon,
.fiwa-step-import .fiwa-failed-icon {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px;
    max-height: 64px;
    margin: 0 auto 12px;
}

.fiwa-step-import .fiwa-completed-icon svg,
.fiwa-step-import .fiwa-failed-icon svg,
.fiwa-step-import .fiwa-result-svg {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px;
    max-height: 64px;
    display: block;
}

.dark .fiwa-background-hint {
    border-color: #1d4ed8;
    background: rgba(30, 58, 138, 0.25);
    color: #bfdbfe;
}

.pending-imports-list {
    display: grid;
    gap: 12px;
}

.pending-import-card {
    padding: 14px 16px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}

.dark .pending-import-card {
    border-color: #1e3a8a;
    background: rgba(15, 23, 42, 0.55);
}

.pending-import-card__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 6px;
}

.pending-import-card__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.dark .pending-import-card__title {
    color: #f9fafb;
}

.pending-import-card__meta,
.pending-import-card__phase,
.import-session-progress__meta {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.pending-import-card__phase {
    margin-bottom: 10px;
    font-weight: 500;
    color: #2563eb;
}

.dark .pending-import-card__phase {
    color: #93c5fd;
}

.pending-import-card__percent,
.import-session-progress__percent {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
}

.pending-import-card__track,
.import-session-progress__track {
    overflow: hidden;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
}

.dark .pending-import-card__track,
.dark .import-session-progress__track {
    background: #374151;
}

.pending-import-card__bar,
.import-session-progress__bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    transition: width 0.6s ease;
}

.import-session-progress__bar.is-active,
.pending-import-card__bar {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

.import-session-progress__header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.import-session-progress__phase {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.dark .import-session-progress__phase {
    color: #d1d5db;
}

@keyframes progress-bar-stripes {
    0% { background-position: 1rem 0; }
    100% { background-position: 0 0; }
}

.fiwa-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.fiwa-extra-grid {
    display: grid;
    gap: 10px;
}

.fiwa-extra-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.dark .fiwa-extra-row {
    border-color: #1f2937;
    background: rgba(15, 23, 42, 0.45);
}

.fiwa-extra-label {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}

.fiwa-review-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.fiwa-review-stat {
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.fiwa-review-stat span {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

.fiwa-review-stat strong {
    font-size: 20px;
}

.fiwa-review-stat.is-danger {
    border-color: #fecaca;
    background: #fef2f2;
}

.fiwa-review-stat.is-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.fiwa-error-summary {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #b91c1c;
}

.fiwa-error-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.fiwa-bulk-category {
    margin: 12px 0 0;
    padding: 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff;
}

.fiwa-bulk-category-help {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.45;
    color: #7f1d1d;
}

.fiwa-bulk-category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.fiwa-bulk-category-row .fiwa-preview-input {
    width: 160px;
}

.fiwa-cell-error {
    margin: 4px 0 0;
    color: #dc2626;
    font-size: 11px;
    font-weight: 600;
}

.fiwa-preview-toolbar,
.fiwa-preview-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.fiwa-preview-pagination {
    justify-content: center;
    margin-bottom: 0;
}

.fiwa-preview-filters {
    display: flex;
    gap: 8px;
}

.fiwa-preview-wrapper--filament {
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    max-height: min(70vh, 640px);
}

.fiwa-preview-shell.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    padding: 20px;
    background: rgb(15 23 42 / 0.45);
}

.fiwa-preview-shell.is-fullscreen .fiwa-preview-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 16px 20px 20px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgb(15 23 42 / 0.35);
}

.fiwa-preview-shell.is-fullscreen .fiwa-preview-toolbar {
    margin-top: 0;
}

.fiwa-preview-shell.is-fullscreen .fiwa-preview-wrapper--filament {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}

.fiwa-preview-shell.is-fullscreen .fiwa-preview-pagination {
    margin-top: 12px;
}

body.fiwa-preview-locked {
    overflow: hidden;
}

.dark .fiwa-preview-shell.is-fullscreen .fiwa-preview-stage {
    background: #111827;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.55);
}

.dark .fiwa-preview-wrapper--filament {
    border-color: #374151;
}

.fiwa-error-more {
    margin: 12px 0 0;
    font-size: 12px;
    color: #6b7280;
}

.fiwa-preview-input {
    width: 7rem;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
}

.fiwa-preview-input.is-invalid {
    border-color: #dc2626;
    background: #fef2f2;
}

.dark .fiwa-preview-input {
    border-color: #4b5563;
    background: #111827;
    color: #f9fafb;
}

.dark .fiwa-preview-input.is-invalid {
    border-color: #f87171;
    background: rgba(127, 29, 29, 0.35);
}

.dark .fiwa-review-stat {
    background: rgba(15, 23, 42, 0.55);
    border-color: #374151;
}

.dark .fiwa-review-stat span {
    color: #9ca3af;
}

.dark .fiwa-review-stat strong {
    color: #f3f4f6;
}

.dark .fiwa-review-stat.is-danger {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(127, 29, 29, 0.25);
}

.dark .fiwa-review-stat.is-success {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(20, 83, 45, 0.25);
}

.dark .fiwa-error-summary {
    color: #fca5a5;
}

.dark .fiwa-bulk-category {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(127, 29, 29, 0.2);
}

.dark .fiwa-bulk-category-help {
    color: #fca5a5;
}

.dark .fiwa-error-list li {
    color: #e5e7eb;
}

.dark .fiwa-error-more {
    color: #9ca3af;
}

.dark .fiwa-extra-label {
    color: #e5e7eb;
}

.fiwa-upsert-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

.dark .fiwa-upsert-label {
    color: #e5e7eb;
}

.fiwa-upsert-field-label {
    display: block;
    margin: 12px 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.dark .fiwa-upsert-field-label {
    color: #d1d5db;
}

.fiwa-upsert-input {
    width: 100%;
    max-width: 420px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #111827;
}

.dark .fiwa-upsert-input {
    border-color: #4b5563;
    background: #111827;
    color: #f9fafb;
}

.fiwa-upsert-help {
    margin: 6px 0 0;
    font-size: 12px;
    color: #6b7280;
}

.dark .fiwa-upsert-help {
    color: #9ca3af;
}

.dark .fiwa-preview-wrapper--filament .fi-ta-table thead th {
    background: #1f2937;
    color: #e5e7eb;
    border-color: #374151;
}

.dark .fiwa-preview-wrapper--filament .fi-ta-table tbody td {
    color: #d1d5db;
    border-color: #374151;
}

.dark .fiwa-preview-wrapper--filament .fi-ta-table tbody tr:hover td {
    background: rgba(31, 41, 55, 0.5);
}

.dark .fiwa-preview-wrapper--filament .fi-ta-table tbody tr.fiwa-row-error td {
    background: rgba(127, 29, 29, 0.2);
}

