/* ============================================================
   Sefari Customer Portal – Hotfix CSS
   Injected directly into dist to avoid full rebuild.
   ============================================================ */

/* ── Global scroll unlock for portal pages ────────────────── */
html:has(body.sefari-portal) {
    overflow-y: auto !important;
    height: auto !important;
}

body.sefari-portal {
    overflow-y: auto !important;
    height: auto !important;
    max-height: none !important;
}

body.sefari-portal .sefari-next-container,
body.sefari-portal .sefari-next-container {
    overflow: visible !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
}

/* ── Order workspace toolbar: keep buttons in a row ───────── */
.sefari-portal .portal-order-workspace-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

/* The map/table toggle group */
.sefari-portal .portal-order-view-toggle {
    display: inline-flex !important;
    flex-shrink: 0 !important;
}

/* ── Section header: row layout on all sizes ──────────────── */
.sefari-portal .portal-section-header.portal-order-workspace-header {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
}

/* ── Mobile-specific overrides (≤ 1024px) ─────────────────── */
@media (max-width: 1024px) {
    /* Keep toolbar horizontal */
    .sefari-portal .portal-order-workspace-actions,
    .sefari-portal .portal-order-workspace-header {
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
    }

    /* Sidebar: compact horizontal grid on tablet */
    .sefari-portal .portal-nav-group {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.25rem !important;
    }

    .sefari-portal .portal-nav-label {
        grid-column: 1 / -1 !important;
    }
}

