/* admin.css - Dutch Theme (Oranje & Blauw) */
:root {
    /* Color Palette */
    --dutch-orange: #FF7B00;
    --dutch-orange-hover: #E06C00;
    --dutch-blue-dark: #0A192F;
    --dutch-blue-med: #112240;
    --dutch-blue-light: #233554;

    --text-primary: #CCD6F6;
    --text-secondary: #8892B0;
    --text-dark: #cbd5e1;

    --bg-main: #060e1d;
    --bg-glass: rgba(17, 34, 64, 0.75);

    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;

    --border-color: rgba(204, 214, 246, 0.1);

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    font-weight: 600;
}

button {
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

input,
select,
textarea {
    font-family: 'Inter', sans-serif;
}

/* Custom Checkbox Styling */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background-color: rgba(10, 25, 47, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    transition: var(--transition);
}

input[type="checkbox"]:checked {
    background-color: var(--dutch-orange);
    border-color: var(--dutch-orange);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:hover {
    border-color: var(--dutch-orange);
}

/* Hide number input spinners globally */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* =========================================
   LOGIN PAGE
========================================= */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at top right, var(--dutch-blue-med), var(--bg-main));
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.user-auth-body .login-container {
    max-width: 500px;
}

.login-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.user-auth-body .login-glass {
    padding: 42px 44px;
}

.login-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--dutch-orange);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #fff;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(6, 20, 44, 0.62);
    border: 1px solid rgba(99, 133, 180, 0.28);
}

.auth-mode-btn {
    height: 38px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.auth-mode-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 123, 0, 0.32);
}

.auth-mode-btn.active {
    background: linear-gradient(180deg, var(--dutch-orange) 0%, var(--dutch-orange-hover) 100%);
    color: #fff;
    border-color: rgba(255, 123, 0, 0.68);
    box-shadow: 0 8px 18px rgba(255, 123, 0, 0.26);
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 38px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
}

.password-toggle-btn:hover {
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-primary);
}

.form-group label.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    cursor: pointer;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(10, 25, 47, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--dutch-orange);
    box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.2);
}

.form-group select {
    width: 100%;
    height: 44px;
    font-size: 15px;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: var(--dutch-orange);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: var(--dutch-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--dutch-orange);
}

.btn-secondary {
    padding: 12px 24px;
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-danger-outline {
    padding: 12px 24px;
    background-color: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}

.btn-danger-outline:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.error-message {
    color: var(--danger);
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    min-height: 20px;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

/* =========================================
   DASHBOARD LAYOUT
========================================= */
.dashboard-body {
    min-height: 100vh;
    display: flex;
    background: var(--bg-main);
}

.dashboard-layout {
    display: flex;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--dutch-blue-dark);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 20px;
    color: #fff;
    letter-spacing: 0.5px;
}

.sidebar-header h2::after {
    content: '.';
    color: var(--dutch-orange);
}

.sidebar-nav {
    flex: 1;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    border-right: 3px solid transparent;
}

.nav-item i {
    font-size: 20px;
    margin-right: 12px;
}

.nav-item:hover,
.nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    border-right-color: var(--dutch-orange);
    color: var(--dutch-orange);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-logout:hover {
    color: #fff;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: 70px;
    background: var(--dutch-blue-dark);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-title h1 {
    font-size: 22px;
    color: #fff;
}

.admin-badge {
    background: var(--dutch-blue-light);
    color: var(--dutch-orange);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 123, 0, 0.2);
}

.views-container {
    padding: 32px;
    flex: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    color: #fff;
}

.section-header .btn-primary {
    width: auto;
    padding: 8px 16px;
}

/* Overview Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.clickable-card {
    cursor: pointer;
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(255, 123, 0, 0.1);
    color: var(--dutch-orange);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
}

.metric-info h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.metric-info p {
    font-size: 28px;
    color: #fff;
    font-weight: 700;
}

.metric-card.alert .metric-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Tables */
.table-container {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: rgba(255, 255, 255, 0.02);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.data-table td {
    font-size: 14px;
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.data-table tbody tr:hover {
    background: rgba(255, 123, 0, 0.06);
    border-left-color: var(--dutch-orange);
    transform: translateX(2px);
}

/* Status badges */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge.maintenance {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}


/* Buttons in table */
.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    padding: 4px;
    margin-right: 8px;
    transition: var(--transition);
}

.btn-icon:hover {
    color: #fff;
    transform: scale(1.1);
}

.btn-icon.edit-btn:hover {
    color: var(--dutch-orange);
}

.btn-icon.delete-btn:hover {
    color: var(--danger);
}

/* Search Bar */
.search-bar {
    display: flex;
    gap: 12px;
}

.search-bar input {
    width: 300px;
    padding: 10px 16px;
    background: rgba(10, 25, 47, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99;
    display: none;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--dutch-blue-dark);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    z-index: 100;
    display: none;
    overflow: visible;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.modal.show {
    display: block;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    transition: var(--transition);
}

.close-modal:hover {
    color: #fff;
}

.modal-body {
    padding: 24px;
    overflow: visible;
}

.modal-body .form-group,
.modal-body .btn-primary,
.modal-body .btn-secondary,
.modal-body .btn-danger-outline {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.modal-body .form-group:last-of-type {
    margin-bottom: 24px;
}

.modal-body input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    flex: 0 0 auto;
    box-shadow: none;
}

.modal-body label.checkbox-inline span {
    color: var(--text-primary);
}

.user-details-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

/* Slot Grid Modal */
.slot-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
    padding: 14px;
    background:
        linear-gradient(180deg, rgba(10, 25, 47, 0.75) 0%, rgba(10, 25, 47, 0.55) 100%),
        radial-gradient(circle at top, rgba(255, 123, 0, 0.08), transparent 58%);
    border-radius: 16px;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* User Park/Unpark renders grouped rows, so use a vertical stack container there. */
#parkingSlotGrid.slot-grid-container {
    display: inline-flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 18px 20px;
    width: fit-content;
    max-width: 100%;
    max-height: none;
    overflow: visible;
}

#view-parking #startParkingSection {
    padding-bottom: 18px;
}

#view-parking #slotGridContainer {
    margin-bottom: 8px;
}

