/* ─── KLX Service Desk — Global Styles ─────────────────────────────────────── */

:root {
    --klx-navy: #1a3a6b;
    --klx-orange: #e8610a;
    --klx-light-bg: #f0f2f5;
    --klx-surface: #ffffff;
    --klx-border: #e0e4ea;
    --klx-mid-grey: #8a9bb0;
    --klx-dark-text: #1c2b3a;
}

/* ─── App Loading Screen ──────────────────────────────────────────────────── */
.app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--klx-light-bg);
    gap: 16px;
    animation: fadeIn 0.3s ease;
}

.app-loading p {
    color: var(--klx-mid-grey);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.app-loading svg {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.7; transform: scale(0.96); }
}

/* ─── Auth Loading ────────────────────────────────────────────────────────── */
.auth-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 16px;
    font-family: 'Inter', sans-serif;
    color: var(--klx-mid-grey);
}

.klx-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--klx-border);
    border-top-color: var(--klx-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ─── Logo ────────────────────────────────────────────────────────────────── */
.klx-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.klx-logo-wrap:hover {
    background: rgba(255,255,255,0.08);
}

.klx-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.klx-brand {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: white;
    letter-spacing: 2px;
}

.klx-product {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 11px;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.5px;
}

/* ─── Nav Drawer Overrides ────────────────────────────────────────────────── */
.mud-nav-link {
    border-radius: 8px !important;
    margin: 2px 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--klx-dark-text) !important;
    transition: background 0.15s !important;
}

.mud-nav-link:hover {
    background: rgba(26, 58, 107, 0.07) !important;
}

.mud-nav-link.active {
    background: rgba(26, 58, 107, 0.1) !important;
    color: var(--klx-navy) !important;
    font-weight: 600 !important;
    border-left: 3px solid var(--klx-orange) !important;
}

/* ─── Table Row Hover ─────────────────────────────────────────────────────── */
.mud-table-row:hover {
    cursor: pointer;
    background: rgba(26, 58, 107, 0.04) !important;
}

/* ─── Card / Paper ────────────────────────────────────────────────────────── */
.mud-paper {
    transition: box-shadow 0.15s;
}

/* ─── Chip ────────────────────────────────────────────────────────────────── */
.mud-chip {
    border-radius: 6px !important;
}

/* ─── Blazor error UI ─────────────────────────────────────────────────────── */
#blazor-error-ui {
    background: #ffebee;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #c62828;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ─── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--klx-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--klx-mid-grey); }
