@import '_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';

.fluent-menu-provider {
    pointer-events: none !important;
}

.fluent-menu-provider > * {
    pointer-events: auto;
}

fluent-dialog.wide-dialog::part(control) {
    --dialog-width: 750px;
    --dialog-height: auto;
}

fluent-dialog.permit-type-dialog::part(control) {
    --dialog-width: 560px;
    --dialog-height: auto;
}

:root {
    --brand: #DE1623;
    --brand-soft: rgba(222, 22, 35, 0.12);
    --brand-surface: #fdecec;

    --primary-pale-bg: var(--brand-surface);
    --primary-pale-border: rgba(222, 22, 35, 0.35);
    --sidebar-bg: rgb(251, 251, 251);


    --status-success: #107c10;
    --status-success-bg: #dff6dd;
    --status-success-border: #a7e3a5;
    --status-warning: #8a5a00;
    --status-warning-bg: #fff4ce;
    --status-warning-border: #ffe7a0;
    --status-error: #d13438;
    --status-error-bg: #fde7e9;
    --status-error-border: #f1bbbc;
    --status-info: #0078d4;
    --status-info-bg: #f0f6ff;
    --status-info-border: #b4d6fa;

    
    --text-strong: #1a1a1a;
    --text-secondary: #3a4148; 
    --text-muted: #666666;
    --text-faint: #888888;
    --border-strong: #d0d0d0;
    --border: #e0e0e0;
    --border-subtle: #f0f0f0;
    --surface-alt: #f6f8fa;
    --surface: #ffffff;
    --surface-page: #ffffff;
    --shadow-card: 0 3px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
    --brand-soft: rgba(222, 22, 35, 0.22);
    --brand-surface: #3a1416;
    --primary-pale-bg: var(--brand-surface);
    --primary-pale-border: rgba(222, 22, 35, 0.45);
    --sidebar-bg: #202024;

    --status-success: #4ec94e;
    --status-success-bg: #12331a;
    --status-success-border: #2c5c30;
    --status-warning: #e0b24d;
    --status-warning-bg: #332a12;
    --status-warning-border: #5c4a1f;
    --status-error: #f2686b;
    --status-error-bg: #3a1d1f;
    --status-error-border: #5c2a2c;
    --status-info: #4aa3e0;
    --status-info-bg: #12283a;
    --status-info-border: #2a4a5c;

    --text-strong: #f3f3f3;
    --text-secondary: #d0d3d7;
    --text-muted: #a8adb3;
    --text-faint: #8b9096;
    --border-strong: #45454d;
    --border: #37373e;
    --border-subtle: #303036;
    --surface-alt: #2f2f36;
    --surface: #26262b;
    --surface-page: #1b1b1f;
    --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.4);
}

html, body {
    background: var(--surface-page);
}

fluent-layout {
    background: var(--surface-page);
}

body {
    --body-font: "Segoe UI Variable", "Segoe UI", sans-serif;
    font-family: var(--body-font);
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    margin: 0;
}

.otp-input::part(control) {
    letter-spacing: 0.4em;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.badge-green {
    --badge-fill-highlight: #dff6dd;
    --badge-color-highlight: #107c10;
    --badge-fill-lowlight: #107c10;
    --badge-color-lowlight: #ffffff;
}

.badge-yellow {
    --badge-fill-highlight: #fff4ce;
    --badge-color-highlight: #8a5a00;
    --badge-fill-lowlight: #8a5a00;
    --badge-color-lowlight: #ffffff;
}

.badge-red {
    --badge-fill-highlight: #fde7e9;
    --badge-color-highlight: #d13438;
    --badge-fill-lowlight: #d13438;
    --badge-color-lowlight: #ffffff;
}

.badge-black {
    --badge-fill-highlight: var(--text-muted);
    --badge-color-highlight: #ffffff;
    --badge-fill-lowlight: #000000;
    --badge-color-lowlight: #ffffff;
}

.badge-blue {
    --badge-fill-highlight: #e3f2ff;
    --badge-color-highlight: #0078d4;
    --badge-fill-lowlight: #0078d4;
    --badge-color-lowlight: #ffffff;
}

[data-theme="dark"] .badge-green {
    --badge-fill-highlight: var(--status-success-bg);
    --badge-color-highlight: var(--status-success);
}

[data-theme="dark"] .badge-yellow {
    --badge-fill-highlight: var(--status-warning-bg);
    --badge-color-highlight: var(--status-warning);
}

[data-theme="dark"] .badge-red {
    --badge-fill-highlight: var(--status-error-bg);
    --badge-color-highlight: var(--status-error);
}

[data-theme="dark"] .badge-blue {
    --badge-fill-highlight: var(--status-info-bg);
    --badge-color-highlight: var(--status-info);
}

[data-theme="dark"] .badge-black {
    --badge-fill-highlight: var(--surface-alt);
    --badge-color-highlight: var(--text-secondary);
}

.main-layout {
    min-height: 100vh;
    align-items: stretch !important;
}

.main-content-wrapper {
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 240px;
    min-width: 240px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    z-index: 5;
    transition: width 0.2s ease, min-width 0.2s ease;
}

/* Collapse toggle */
.sidebar-toggle {
    position: absolute;
    top: 30px;
    right: -13px;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-card);
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 8;
}
.sidebar-toggle:hover { color: var(--brand); border-color: var(--brand); }
.sidebar-toggle svg { width: 14px; height: 14px; transition: transform 0.2s ease; }