#view-parking #slotGridContainer .slot-grid-container {
    justify-self: start;
}

#view-parking .slot-row {
    grid-template-columns: 84px max-content;
    gap: 12px;
}

#view-parking .slot-row-seats {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 96px;
    gap: 10px;
    width: max-content;
    overflow: visible;
    padding: 3px 2px 8px;
}

#view-parking .slot-item {
    width: 96px;
    min-height: 74px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    will-change: auto;
    transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.slot-row {
    display: grid;
    grid-template-columns: 82px 1fr;
    align-items: center;
    gap: 10px;
}

.slot-row-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: right;
    padding-right: 8px;
}

.slot-row-seats {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 2px 6px;
}

.slot-row-seats::-webkit-scrollbar {
    height: 6px;
}

.slot-row-seats::-webkit-scrollbar-thumb {
    background: rgba(204, 214, 246, 0.2);
    border-radius: 6px;
}

.slot-item {
    display: grid;
    place-items: center;
    place-content: center;
    gap: 4px;
    padding: 12px 10px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
    border: 2px solid transparent;
    user-select: none;
    position: relative;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
    text-align: center;
    min-height: 80px;
    overflow: hidden;
    will-change: transform;
    backdrop-filter: blur(6px);
}

.slot-item strong {
    font-size: 15px;
    line-height: 1;
    margin: 0;
}

.slot-item::after {
    display: block;
    max-width: 100%;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    opacity: 0.72;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-item.VACANT {
    background: linear-gradient(180deg, rgba(46, 204, 113, 0.24), rgba(46, 204, 113, 0.12));
    border-color: rgba(46, 204, 113, 0.45);
    color: var(--success);
}

.slot-item.VACANT:hover {
    background: linear-gradient(180deg, rgba(46, 204, 113, 0.32), rgba(46, 204, 113, 0.18));
    transform: translateY(-2px);
}

.slot-item.VACANT::after {
    content: 'Vacant';
}

.slot-item.OCCUPIED {
    background: linear-gradient(180deg, rgba(52, 152, 219, 0.22), rgba(52, 152, 219, 0.12));
    border-color: rgba(52, 152, 219, 0.42);
    color: var(--primary);
    cursor: not-allowed;
}

.slot-item.slot-static {
    cursor: default;
}

.slot-item.OCCUPIED.slot-violation-clickable {
    cursor: pointer;
}

.slot-item.slot-violation-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.slot-item.slot-violation-clickable.slot-violation-expanded {
    border-color: rgba(248, 113, 113, 0.95);
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35), 0 0 18px rgba(239, 68, 68, 0.32);
}

