html, body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

/* ══════════════════════════════════════════════════
   CUSTOM SCROLLBAR — Premium asisDENT dizaynı
   ══════════════════════════════════════════════════ */

/* === Chromium (Chrome, Edge, Opera, Brave) === */

/* Scrollbar eni */
::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

/* Track — tam şəffaf */
::-webkit-scrollbar-track {
    background: transparent !important;
    border: none !important;
}

/* Thumb — asisDENT teal rəngi */
::-webkit-scrollbar-thumb {
    background: rgba(15, 118, 110, 0.3) !important;
    border-radius: 10px !important;
    border: none !important;
    min-height: 28px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 118, 110, 0.55) !important;
}

::-webkit-scrollbar-thumb:active {
    background: rgba(15, 118, 110, 0.7) !important;
}

/* === Dark mode === */
.mud-theme-dark ::-webkit-scrollbar-thumb {
    background: rgba(45, 212, 191, 0.25) !important;
}

.mud-theme-dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(45, 212, 191, 0.45) !important;
}

.mud-theme-dark ::-webkit-scrollbar-thumb:active {
    background: rgba(45, 212, 191, 0.6) !important;
}

/* === Firefox === */
* {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(15, 118, 110, 0.3) transparent !important;
}

.mud-theme-dark * {
    scrollbar-color: rgba(45, 212, 191, 0.25) transparent !important;
}

/* ══════════════════════════════════════════════════
   LAYOUT FLASH PREVENTION — Login səhifəsində arxa
   planın görünməsinin qarşısını alır
   ══════════════════════════════════════════════════ */

/* Blazor yüklənənə qədər body-də heç nə görünməsin */
body:not(.blazor-loaded) {
    background: #f8fafc !important;
}
body:not(.blazor-loaded) .mud-layout,
body:not(.blazor-loaded) .mud-drawer,
body:not(.blazor-loaded) .mud-appbar {
    visibility: hidden !important;
}

/* Login səhifəsinin özü həmişə full-screen olsun */
.login-shell {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99998 !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
}

/* asisdent-premium-layout da full-screen olsun */
.asisdent-premium-layout {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99997 !important;
    background: #f8fafc !important;
}

/* === Layout Utility Classes === */
.d-flex {
    display: flex !important;
}

.justify-center {
    justify-content: center !important;
}

.align-center {
    align-items: center !important;
}

.mb-6 {
    margin-bottom: 2rem !important;
}

.ml-4 {
    margin-left: 1.5rem !important;
}

.text-decoration-none {
    text-decoration: none !important;
}

/* === NAVBAR (AppBar) GLOBAL STILLER === */
.mud-appbar {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18) !important;
}

/* === SIDEBAR KÖLGƏSİ === */
.mud-drawer {
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.08) !important;
}

/* === COLD START / LOADING SCREEN === */
.cold-start-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f8fafc;
    font-family: 'Segoe UI', Roboto, sans-serif;
    z-index: 99999;
}

.premium-loader-container {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 118, 110, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid rgba(15, 118, 110, 0.1);
}

.premium-loader-logo {
    width: 100px;
    height: auto;
    object-fit: contain;
    z-index: 1;
}

/* Skaner effekti */
.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #0f766e;
    box-shadow: 0 0 15px #0f766e, 0 0 30px #2dd4bf;
    animation: scan 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 2;
}

@keyframes scan {
    0% {
        top: -10%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 110%;
        opacity: 0;
    }
}

