/* ─── LUSMAR BULBFINDER ADMIN ─── */
/* Design System: matched to Lusmar B2B app (Lusmar_Git) — navy + cyan */

:root {
    /* Lusmar palette (dark mode) */
    --bf-bg:            #0B132B;   /* page background */
    --bf-surface:       #0f1d3a;   /* cards, drawer, appbar */
    --bf-surface2:      #102245;   /* secondary surface (hovers, table head) */
    --bf-card:          #0f1d3a;
    --bf-text:          #e7ecff;   /* primary text — light blue-white */
    --bf-text-muted:    #a6b0cf;   /* muted blue-gray */
    --bf-primary:       #00d4ff;   /* electric cyan (brand-2) */
    --bf-primary-light: #4ea2ff;   /* sky blue (brand) */
    --bf-primary-dark:  #0099cc;
    --bf-accent:        #00d2ff;
    --bf-success:       #27d980;
    --bf-warning:       #ffb020;
    --bf-error:         #ef4444;
    --bf-border:        rgba(255,255,255,.08);
    --bf-radius:        18px;      /* large card radius like Lusmar */
    --bf-radius-sm:     10px;
    --bf-shadow:        0 10px 30px rgba(0, 0, 0, .35);
    --bf-glow:          0 0 24px rgba(0,212,255,.18);
}

/* ─── Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bf-bg);
    color: var(--bf-text);
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: .005em;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--bf-primary); color: #001428; }

/* ─── MudBlazor overrides ─────────────────────────────────────────── */
.mud-drawer {
    background: var(--bf-surface) !important;
    border-right: 1px solid var(--bf-border) !important;
    box-shadow: var(--bf-shadow) !important;
}

.mud-drawer-header {
    background: linear-gradient(135deg, var(--bf-surface2), var(--bf-surface)) !important;
    border-bottom: 1px solid var(--bf-border) !important;
    padding: 14px 16px !important;
    min-height: 0 !important;
    height: auto !important;
}

/* Replacement for MudDrawerHeader (we render our own to control the height) */
.bf-drawer-brand {
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--bf-surface2), var(--bf-surface));
    border-bottom: 1px solid var(--bf-border);
}

/* MudNavMenu has internal top padding by default — kill it so menu items
   start immediately under the brand block. */
.mud-drawer .mud-navmenu {
    padding-top: 4px !important;
}