.slot-item.OCCUPIED::after {
    content: 'Occupied';
}

.slot-item.MAINTENANCE {
    background: linear-gradient(180deg, rgba(241, 196, 15, 0.22), rgba(241, 196, 15, 0.12));
    border-color: rgba(241, 196, 15, 0.42);
    color: var(--warning);
}

.slot-item.MAINTENANCE:hover {
    background: linear-gradient(180deg, rgba(241, 196, 15, 0.3), rgba(241, 196, 15, 0.16));
    transform: translateY(-2px);
}

.slot-item.MAINTENANCE::after {
    content: 'Maintenance';
}

/* Keep explicit category labels from JS (e.g., VIOLATION) over class defaults. */
.slot-item[data-status-label]::after {
    content: attr(data-status-label);
}

.slot-item.selected {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 18px rgba(255, 123, 0, 0.24);
    transform: translateY(-1px);
}

.slot-violation-popover {
    position: fixed;
    z-index: 1300;
    width: 460px;
    max-width: calc(100vw - 20px);
    background: linear-gradient(180deg, rgba(9, 24, 46, 0.98) 0%, rgba(7, 18, 36, 0.98) 100%);
    border: 1px solid rgba(248, 113, 113, 0.32);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(248, 113, 113, 0.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 12px 14px 10px;
    opacity: 0;
    transform: translateY(6px) scale(0.98);
    transition: opacity 140ms ease, transform 140ms ease;
    pointer-events: none;
    overflow: hidden;
}

.slot-violation-popover.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.slot-violation-popover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(248, 113, 113, 0.8), rgba(255, 178, 107, 0.55));
}

.slot-violation-popover h4 {
    margin: 0 0 10px 0;
    font-size: 12px;
    font-weight: 700;
    color: #fde2e2;
    text-transform: uppercase;
    letter-spacing: 0.65px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 2px 8px;
    border-bottom: 1px solid rgba(248, 113, 113, 0.16);
}

.slot-violation-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    max-height: none;
    overflow: visible;
    padding-right: 2px;
}

.slot-violation-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 9px;
    padding: 7px 8px;
}

.slot-violation-row .k {
    color: #9fb0c8;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.55px;
    font-weight: 700;
}

.slot-violation-row .v {
    color: #e8eef9;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.slot-violation-hint {
    margin-top: 7px;
    color: #96a7c2;
    font-size: 10px;
    letter-spacing: 0.4px;
    text-align: right;
    opacity: 0.85;
}

@media (max-width: 760px) {
    .slot-violation-popover {
        width: calc(100vw - 16px);
        border-radius: 12px;
    }

    .slot-violation-list {
        grid-template-columns: 1fr;
        max-height: 300px;
        overflow-y: auto;
    }
}

.slot-legend {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
    /* Ensure it respects width/height in flex container */
    flex-shrink: 0;
}

.legend-color.vacant {
    background-color: var(--success);
}

.legend-color.occupied {
    background-color: rgba(52, 152, 219, 0.4);
    border: 1px solid rgba(52, 152, 219, 0.8);
}

.legend-color.maintenance {
    background-color: var(--warning);
}

/* Parking History List & Cards */
.parking-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 0;
}

.parking-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.parking-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.parking-card.is-active-card {
    cursor: pointer;
}

.parking-card.is-active-card:hover {
    border-color: var(--dutch-orange);
    background-color: rgba(255, 123, 0, 0.04);
}

.parking-card.police-search-card {
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
    border-color: rgba(148, 163, 184, 0.22);
}

.police-search-main {
    flex: 1;
    min-width: 0;
}

.police-search-main .parking-card-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    margin-bottom: 8px;
}

.parking-card.police-search-card .badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    width: auto;
    align-self: auto;
}

.police-search-main .parking-card-body {
    border-left: 0;
    padding: 0;
    gap: 16px;
    grid-template-columns: 1fr 1.2fr 1fr 1.2fr;
}

.police-search-main .parking-card-footer {
    justify-content: flex-start;
    min-width: 0;
    margin-top: 6px;
    padding-top: 0;
    border-top: 0;
    color: #cbd5e1;
}

