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

.sidebar {
    width: 240px;
    min-height: 100vh;
    background-color: #ffffff;
    color: #243040;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid #e8edf3;
}

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

.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: #64748b;
    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: #f0f4ff;
    color: #0b2f6b;
}

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

.nav-footer a {
    color: #64748b;
    text-decoration: none;
}

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

.main-content {
    flex: 1;
    padding: 2rem;
    background-color: #fafbfc;
    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;
}

/* ============================================================================
   BULK ENTRY GRID — CompanyBulkGrid, PersonBulkGrid, FlatBulkGrid, ParkingSpaceBulkGrid
   Plain <input> cells (not MudTextField) so paste + Enter/Tab keyboard navigation can rely on
   native DOM focus behaviour, styled to sit visually with the rest of the MudBlazor surface.
   Ported from Resiqo.Web/wwwroot/css/components.css — hardcoded colors match this app's own
   palette (see .sidebar/.page-header above) since this project doesn't use CSS custom properties.
   ============================================================================ */

.bulk-grid-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 55vh;
    border: 1px solid #e8edf3;
    border-radius: 0.5rem;
}

.bulk-grid-table {
    border-collapse: collapse;
    width: 100%;
    min-width: max-content;
}

.bulk-grid-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.bulk-grid-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e8edf3;
    white-space: nowrap;
}

.bulk-grid-table td {
    padding: 2px 4px;
    border-bottom: 1px solid #e8edf3;
}

.bulk-grid-table input {
    width: 100%;
    min-width: 90px;
    box-sizing: border-box;
    font-size: 0.875rem;
    color: #243040;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    background: transparent;
}

.bulk-grid-table input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
}

.bulk-grid-table input.bulk-grid-cell-error {
    border-color: #dc2626;
    background: #fef2f2;
}

.bulk-grid-table tr:hover td {
    background: #f8fafc;
}