.loading-text {
    color: #0f766e;
    font-weight: 700;
    letter-spacing: 3px;
    font-size: 13px;
    text-transform: uppercase;
    animation: pulse-text 2s infinite ease-in-out;
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

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

/* =============================================
   PENMAN BLAZOR QUILL / QUILL EDITOR — GLOBAL
   ============================================= */

/* Quill editor content sahəsi — minimum hündürlük */
.ql-editor {
    min-height: 180px !important;
}

/* Qeyd redaktoru (CustomerDetailDialog) içində editor */
.mud-dialog .ql-editor {
    min-height: 140px !important;
}

/* Toolbar və container-in qonşuluq border-radius */
.ql-toolbar {
    border-radius: 8px 8px 0 0;
}

.ql-container {
    border-radius: 0 0 8px 8px;
}

/* =============================================
   QARANLIQ MOD (DARK MODE) DƏSTƏYİ
   ============================================= */

/* MudBlazor dark mode: .mud-theme-dark tətbiq edilir */
.mud-theme-dark .ql-toolbar {
    background-color: #2d2d2d !important;
    border-color: #444 !important;
}

.mud-theme-dark .ql-container {
    border-color: #444 !important;
    background-color: #1e1e1e !important;
}

.mud-theme-dark .ql-editor {
    color: #e0e0e0 !important;
}

/* Toolbar butonları — ağ rəngdə görünsün */
.mud-theme-dark .ql-toolbar button .ql-stroke,
.mud-theme-dark .ql-toolbar .ql-picker-label .ql-stroke {
    stroke: #ccc !important;
}

.mud-theme-dark .ql-toolbar button .ql-fill,
.mud-theme-dark .ql-toolbar .ql-picker-label .ql-fill {
    fill: #ccc !important;
}

.mud-theme-dark .ql-toolbar button:hover .ql-stroke,
.mud-theme-dark .ql-toolbar .ql-picker-label:hover .ql-stroke {
    stroke: #fff !important;
}

.mud-theme-dark .ql-toolbar button:hover .ql-fill,
.mud-theme-dark .ql-toolbar .ql-picker-label:hover .ql-fill {
    fill: #fff !important;
}

.mud-theme-dark .ql-toolbar button.ql-active .ql-stroke {
    stroke: #0f766e !important;
}

.mud-theme-dark .ql-toolbar button.ql-active .ql-fill {
    fill: #0f766e !important;
}

/* Dropdown pickers (header, color, background) */
.mud-theme-dark .ql-toolbar .ql-picker {
    color: #ccc !important;
}

.mud-theme-dark .ql-toolbar .ql-picker-label {
    border-color: #555 !important;
}

.mud-theme-dark .ql-toolbar .ql-picker-label:hover {
    color: #fff !important;
}

.mud-theme-dark .ql-toolbar .ql-picker-options {
    background-color: #2d2d2d !important;
    border-color: #444 !important;
}

/* Picker options içində seçimlər */
.mud-theme-dark .ql-toolbar .ql-picker-item {
    color: #ccc !important;
}

.mud-theme-dark .ql-toolbar .ql-picker-item:hover {
    color: #fff !important;
}

/* Placeholder text */
.mud-theme-dark .ql-editor.ql-blank::before {
    color: #666 !important;
}

/* Toolbar active button background (basılı halda) */
.mud-theme-dark .ql-toolbar button.ql-active {
    background-color: rgba(15, 118, 110, 0.2) !important;
}

/* Color picker düyməsi üçün SVG rəngləri */
.mud-theme-dark .ql-toolbar .ql-color-picker .ql-picker-label svg,
.mud-theme-dark .ql-toolbar .ql-background-picker .ql-picker-label svg {
    filter: brightness(0) invert(0.8);
}

/* ══════════════════════════════════════════════════
   GLOBAL SEARCH DIALOG — Modern SaaS tərzi
   ══════════════════════════════════════════════════ */

.search-dialog {
    border-radius: 16px !important;
    overflow: hidden !important;
}

.search-dialog .mud-dialog-content {
    padding: 16px 20px 12px !important;
}

.search-input .mud-input-outlined-border {
    border-radius: 12px !important;
}

.search-results-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 360px;
    overflow-y: auto;
}

.search-result-item {
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.search-result-item:hover {
    background: var(--mud-palette-background-grey);
}

/* Qaranlıq modda */
.mud-theme-dark .search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}


/* ══════════════════════════════════════════════════════════════
   XƏTA SƏHİFƏLƏRİ (404 / ümumi xəta)  —  2026-07-30
   Pages/Errors/NotFoundPage.razor · Pages/Errors/ErrorPage.razor
   ══════════════════════════════════════════════════════════════ */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 70vh;
    padding: 32px 24px;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

/* Cold-start ekranındakı loqo qutusunun eynisi — vizual davamlılıq üçün */
.error-logo-box {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 118, 110, 0.15);
    border: 1px solid rgba(15, 118, 110, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.error-logo {
    width: 86px;
    height: auto;
    object-fit: contain;
}

.error-code {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    color: #0f766e;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.error-code--warn {
    color: #b45309;
}

.error-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
}

.error-text {
    font-size: 14px;
    line-height: 1.7;
    color: #475569;
    max-width: 460px;
    margin-bottom: 28px;
}

.error-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Dark mode */
.mud-theme-dark .error-logo-box {
    background: #1e293b;
    border-color: rgba(45, 212, 191, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.mud-theme-dark .error-code {
    color: #2dd4bf;
}

.mud-theme-dark .error-code--warn {
    color: #fbbf24;
}

.mud-theme-dark .error-title {
    color: #f1f5f9;
}

.mud-theme-dark .error-text {
    color: #94a3b8;
}

/* Kiçik ekranlar */
@media (max-width: 600px) {
    .error-code { font-size: 48px; }
    .error-logo-box { width: 96px; height: 96px; }
    .error-logo { width: 68px; }
    .error-actions { flex-direction: column; width: 100%; max-width: 260px; }
}