.police-activity-panel {
    width: 100%;
    border-left: 0;
    border-top: 0;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.police-activity-title {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
}

.police-activity-list {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    padding-left: 0;
}

.police-activity-list::before {
    display: none;
}

.police-activity-item {
    position: relative;
}

.police-activity-dot {
    position: static;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-secondary);
    flex-shrink: 0;
}

.police-activity-dot.success {
    background: var(--success);
}

.police-activity-dot.danger {
    background: var(--danger);
}

.police-activity-chip {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 0;
    background: rgba(9, 22, 44, 0.55);
}

.police-activity-action {
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 600;
}

.police-activity-time {
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    margin-left: auto;
}

.parking-card-chevron {
    font-size: 22px;
    color: var(--text-secondary);
    flex-shrink: 0;
    opacity: 0;
    width: 24px;
}

.is-active-card .parking-card-chevron {
    opacity: 1;
    color: var(--dutch-orange);
}

.parking-card-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.parking-card-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.parking-card-title i {
    color: var(--primary);
    font-size: 18px;
}

.parking-card-body {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr 1.5fr;
    align-items: center;
    gap: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0 20px;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ui-icon {
    color: var(--text-secondary);
    font-size: 16px;
    margin-top: 2px;
}

.detail-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
}

.detail-value.text-sm {
    font-size: 13px;
    line-height: 1.4;
}

.parking-card-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 140px;
    flex-shrink: 0;
}

.stat-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-light);
}

/* Pagination Number Buttons */
.page-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    color: var(--text-secondary);
    padding: 0 4px;
}

/* =========================================
   CUSTOM DROPDOWN (replaces native select)
   ========================================= */
.custom-dropdown {
    position: relative;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.custom-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    padding: 0 36px 0 14px;
    background: linear-gradient(180deg, rgba(10, 30, 63, 0.95) 0%, rgba(6, 20, 45, 0.95) 100%);
    color: var(--text-primary);
    border: 1px solid rgba(99, 133, 180, 0.38);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(2, 8, 22, 0.25);
}

.custom-dropdown-trigger:hover {
    border-color: var(--dutch-orange);
    box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.15), 0 4px 12px rgba(2, 8, 22, 0.3);
}

.custom-dropdown-trigger .trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-dropdown-trigger .trigger-chevron {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.custom-dropdown.open .custom-dropdown-trigger {
    border-color: var(--dutch-orange);
    box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.2);
}

.custom-dropdown.open .trigger-chevron {
    transform: translateY(-50%) rotate(180deg);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(10, 30, 63, 0.98) 0%, rgba(6, 20, 45, 0.98) 100%);
    border: 1px solid rgba(99, 133, 180, 0.38);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 4px;
}

.custom-dropdown.open .custom-dropdown-menu {
    display: block;
    animation: dropdown-in 0.15s ease-out;
    z-index: 1400;
}

@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.custom-dropdown-option {
    padding: 10px 14px;
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 14px;
}

.custom-dropdown-option:hover {
    background: rgba(255, 123, 0, 0.1);
}

.custom-dropdown-option.selected {
    background: rgba(255, 123, 0, 0.18);
    color: #fff;
    font-weight: 500;
}

.custom-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(136, 146, 176, 0.3);
    border-radius: 3px;
}

/* Pagination compact variant */
.custom-dropdown.compact .custom-dropdown-trigger {
    height: 36px;
    font-size: 13px;
    padding: 0 32px 0 12px;
    border-radius: 8px;
}

.custom-dropdown.compact .trigger-chevron {
    right: 10px;
    font-size: 12px;
}

.custom-dropdown.compact .custom-dropdown-option {
    padding: 8px 12px;
    font-size: 13px;
}

/* =========================================
   SHARED SELECT / DROPDOWN STYLING
   ========================================= */
