/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    min-height: 100vh;
    background-color: #1e293b;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #f8fafc;
    border-bottom: 1px solid #334155;
}

.nav-menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    flex: 1;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background-color: #334155;
    color: #f8fafc;
}

.nav-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #334155;
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-footer a {
    color: #94a3b8;
    text-decoration: none;
}

.nav-footer a:hover {
    color: #f8fafc;
}

.main-content {
    flex: 1;
    padding: 2rem;
    background-color: #f8fafc;
    overflow-y: auto;
}

/* Error UI */
#blazor-error-ui {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 0.5rem;
    color: #991b1b;
    display: none;
    padding: 0.75rem 1rem;
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
}

#blazor-error-ui .reload {
    color: #dc2626;
    font-weight: 600;
    margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 1rem;
    color: #6b7280;
}

/* Page header */
.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

/* Tables */
.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

/* Modal overlay */
.modal-backdrop-custom {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
}

.modal-dialog-custom {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    width: 100%;
    max-width: 480px;
}