/* Hamburger (mobile only) + scrim */
.sidebar-hamburger {
    display: none;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text-strong);
    place-items: center;
    cursor: pointer;
}
.sidebar-hamburger svg { width: 20px; height: 20px; }

.sidebar-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 40;
}
.sidebar-scrim--open { opacity: 1; pointer-events: auto; }

/* Collapsed (desktop) - icons only */
.main-layout--collapsed .sidebar { width: 52px; min-width: 52px; }
.main-layout--collapsed .sidebar-logo { padding: 1.5rem 0; }
.main-layout--collapsed .sidebar-logo-full { display: none; }
.main-layout--collapsed .sidebar-logo-mark { display: block; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.main-layout--collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.main-layout--collapsed .sidebar-user-details,
.main-layout--collapsed .sidebar-user-actions { display: none; }
.main-layout--collapsed .sidebar-user-info { justify-content: center; }

.main-layout--collapsed .sidebar-nav { display: flex; justify-content: center; padding: 0; }
.main-layout--collapsed .sidebar-nav .fluent-nav-text { display: none; }
.main-layout--collapsed .sidebar-nav .content-region { justify-content: center; padding: 0; margin-inline-start: 0; }
.main-layout--collapsed .sidebar-nav .active .content-region { margin-inline-start: calc(var(--design-unit) * 2px); }
.main-layout--collapsed .sidebar-nav .expand-collapse-button { display: none; }

.sidebar-logo {
    padding: 2.5rem 1.5rem;
    display: flex;
    align-items: center;
    height: 64px;
    box-sizing: border-box;
    justify-content: center;
}

.sidebar-logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.sidebar-logo-mark {
    display: none;
}

.sidebar-user-profile {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-fill-rest);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
    cursor: pointer;
}

.sidebar-user-details {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-actions {
    display: flex;
    gap: 0.5rem;
}

.sidebar-user-actions button {
    flex: 1;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    transition: all 0.2s ease;
}

.sidebar-user-actions button:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--border-strong);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 0.5rem 0.5rem 0.5rem;
}

/* Navigation Menu Styling */
.sidebar fluent-nav-menu {
    background: transparent;
    --nav-menu-background: transparent;
    width: 100%;
}

.sidebar fluent-nav-link {
    --nav-link-padding: 0.4rem 0.75rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.125rem;
}

.sidebar fluent-nav-link:hover {
    background: rgba(0, 0, 0, 0.03);
}

.sidebar fluent-nav-link[aria-current="page"],
.sidebar fluent-nav-link.active {
    background: rgba(0, 0, 0, 0.03);
    color: var(--accent-fill-rest);
    --neutral-foreground-rest: var(--accent-fill-rest);
}

