:root {
    --rz-primary: #1a56db;
    --rz-primary-light: #e1effe;
    --rz-sidebar-bg: #ffffff;
    --rz-sidebar-color: #475569;
    --rz-header-bg: #ffffff;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background: #f1f5f9;
    color: #1e293b;
}

#app {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Loading screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 1.5rem;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #1a56db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Header */
.rz-header {
    background: var(--rz-header-bg) !important;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    color: #1e293b !important;
}

/* Sidebar */
.rz-sidebar {
    background: var(--rz-sidebar-bg) !important;
    border-right: none !important;
}

.rz-sidebar .rz-panel-menu {
    padding: 0.5rem;
}

.rz-sidebar .rz-navigation-item-link,
.rz-sidebar .rz-panel-menu-item-link {
    color: #475569 !important;
    border-radius: 8px;
    margin: 2px 0;
    padding: 0.6rem 1rem;
    transition: background 0.15s;
}

.rz-sidebar .rz-navigation-item-link:hover,
.rz-sidebar .rz-panel-menu-item-link:hover {
    background: rgba(0,0,0,0.05) !important;
    color: #1e293b !important;
}

.rz-sidebar .rz-navigation-item-link.active,
.rz-sidebar .rz-panel-menu-item-link.active,
.rz-sidebar .rz-state-focused .rz-navigation-item-link,
.rz-sidebar .rz-state-focused .rz-panel-menu-item-link {
    background: #e1effe !important;
    color: #1e293b !important;
    font-weight: 600;
}

.rz-sidebar .rz-navigation-item-icon,
.rz-sidebar .rz-panel-menu-item-icon {
    color: #64748b !important;
}

.rz-sidebar .rz-navigation-item-link.active .rz-navigation-item-icon,
.rz-sidebar .rz-panel-menu-item-link.active .rz-panel-menu-item-icon {
    color: #1a56db !important;
}

/* Body background */
.rz-body {
    background: #f1f5f9 !important;
}

/* Cards */
.rz-card {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

/* DataGrid */
.rz-datatable thead th {
    background: #f8fafc !important;
    font-weight: 600 !important;
    color: #475569 !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.rz-datatable tbody tr:hover {
    background: #f1f5f9 !important;
}

/* Buttons */
.rz-button.rz-variant-filled {
    border-radius: 8px;
    font-weight: 500;
}

/* Dialog */
.rz-dialog {
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15) !important;
}

.rz-dialog-titlebar {
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 1.25rem 1.5rem !important;
}

.rz-dialog-content {
    padding: 1.5rem !important;
}

/* Dashboard stat cards */
.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: default;
}

.stat-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.stat-icon.blue   { background: #dbeafe; color: #1d4ed8; }
.stat-icon.green  { background: #dcfce7; color: #16a34a; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.amber  { background: #fef3c7; color: #d97706; }

.stat-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin: 0;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1;
}

/* Page headers */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-header h3 {
    margin: 0;
    font-weight: 700;
    color: #1e293b;
}

/* Blazor error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

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

/* Badge styles */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.active   { background: #dcfce7; color: #166534; }
.status-badge.blocked  { background: #fee2e2; color: #991b1b; }
.status-badge.info     { background: #dbeafe; color: #1e40af; }
.status-badge.warning  { background: #fef3c7; color: #92400e; }
.status-badge.error    { background: #fee2e2; color: #991b1b; }

/* Role chips */
.role-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 0 0.2rem;
    background: #e0e7ff;
    color: #3730a3;
}

/* ── Sidebar brand ──────────────────────────────── */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 1rem 1.1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    background: rgba(96, 165, 250, 0.18);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.sidebar-brand-title {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e293b;
    line-height: 1.2;
}

.sidebar-brand-subtitle {
    display: block;
    font-size: 0.62rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    line-height: 1.2;
}

/* ── Nav section labels ─────────────────────────── */
.nav-section-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    padding: 0.85rem 1rem 0.25rem 1rem;
    user-select: none;
}

/* ── User avatar ────────────────────────────────── */
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a56db, #3b82f6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(26, 86, 219, 0.35);
}

/* ── Quick actions card ─────────────────────────── */
.quick-actions-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.quick-actions-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin: 0 0 1rem 0;
}

/* ── Extra status badge variants ────────────────── */
.status-badge.pending {
    background: #e0f2fe;
    color: #0369a1;
}

.status-badge.cancelled {
    background: #f3f4f6;
    color: #6b7280;
}

/* ── Sidebar layout fix ─────────────────────────── */
.rz-sidebar .rz-panel-menu {
    flex: 1;
    overflow-y: auto;
}

/* ── Landing page ───────────────────────────────── */
.landing-layout {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.landing-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}

.landing-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #1a56db, #3b82f6);
    border-radius: 18px;
    margin: 0 auto 1.5rem;
    color: #ffffff;
    font-size: 2.5rem;
    box-shadow: 0 8px 28px rgba(26, 86, 219, 0.45);
}

.landing-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* ── Header brand (small, visible when sidebar collapsed) ── */
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.95rem;
}

.header-brand .rz-icon {
    font-size: 1.35rem;
    color: #1a56db;
}