.rows-per-page-select,
.dashboard-body .form-group select,
.dashboard-body .modal-body select,
.dashboard-body .topbar select,
.login-body select,
.form-group select,
select {
    background: linear-gradient(180deg, rgba(10, 30, 63, 0.95) 0%, rgba(6, 20, 45, 0.95) 100%);
    color: var(--text-primary);
    border: 1px solid rgba(99, 133, 180, 0.38);
    border-radius: 10px;
    padding: 0 40px 0 14px;
    font-size: 14px;
    height: 40px;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238892B0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"), linear-gradient(180deg, rgba(10, 30, 63, 0.95) 0%, rgba(6, 20, 45, 0.95) 100%);
    background-repeat: no-repeat, no-repeat;
    background-position: right 12px center, center;
    background-size: 16px, cover;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(2, 8, 22, 0.25);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.rows-per-page-select:hover,
.dashboard-body .form-group select:hover,
.dashboard-body .modal-body select:hover,
.dashboard-body .topbar select:hover,
.login-body select:hover,
.form-group select:hover,
select:hover {
    border-color: var(--dutch-orange);
    box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.15), 0 4px 12px rgba(2, 8, 22, 0.3);
}

.rows-per-page-select:focus,
.dashboard-body .form-group select:focus,
.dashboard-body .modal-body select:focus,
.dashboard-body .topbar select:focus,
.login-body select:focus,
.form-group select:focus,
select:focus {
    border-color: var(--dutch-orange);
    box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.2);
    outline: none;
}

/* Option styling - themed dropdown menu */
.rows-per-page-select option,
.dashboard-body .form-group select option,
.dashboard-body .modal-body select option,
.dashboard-body .topbar select option,
.login-body select option,
.form-group select option,
select option {
    background-color: #0a192f;
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

/* Pagination controls dropdown */
.pagination-controls select,
.pagination-controls .rows-per-page-select {
    height: 36px;
    font-size: 13px;
    padding: 0 36px 0 12px;
    border-radius: 8px;
}

#view-sessions .pagination-controls {
    flex-wrap: nowrap;
}

#view-sessions .pagination-controls label {
    white-space: nowrap;
}

.rows-per-page-select option:hover,
.dashboard-body .form-group select option:hover,
.dashboard-body .modal-body select option:hover,
.dashboard-body .topbar select option:hover,
.login-body select option:hover,
.form-group select option:hover,
select option:hover {
    background-color: rgba(255, 123, 0, 0.15);
}

.rows-per-page-select option:checked,
.dashboard-body .form-group select option:checked,
.dashboard-body .modal-body select option:checked,
.dashboard-body .topbar select option:checked,
.login-body select option:checked,
.form-group select option:checked,
select option:checked {
    background-color: rgba(255, 123, 0, 0.2);
    color: #fff;
}

.rows-per-page-select option:focus,
.dashboard-body .form-group select option:focus,
.dashboard-body .modal-body select option:focus,
.dashboard-body .topbar select option:focus,
.login-body select option:focus,
.form-group select option:focus,
select option:focus {
    background-color: rgba(255, 123, 0, 0.25);
    outline: none;
}

/* Custom Search Input */
.search-input-dark {
    background-color: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    height: 35px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-input-dark:focus {
    border-color: var(--primary);
    outline: none;
    background-color: rgba(255, 255, 255, 0.08);
}

.search-input-dark::placeholder {
    color: var(--text-secondary);
}

/* =========================================
   HOME PAGE ROLE CARDS
   ========================================= */
.role-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 10px;
}

.role-card {
    background: rgba(10, 25, 47, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.role-card:hover {
    transform: translateY(-4px);
    border-color: var(--dutch-orange);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.role-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    margin: 0 auto 12px;
}

.role-card h3 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 6px;
}

.role-card p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

/* =========================================
   CHART CONTAINERS (Municipality)
   ========================================= */
.chart-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.chart-card canvas {
    max-height: 300px;
}

/* =========================================
   ACTIVITY TIMELINE
   ========================================= */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--dutch-orange);
    border: 2px solid var(--dutch-blue-dark);
}

.timeline-dot.success { background: var(--success); }
.timeline-dot.warning { background: var(--warning); }
.timeline-dot.danger { background: var(--danger); }