/* ── Small mobile overrides (≤ 640px) ─────────────────────── */
@media (max-width: 640px) {
    /* Keep the order workspace header content flowing */
    .sefari-portal .portal-section-header.portal-order-workspace-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    /* But KEEP the actions row horizontal */
    .sefari-portal .portal-order-workspace-actions {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.375rem !important;
        width: 100% !important;
    }

    /* Buttons: compact sizing on mobile */
    .sefari-portal .portal-order-workspace-actions .btn {
        padding: 0.375rem 0.625rem !important;
        font-size: 0.8125rem !important;
        min-height: 2rem !important;
    }

    .sefari-portal .portal-order-view-toggle .btn {
        padding: 0.375rem 0.5rem !important;
    }

    /* New Order button gets pushed to end */
    .sefari-portal .portal-order-workspace-actions > .btn-wrapper:last-child {
        margin-left: auto !important;
    }

    /* Topbar on mobile: keep items in a row */
    .sefari-portal .portal-topbar {
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .sefari-portal .portal-topbar-actions {
        flex-wrap: wrap !important;
        gap: 0.375rem !important;
    }

    /* Main content area: reduce padding on mobile */
    .sefari-portal .portal-container > .portal-main {
        padding: 0.5rem !important;
        gap: 0.5rem !important;
    }

    /* Order list panel: full width on mobile */
    .sefari-portal .portal-order-list-panel {
        position: relative !important;
        width: 100% !important;
        max-height: 50vh !important;
        overflow-y: auto !important;
    }

    /* Order route panel / detail sidebar */
    .sefari-portal .portal-order-route-panel {
        position: relative !important;
        width: 100% !important;
        min-height: auto !important;
    }

    /* Form actions: horizontal */
    .sefari-portal .portal-form-actions {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    /* Invoice summary: 2 cols instead of 4 */
    .sefari-portal .portal-invoice-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    /* Dashboard quick actions: wrap nicely */
    .sefari-portal .portal-dashboard-quick-actions {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    /* Sidebar nav: single column on very small screens */
    .sefari-portal .portal-nav-group {
        grid-template-columns: 1fr !important;
    }
}

/* ── Map container: proper sizing ─────────────────────────── */
.sefari-portal .portal-order-map-stage {
    position: relative !important;
    min-height: 400px !important;
}

/* Leaflet map: ensure it fills container */
.sefari-portal .portal-order-map-stage .leaflet-container {
    min-height: 400px !important;
}

/* ── Fix broken avatar fallback ───────────────────────────── */
.sefari-portal img[src*="no-avatar"]:not([src*="s3.sefari.io"]),
.sefari-portal img.avatar-image[src=""],
.sefari-portal img.avatar-image:not([src]) {
    content: url("https://s3.sefari.io/sfr-assets/static/no-avatar.png") !important;
}

/* ============================================================
   Performance — Core Web Vitals Optimizations
   ============================================================ */

/* INP: Skip rendering of off-screen/collapsed content panels */
.next-content-panel-is-closed {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* INP: Prevent invisible notification container from intercepting clicks */
.ember-cli-notifications-notification__container,
.ember-cli-notifications-notification__container--top {
    pointer-events: none !important;
}

.ember-cli-notifications-notification__container > *,
.ember-cli-notifications-notification__container--top > * {
    pointer-events: auto !important;
}

/* ============================================================
   Green Obsidian — Light Mode Darkened Accents
   Makes green richer/deeper on white backgrounds.
   ============================================================ */

/* Text accents: use green-700 (#15803d) instead of green-500 */
body:not([data-theme='dark']) .text-green-500,
body:not([data-theme='dark']) .text-sky-500,
body:not([data-theme='dark']) .text-blue-500 {
    color: #15803d !important;
}

/* Background accents: use green-600 (#16a34a) */
body:not([data-theme='dark']) .bg-green-500,
body:not([data-theme='dark']) .bg-sky-500,
body:not([data-theme='dark']) .bg-blue-500 {
    background-color: #16a34a !important;
}

/* Portal: darken sidebar active text for light mode */
body:not([data-theme='dark']).sefari-portal .next-nav-item.active {
    color: #166534 !important;
    border-color: #16a34a !important;
    background: #dcfce7 !important;
}

/* Portal: darken hero link/button hover text */
body:not([data-theme='dark']).sefari-portal .portal-header-link:hover,
body:not([data-theme='dark']).sefari-portal .portal-quick-link:hover {
    color: #166534 !important;
    border-color: #16a34a !important;
}

/* Portal: darken the primary action button */
body:not([data-theme='dark']).sefari-portal .portal-quick-link.primary {
    background: #16a34a !important;
    border-color: #15803d !important;
}

/* Portal: darken account mark icon in light mode */
body:not([data-theme='dark']).sefari-portal .portal-account-mark {
    color: #166534 !important;
    border-color: #16a34a !important;
}

/* Portal: KPI accent icons */
body:not([data-theme='dark']).sefari-portal .portal-kpi-accent-blue .portal-kpi-icon,
body:not([data-theme='dark']).sefari-portal .portal-kpi-accent-green .portal-kpi-icon {
    color: #166534 !important;
    background: #bbf7d0 !important;
}

/* Console: primary buttons in light mode */
body:not([data-theme='dark']) .btn-primary,
body:not([data-theme='dark']) .btn.btn-primary {
    background-color: #16a34a !important;
    border-color: #15803d !important;
}

body:not([data-theme='dark']) .btn-primary:hover,
body:not([data-theme='dark']) .btn.btn-primary:hover {
    background-color: #15803d !important;
}

/* Console: link text in light mode */
body:not([data-theme='dark']) a.text-green-500,
body:not([data-theme='dark']) a.text-sky-500 {
    color: #15803d !important;
}

/* Focus rings: deeper green */
body:not([data-theme='dark']) .focus\:ring-green-500:focus,
body:not([data-theme='dark']) .focus\:border-green-300:focus {
    border-color: #16a34a !important;
}

/* ============================================================
   Green Obsidian — Dark Emerald Glassy Theme
   Replaces blue-gray/slate dark mode with emerald-tinted
   backgrounds for that obsidian glass effect.
   ============================================================ */

/* ── Color palette reference ──────────────────────────────────
   Deepest:   #040d07  (near-black emerald)
   Base:      #071410  (main background)
   Surface:   #0c1f16  (sidebar, cards)
   Elevated:  #112a1d  (panels, modals, dropdowns)
   Hover:     #163524  (hover states)
   Border:    #1a3f2b  (borders, dividers)
   Muted:     #22543a  (muted accents)
   ──────────────────────────────────────────────────────────── */

/* ── Body & root container ──────────────────────────────────── */
body[data-theme='dark'],
html[data-theme='dark'] {
    background-color: #071410 !important;
}

body[data-theme='dark'] .ember-application,
body[data-theme='dark'] #ember-application {
    background-color: #071410 !important;
}

/* ── Main app container ─────────────────────────────────────── */
body[data-theme='dark'] .sefari-next-container,
body[data-theme='dark'] .next-view-container {
    background-color: #071410 !important;
}

/* ── Top navigation bar ─────────────────────────────────────── */
body[data-theme='dark'] .next-header-nav,
body[data-theme='dark'] .next-header,
body[data-theme='dark'] header.next-header-nav {
    background-color: #0c1f16 !important;
    border-bottom-color: #1a3f2b !important;
    backdrop-filter: blur(12px) saturate(150%) !important;
}

/* ── Sidebar / left nav ─────────────────────────────────────── */
body[data-theme='dark'] .next-sidebar,
body[data-theme='dark'] .next-nav-sidebar,
body[data-theme='dark'] .next-content-panel-sidebar,
body[data-theme='dark'] .sefari-next-container > nav {
    background-color: #0c1f16 !important;
    border-right-color: #1a3f2b !important;
}

/* Sidebar active item */
body[data-theme='dark'] .next-nav-item.active,
body[data-theme='dark'] .next-nav-item.is-active {
    background-color: rgba(34, 197, 94, 0.12) !important;
    border-color: #22c55e !important;
}

/* Sidebar hover */
body[data-theme='dark'] .next-nav-item:hover {
    background-color: rgba(34, 197, 94, 0.06) !important;
}

/* ── Cards & surfaces ───────────────────────────────────────── */
body[data-theme='dark'] .next-content-panel,
body[data-theme='dark'] .next-content-panel-body,
body[data-theme='dark'] .next-widget-container {
    background-color: #0c1f16 !important;
    border-color: #1a3f2b !important;
}

/* Individual card tiles */
body[data-theme='dark'] .next-dd-content,
body[data-theme='dark'] .next-info-block,
body[data-theme='dark'] .next-table-wrapper {
    background-color: #0c1f16 !important;
}

/* ── Dropdowns & popovers ───────────────────────────────────── */
body[data-theme='dark'] .ember-basic-dropdown-content,
body[data-theme='dark'] .next-dd-menu,
body[data-theme='dark'] .fleetops-google-popover,
body[data-theme='dark'] [data-popper-placement] {
    background-color: #112a1d !important;
    border-color: #1a3f2b !important;
}

/* Dropdown items hover */
body[data-theme='dark'] .ember-basic-dropdown-content li:hover,
body[data-theme='dark'] .next-dd-menu-item:hover {
    background-color: #163524 !important;
}

/* ── Modals ─────────────────────────────────────────────────── */
body[data-theme='dark'] .modal-dialog,
body[data-theme='dark'] .modal-content,
body[data-theme='dark'] .next-modal-content,
body[data-theme='dark'] .next-overlay-panel-content {
    background-color: #112a1d !important;
    border-color: #1a3f2b !important;
}

body[data-theme='dark'] .modal-header,
body[data-theme='dark'] .next-modal-header {
    border-bottom-color: #1a3f2b !important;
    background-color: #0c1f16 !important;
}

body[data-theme='dark'] .modal-footer,
body[data-theme='dark'] .next-modal-footer {
    border-top-color: #1a3f2b !important;
    background-color: #0c1f16 !important;
}

/* ── Form inputs ────────────────────────────────────────────── */
body[data-theme='dark'] input,
body[data-theme='dark'] select,
body[data-theme='dark'] textarea,
body[data-theme='dark'] .form-input,
body[data-theme='dark'] .form-select {
    background-color: #071410 !important;
    border-color: #1a3f2b !important;
}

body[data-theme='dark'] input:focus,
body[data-theme='dark'] select:focus,
body[data-theme='dark'] textarea:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15) !important;
}

/* ── Table rows ─────────────────────────────────────────────── */
body[data-theme='dark'] .next-table tbody tr:hover,
body[data-theme='dark'] table tbody tr:hover {
    background-color: rgba(34, 197, 94, 0.04) !important;
}

body[data-theme='dark'] .next-table thead,
body[data-theme='dark'] table thead {
    background-color: #0c1f16 !important;
    border-bottom-color: #1a3f2b !important;
}

/* ── Tailwind dark bg overrides ─────────────────────────────── */
body[data-theme='dark'] .dark\:bg-gray-900 { background-color: #071410 !important; }
body[data-theme='dark'] .dark\:bg-gray-800 { background-color: #0c1f16 !important; }
body[data-theme='dark'] .dark\:bg-gray-700 { background-color: #112a1d !important; }
body[data-theme='dark'] .dark\:bg-gray-600 { background-color: #163524 !important; }
body[data-theme='dark'] .dark\:bg-zinc-900 { background-color: #071410 !important; }
body[data-theme='dark'] .dark\:bg-zinc-800 { background-color: #0c1f16 !important; }
body[data-theme='dark'] .dark\:bg-zinc-700 { background-color: #112a1d !important; }
body[data-theme='dark'] .dark\:bg-slate-900 { background-color: #071410 !important; }
body[data-theme='dark'] .dark\:bg-slate-800 { background-color: #0c1f16 !important; }
body[data-theme='dark'] .dark\:bg-slate-700 { background-color: #112a1d !important; }
body[data-theme='dark'] .dark\:bg-neutral-900 { background-color: #071410 !important; }
body[data-theme='dark'] .dark\:bg-neutral-800 { background-color: #0c1f16 !important; }

/* ── Tailwind dark border overrides ─────────────────────────── */
body[data-theme='dark'] .dark\:border-gray-700 { border-color: #1a3f2b !important; }
body[data-theme='dark'] .dark\:border-gray-600 { border-color: #22543a !important; }
body[data-theme='dark'] .dark\:border-gray-800 { border-color: #163524 !important; }
body[data-theme='dark'] .dark\:border-zinc-700 { border-color: #1a3f2b !important; }
body[data-theme='dark'] .dark\:border-slate-700 { border-color: #1a3f2b !important; }

/* ── Scrollbar: emerald tint ────────────────────────────────── */
body[data-theme='dark'] ::-webkit-scrollbar-track {
    background: #071410 !important;
}

body[data-theme='dark'] ::-webkit-scrollbar-thumb {
    background: #1a3f2b !important;
    border-radius: 4px !important;
}

body[data-theme='dark'] ::-webkit-scrollbar-thumb:hover {
    background: #22543a !important;
}

/* ── Portal-specific dark emerald ───────────────────────────── */
body[data-theme='dark'].sefari-portal .portal-container,
body[data-theme='dark'].sefari-portal .portal-main {
    background-color: #071410 !important;
}

body[data-theme='dark'].sefari-portal .portal-sidebar {
    background-color: #0c1f16 !important;
    border-right-color: #1a3f2b !important;
}

body[data-theme='dark'].sefari-portal .portal-topbar {
    background-color: #0c1f16 !important;
    border-bottom-color: #1a3f2b !important;
}

body[data-theme='dark'].sefari-portal .portal-kpi-card {
    background-color: #0c1f16 !important;
    border-color: #1a3f2b !important;
}

body[data-theme='dark'].sefari-portal .portal-section-card {
    background-color: #0c1f16 !important;
    border-color: #1a3f2b !important;
}

/* ── Glassy effect on key surfaces ──────────────────────────── */
body[data-theme='dark'] .next-header-nav,
body[data-theme='dark'] .next-sidebar {
    background: rgba(12, 31, 22, 0.92) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
}

/* ── Order panel / form sidebar ─────────────────────────────── */
body[data-theme='dark'] .next-overlay-panel,
body[data-theme='dark'] .next-content-overlay-panel-body {
    background-color: #0c1f16 !important;
    border-left-color: #1a3f2b !important;
}

/* ── Tooltip ────────────────────────────────────────────────── */
body[data-theme='dark'] .ember-tooltip,
body[data-theme='dark'] .tippy-box {
    background-color: #112a1d !important;
    border-color: #1a3f2b !important;
}

/* ============================================================
   Premium Auth — Glass Obsidian Override (hotfix)
   ============================================================ */

@keyframes sfr-glow-drift {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    33% { opacity: 0.8; transform: translate(-48%, -52%) scale(1.05) rotate(1deg); }
    66% { opacity: 0.6; transform: translate(-52%, -48%) scale(1.02) rotate(-1deg); }
}
@keyframes sfr-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    50% { transform: translate(-20px, -30px) scale(1.15); opacity: 0.7; }
}
@keyframes sfr-shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes sfr-card-enter {
    0% { opacity: 0; transform: translateY(24px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes sfr-border-glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.sfr-auth-backdrop {
    background: #040d07 !important;
    background-image:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 80% 60%, rgba(5, 150, 105, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 100% 100% at 50% 100%, rgba(4, 120, 87, 0.04) 0%, transparent 40%) !important;
}

.sfr-auth-glow {
    width: 700px !important;
    height: 500px !important;
    top: 25% !important;
    background:
        radial-gradient(ellipse 50% 50% at 30% 40%, rgba(16, 185, 129, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 70% 55%, rgba(5, 150, 105, 0.12) 0%, transparent 55%) !important;
    filter: blur(60px) !important;
    animation: sfr-glow-drift 8s ease-in-out infinite !important;
}

.sfr-auth-glow::after {
    content: '' !important;
    position: absolute !important;
    bottom: -20% !important;
    right: -10% !important;
    width: 300px !important;
    height: 300px !important;
    border-radius: 50% !important;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.1) 0%, transparent 60%) !important;
    filter: blur(40px) !important;
    animation: sfr-orb-float 10s ease-in-out infinite 2s !important;
}

.sfr-auth-card {
    max-width: 26rem !important;
    border: 1px solid rgba(34, 197, 94, 0.1) !important;
    border-radius: 1.25rem !important;
    background: rgba(8, 18, 12, 0.75) !important;
    backdrop-filter: blur(32px) saturate(180%) brightness(1.05) !important;
    -webkit-backdrop-filter: blur(32px) saturate(180%) brightness(1.05) !important;
    box-shadow:
        0 0 0 1px rgba(34, 197, 94, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 24px 48px -12px rgba(0, 0, 0, 0.6),
        0 0 120px -20px rgba(16, 185, 129, 0.06) !important;
    animation: sfr-card-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

.sfr-auth-card::before {
    content: '' !important;
    position: absolute !important;
    inset: -1px !important;
    border-radius: 1.3rem !important;
    background: linear-gradient(135deg,
        rgba(34, 197, 94, 0.2) 0%,
        rgba(16, 185, 129, 0.05) 30%,
        rgba(5, 150, 105, 0.15) 70%,
        rgba(34, 197, 94, 0.1) 100%) !important;
    z-index: -1 !important;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
    mask-composite: exclude !important;
    -webkit-mask-composite: xor !important;
    padding: 1px !important;
    animation: sfr-border-glow 4s ease-in-out infinite !important;
}

.sfr-auth-card::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 10% !important;
    right: 10% !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent) !important;
}

.sfr-auth-title {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    background: linear-gradient(135deg, #f0fdf4, #d1fae5 30%, #a7f3d0 60%, #86efac) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.sfr-auth-logo {
    border-radius: 1rem !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 24px rgba(16, 185, 129, 0.12) !important;
    transition: box-shadow 0.3s ease !important;
}

.sfr-auth-logo-link {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sfr-auth-logo-link:hover {
    transform: scale(1.05) !important;
}

.sfr-auth-logo-link:hover .sfr-auth-logo {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 32px rgba(16, 185, 129, 0.2), 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.sfr-auth-input,
.sfr-auth-card .form-input,
.sfr-auth-card .ember-text-field {
    height: 2.875rem !important;
    border: 1px solid rgba(34, 197, 94, 0.08) !important;
    border-radius: 0.625rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    color: #f0fdf4 !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sfr-auth-input:focus,
.sfr-auth-card .form-input:focus,
.sfr-auth-card .ember-text-field:focus {
    border-color: rgba(34, 197, 94, 0.4) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.08), 0 0 16px rgba(16, 185, 129, 0.06) !important;
}

.sfr-auth-input::placeholder {
    color: rgba(167, 243, 208, 0.3) !important;
}

.sfr-auth-remember-label {
    color: rgba(167, 243, 208, 0.5) !important;
}

.sfr-auth-forgot-link {
    color: #34d399 !important;
    transition: all 0.2s ease !important;
}

.sfr-auth-forgot-link:hover {
    color: #6ee7b7 !important;
    text-shadow: 0 0 12px rgba(52, 211, 153, 0.3) !important;
}

.sfr-auth-submit .btn {
    height: 2.875rem !important;
    border-radius: 0.625rem !important;
    font-size: 0.9rem !important;
    letter-spacing: 0.01em !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.sfr-auth-submit .btn::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.08) 45%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.08) 55%, transparent 65%) !important;
    background-size: 200% 100% !important;
    animation: sfr-shimmer 3s ease-in-out infinite !important;
    border-radius: inherit !important;
}

.sfr-auth-submit .btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35), 0 0 40px rgba(16, 185, 129, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.sfr-auth-back .btn {
    background: rgba(12, 31, 22, 0.6) !important;
    border: 1px solid rgba(34, 197, 94, 0.1) !important;
    color: rgba(167, 243, 208, 0.6) !important;
    backdrop-filter: blur(12px) saturate(150%) !important;
    border-radius: 0.5rem !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sfr-auth-back .btn:hover {
    background: rgba(12, 31, 22, 0.8) !important;
    border-color: rgba(34, 197, 94, 0.2) !important;
    color: #a7f3d0 !important;
}
/* deployed: 1782625441 */

/* ============================================================
   Glassy Primary Buttons — Frosted Emerald Override
   Matches the Dashboard nav button aesthetic.
   Replaces flat solid green with dark glass + green glow.
   ============================================================ */

/* Dark mode: btn-primary → frosted emerald glass */
body[data-theme='dark'] .btn-primary,
body[data-theme='dark'] .btn.btn-primary,
body[data-theme='dark'] .sefari-portal .btn-primary,
body[data-theme='dark'] .sefari-portal .btn.btn-primary {
    background: rgba(12, 31, 22, 0.7) !important;
    border: 1px solid rgba(34, 197, 94, 0.25) !important;
    color: #a7f3d0 !important;
    backdrop-filter: blur(8px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(8px) saturate(140%) !important;
    box-shadow:
        0 0 0 1px rgba(34, 197, 94, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 2px 8px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body[data-theme='dark'] .btn-primary:hover,
body[data-theme='dark'] .btn.btn-primary:hover,
body[data-theme='dark'] .sefari-portal .btn-primary:hover,
body[data-theme='dark'] .sefari-portal .btn.btn-primary:hover {
    background: rgba(12, 31, 22, 0.85) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
    color: #d1fae5 !important;
    box-shadow:
        0 0 0 1px rgba(34, 197, 94, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(16, 185, 129, 0.08) !important;
    transform: translateY(-1px) !important;
}

body[data-theme='dark'] .btn-primary:active,
body[data-theme='dark'] .btn.btn-primary:active {
    transform: translateY(0) !important;
    background: rgba(12, 31, 22, 0.9) !important;
}

/* Also catch btn-success / btn-green which are similar flat green */
body[data-theme='dark'] .btn-success,
body[data-theme='dark'] .btn.btn-success {
    background: rgba(12, 31, 22, 0.7) !important;
    border: 1px solid rgba(34, 197, 94, 0.25) !important;
    color: #a7f3d0 !important;
    backdrop-filter: blur(8px) !important;
    box-shadow:
        0 0 0 1px rgba(34, 197, 94, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 2px 8px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body[data-theme='dark'] .btn-success:hover,
body[data-theme='dark'] .btn.btn-success:hover {
    background: rgba(12, 31, 22, 0.85) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
    color: #d1fae5 !important;
    box-shadow:
        0 0 0 1px rgba(34, 197, 94, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(16, 185, 129, 0.08) !important;
    transform: translateY(-1px) !important;
}

/* Keep the auth submit button its own special gradient style */
body[data-theme='dark'] .sfr-auth-submit .btn,
body[data-theme='dark'] .sfr-auth-submit .btn.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* ============================================================
   Ambient Background Gradient Drift
   Ultra-slow, barely perceptible emerald glow animation.
   30s cycle, very subtle. Like the login screen but quieter.
   ============================================================ */

@keyframes sfr-ambient-drift {
    0% {
        background-position: 20% 40%, 80% 60%, 50% 90%;
    }
    25% {
        background-position: 25% 35%, 75% 65%, 55% 85%;
    }
    50% {
        background-position: 22% 45%, 78% 55%, 48% 92%;
    }
    75% {
        background-position: 18% 38%, 82% 62%, 52% 88%;
    }
    100% {
        background-position: 20% 40%, 80% 60%, 50% 90%;
    }
}

/* Apply the ambient drift to the main dark mode body */
body[data-theme='dark'] {
    background-color: #071410 !important;
    background-image:
        radial-gradient(ellipse 80% 60% at var(--sfr-bg1, 20%) var(--sfr-bg2, 40%), rgba(16, 185, 129, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 80% 60%, rgba(5, 150, 105, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse 100% 100% at 50% 90%, rgba(4, 120, 87, 0.02) 0%, transparent 40%) !important;
    background-size: 200% 200%, 200% 200%, 200% 200% !important;
    animation: sfr-ambient-drift 30s ease-in-out infinite !important;
}

/* Portal container gets the same treatment */
body[data-theme='dark'].sefari-portal .portal-container,
body[data-theme='dark'].sefari-portal .portal-main,
body[data-theme='dark'] .sefari-next-container,
body[data-theme='dark'] .next-view-container {
    background: transparent !important;
}

/* The tracking page backdrop also gets the drift */
body[data-theme='dark'] .sfr-auth-backdrop {
    background: #040d07 !important;
    background-image:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 80% 60%, rgba(5, 150, 105, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 100% 100% at 50% 100%, rgba(4, 120, 87, 0.04) 0%, transparent 40%) !important;
    background-size: 200% 200%, 200% 200%, 200% 200% !important;
    animation: sfr-ambient-drift 20s ease-in-out infinite !important;
}