/* Compact nav section headers (replace MudDivider + Typo.overline blocks) */
.bf-nav-section {
    padding: 14px 20px 4px;
    color: var(--bf-text-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.bf-nav-section:first-child {
    padding-top: 8px;
}

.mud-main-content {
    background: var(--bf-bg) !important;
    min-height: 100vh;
}

.mud-appbar {
    background: rgba(15,29,58,.85) !important;
    border-bottom: 1px solid var(--bf-border) !important;
    box-shadow: none !important;
    backdrop-filter: saturate(120%) blur(10px);
    -webkit-backdrop-filter: saturate(120%) blur(10px);
}

.mud-nav-item .mud-nav-link {
    border-radius: var(--bf-radius-sm) !important;
    margin: 2px 8px !important;
    padding: 10px 12px !important;
    color: var(--bf-text-muted) !important;
    font-weight: 500 !important;
    transition: all .2s ease !important;
}
.mud-nav-item .mud-nav-link:hover {
    background: rgba(0,212,255,.10) !important;
    color: var(--bf-primary) !important;
}
.mud-nav-item .mud-nav-link.active {
    background: rgba(0,212,255,.15) !important;
    color: var(--bf-primary) !important;
    border-left: 3px solid var(--bf-primary) !important;
}

.mud-paper {
    background: var(--bf-card) !important;
    border: 1px solid var(--bf-border) !important;
    border-radius: var(--bf-radius) !important;
    box-shadow: var(--bf-shadow) !important;
}

.mud-table { background: transparent !important; }

.mud-table-head .mud-table-cell {
    background: var(--bf-surface2) !important;
    color: var(--bf-text-muted) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    letter-spacing: .05em !important;
    text-transform: uppercase !important;
    border-bottom: 1px solid var(--bf-border) !important;
}
.mud-table-body .mud-table-row:hover {
    background: rgba(0,212,255,.06) !important;
}
.mud-table-cell {
    color: var(--bf-text) !important;
    border-bottom: 1px solid rgba(255,255,255,.05) !important;
}

/* Inputs */
.mud-input-outlined .mud-input-outlined-border {
    border-color: var(--bf-border) !important;
    border-radius: var(--bf-radius-sm) !important;
}
.mud-input-outlined:hover .mud-input-outlined-border,
.mud-input-outlined.mud-focused .mud-input-outlined-border {
    border-color: var(--bf-primary) !important;
}
.mud-input-label { color: var(--bf-text-muted) !important; }
.mud-input-label.mud-focused { color: var(--bf-primary) !important; }
.mud-input-base input, .mud-input-base textarea {
    color: var(--bf-text) !important;
    background: transparent !important;
}

/* Popover / dropdown */
.mud-popover {
    background: var(--bf-surface2) !important;
    border: 1px solid var(--bf-border) !important;
    border-radius: 12px !important;
    box-shadow: var(--bf-shadow) !important;
}
.mud-list-item:hover { background: rgba(0,212,255,.10) !important; }
.mud-selected-item   { color: var(--bf-primary) !important; }

/* Buttons */
.mud-button-filled-primary {
    background: linear-gradient(135deg, var(--bf-primary-light), var(--bf-primary)) !important;
    color: #001428 !important;
    box-shadow: 0 4px 15px rgba(0,212,255,.28) !important;
    transition: all .2s ease !important;
    font-weight: 600 !important;
}
.mud-button-filled-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 22px rgba(0,212,255,.45) !important;
}
.mud-button-outlined {
    border-color: var(--bf-border) !important;
    color: var(--bf-text) !important;
}
.mud-button-outlined:hover {
    background: rgba(255,255,255,.04) !important;
    border-color: var(--bf-primary) !important;
}

/* Chips */
.mud-chip { border-radius: 8px !important; font-weight: 500 !important; }
.mud-chip-color-success { background: rgba(39,217,128,.15) !important; color: var(--bf-success) !important; }
.mud-chip-color-error   { background: rgba(239,68,68,.15)  !important; color: var(--bf-error)   !important; }
.mud-chip-color-warning { background: rgba(255,176,32,.15) !important; color: var(--bf-warning) !important; }
.mud-chip-color-primary { background: rgba(0,212,255,.15)  !important; color: var(--bf-primary) !important; }

/* Alerts */
.mud-alert-filled-info    { background: rgba(0,212,255,.10) !important; color: var(--bf-primary) !important; }
.mud-alert-filled-success { background: rgba(39,217,128,.12) !important; color: var(--bf-success) !important; }
.mud-alert-filled-error   { background: rgba(239,68,68,.12)  !important; color: var(--bf-error)   !important; }
.mud-alert-filled-warning { background: rgba(255,176,32,.12) !important; color: var(--bf-warning) !important; }

/* ─── Lusmar custom components ────────────────────────────────────── */
.bf-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.bf-logo-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--bf-primary), var(--bf-primary-light));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: #001428;
    box-shadow: 0 4px 16px rgba(0,212,255,.35);
}
.bf-logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--bf-text);
    line-height: 1;
    letter-spacing: .4px;
}
.bf-logo-sub {
    font-size: 10px;
    color: var(--bf-text-muted);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-top: 3px;
}

/* Page header */
.bf-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bf-border);
    flex-wrap: wrap;
    gap: 16px;
}
.bf-page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--bf-text);
    margin: 0;
    letter-spacing: -.01em;
}
.bf-page-subtitle {
    font-size: 13px;
    color: var(--bf-text-muted);
    margin: 4px 0 0;
}

/* Vehicle type tabs */
.bf-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.bf-type-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--bf-radius-sm);
    border: 1px solid var(--bf-border);
    background: var(--bf-surface);
    color: var(--bf-text-muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all .2s ease;
    white-space: nowrap;
}
.bf-type-tab:hover {
    border-color: var(--bf-primary);
    color: var(--bf-primary);
    background: rgba(0,212,255,.06);
}
.bf-type-tab.active {
    background: rgba(0,212,255,.12);
    border-color: var(--bf-primary);
    color: var(--bf-primary);
    box-shadow: 0 0 14px rgba(0,212,255,.18) inset;
}