.timeline-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(10, 25, 47, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.timeline-action {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* =========================================
   STATUS CHECK RESULT CARD
   ========================================= */
.status-result-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.status-result-card.parked {
    border-left: 4px solid var(--success);
}

.status-result-card.not-parked {
    border-left: 4px solid var(--text-secondary);
}

/* =========================================
   ACTIVE SESSION CARD
   ========================================= */
.active-session-card {
    background: var(--bg-glass);
    border: 1px solid var(--success);
    border-left: 4px solid var(--success);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.active-session-card h3 {
    color: var(--success);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================
   RESPONSIVE OVERRIDES
   ========================================= */
@media (max-width: 768px) {
    .role-cards-grid {
        grid-template-columns: 1fr;
    }
    .chart-container {
        grid-template-columns: 1fr !important;
    }
    .parking-card-body {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .slot-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .slot-row-label {
        text-align: left;
        padding-right: 0;
    }

    .police-search-main .parking-card-header {
        margin-bottom: 8px;
    }

    .police-search-main .parking-card-body {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .police-activity-panel {
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 10px;
    }

    .police-activity-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .sidebar {
        display: none;
    }
    .main-content {
        margin-left: 0;
    }
}

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: toast-in 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}

.toast.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.toast.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.toast.removing {
    animation: toast-out 0.3s ease-in forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* Theme-native tooltip replacement for default browser title popups */
.themed-tooltip {
    position: absolute;
    z-index: 3000;
    max-width: 320px;
    background: linear-gradient(180deg, rgba(8, 26, 54, 0.98) 0%, rgba(6, 19, 40, 0.98) 100%);
    color: var(--text-primary);
    border: 1px solid rgba(255, 123, 0, 0.45);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.35;
    box-shadow: 0 10px 24px rgba(2, 8, 22, 0.45), 0 0 0 1px rgba(255, 123, 0, 0.08);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.themed-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   FILTER LABEL & BAR
   ========================================= */
.filter-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.filter-bar {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-group-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
}

/* =========================================
   LOADING CELL
   ========================================= */
.loading-cell {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.loading-cell i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

/* =========================================
   EMPTY STATE
   ========================================= */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    gap: 12px;
}

.empty-state i {
    font-size: 48px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
    margin: 0;
}

/* =========================================
   PARKING CARD FOOTER
   ========================================= */

/* =========================================
   SIDEBAR POWERED BY
   ========================================= */
.sidebar-powered-by {
    margin-top: auto;
    margin-bottom: -15px;
    font-size: 11px;
    text-align: center;
    color: var(--text-secondary);
    opacity: 0.7;
    letter-spacing: 0.5px;
    padding: 0 24px;
}

.inline-edit-field {
    height: 34px;
    width: 100%;
    padding: 0 11px;
    background: linear-gradient(180deg, rgba(10, 28, 58, 0.95) 0%, rgba(7, 20, 42, 0.95) 100%);
    color: #fff;
    border: 1px solid rgba(99, 133, 180, 0.36);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.inline-edit-field:focus {
    outline: none;
    border-color: var(--dutch-orange);
    box-shadow: 0 0 0 2px rgba(255, 123, 0, 0.18);
}

.inline-password-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.inline-password-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
}

.inline-password-toggle:hover {
    color: var(--text-primary);
}

.inline-edit-name { max-width: 140px; }
.inline-edit-email { max-width: 190px; }
.inline-edit-phone { max-width: 120px; }
.inline-edit-status { max-width: 132px; }
.inline-edit-password { max-width: 95px; }

.u-active .custom-dropdown,
.u-active .custom-dropdown-trigger {
    max-width: 132px;
}

.u-active .custom-dropdown-trigger {
    height: 34px;
    border-radius: 8px;
}

.u-active .custom-dropdown-menu {
    border-color: rgba(255, 123, 0, 0.5);
    border-radius: 11px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 123, 0, 0.14);
}

.u-active .custom-dropdown-option {
    min-height: 30px;
    padding: 7px 11px;
    border-radius: 7px;
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
.flex-row { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }

/* =========================================
   PHASE 1: ACCESSIBILITY & FOCUS INDICATORS
   ========================================= */
*:focus-visible {
    outline: 2px solid var(--dutch-orange);
    outline-offset: 2px;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-danger-outline:focus-visible,
.btn-logout:focus-visible,
.btn-icon:focus-visible,
.nav-item:focus-visible,
.page-btn:focus-visible {
    outline: 2px solid var(--dutch-orange);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 123, 0, 0.25);
}

/* Button disabled state */
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    transition: all 0.2s ease;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 123, 0, 0.1);
    border-color: var(--dutch-orange);
    color: var(--dutch-orange);
}

.btn-danger-outline {
    transition: all 0.2s ease;
}

.btn-danger-outline:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* =========================================
   TABLE RESPONSIVE WRAPPER
   ========================================= */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
}

.table-container::-webkit-scrollbar {
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(136, 146, 176, 0.3);
    border-radius: 3px;
}

.data-table {
    min-width: 600px;
    width: 100%;
}

.data-table th {
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: var(--dutch-blue-dark);
    z-index: 1;
}

/* Table row hover — fixed (no translateX) */
.data-table tbody tr:hover {
    background: rgba(255, 123, 0, 0.06);
    border-left-color: transparent;
    transform: none;
    box-shadow: inset 3px 0 0 var(--dutch-orange);
}

/* =========================================
   SIDEBAR HOVER EFFECTS
   ========================================= */
.nav-item {
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 8px;
}

.nav-item:hover:not(.active) {
    background: rgba(255, 123, 0, 0.08);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(255, 123, 0, 0.12);
    border-right: none;
}

/* =========================================
   VIEW TRANSITIONS
   ========================================= */
.view-section {
    animation: viewFadeIn 0.25s ease-out;
}

@keyframes viewFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   BADGE HOVER
   ========================================= */
.badge {
    transition: all 0.2s ease;
    cursor: default;
}

.badge:hover {
    filter: brightness(1.15);
}

/* =========================================
   MODAL ACCESSIBILITY
   ========================================= */
.modal {
    max-height: 90vh;
    overflow: visible;
}

.modal-body {
    max-height: none;
    overflow: visible;
    padding-right: 24px;
}

.modal-body::-webkit-scrollbar {
    width: 0;
}

.modal-body::-webkit-scrollbar-thumb {
    background: transparent;
}

/* =========================================
   SKELETON LOADING
   ========================================= */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 100%;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-card {
    height: 120px;
    margin-bottom: 16px;
    border-radius: 12px;
}

.skeleton-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.skeleton-row .skeleton {
    height: 16px;
    flex: 1;
}

@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* =========================================
   CONFIRM MODAL
   ========================================= */
.confirm-modal-content {
    text-align: center;
    padding: 8px 0;
}

.confirm-modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.confirm-modal-icon.warning {
    color: var(--warning);
}

.confirm-modal-icon.danger {
    color: var(--danger);
}

.confirm-modal-message {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.confirm-modal-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.confirm-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-modal-actions .btn-secondary {
    width: auto;
    padding: 10px 24px;
}

.confirm-modal-actions .btn-primary {
    width: auto;
    padding: 10px 24px;
}

/* =========================================
   EMPTY STATE IMPROVED
   ========================================= */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    gap: 12px;
}

.empty-state i {
    font-size: 56px;
    opacity: 0.25;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 14px;
    margin: 0;
    text-align: center;
    max-width: 300px;
}

.empty-state .btn-primary {
    margin-top: 8px;
    width: auto;
    padding: 10px 24px;
    font-size: 13px;
}

/* =========================================
   PAGINATION ACTIVE STATE
   ========================================= */
.page-btn.active {
    background: var(--dutch-orange);
    color: #fff;
    border-color: var(--dutch-orange);
    font-weight: 600;
}

.page-btn:hover:not(:disabled):not(.active) {
    background: rgba(255, 123, 0, 0.1);
    border-color: var(--dutch-orange);
    color: var(--dutch-orange);
}

.page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* =========================================
   FORM VALIDATION STYLES
   ========================================= */
.form-group input:invalid:not(:placeholder-shown),
.form-group input.error,
.form-group select.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
    display: block;
}

/* =========================================
   SKIP TO CONTENT (Accessibility)
   ========================================= */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--dutch-orange);
    color: #fff;
    padding: 12px 24px;
    z-index: 10000;
    font-weight: 600;
    border-radius: 0 0 8px 0;
    transition: top 0.2s ease;
    text-decoration: none;
}

.skip-to-content:focus {
    top: 0;
}

/* =========================================
   TOOLTIP
   ========================================= */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--dutch-blue-dark);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* =========================================
   RESPONSIVE — TABLET (768px)
   ========================================= */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
    }

    .role-cards-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================================
   RESPONSIVE — MOBILE (768px)
   ========================================= */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        width: 260px;
    }

    .sidebar.open {
        left: 0;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .topbar {
        padding: 12px 16px;
    }

    .views-container {
        padding: 16px;
    }

    .role-cards-grid {
        grid-template-columns: 1fr;
    }

    .parking-card-body {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .chart-container {
        grid-template-columns: 1fr !important;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-group {
        min-width: 100% !important;
    }

    .pagination-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .pagination-controls {
        flex-wrap: wrap;
    }

    .hamburger-btn {
        display: flex;
    }

    .confirm-modal-actions {
        flex-direction: column;
    }

    .confirm-modal-actions .btn-secondary,
    .confirm-modal-actions .btn-primary {
        width: 100%;
    }
}

/* =========================================
   HAMBURGER BUTTON
   ========================================= */
.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 12px;
}

.hamburger-btn:hover {
    border-color: var(--dutch-orange);
    color: var(--dutch-orange);
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }
}