/* Top level nav links */
.sidebar-top-nav {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Nav groups */
.sidebar fluent-nav-group {
    --nav-group-header-padding: 0.4rem 0.75rem;
    margin-bottom: 0.25rem;
    font-size: 0.7rem;
}

.sidebar fluent-nav-group::part(content) {
    padding-left: 0;
}

.sidebar fluent-nav-link::part(icon) {
    color: var(--text-secondary);
    font-size: 14px;
}

.sidebar fluent-nav-link[aria-current="page"]::part(icon),
.sidebar fluent-nav-link.active::part(icon) {
    color: currentColor;
}

.sidebar fluent-nav-group::part(icon) {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Top Bar */
.top-bar {
    background: var(--surface-page) !important;
    border-bottom: none !important;
    flex-shrink: 0;
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 0 !important;
    position: relative;
    z-index: 4 !important;
}

.top-bar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 48px;
    padding: 0;
}

.top-bar-left {
    flex: 1;
}

/* Top Bar Secondary Navigation Links */
.top-bar-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.top-bar-link {
    font-size: 0.6875rem;
    color: var(--text-faint);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
    font-weight: 400;
}

.top-bar-link:hover {
    color: var(--text-faint);
    text-decoration: none;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Static-page links overflow  */
.top-bar-overflow { position: relative; display: none; }
.top-bar-overflow-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
}
.top-bar-overflow-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 170px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-card);
    padding: 0.4rem;
    z-index: 60;
}
.top-bar-overflow-link {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
}
.top-bar-overflow-link:hover { background: var(--surface-alt); }

/* Body Content */
.body-content {
    flex: 1;
    display: flex;
    background: var(--surface-page);
    overflow-y: auto;
    min-height: 0;
}

.content {
    padding: 1.5rem;
    padding-top: 0;
    width: 100%;
    background: var(--surface-page);
}

.navmenu-icon {
    display: none;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 50;
        height: 100dvh;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.22s ease, width 0.2s ease;
        box-shadow: 0 0 24px rgba(0, 0, 0, 0.25);
    }

    .main-layout--drawer .sidebar { transform: translateX(0); }

    .sidebar-toggle { display: none; }
    .sidebar-hamburger { display: grid; }

    .top-bar-nav { display: none; }
    .top-bar-overflow { display: block; }

    .content {
        padding: 1rem;
    }
}

@media (max-width: 560px) {
    .page-header-actions {
        width: 100%;
    }
    .page-header-actions fluent-button {
        flex: 1 1 100%;
    }
}

/* Error Handling */
#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;
    margin: 20px 0;
}

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

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::before {
    content: "An error has occurred. "
}

/* Loading Spinner */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--border);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* Utility Classes */
code {
    color: #c02d76;
}

.alert {
    border: 1px dashed var(--accent-fill-rest);
    padding: 5px;
}

/* Dialog Styles */
.permit-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.permit-dialog-card {
    max-width: 480px;
    width: 100%;
}


/* FlatCard hoverable effect */
fluent-card.flat-card-hoverable:hover {
    border-color: var(--accent-fill-rest) !important;
    transform: translateY(-2px);
}

/* Page Header Component */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0 1rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
    width: 100%;
}

.page-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header-back {
    margin-right: 0.25rem;
}

.page-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--sidebar-bg);
    flex-shrink: 0;
}

.page-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.page-header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-strong);
    line-height: 1.3;
}

.page-header-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Icon Box Component */
.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-pale-bg, rgb(227, 242, 255));
    border: 1px solid var(--primary-pale-border, rgb(134, 191, 240));
    border-radius: 6px;
    flex-shrink: 0;
}

.icon-box-sm {
    width: 28px;
    height: 28px;
}

.icon-box-md {
    width: 36px;
    height: 36px;
}

.icon-box-lg {
    width: 44px;
    height: 44px;
}

/* ── Static Content Pages ── */
.static-content {
    font-family: var(--body-font);
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--neutral-foreground-rest);
    /*max-width: 800px;*/
}

.static-content h1,
.static-content h2,
.static-content h3,
.static-content h4 {
    color: var(--neutral-foreground-rest);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.static-content h1 { font-size: 1.5rem; }
.static-content h2 { font-size: 1.25rem; }
.static-content h3 { font-size: 1.1rem; }

.static-content p {
    margin: 0.75em 0;
}

.static-content a {
    color: var(--accent-fill-rest);
    text-decoration: none;
}

.static-content a:hover {
    text-decoration: underline;
}

.static-content ul,
.static-content ol {
    margin: 0.75em 0;
    padding-left: 1.5em;
}

.static-content li {
    margin: 0.25em 0;
}

.static-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.static-content th,
.static-content td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--neutral-stroke-rest);
    text-align: left;
}