/* Breadcrumb */
.bf-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--bf-text-muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.bf-breadcrumb-item {
    cursor: pointer;
    color: var(--bf-primary);
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0,212,255,.08);
    border: 1px solid rgba(0,212,255,.18);
    transition: all .15s ease;
}
.bf-breadcrumb-item:hover { background: rgba(0,212,255,.18); }
.bf-breadcrumb-sep { color: var(--bf-border); }
.bf-breadcrumb-current { color: var(--bf-text); font-weight: 500; }

/* Stats cards */
.bf-stat-card {
    background: var(--bf-card);
    border: 1px solid var(--bf-border);
    border-radius: var(--bf-radius);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--bf-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}
.bf-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--bf-shadow), var(--bf-glow);
}
.bf-stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.bf-stat-icon-purple { background: rgba(0,212,255,.18); color: var(--bf-primary); }
.bf-stat-icon-amber  { background: rgba(255,176,32,.15); color: var(--bf-warning); }
.bf-stat-icon-green  { background: rgba(39,217,128,.15); color: var(--bf-success); }
.bf-stat-value { font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--bf-text); }
.bf-stat-label { font-size: 12px; color: var(--bf-text-muted); margin-top: 6px; }

/* Error state */
.bf-error {
    display: flex; align-items: center; justify-content: center;
    min-height: 200px; flex-direction: column; gap: 12px;
    color: var(--bf-error); font-size: 15px;
}

/* Loading skeleton */
.bf-skeleton {
    background: linear-gradient(90deg, var(--bf-surface) 25%, var(--bf-surface2) 50%, var(--bf-surface) 75%);
    background-size: 200% 100%;
    animation: bf-shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes bf-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bf-bg); }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,.30); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--bf-primary); }

/* Animations */
@keyframes bf-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.bf-fade-in { animation: bf-fade-in .3s ease forwards; }

/* ─── Login page (matches Lusmar B2B aesthetic) ──────────────────── */
.empty-layout { min-height: 100vh; }

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 30%, rgba(0,212,255,.10) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(78,162,255,.10) 0%, transparent 50%),
        var(--bf-bg);
    position: relative;
    overflow: hidden;
}

.login-aurora {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(0,212,255,.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: var(--bf-surface);
    border: 1px solid var(--bf-border);
    border-radius: var(--bf-radius);
    padding: 40px 36px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, .55),
        0 0 0 1px rgba(0,212,255,.05) inset,
        0 0 60px rgba(0,212,255,.10);
    animation: bf-fade-in .4s ease forwards;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bf-border);
}
.login-brand-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--bf-primary), var(--bf-primary-light));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #001428;
    box-shadow: 0 8px 20px rgba(0,212,255,.35);
    letter-spacing: -.02em;
}
.login-brand-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--bf-text);
    line-height: 1;
    letter-spacing: .5px;
}
.login-brand-sub {
    font-size: 11px;
    color: var(--bf-text-muted);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-top: 4px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--bf-text);
    margin: 0 0 6px;
    letter-spacing: -.02em;
}
.login-subtitle {
    font-size: 13px;
    color: var(--bf-text-muted);
    margin: 0 0 24px;
}

.login-notice {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    text-align: center;
}
.login-notice-error {
    background: rgba(239, 68, 68, .10);
    border: 1px solid rgba(239, 68, 68, .35);
    color: #ff8585;
}

.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--bf-text-muted);
    font-weight: 500;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.login-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bf-bg);
    border: 1px solid var(--bf-border);
    color: var(--bf-text);
    border-radius: var(--bf-radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: all .2s ease;
    outline: none;
}
.login-input:hover { border-color: rgba(0,212,255,.40); }
.login-input:focus {
    border-color: var(--bf-primary);
    box-shadow: 0 0 0 3px rgba(0,212,255,.18);
}

.login-btn {
    margin-top: 6px;
    padding: 14px 18px;
    border: 0;
    border-radius: var(--bf-radius-sm);
    background: linear-gradient(135deg, var(--bf-primary-light), var(--bf-primary));
    color: #001428;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .03em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all .2s ease;
    box-shadow: 0 8px 24px rgba(0,212,255,.30);
}
.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 32px rgba(0,212,255,.45);
}
.login-btn:active { transform: translateY(0); }

.login-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--bf-border);
    text-align: center;
    font-size: 11px;
    color: var(--bf-text-muted);
    letter-spacing: .08em;
    text-transform: uppercase;
}
.login-footer-dot { margin: 0 6px; opacity: .5; }