/* =========================================
   REDUCED MOTION
   ========================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================
   SCREEN READER ONLY
   ========================================= */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================
   PREMIUM ANIMATIONS
   ========================================= */

/* Staggered card entrance */
.metrics-grid .metric-card,
.parking-list-container .parking-card {
    animation: cardEntrance 0.4s ease-out both;
}

.metrics-grid .metric-card:nth-child(1) { animation-delay: 0s; }
.metrics-grid .metric-card:nth-child(2) { animation-delay: 0.08s; }
.metrics-grid .metric-card:nth-child(3) { animation-delay: 0.16s; }
.metrics-grid .metric-card:nth-child(4) { animation-delay: 0.24s; }

.parking-list-container .parking-card:nth-child(1) { animation-delay: 0s; }
.parking-list-container .parking-card:nth-child(2) { animation-delay: 0.06s; }
.parking-list-container .parking-card:nth-child(3) { animation-delay: 0.12s; }
.parking-list-container .parking-card:nth-child(4) { animation-delay: 0.18s; }
.parking-list-container .parking-card:nth-child(5) { animation-delay: 0.24s; }

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login page ambient background (shared by landing + role logins) */
.login-body {
    background:
        radial-gradient(1300px 700px at 78% 18%, rgba(255, 123, 0, 0.12) 0%, rgba(255, 123, 0, 0.02) 40%, transparent 70%),
        radial-gradient(1000px 540px at 14% 84%, rgba(24, 144, 255, 0.09) 0%, transparent 72%),
        linear-gradient(125deg, #020a1a 0%, #03122c 44%, #07193a 100%);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.login-body::before,
.login-body::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.login-body::before {
    background:
        radial-gradient(420px 340px at 24% 20%, rgba(255, 123, 0, 0.18) 0%, transparent 70%),
        radial-gradient(460px 380px at 82% 76%, rgba(35, 120, 255, 0.14) 0%, transparent 72%);
    filter: blur(18px);
    animation: loginAmbientDrift 16s ease-in-out infinite alternate;
}

.login-body::after {
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 92px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 84px);
    opacity: 0.18;
    mask-image: radial-gradient(circle at center, black 12%, transparent 88%);
    -webkit-mask-image: radial-gradient(circle at center, black 12%, transparent 88%);
}

.login-body > * {
    position: relative;
    z-index: 1;
}

@keyframes loginAmbientDrift {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    100% {
        transform: translate3d(-3.5%, 2.5%, 0) scale(1.05);
    }
}

/* Role card hover scale */
.role-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.role-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--dutch-orange);
    box-shadow: 0 16px 40px rgba(255, 123, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.role-card:hover .role-card-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Metric card hover — subtle glow */
.metric-card {
    transition: all 0.25s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Table row stagger */
.data-table tbody tr {
    animation: rowFadeIn 0.3s ease-out both;
}

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

/* Button press effect */
.btn-primary:active:not(:disabled) {
    transform: scale(0.97);
}

.btn-secondary:active:not(:disabled) {
    transform: scale(0.97);
}

/* Parking card active pulse */
.parking-card.is-active-card {
    animation: activePulse 3s ease-in-out infinite;
}

@keyframes activePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
    50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1); }
}

/* Chart card entrance */
.chart-card {
    animation: cardEntrance 0.5s ease-out both;
    animation-delay: 0.2s;
}

/* Badge hover */
.badge.active:hover { background: rgba(16, 185, 129, 0.25); }
.badge.inactive:hover { background: rgba(136, 146, 176, 0.25); }
.badge.danger:hover { background: rgba(239, 68, 68, 0.25); }
.badge.warning:hover { background: rgba(245, 158, 11, 0.25); }

/* Custom dropdown menu entrance */
.custom-dropdown-menu {
    transform-origin: top;
}

/* Toast entrance improved */
.toast {
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}