.static-content th {
    background: var(--neutral-layer-2);
    font-weight: 600;
    font-size: 0.8125rem;
}

.static-content blockquote {
    margin: 1em 0;
    padding: 0.75em 1em;
    border-left: 3px solid var(--accent-fill-rest);
    background: var(--neutral-layer-2);
    font-style: italic;
}

.static-content details {
    margin: 0.75em 0;
    padding: 0.75em 1em;
    background: var(--neutral-layer-2);
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 4px;
}

.static-content summary {
    cursor: pointer;
    font-weight: 600;
    padding: 0.25em 0;
}

.static-content details[open] summary {
    margin-bottom: 0.5em;
}

.static-content hr {
    border: none;
    border-top: 1px solid var(--neutral-stroke-rest);
    margin: 1.5em 0;
}

.static-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ── Dashboard cards (flat: border, no shadow, square corners) ── */
/*  Reusable raised card surface (widgets, auth, any panel).  */
.surface-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-card);
}

.dashboard-section {
    padding: 1.15rem 1.25rem;
}

/* ─Dashboard two-column layout (wide left, narrow right) ─ */
.dash-2col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.dash-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

@media (max-width: 980px) {
    .dash-2col { grid-template-columns: 1fr; }
}

.dashboard-link {
    font-size: 0.8125rem;
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}
.dashboard-link:hover { text-decoration: underline; }

.dash-actions { display: flex; gap: 0.5rem; align-items: center; }

.btn-compact::part(control) {
    height: 28px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
}

.grid-action-btn {
    height: 20px;
    min-height: 20px;
    display: inline-flex;
    align-items: center;
}

.grid-action-btn::part(control) {
    height: 20px;
    min-height: 20px;
    min-width: 24px;
    padding: 0 4px;
}

.input-lg::part(root) {
    height: 42px;
    border-radius: 8px;
}

.btn-lg {
    height: 44px;
}

.btn-lg::part(control) {
    height: 100%;
    border-radius: 8px;
}

.lim-select {
    width: 100%;
    min-width: 0;
}

.lim-select::part(control) {
    width: 100%;
    min-width: 0;
}

.lim-select::part(listbox) {
    max-height: 260px;
    overflow-y: auto;
}

/* Data grid card */
.grid-card {
    overflow: hidden;
}

/* Horizontal scroll for grids on narrow screens */
.grid-scroll {
    overflow-x: auto;
}

.grid-scroll .fluent-data-grid {
    min-width: 720px;
}

/* Compact grid headers */
.compact-grid .column-header,
.compact-grid .col-title,
.compact-grid .col-title-text {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
}

.compact-grid thead th,
.compact-grid tr[row-type='sticky-header'] > th {
    min-height: 0 !important;
    height: auto !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

.compact-grid .col-title {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

/* Reusable data grid cell utilities */
.cell-mono { font-family: monospace; font-size: 0.8rem; }
.cell-num-muted { color: var(--text-faint); font-variant-numeric: tabular-nums; }
.cell-strong { font-weight: 600; }
.amount { font-weight: 500; }
.amount .arrow { font-size: 0.72em; margin-right: 2px; }
.amount--in .arrow { color: var(--status-success); }
.amount--out .arrow { color: var(--status-error); }

/* Narrow first column (row number) */
.grid-narrow-first th:first-child,
.grid-narrow-first td:first-child {
    min-width: 34px !important;
    width: auto !important;
    white-space: nowrap;
}

/* Excel-style vertical column separators for data grids */
.grid-lines td + td,
.grid-lines thead th + th,
.grid-lines tr[row-type='sticky-header'] > th + th {
    border-left: 1px solid var(--border);
}

.menu-danger,
.menu-danger::part(content) {
    color: var(--status-error);
}

/*  Login page */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2.25rem 2.25rem 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-card);
}

.auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-brand img {
    height: 42px;
    width: auto;
}

.auth-title {
    margin: 0 0 0.4rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-strong);
}

.auth-subtitle {
    margin: 0 0 2rem 0;
    font-size: 0.875rem;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.45;
}

.auth-field {
    width: 100%;
    margin-bottom: 1.15rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.auth-input {
    width: 100%;
}

.auth-input::part(root) {
    width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.auth-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--brand);
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Login page */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2.25rem 2.25rem 2rem;
}

.auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-brand img {
    height: 42px;
    width: auto;
}

.auth-title {
    margin: 0 0 0.4rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-strong);
}

.auth-subtitle {
    margin: 0 0 2rem 0;
    font-size: 0.875rem;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.45;
}

.auth-field {
    width: 100%;
    margin-bottom: 1.15rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.auth-input {
    width: 100%;
}

.auth-input::part(root) {
    width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.auth-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--brand);
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

/*  KPI strip shared across list views */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi-row--3 { grid-template-columns: repeat(3, 1fr); }
.kpi-row--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }

.summary-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
@media (max-width: 820px) { .summary-breakdown { grid-template-columns: 1fr; } }

/*  Available permits catalog grid  */
.permit-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; width: 100%; }

/* StatTile - global */
.stat-tile { padding: 12px 14px; min-width: 0; }
.stat-tile-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }
.stat-tile-value { font-size: 22px; font-weight: 600; margin-top: 4px; line-height: 1.1; color: var(--text-strong); }
.stat-tile-value small { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.stat-tile-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-tile--accent .stat-tile-value { color: var(--brand); }

/*  Shared compact list rows (vehicles / guest parking / permits)  */
.plate-chip {
    display: inline-block;
    font-family: "Consolas", "Menlo", "DejaVu Sans Mono", ui-monospace, monospace;
    font-variant-numeric: slashed-zero;
    font-feature-settings: "zero" 1;
    font-weight: 700; letter-spacing: 1.5px; font-size: 13px;
    padding: 4px 9px; background: var(--surface);
    border: 1.5px solid var(--neutral-stroke-rest, var(--border-strong)); border-radius: 4px;
    color: var(--text-strong); white-space: nowrap;
}
.plate-chip.struck { text-decoration: line-through; opacity: .45; }
.repl-arrow { color: var(--text-faint); font-size: 12px; }

/*  Shared form field styling */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.form-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.form-hint {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

.entry-list { display: flex; flex-direction: column; }

.plate-name { font-family: "Consolas", "Menlo", "DejaVu Sans Mono", ui-monospace, monospace; font-weight: 700; letter-spacing: 1px; }
.plate-name.struck { text-decoration: line-through; opacity: 0.5; }
.entity-list-notice { margin-bottom: 0.5rem; }
.entity-list-more { display: inline-block; margin-top: 0.6rem; }


.cookie-consent {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1000;
    max-width: 620px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1rem;
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-card);
    font-size: 0.78rem;
    line-height: 1.45;
}

.cookie-consent__text { flex: 1; }

.cookie-consent__btn {
    flex-shrink: 0;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.cookie-consent__btn:hover { opacity: 0.9; }

@media (max-width: 560px) {
    .cookie-consent { flex-direction: column; align-items: stretch; text-align: center; }
}
.mgr-pay {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.75rem;
    width: 100%;
}

.mgr-pay-email {
    flex: 1 1 220px;
    max-width: 340px;
}

.mgr-pay-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    margin-left: auto;
}
.cp-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--neutral-foreground-rest);
    cursor: pointer;
    line-height: 1.35;
}

.auth-input.input-invalid::part(root) {
    outline: 2px solid var(--status-error);
    outline-offset: -1px;
    border-radius: 4px;
}

.cp-terms-label a {
    color: var(--brand);
    font-weight: 500;
    text-decoration: underline;
}

.cp-terms-linkbtn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 500;
    color: var(--brand);
    text-decoration: underline;
    cursor: pointer;
}

fluent-dialog.terms-dialog::part(control) {
    --dialog-width: min(1000px, 94vw);
    --dialog-height: auto;
}

.terms-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.pwd-req-cap--err {
    color: var(--status-error) !important;
}
/* Guest parking dialog rules */
.gp-active-until {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    background: var(--neutral-layer-2);
    border-radius: 6px;
    font-size: 0.9rem;
}

.gp-active-until strong {
    font-variant-numeric: tabular-nums;
}

.gp-rules {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.6rem 0.75rem;
    background: var(--neutral-layer-2);
    border-radius: 6px;
}

.gp-rules-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.6;
    margin-bottom: 0.15rem;
}

.gp-rules-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
}

.gp-rules-k {
    color: var(--text-muted);
}

.gp-rules-v {
    font-weight: 600;
    text-align: right;
}