@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* ======================================================
   Base document setup
   ====================================================== */

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ======================================================
   MudBlazor layout alignment
   ====================================================== */

/* Offset drawer below AppBar */
.drawer-offset {
    padding-top: 64px; /* AppBar height */
}

/* Let MudBlazor calculate layout height */
.mud-layout {
    min-height: 100vh;
}

/* Allow drawer content to scroll if long */
.mud-drawer-content {
    overflow-y: auto;
}

/* Drawer visual polish */
.mud-drawer {
    border-right: 1px solid rgba(0, 0, 0, 0.12);
}

/* Nav spacing */
.mud-nav-link {
    padding: 12px 16px;
    font-size: 0.95rem;
}

/* ======================================================
   Links & buttons
   ====================================================== */

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

/* ======================================================
   Validation styles
   ====================================================== */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* ======================================================
   Blazor error UI
   ====================================================== */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.ai-panel {
    background: linear-gradient(135deg, #ECEFF1, #FAFAFA);
    border-left: 4px solid #00ACC1;
}

.map-container {
    position: relative;
    width: 100%;
    height: 75vh; /* Desktop height */
    min-height: 550px; /* Prevent tiny map */
    max-height: 900px; /* Avoid monster screens */
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
}

    .map-container iframe {
        width: 100%;
        height: 100%;
        border: 0;
        border-radius: 14px;
    }


/* ======================================================
   Concierge Chat
   ====================================================== */

.chat-messages {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
}

.processing-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.95;
}


.concierge-chat-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1400;
}

.concierge-chat-window {
    position: fixed;
    right: 24px;
    bottom: 88px;
    width: 420px;
    height: 620px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 110px);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1500;
    border: 1px solid rgba(0,0,0,0.08);
}

.concierge-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.concierge-chat-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.concierge-chat-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2f2f2f;
    line-height: 1.2;
}

.concierge-chat-subtitle {
    font-size: 0.78rem;
    color: #6b7280;
    line-height: 1.2;
}

.concierge-chat-close {
    cursor: pointer;
}

.concierge-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.concierge-chat-empty {
    padding: 10px 0 4px 0;
}

.concierge-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.concierge-chat-row {
    display: flex;
    width: 100%;
}

    .concierge-chat-row.user {
        justify-content: flex-end;
    }

    .concierge-chat-row.bot {
        justify-content: flex-start;
    }

.concierge-chat-bubble-wrap {
    max-width: 78%;
    display: flex;
    flex-direction: column;
}

.concierge-chat-row.user .concierge-chat-bubble-wrap {
    align-items: flex-end;
}

.concierge-chat-row.bot .concierge-chat-bubble-wrap {
    align-items: flex-start;
}

.concierge-chat-bubble {
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.45;
    word-break: break-word;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.concierge-chat-row.user .concierge-chat-bubble {
    background: #e8f1fb;
    color: #1f2937;
    border-bottom-right-radius: 6px;
}

.concierge-chat-row.bot .concierge-chat-bubble {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid rgba(0,0,0,0.08);
    border-bottom-left-radius: 6px;
}

.concierge-chat-time {
    margin-top: 4px;
    font-size: 0.72rem;
    color: #6b7280;
    padding: 0 4px;
}

.concierge-chat-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.concierge-chat-input {
    flex: 1;
}

    .concierge-chat-input .mud-input-slot {
        background: #ffffff;
    }

.concierge-chat-send {
    min-width: 84px;
    height: 40px;
    border-radius: 10px;
    font-weight: 600;
}

.concierge-chat-body::-webkit-scrollbar {
    width: 10px;
}

.concierge-chat-body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.18);
    border-radius: 999px;
}

.concierge-chat-body::-webkit-scrollbar-track {
    background: transparent;
}

@media (max-width: 640px) {
    .concierge-chat-window {
        right: 12px;
        bottom: 76px;
        width: calc(100vw - 24px);
        height: 72vh;
        max-height: calc(100vh - 92px);
        border-radius: 14px;
    }

    .concierge-chat-body {
        padding: 12px;
    }

    .concierge-chat-bubble-wrap {
        max-width: 88%;
    }

    .concierge-chat-footer {
        padding: 10px;
    }
}

.concierge-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1400;
    border-radius: 999px;
    padding: 10px 16px;
    min-width: 170px;
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

@media (max-width: 900px) {
    .concierge-fab {
        right: 16px;
        bottom: 16px;
        min-width: 0;
        padding: 8px 12px;
    }
}

.home-hero-card {
    border-radius: 18px;
    overflow: hidden;
    background-image: linear-gradient(rgba(255,255,255,.86), rgba(255,255,255,.86)), url('/images/building-hero.png');
    background-size: cover;
    background-position: center;
    min-height: 360px;
}

.home-hero-inner {
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ============================================================
   Concierge Platform Theme System
   Default: Night Mode
   Options: Night, Light, Blue
   ============================================================ */

body.concierge-theme-night {
    background: #121820;
    color: #e5e7eb;
}

    body.concierge-theme-night .mud-main-content,
    body.concierge-theme-night .mud-layout,
    body.concierge-theme-night main {
        background: #121820;
        color: #e5e7eb;
    }

    body.concierge-theme-night .mud-paper,
    body.concierge-theme-night .mud-card,
    body.concierge-theme-night .dashboard-shell,
    body.concierge-theme-night .dashboard-card {
        background-color: #1e2732 !important;
        color: #e5e7eb !important;
        border-color: #334155 !important;
    }

    body.concierge-theme-night .mud-table,
    body.concierge-theme-night .mud-table-container {
        background-color: #1e2732 !important;
        color: #e5e7eb !important;
    }

    body.concierge-theme-night .mud-input,
    body.concierge-theme-night .mud-input-control,
    body.concierge-theme-night .mud-input-slot {
        color: #e5e7eb !important;
    }

    body.concierge-theme-night .mud-drawer {
        background-color: #18212b !important;
        color: #e5e7eb !important;
    }

    body.concierge-theme-night .mud-appbar {
        background-color: #0f1720 !important;
    }

    body.concierge-theme-night a {
        color: #67e8f9;
    }


/* Classic Light */

body.concierge-theme-light {
    background: #f7f9fb;
    color: #1f2933;
}

    body.concierge-theme-light .mud-main-content,
    body.concierge-theme-light .mud-layout,
    body.concierge-theme-light main {
        background: #f7f9fb;
        color: #1f2933;
    }

    body.concierge-theme-light .mud-paper,
    body.concierge-theme-light .mud-card,
    body.concierge-theme-light .dashboard-shell,
    body.concierge-theme-light .dashboard-card {
        background-color: #ffffff !important;
        color: #1f2933 !important;
        border-color: #e5e7eb !important;
    }

    body.concierge-theme-light .mud-drawer {
        background-color: #eef2f5 !important;
        color: #1f2933 !important;
    }

    body.concierge-theme-light .mud-appbar {
        background-color: #24343a !important;
    }


/* Executive Blue */

body.concierge-theme-blue {
    background: #eaf3f8;
    color: #1b2633;
}

    body.concierge-theme-blue .mud-main-content,
    body.concierge-theme-blue .mud-layout,
    body.concierge-theme-blue main {
        background: #eaf3f8;
        color: #1b2633;
    }

    body.concierge-theme-blue .mud-paper,
    body.concierge-theme-blue .mud-card,
    body.concierge-theme-blue .dashboard-shell,
    body.concierge-theme-blue .dashboard-card {
        background-color: #ffffff !important;
        color: #1b2633 !important;
        border-color: #d6e4ef !important;
    }

    body.concierge-theme-blue .mud-drawer {
        background-color: #dbeaf3 !important;
        color: #1b2633 !important;
    }

    body.concierge-theme-blue .mud-appbar {
        background-color: #1e3a5f !important;
    }

    body.concierge-theme-blue a {
        color: #0369a1;
    }

/* ============================================================
   NIGHT MODE READABILITY PATCH
   Put this AFTER all other theme CSS
   ============================================================ */

body.concierge-theme-night {
    background-color: #0f1720 !important;
    color: #f3f4f6 !important;
}

    /* Main application background */
    body.concierge-theme-night .mud-layout,
    body.concierge-theme-night .mud-main-content,
    body.concierge-theme-night .mud-container,
    body.concierge-theme-night main,
    body.concierge-theme-night article,
    body.concierge-theme-night .content {
        background-color: #0f1720 !important;
        color: #f3f4f6 !important;
    }

    /* Main cards / paper / dashboard panels */
    body.concierge-theme-night .mud-paper,
    body.concierge-theme-night .mud-card,
    body.concierge-theme-night .dashboard-shell,
    body.concierge-theme-night .dashboard-card {
        background-color: #1e2937 !important;
        color: #f3f4f6 !important;
        border-color: #475569 !important;
    }

        /* Nested cards should not disappear into background */
        body.concierge-theme-night .mud-paper .mud-paper,
        body.concierge-theme-night .mud-card .mud-card {
            background-color: #223044 !important;
            color: #f3f4f6 !important;
            border-color: #52647a !important;
        }

    /* Typography */
    body.concierge-theme-night .mud-typography,
    body.concierge-theme-night .mud-text,
    body.concierge-theme-night h1,
    body.concierge-theme-night h2,
    body.concierge-theme-night h3,
    body.concierge-theme-night h4,
    body.concierge-theme-night h5,
    body.concierge-theme-night h6,
    body.concierge-theme-night p,
    body.concierge-theme-night span,
    body.concierge-theme-night div {
        color: inherit;
    }

    /* Muted / secondary text needs to remain readable */
    body.concierge-theme-night .mud-typography-body2,
    body.concierge-theme-night .mud-typography-caption,
    body.concierge-theme-night .mud-typography-subtitle1,
    body.concierge-theme-night .mud-typography-subtitle2,
    body.concierge-theme-night .mud-typography-color-secondary {
        color: #cbd5e1 !important;
    }

    /* Bright cyan helper text */
    body.concierge-theme-night .mud-typography[style*="color"],
    body.concierge-theme-night .text-info,
    body.concierge-theme-night .mud-info-text {
        color: #67e8f9 !important;
    }

    /* Tables */
    body.concierge-theme-night .mud-table,
    body.concierge-theme-night .mud-table-container {
        background-color: #1e2937 !important;
        color: #f3f4f6 !important;
    }

    body.concierge-theme-night .mud-table-root {
        background-color: #1e2937 !important;
        color: #f3f4f6 !important;
    }

    body.concierge-theme-night .mud-table-head,
    body.concierge-theme-night .mud-table-row,
    body.concierge-theme-night .mud-table-cell,
    body.concierge-theme-night th,
    body.concierge-theme-night td {
        background-color: #1e2937 !important;
        color: #f3f4f6 !important;
        border-color: #475569 !important;
    }

        body.concierge-theme-night .mud-table-head .mud-table-cell,
        body.concierge-theme-night thead th {
            color: #e2e8f0 !important;
            font-weight: 600 !important;
            background-color: #263548 !important;
        }

        body.concierge-theme-night .mud-table-row:hover,
        body.concierge-theme-night tbody tr:hover {
            background-color: #2f4058 !important;
        }

    /* Open Issues table specifically */
    body.concierge-theme-night .mud-table .mud-chip,
    body.concierge-theme-night .mud-chip {
        color: #f8fafc !important;
    }

    /* Chips / status pills */
    body.concierge-theme-night .mud-chip-outlined {
        border-color: #94a3b8 !important;
        color: #f8fafc !important;
    }

    body.concierge-theme-night .mud-chip-filled {
        color: #ffffff !important;
    }

    /* Inputs */
    body.concierge-theme-night .mud-input,
    body.concierge-theme-night .mud-input-control,
    body.concierge-theme-night .mud-input-slot,
    body.concierge-theme-night input,
    body.concierge-theme-night textarea {
        color: #f3f4f6 !important;
    }

    body.concierge-theme-night .mud-input-label,
    body.concierge-theme-night label {
        color: #cbd5e1 !important;
    }

    body.concierge-theme-night .mud-input-outlined-border {
        border-color: #64748b !important;
    }

    body.concierge-theme-night .mud-input-root {
        background-color: #111827 !important;
    }

    /* Buttons */
    body.concierge-theme-night .mud-button {
        font-weight: 600;
    }

    /* Outlined buttons need brighter text/borders */
    body.concierge-theme-night .mud-button-outlined {
        color: #e2e8f0 !important;
        border-color: #94a3b8 !important;
    }

    /* Text buttons */
    body.concierge-theme-night .mud-button-text {
        color: #93c5fd !important;
    }

    /* Disabled buttons were nearly invisible */
    body.concierge-theme-night .mud-button:disabled,
    body.concierge-theme-night .mud-button.mud-disabled,
    body.concierge-theme-night .mud-disabled {
        opacity: 0.65 !important;
        color: #cbd5e1 !important;
        border-color: #64748b !important;
    }

    /* Links */
    body.concierge-theme-night a,
    body.concierge-theme-night .mud-link {
        color: #67e8f9 !important;
    }

        body.concierge-theme-night a:hover,
        body.concierge-theme-night .mud-link:hover {
            color: #a5f3fc !important;
        }

    /* Drawer / left nav */
    body.concierge-theme-night .mud-drawer {
        background-color: #111c27 !important;
        color: #e5e7eb !important;
        border-color: #334155 !important;
    }

    body.concierge-theme-night .mud-nav-link,
    body.concierge-theme-night .mud-nav-link-text,
    body.concierge-theme-night .mud-navmenu,
    body.concierge-theme-night .mud-nav-group {
        color: #e5e7eb !important;
    }

        body.concierge-theme-night .mud-nav-link:hover {
            background-color: #263548 !important;
        }

        body.concierge-theme-night .mud-nav-link.active,
        body.concierge-theme-night .mud-nav-link.mud-nav-link-active {
            background-color: #334155 !important;
            color: #ffffff !important;
        }

    /* App bar */
    body.concierge-theme-night .mud-appbar {
        background-color: #0b121a !important;
        color: #ffffff !important;
    }

    /* Divider lines */
    body.concierge-theme-night .mud-divider,
    body.concierge-theme-night hr {
        border-color: #475569 !important;
    }

    /* Alerts */
    body.concierge-theme-night .mud-alert {
        background-color: #1f2937 !important;
        color: #f3f4f6 !important;
        border-color: #475569 !important;
    }

    /* Dialogs / popovers / menus */
    body.concierge-theme-night .mud-popover,
    body.concierge-theme-night .mud-menu,
    body.concierge-theme-night .mud-list,
    body.concierge-theme-night .mud-dialog {
        background-color: #1e2937 !important;
        color: #f3f4f6 !important;
    }

    /* Dashboard-specific improvement */
    body.concierge-theme-night .dashboard-mode-note,
    body.concierge-theme-night .dashboard-help-text {
        color: #67e8f9 !important;
    }

    /* ============================================================
   NIGHT MODE FORM FIELD / LABEL READABILITY PATCH
   Put this at the very bottom of the CSS file
   ============================================================ */

    body.concierge-theme-night .mud-input-control,
    body.concierge-theme-night .mud-input-control-input-container {
        color: #f8fafc !important;
    }

        /* Floating labels on outlined MudTextField / MudSelect */
        body.concierge-theme-night .mud-input-label,
        body.concierge-theme-night .mud-input-label-outlined,
        body.concierge-theme-night .mud-input-control > .mud-input-label {
            color: #e2e8f0 !important;
            background-color: #1e2937 !important;
            padding: 0 6px !important;
            border-radius: 4px !important;
        }

            /* Required asterisk labels */
            body.concierge-theme-night .mud-input-label .mud-input-label-asterisk,
            body.concierge-theme-night .mud-input-required {
                color: #fca5a5 !important;
            }

    /* Text inside inputs */
    body.concierge-theme-night .mud-input,
    body.concierge-theme-night .mud-input-root,
    body.concierge-theme-night .mud-input-slot,
    body.concierge-theme-night input,
    body.concierge-theme-night textarea {
        color: #ffffff !important;
        background-color: #111827 !important;
    }

        /* Placeholder text */
        body.concierge-theme-night input::placeholder,
        body.concierge-theme-night textarea::placeholder,
        body.concierge-theme-night .mud-input-slot::placeholder {
            color: #94a3b8 !important;
            opacity: 1 !important;
        }

    /* Outlined borders */
    body.concierge-theme-night .mud-input-outlined-border,
    body.concierge-theme-night .mud-input-root-outlined .mud-input-outlined-border {
        border-color: #64748b !important;
    }

    /* Border on hover/focus */
    body.concierge-theme-night .mud-input-root:hover .mud-input-outlined-border {
        border-color: #93c5fd !important;
    }

    body.concierge-theme-night .mud-input-root.mud-focused .mud-input-outlined-border {
        border-color: #22d3ee !important;
    }

    /* Select dropdown text and icons */
    body.concierge-theme-night .mud-select,
    body.concierge-theme-night .mud-select-input,
    body.concierge-theme-night .mud-select .mud-input-slot {
        color: #ffffff !important;
        background-color: #111827 !important;
    }

        body.concierge-theme-night .mud-select .mud-icon-root,
        body.concierge-theme-night .mud-input-adornment .mud-icon-root {
            color: #cbd5e1 !important;
        }

    /* Disabled fields should still be readable */
    body.concierge-theme-night .mud-input-root.mud-disabled,
    body.concierge-theme-night .mud-input-control.mud-disabled,
    body.concierge-theme-night input:disabled,
    body.concierge-theme-night textarea:disabled {
        color: #cbd5e1 !important;
        background-color: #1f2937 !important;
        opacity: 0.85 !important;
    }

    /* Textareas specifically */
    body.concierge-theme-night textarea.mud-input-slot {
        background-color: #111827 !important;
        color: #ffffff !important;
    }

    /* Mud fieldset / outline container */
    body.concierge-theme-night fieldset {
        border-color: #64748b !important;
    }

    /* Helper text / validation text */
    body.concierge-theme-night .mud-input-helper-text {
        color: #cbd5e1 !important;
    }

        body.concierge-theme-night .mud-input-error,
        body.concierge-theme-night .mud-input-helper-text.mud-error-text {
            color: #fca5a5 !important;
        }

/* ============================================================
   MOBILE / TABLET RESPONSIVENESS PATCH
   Final cleaned mobile section
   ============================================================ */

/* General mobile page spacing */
@media (max-width: 768px) {
    .mud-main-content {
        margin-left: 0 !important;
        padding: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .mud-container,
    .mud-container-maxwidth-lg,
    .mud-container-maxwidth-xl {
        padding-left: 8px !important;
        padding-right: 8px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .mud-paper,
    .mud-card {
        border-radius: 14px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .pa-6 {
        padding: 16px !important;
    }

    .pa-4 {
        padding: 12px !important;
    }

    .ma-6 {
        margin: 12px !important;
    }

    .ma-4 {
        margin: 8px !important;
    }
}

/* Mobile drawer should not squeeze page content */
@media (max-width: 960px) {
    .mud-main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .app-nav-drawer {
        max-width: 280px !important;
    }

        .app-nav-drawer .mud-drawer-content,
        .mud-drawer-content {
            width: 280px !important;
            max-width: 280px !important;
        }

    .mud-nav-link {
        min-height: 42px !important;
    }
}

/* Hide desktop-only items on phones */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

/* App bar mobile polish */
@media (max-width: 600px) {
    .mud-appbar .mud-typography,
    .mud-appbar span {
        font-size: 0.95rem !important;
    }

    .mud-appbar {
        min-height: 56px !important;
    }
}

/* Button groups wrap instead of overflowing */
@media (max-width: 768px) {
    .mud-stack-row {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .mud-button {
        min-height: 38px;
        white-space: nowrap !important;
    }

    .mud-button-root {
        margin-bottom: 4px;
    }
}

/* Forms full-width on phones */
@media (max-width: 768px) {
    .mud-input-control,
    .mud-input-root,
    .mud-select,
    .mud-picker-input-button,
    input,
    textarea {
        width: 100% !important;
    }

    .mud-form {
        width: 100% !important;
    }
}

/* Tables scroll horizontally on phones */
@media (max-width: 768px) {
    .mud-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .mud-table {
        min-width: 720px;
    }

    .mud-table-cell {
        white-space: nowrap;
        overflow-wrap: anywhere;
    }

    .mud-alert {
        overflow-wrap: anywhere;
    }
}

/* ============================================================
   DASHBOARD MOBILE HARD FIX
   Requires Dashboard.razor classes:
   dashboard-shell, dashboard-header-card, dashboard-header-row,
   dashboard-header-text, dashboard-building-row,
   dashboard-building-title, dashboard-role-chip,
   dashboard-intro, dashboard-mode-buttons, dashboard-mode-button
   ============================================================ */

.dashboard-shell {
    max-width: 1200px;
    margin: 24px auto;
    width: calc(100% - 32px);
}

.dashboard-header-card {
    overflow: hidden;
}

.dashboard-header-row {
    min-width: 0;
}

.dashboard-header-text {
    min-width: 0;
    flex: 1 1 auto;
}

.dashboard-building-row {
    min-width: 0;
}

.dashboard-building-title {
    min-width: 0;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.25;
}

.dashboard-intro {
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.35;
}

.dashboard-mode-buttons {
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.dashboard-mode-button {
    white-space: nowrap !important;
}

@media (max-width: 768px) {
    .dashboard-shell {
        width: 100% !important;
        max-width: 100% !important;
        margin: 8px 0 !important;
        padding: 12px !important;
        border-radius: 14px !important;
    }

    .dashboard-header-card {
        padding: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .dashboard-header-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .dashboard-header-text {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .dashboard-building-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .dashboard-building-title {
        display: block !important;
        flex: 1 1 auto !important;
        min-width: 160px !important;
        max-width: 100% !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        line-height: 1.25 !important;
    }

    .dashboard-role-chip {
        flex: 0 0 auto !important;
    }

    .dashboard-intro {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        line-height: 1.35 !important;
    }

    .dashboard-mode-buttons {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

        .dashboard-mode-buttons .mud-button {
            flex: 0 0 auto !important;
            min-width: auto !important;
            white-space: nowrap !important;
            font-size: 0.78rem !important;
            padding-left: 10px !important;
            padding-right: 10px !important;
        }
}

/* Dashboard split rows: AI briefing, Open Items, Open Issues headers */
@media (max-width: 768px) {
    .dashboard-split-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
    }

        .dashboard-split-row .mud-button {
            align-self: flex-start !important;
        }
}

/* Prevent accidental one-character-per-line wrapping inside dashboard */
@media (max-width: 768px) {
    .dashboard-shell .mud-typography,
    .dashboard-shell .mud-button,
    .dashboard-shell h1,
    .dashboard-shell h2,
    .dashboard-shell h3,
    .dashboard-shell h4,
    .dashboard-shell h5,
    .dashboard-shell h6,
    .dashboard-shell span,
    .dashboard-shell p {
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    .dashboard-shell .dashboard-building-title,
    .dashboard-shell .dashboard-intro {
        overflow-wrap: break-word !important;
    }
}

/* ============================================================
   CONCIERGE CHAT MOBILE FIX
   Uses actual Dashboard.razor chat classes
   ============================================================ */

@media (max-width: 768px) {
    .concierge-chat-window {
        right: 12px !important;
        bottom: 76px !important;
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        height: 72vh !important;
        max-height: calc(100vh - 92px) !important;
        border-radius: 14px !important;
    }

    .concierge-chat-body {
        padding: 12px !important;
    }

    .concierge-chat-bubble-wrap {
        max-width: 88% !important;
    }

    .concierge-chat-footer {
        padding: 10px !important;
    }

    .concierge-chat-launcher,
    .concierge-fab {
        right: 16px !important;
        bottom: 16px !important;
    }

    .concierge-fab {
        min-width: 0 !important;
        padding: 8px 12px !important;
    }
}


/* ============================================================
   OPEN ITEMS / OPEN ISSUES MOBILE CARD FIX
   ============================================================ */

.mobile-label {
    display: none;
}

.mobile-issue-list {
    display: none;
}

@media (max-width: 768px) {
    .desktop-label {
        display: none !important;
    }

    .mobile-label {
        display: inline !important;
    }

    .dashboard-open-items-card {
        overflow: hidden !important;
    }

    .dashboard-open-items-button {
        max-width: 100% !important;
        white-space: nowrap !important;
        align-self: flex-start !important;
    }

    .desktop-table-only {
        display: none !important;
    }

    .mobile-issue-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .mobile-issue-card {
        width: 100% !important;
        max-width: 100% !important;
        background-color: #223044 !important;
        border-color: #52647a !important;
    }

    .mobile-issue-card-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .mobile-issue-description {
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        line-height: 1.35 !important;
    }

    .mobile-issue-card .mud-button {
        align-self: flex-start !important;
        margin-top: 4px !important;
    }
}

@media (min-width: 769px) {
    .desktop-table-only {
        display: block !important;
    }

    .mobile-issue-list {
        display: none !important;
    }
}

/* ============================================================
   RESPONSIVE TABLE / MOBILE CARD PATTERN
   Use desktop table on large screens, cards on phones
   ============================================================ */

.mobile-card-list {
    display: none;
}

.desktop-table-only {
    display: block;
}

@media (max-width: 768px) {
    .desktop-table-only {
        display: none !important;
    }

    .mobile-card-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .mobile-list-card {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 14px !important;
        padding: 14px !important;
    }

    .mobile-card-title {
        font-weight: 700 !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    .mobile-card-meta {
        font-size: 0.85rem !important;
        line-height: 1.35 !important;
        opacity: 0.95;
    }

    .mobile-card-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-top: 8px !important;
    }

    .mobile-page-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .mobile-page-header-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
    }

        .mobile-page-header-actions .mud-button {
            align-self: flex-start !important;
            max-width: 100% !important;
        }
}

/* ============================================================
   MOBILE ACCOUNT MENU / POPOVER FIX
   Prevent MudMenu dropdowns from becoming full-width panels
   ============================================================ */

@media (max-width: 768px) {
    .mud-popover .mud-paper,
    .mud-menu .mud-paper,
    .mud-list {
        width: auto !important;
        min-width: 180px !important;
        max-width: 280px !important;
    }

    .mud-popover {
        z-index: 2000 !important;
    }

    .mud-menu-item {
        min-height: 42px !important;
        cursor: pointer !important;
    }
}

/* ============================================================
   CONCIERGE CHAT NIGHT MODE READABILITY FIX
   Fixes unreadable AI chat in Night Mode on desktop and mobile
   ============================================================ */

body.concierge-theme-night .concierge-chat-window {
    background: #111827 !important;
    color: #f8fafc !important;
    border: 1px solid #475569 !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45) !important;
}

body.concierge-theme-night .concierge-chat-header {
    background: #1e2937 !important;
    color: #f8fafc !important;
    border-bottom: 1px solid #475569 !important;
}

body.concierge-theme-night .concierge-chat-title {
    color: #ffffff !important;
}

body.concierge-theme-night .concierge-chat-subtitle {
    color: #cbd5e1 !important;
}

body.concierge-theme-night .concierge-chat-close,
body.concierge-theme-night .concierge-chat-close .mud-icon-root {
    color: #e2e8f0 !important;
}

body.concierge-theme-night .concierge-chat-body {
    background: #0f1720 !important;
    color: #f8fafc !important;
}

body.concierge-theme-night .concierge-chat-footer {
    background: #1e2937 !important;
    border-top: 1px solid #475569 !important;
}

body.concierge-theme-night .concierge-chat-row.user .concierge-chat-bubble {
    background: #0e7490 !important;
    color: #ffffff !important;
    border: 1px solid #22d3ee !important;
}

body.concierge-theme-night .concierge-chat-row.bot .concierge-chat-bubble {
    background: #223044 !important;
    color: #f8fafc !important;
    border: 1px solid #52647a !important;
}

body.concierge-theme-night .concierge-chat-time {
    color: #cbd5e1 !important;
}

body.concierge-theme-night .concierge-chat-suggestions .mud-button {
    color: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    background-color: #1e2937 !important;
}

    body.concierge-theme-night .concierge-chat-suggestions .mud-button:hover {
        background-color: #2f4058 !important;
        border-color: #22d3ee !important;
        color: #ffffff !important;
    }

body.concierge-theme-night .concierge-chat-input .mud-input-root,
body.concierge-theme-night .concierge-chat-input .mud-input-slot,
body.concierge-theme-night .concierge-chat-input input {
    background-color: #0f1720 !important;
    color: #ffffff !important;
}

    body.concierge-theme-night .concierge-chat-input input::placeholder {
        color: #94a3b8 !important;
        opacity: 1 !important;
    }

body.concierge-theme-night .concierge-chat-send {
    color: #ffffff !important;
}

body.concierge-theme-night .processing-bubble {
    background: #223044 !important;
    color: #f8fafc !important;
    border: 1px solid #52647a !important;
}

/* Keep chat readable in Light and Blue themes too */
body.concierge-theme-light .concierge-chat-window,
body.concierge-theme-blue .concierge-chat-window {
    background: #ffffff !important;
    color: #1f2937 !important;
}

body.concierge-theme-light .concierge-chat-body,
body.concierge-theme-blue .concierge-chat-body {
    background: #f8fafc !important;
}

body.concierge-theme-light .concierge-chat-title,
body.concierge-theme-blue .concierge-chat-title {
    color: #1f2937 !important;
}

body.concierge-theme-light .concierge-chat-subtitle,
body.concierge-theme-blue .concierge-chat-subtitle {
    color: #64748b !important;
}

@media (max-width: 768px) {
    .admin-notifications-page-shell {
        margin: 8px 0 !important;
        padding: 14px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .admin-notifications-filter-panel,
    .admin-notifications-list-panel,
    .admin-notifications-summary-panel {
        padding: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .admin-notifications-mobile-list {
        margin-top: 16px !important;
    }

    .admin-notifications-page-shell .mud-input-control,
    .admin-notifications-page-shell .mud-select,
    .admin-notifications-page-shell input {
        width: 100% !important;
    }
}

/* =========================================================
   Mobile table/card helpers
   Used by Broadcasts, Admin Staff, Amenity Requests, etc.
   ========================================================= */

.desktop-table-only {
    display: block;
}

.mobile-card-list {
    display: none;
}

.mobile-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

    .mobile-action-bar .mud-button-root {
        white-space: nowrap;
    }

.mobile-list-card {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    background: rgba(15, 23, 42, 0.35);
}

.mobile-card-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.mobile-card-subtitle {
    font-size: 0.85rem;
    opacity: 0.78;
    margin-bottom: 10px;
}

.mobile-card-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

    .mobile-card-row:last-child {
        border-bottom: none;
    }

.mobile-card-label {
    font-size: 0.78rem;
    opacity: 0.7;
}

.mobile-card-value {
    font-size: 0.88rem;
    font-weight: 600;
    text-align: right;
}

.mobile-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

    .mobile-card-actions .mud-button-root {
        width: 100%;
    }

@media (max-width: 600px) {
    .desktop-table-only {
        display: none !important;
    }

    .mobile-card-list {
        display: block !important;
    }

    .mobile-action-bar {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

        .mobile-action-bar .mud-button-root {
            width: 100%;
            white-space: normal;
            min-height: 42px;
        }

    .mobile-page-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

        .mobile-page-header .mud-button-root {
            width: 100%;
        }

    .mud-table-container {
        max-width: 100%;
        overflow-x: auto;
    }
}


/* =========================================================
   Amenity Requests - responsive mobile layout
   Page: /amenities/requests
   ========================================================= */

.amenity-requests-mobile-list {
    display: none;
}

.amenity-requests-desktop-table {
    width: 100%;
}

.amenity-requests-table-actions {
    flex-wrap: wrap;
}

.amenity-request-mobile-card {
    border-radius: 14px;
}

.amenity-request-mobile-title {
    line-height: 1.25;
    word-break: break-word;
}

.amenity-request-mobile-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    font-size: 0.9rem;
}

    .amenity-request-mobile-row:last-child {
        border-bottom: none;
    }

    .amenity-request-mobile-row span {
        opacity: 0.75;
        min-width: 90px;
    }

    .amenity-request-mobile-row strong {
        text-align: right;
        word-break: break-word;
    }

.amenity-request-mobile-field {
    margin-top: 8px;
}

.amenity-request-mobile-actions .mud-button-root {
    min-height: 42px;
}

@media (max-width: 600px) {
    .amenity-requests-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .amenity-requests-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

        .amenity-requests-header .mud-typography-h4 {
            font-size: 2rem;
            line-height: 1.12;
        }

    .amenity-requests-back-button {
        width: 100%;
    }

    .amenity-requests-desktop-table {
        display: none !important;
    }

    .amenity-requests-mobile-list {
        display: block !important;
    }
}

/* =========================================================
   Admin Staff Management - responsive mobile layout
   Page: /admin/staff
   ========================================================= */

.staff-mobile-list {
    display: none;
}

.staff-desktop-table {
    width: 100%;
}

.staff-table-actions {
    flex-wrap: wrap;
}

.staff-header-actions,
.staff-form-actions {
    flex-wrap: wrap;
}

.staff-mobile-card {
    border-radius: 14px;
}

.staff-mobile-title {
    line-height: 1.25;
    word-break: break-word;
}

.staff-mobile-subtitle {
    word-break: break-word;
}

.staff-mobile-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    font-size: 0.9rem;
}

    .staff-mobile-row:last-child {
        border-bottom: none;
    }

    .staff-mobile-row span {
        opacity: 0.75;
        min-width: 90px;
    }

    .staff-mobile-row strong {
        text-align: right;
        word-break: break-word;
    }

.staff-mobile-actions {
    margin-top: 10px;
}

    .staff-mobile-actions .mud-button-root {
        width: 100%;
        min-height: 42px;
    }

@media (max-width: 600px) {
    .staff-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .staff-page-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

        .staff-page-header .mud-typography-h4 {
            font-size: 2rem;
            line-height: 1.12;
        }

    .staff-header-actions,
    .staff-form-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .staff-header-actions .mud-button-root,
        .staff-form-actions .mud-button-root {
            width: 100%;
            min-height: 42px;
        }

    .staff-desktop-table {
        display: none !important;
    }

    .staff-mobile-list {
        display: block !important;
    }
}

/* =========================================================
   Maintenance Detail - responsive mobile layout
   Page: /maintenance/{Id:int}
   ========================================================= */

.maintenance-detail-page-shell {
    max-width: 1100px;
    margin: 36px auto;
    border-radius: 18px;
}

.maintenance-detail-header {
    flex-wrap: wrap;
}

.maintenance-detail-summary-card,
.maintenance-detail-photo-card,
.maintenance-detail-actions-card,
.maintenance-detail-followup-card {
    border-radius: 16px;
}

.maintenance-detail-description {
    white-space: pre-wrap;
    word-break: break-word;
}

.maintenance-detail-photo-img {
    max-width: 100%;
    border-radius: 10px;
}

.maintenance-detail-actions,
.maintenance-detail-resident-actions {
    flex-wrap: wrap;
}

    .maintenance-detail-actions .mud-button-root,
    .maintenance-detail-resident-actions .mud-button-root {
        min-height: 42px;
    }

@media (max-width: 600px) {
    .maintenance-detail-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .maintenance-detail-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

        .maintenance-detail-header .mud-typography-h4 {
            font-size: 1.9rem;
            line-height: 1.12;
        }

    .maintenance-detail-back-button {
        width: 100%;
    }

    .maintenance-detail-summary-card,
    .maintenance-detail-photo-card,
    .maintenance-detail-actions-card,
    .maintenance-detail-followup-card {
        padding: 14px !important;
        overflow-x: hidden;
    }

    .maintenance-detail-actions,
    .maintenance-detail-resident-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .maintenance-detail-actions .mud-button-root,
        .maintenance-detail-resident-actions .mud-button-root {
            width: 100%;
            min-height: 44px;
            white-space: normal;
        }
}

/* =========================================================
   My Amenity Reservations - responsive mobile layout
   Page: /amenities/my
   ========================================================= */

.my-reservations-mobile-list {
    display: none;
}

.my-reservations-desktop-table {
    width: 100%;
}

.my-reservations-table-actions {
    flex-wrap: wrap;
}

.my-reservations-mobile-card {
    border-radius: 14px;
}

.my-reservations-mobile-title {
    line-height: 1.25;
    word-break: break-word;
}

.my-reservations-mobile-subtitle {
    word-break: break-word;
}

.my-reservations-mobile-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    font-size: 0.9rem;
}

    .my-reservations-mobile-row:last-child {
        border-bottom: none;
    }

    .my-reservations-mobile-row span {
        opacity: 0.75;
        min-width: 85px;
    }

    .my-reservations-mobile-row strong {
        text-align: right;
        word-break: break-word;
    }

.my-reservations-mobile-actions {
    margin-top: 10px;
}

    .my-reservations-mobile-actions .mud-button-root {
        width: 100%;
        min-height: 42px;
    }

@media (max-width: 600px) {
    .my-reservations-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .my-reservations-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

        .my-reservations-header .mud-typography-h4 {
            font-size: 2rem;
            line-height: 1.12;
        }

    .my-reservations-back-button {
        width: 100%;
    }

    .my-reservations-desktop-table {
        display: none !important;
    }

    .my-reservations-mobile-list {
        display: block !important;
    }
}

/* =========================================================
   Amenities Main Page - responsive mobile layout
   Page: /amenities
   ========================================================= */

.amenities-page-shell {
    max-width: 1150px;
    margin: 24px auto;
    border-radius: 18px;
}

.amenities-page-header {
    flex-wrap: wrap;
}

.amenities-header-actions,
.amenities-quick-shell,
.amenities-quick-button-row {
    flex-wrap: wrap;
}

.amenities-card {
    border-radius: 16px;
    height: 100%;
}

.amenities-card-title {
    line-height: 1.2;
    word-break: break-word;
}

.amenities-card-subtitle {
    word-break: break-word;
}

.amenities-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .amenities-card-actions .mud-button-root {
        min-height: 42px;
    }

@media (max-width: 600px) {
    .amenities-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .amenities-page-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

        .amenities-page-header .mud-typography-h4 {
            font-size: 2rem;
            line-height: 1.12;
        }

    .amenities-header-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .amenities-header-actions .mud-button-root,
        .amenities-header-actions .mud-chip-root {
            width: 100%;
            justify-content: center;
        }

    .amenities-quick-card {
        padding: 14px !important;
        border-radius: 16px !important;
    }

    .amenities-quick-shell {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

    .amenities-quick-button-row {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .amenities-quick-button-row .mud-button-root {
            width: 100%;
            min-height: 42px;
            white-space: normal;
        }

    .amenities-card-actions {
        flex-direction: column;
        align-items: stretch;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

        .amenities-card-actions .mud-button-root {
            width: 100%;
            white-space: normal;
        }

    .amenities-card-header-row {
        align-items: flex-start !important;
    }

        .amenities-card-header-row .mud-chip-root {
            margin-top: 4px;
        }
}

/* =========================================================
   Building Profile - responsive mobile layout
   Page: /admin/building
   ========================================================= */

.building-page-shell {
    max-width: 1100px;
    margin: 24px auto;
    border-radius: 18px;
}

.building-page-header {
    flex-wrap: wrap;
}

.building-admin-current-card {
    border-radius: 14px;
    max-width: 100%;
}

.building-admin-current-text {
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.building-form-actions {
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .building-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .building-page-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

        .building-page-header .mud-typography-h4 {
            font-size: 2rem;
            line-height: 1.12;
        }

    .building-back-button {
        width: 100%;
    }

    .building-form-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .building-form-actions .mud-button-root {
            width: 100%;
            min-height: 42px;
            white-space: normal;
        }
}

/* =========================================================
   Invite Management - responsive mobile layout
   Page: /admin/invites
   ========================================================= */

.invites-page-shell {
    max-width: 1100px;
    margin: 24px auto;
    border-radius: 18px;
}

.invites-page-header {
    flex-wrap: wrap;
}

.invites-mobile-list {
    display: none;
}

.invites-desktop-table {
    width: 100%;
}

.invites-table-actions {
    flex-wrap: wrap;
}

.invite-mobile-card {
    border-radius: 14px;
}

.invite-mobile-title {
    line-height: 1.25;
    word-break: break-word;
}

.invite-mobile-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    font-size: 0.9rem;
}

    .invite-mobile-row:last-child {
        border-bottom: none;
    }

    .invite-mobile-row span {
        opacity: 0.75;
        min-width: 85px;
    }

    .invite-mobile-row strong {
        text-align: right;
        word-break: break-word;
    }

.invite-mobile-actions {
    margin-top: 10px;
}

    .invite-mobile-actions .mud-button-root {
        width: 100%;
        min-height: 42px;
    }

@media (max-width: 600px) {
    .invites-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .invites-page-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

        .invites-page-header .mud-typography-h4 {
            font-size: 2rem;
            line-height: 1.12;
        }

    .invites-back-button {
        width: 100%;
    }

    .invites-section-card {
        padding: 14px !important;
        border-radius: 16px !important;
        overflow-x: hidden;
    }

    .invites-desktop-table {
        display: none !important;
    }

    .invites-mobile-list {
        display: block !important;
    }
}

/* =========================================================
   Amenity Setup - responsive mobile layout
   Page: /admin/amenities
   ========================================================= */

.admin-amenities-page-shell {
    max-width: 1280px;
    margin: 24px auto;
    border-radius: 18px;
}

.admin-amenities-header {
    flex-wrap: wrap;
}

.admin-amenities-section-card,
.admin-amenities-card {
    border-radius: 16px;
}

.admin-amenities-actions,
.admin-amenities-resource-actions {
    flex-wrap: wrap;
}

.admin-amenities-resource-mobile-list {
    display: none;
}

.admin-amenities-resource-desktop-table {
    width: 100%;
}

.admin-amenities-resource-mobile-card {
    border-radius: 14px;
}

.admin-amenities-resource-mobile-title {
    line-height: 1.25;
    word-break: break-word;
}

.admin-amenities-resource-mobile-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    font-size: 0.9rem;
}

    .admin-amenities-resource-mobile-row:last-child {
        border-bottom: none;
    }

    .admin-amenities-resource-mobile-row span {
        opacity: 0.75;
        min-width: 95px;
    }

    .admin-amenities-resource-mobile-row strong {
        text-align: right;
        word-break: break-word;
    }

.admin-amenities-resource-mobile-actions {
    margin-top: 10px;
}

    .admin-amenities-resource-mobile-actions .mud-button-root {
        width: 100%;
        min-height: 42px;
    }

@media (max-width: 600px) {
    .admin-amenities-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .admin-amenities-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

        .admin-amenities-header .mud-typography-h4 {
            font-size: 2rem;
            line-height: 1.12;
        }

    .admin-amenities-back-button {
        width: 100%;
    }

    .admin-amenities-section-card,
    .admin-amenities-card {
        padding: 14px !important;
        border-radius: 16px !important;
        overflow-x: hidden;
    }

    .admin-amenities-actions,
    .admin-amenities-resource-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .admin-amenities-actions .mud-button-root,
        .admin-amenities-resource-actions .mud-button-root {
            width: 100%;
            min-height: 42px;
            white-space: normal;
        }

    .admin-amenities-resource-desktop-table {
        display: none !important;
    }

    .admin-amenities-resource-mobile-list {
        display: block !important;
    }
}


/* =========================================================
   Identity Login Page - Concierge theme
   File: Areas/Identity/Pages/Account/Login.cshtml
   ========================================================= */

.login-page-shell {
    min-height: calc(100vh - 80px);
    margin: -16px -12px 0 -12px;
    padding: 48px 16px;
    background: radial-gradient(circle at top left, rgba(0, 172, 193, 0.22), transparent 32%), linear-gradient(135deg, #263238 0%, #111827 48%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-page-card {
    width: 100%;
    max-width: 460px;
    border-radius: 22px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-brand-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    margin: 0 auto 14px auto;
    background: #263238;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.login-brand h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: #263238;
}

.login-brand p {
    margin: 6px 0 0 0;
    color: #64748b;
    font-size: 0.95rem;
}

.login-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #263238;
    margin-bottom: 16px;
}

.login-page-card .form-control {
    border-radius: 12px;
    min-height: 52px;
}

.login-page-card .form-floating > label {
    color: #64748b;
}

.login-page-card .btn-primary {
    background-color: #263238;
    border-color: #263238;
    border-radius: 14px;
    min-height: 48px;
    font-weight: 700;
}

    .login-page-card .btn-primary:hover {
        background-color: #37474f;
        border-color: #37474f;
    }

.login-links {
    margin-top: 18px;
    display: grid;
    gap: 8px;
    text-align: center;
}

    .login-links a {
        color: #007c91;
        text-decoration: none;
        font-weight: 600;
    }

        .login-links a:hover {
            text-decoration: underline;
        }

.login-external-box {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(100, 116, 139, 0.25);
}

.login-validation {
    margin-bottom: 14px;
}

@media (max-width: 600px) {
    .login-page-shell {
        min-height: calc(100vh - 64px);
        padding: 24px 12px;
        align-items: flex-start;
    }

    .login-page-card {
        padding: 22px;
        border-radius: 18px;
    }

    .login-brand h1 {
        font-size: 1.45rem;
    }

    .login-brand p {
        font-size: 0.88rem;
    }
}

/* =========================================================
   Identity public layout shell
   File: Areas/Identity/Pages/_Layout.cshtml
   ========================================================= */

.identity-shell-body {
    margin: 0;
    background: #0f172a;
    min-height: 100vh;
}

.identity-public-navbar {
    background: #0b111a;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.identity-public-brand {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.identity-public-icon {
    margin-right: 8px;
}

.identity-public-navbar .nav-link,
.identity-public-navbar a {
    color: rgba(255, 255, 255, 0.88) !important;
}

    .identity-public-navbar .nav-link:hover,
    .identity-public-navbar a:hover {
        color: #ffffff !important;
    }

.identity-main {
    min-height: calc(100vh - 58px);
}


/* =========================================================
   Identity message / confirmation cards
   Used by RegisterConfirmation, ConfirmEmail, Reset confirmations
   ========================================================= */

.login-message-box {
    border: 1px solid rgba(100, 116, 139, 0.25);
    border-radius: 14px;
    padding: 16px;
    background: rgba(241, 245, 249, 0.85);
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.5;
}

    .login-message-box strong {
        color: #263238;
    }

.login-message-actions {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}

    .login-message-actions .btn {
        border-radius: 14px;
        min-height: 44px;
        font-weight: 700;
    }

/* =========================================================
   Custom Register Page
   Page: /register
   ========================================================= */

.register-page-shell {
    max-width: 760px;
    margin: 32px auto;
    padding: 0 12px;
}

.register-page-card {
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.register-page-title {
    font-weight: 700;
}

.register-page-subtitle {
    opacity: 0.82;
}

@media (max-width: 600px) {
    .register-page-shell {
        margin: 16px auto;
        padding: 0 10px;
    }

    .register-page-card {
        padding: 18px !important;
        border-radius: 18px;
    }
}


/* =========================================================
   Mobile App Shell / Bottom Navigation
   File: MainLayout.razor
   ========================================================= */

.mobile-bottom-nav {
    display: none;
}

.app-bar-title {
    min-width: 0;
}

@media (max-width: 768px) {
    .app-bar-title {
        max-width: calc(100vw - 145px);
        overflow: hidden;
    }

        .app-bar-title .mud-typography-h6,
        .app-bar-title .mud-typography-caption {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

    .mobile-app-content-container {
        padding-bottom: 96px !important;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1400;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        min-height: 66px;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        background: #263238;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.28);
    }

    .mobile-bottom-nav-item {
        border: 0;
        background: transparent;
        color: rgba(255, 255, 255, 0.74);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-size: 0.72rem;
        font-weight: 600;
        min-width: 0;
        padding: 4px 2px;
        border-radius: 12px;
    }

        .mobile-bottom-nav-item span {
            max-width: 100%;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .mobile-bottom-nav-item.active {
            color: #00acc1;
            background: rgba(0, 172, 193, 0.12);
        }

        .mobile-bottom-nav-item:active {
            transform: translateY(1px);
        }
}

/* =========================================================
   Forms Landing Page - responsive mobile layout
   Page: /forms
   ========================================================= */

.forms-page-shell {
    max-width: 1100px;
    margin: 24px auto;
    border-radius: 18px;
}

.forms-page-header {
    flex-wrap: wrap;
}

.forms-card {
    border-radius: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.forms-card-title {
    line-height: 1.25;
    word-break: break-word;
}

.forms-card-description {
    word-break: break-word;
}

.forms-card-chips {
    flex-wrap: wrap;
}

.forms-card-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .forms-card-actions .mud-button-root {
        min-height: 42px;
    }

@media (max-width: 600px) {
    .forms-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .forms-page-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

        .forms-page-header .mud-typography-h4 {
            font-size: 2rem;
            line-height: 1.12;
        }

    .forms-header-button {
        width: 100%;
        min-height: 42px;
        white-space: normal;
    }

    .forms-card-actions {
        flex-direction: column;
        align-items: stretch;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

        .forms-card-actions .mud-button-root {
            width: 100%;
            white-space: normal;
        }
}

/* =========================================================
   My Forms Page
   Page: /forms/my
   ========================================================= */

.forms-my-page-shell {
    max-width: 1100px;
    margin: 24px auto;
    border-radius: 18px;
}

@media (max-width: 600px) {
    .forms-my-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }
}

/* =========================================================
   Admin Forms Review Page
   Page: /admin/forms
   ========================================================= */

.admin-forms-page-shell {
    max-width: 1200px;
    margin: 24px auto;
    border-radius: 18px;
}

.admin-form-review-panel {
    border-radius: 16px;
}

    .admin-form-review-panel .mud-typography,
    .admin-form-review-panel a {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

.admin-form-review-actions {
    flex-wrap: wrap;
}

    .admin-form-review-actions .mud-button-root {
        min-height: 42px;
    }

@media (max-width: 600px) {
    .admin-forms-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .admin-form-review-panel {
        padding: 14px !important;
        border-radius: 16px !important;
        overflow-x: hidden;
    }

    .admin-form-review-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .admin-form-review-actions .mud-button-root {
            width: 100%;
            white-space: normal;
        }
}

/* =========================================================
   Resident Form Detail Pages
   Example: /forms/moveinout/{FormId:int}
   ========================================================= */

.form-detail-page-shell {
    max-width: 1000px;
    margin: 24px auto;
    border-radius: 18px;
}

.form-detail-header {
    flex-wrap: wrap;
}

.form-detail-upload-actions,
.form-detail-submit-actions,
.form-detail-file-row {
    flex-wrap: wrap;
}

.form-detail-section-card {
    border-radius: 14px;
}

.form-detail-file-name {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.form-detail-upload-actions .mud-button-root,
.form-detail-submit-actions .mud-button-root {
    min-height: 42px;
}

@media (max-width: 600px) {
    .form-detail-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .form-detail-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

        .form-detail-header .mud-typography-h4 {
            font-size: 2rem;
            line-height: 1.12;
        }

    .form-detail-back-button {
        width: 100%;
        min-height: 42px;
    }

    .form-detail-upload-actions,
    .form-detail-submit-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .form-detail-upload-actions .mud-button-root,
        .form-detail-submit-actions .mud-button-root {
            width: 100%;
            white-space: normal;
        }

    .form-detail-file-row {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .form-detail-file-row .mud-button-root {
            width: 100%;
        }

    .form-detail-section-card {
        padding: 14px !important;
        overflow-x: hidden;
    }
}

/* =========================================================
   Form Submission View
   Page: /forms/view/{SubmissionId:int}
   ========================================================= */

.form-view-detail-line {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
}

.form-view-section-title {
    line-height: 1.25;
    word-break: break-word;
}

/* =========================================================
   Documents Pages
   Pages: /documents and /admin/documents
   ========================================================= */

.documents-page-shell,
.admin-documents-page-shell {
    max-width: 1200px;
    margin: 24px auto;
    border-radius: 18px;
}

.admin-documents-upload-panel,
.admin-documents-existing-panel,
.admin-documents-ai-panel {
    border-radius: 16px;
}

.document-file-name,
.documents-page-shell .mobile-card-meta,
.admin-documents-page-shell .mobile-card-meta {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-documents-actions {
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .documents-page-shell,
    .admin-documents-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .admin-documents-upload-panel,
    .admin-documents-existing-panel,
    .admin-documents-ai-panel {
        padding: 14px !important;
        border-radius: 16px !important;
        overflow-x: hidden;
    }

    .admin-documents-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .admin-documents-actions .mud-button-root {
            width: 100%;
            min-height: 42px;
            white-space: normal;
        }
}

/* =========================================================
   Dashboard Polish
   Page: /dashboard
   ========================================================= */

.dashboard-shell {
    border-radius: 18px;
}

.dashboard-header-card,
.dashboard-section-card,
.dashboard-kpi-card,
.dashboard-open-items-card {
    border-radius: 16px;
}

.dashboard-kpi-card {
    height: 100%;
}

    .dashboard-kpi-card .mud-card-content {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .dashboard-kpi-card .mud-button-root {
        align-self: flex-start;
        min-height: 38px;
    }

.dashboard-quick-actions {
    flex-wrap: wrap;
}

    .dashboard-quick-actions .mud-button-root {
        min-height: 42px;
    }

.dashboard-mode-buttons {
    flex-wrap: wrap;
}

.dashboard-mode-button {
    min-height: 36px;
}

.dashboard-split-row {
    flex-wrap: wrap;
    gap: 12px;
}

    .dashboard-split-row .mud-button-root {
        min-height: 42px;
    }

.dashboard-building-row {
    flex-wrap: wrap;
}

.dashboard-building-title,
.dashboard-intro,
.mobile-issue-description,
.concierge-chat-bubble {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.mobile-issue-list {
    display: none;
}

.mobile-label {
    display: none;
}

.desktop-label {
    display: inline;
}

@media (max-width: 600px) {
    .dashboard-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .dashboard-header-card,
    .dashboard-section-card,
    .dashboard-open-items-card {
        padding: 14px !important;
        border-radius: 16px !important;
        overflow-x: hidden;
    }

    .dashboard-header-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
    }

    .dashboard-building-row {
        align-items: flex-start !important;
    }

    .dashboard-building-title {
        font-size: 1.1rem;
        line-height: 1.2;
    }

    .dashboard-role-chip {
        margin-top: 2px;
    }

    .dashboard-mode-buttons {
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px !important;
    }

        .dashboard-mode-buttons .mud-button-root {
            width: 100%;
            min-width: 0;
            white-space: normal;
        }

    .dashboard-kpi-card {
        border-radius: 16px !important;
    }

        .dashboard-kpi-card .mud-button-root {
            width: 100%;
            align-self: stretch;
            white-space: normal;
        }

    .dashboard-quick-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .dashboard-quick-actions .mud-button-root {
            width: 100%;
            white-space: normal;
        }

    .dashboard-split-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }

        .dashboard-split-row .mud-button-root {
            width: 100%;
            white-space: normal;
        }

    .desktop-label {
        display: none;
    }

    .mobile-label {
        display: inline;
    }

    .mobile-issue-list {
        display: block;
    }

    .mobile-issue-card {
        border-radius: 14px !important;
        margin-bottom: 10px;
    }

        .mobile-issue-card .mud-button-root {
            width: 100%;
            min-height: 42px;
        }

    .concierge-chat-launcher {
        bottom: 82px !important;
        right: 12px !important;
    }

    .concierge-fab {
        min-height: 44px;
        border-radius: 999px !important;
    }

    .concierge-chat-window {
        left: 10px !important;
        right: 10px !important;
        bottom: 82px !important;
        width: auto !important;
        max-width: none !important;
        max-height: calc(100vh - 150px) !important;
        border-radius: 18px !important;
    }

    .concierge-chat-suggestions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

        .concierge-chat-suggestions .mud-button-root {
            width: 100%;
            white-space: normal;
        }

    .concierge-chat-footer {
        gap: 6px;
    }

    .concierge-chat-send {
        min-width: 72px !important;
    }
}

.staff-edit-section-anchor {
    scroll-margin-top: 90px;
}

/* =========================================================
   My Profile Page
   Page: /my-profile
   ========================================================= */

.my-profile-page-shell {
    max-width: 900px;
    margin: 24px auto;
    border-radius: 18px;
}

.my-profile-section-card {
    border-radius: 14px;
}

.my-profile-actions {
    flex-wrap: wrap;
}

    .my-profile-actions .mud-button-root {
        min-height: 42px;
    }

@media (max-width: 600px) {
    .my-profile-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

        .my-profile-page-shell .mud-typography-h4 {
            font-size: 2rem;
            line-height: 1.12;
        }

    .my-profile-section-card {
        padding: 14px !important;
        border-radius: 16px !important;
    }

    .my-profile-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
    }

        .my-profile-actions .mud-button-root {
            width: 100%;
            white-space: normal;
        }
}

/* =========================================================
   Contacts Page
   Page: /contact
   ========================================================= */

.contact-page-shell {
    max-width: 1100px;
    margin: 24px auto;
    border-radius: 18px;
}

.contact-section-card {
    border-radius: 16px;
}

.contact-card {
    border-radius: 16px;
    height: 100%;
}

    .contact-card .mud-card-content {
        height: 100%;
    }

.contact-card-header {
    flex-wrap: wrap;
    gap: 6px;
}

.contact-card-title,
.contact-card-value,
.contact-card-notes {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.contact-link {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 600px) {
    .contact-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .contact-section-card {
        padding: 14px !important;
        border-radius: 16px !important;
        overflow-x: hidden;
    }

    .contact-card {
        border-radius: 16px !important;
    }
}

/* =========================================================
   Neighborhood Explorer
   Page: /neighborhood
   ========================================================= */

.neighborhood-page-shell {
    max-width: 1400px;
    margin: 24px auto;
    border-radius: 18px;
}

.neighborhood-page-header {
    flex-wrap: wrap;
    gap: 12px;
}

.neighborhood-actions,
.neighborhood-category-actions,
.neighborhood-map-actions {
    flex-wrap: wrap;
}

    .neighborhood-actions .mud-button-root,
    .neighborhood-category-actions .mud-button-root,
    .neighborhood-map-actions .mud-button-root {
        min-height: 42px;
    }

.neighborhood-map-panel {
    border-radius: 14px;
}

@media (max-width: 600px) {
    .neighborhood-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .neighborhood-page-header {
        flex-direction: column !important;
        align-items: stretch !important;
    }

        .neighborhood-page-header .mud-typography-h4 {
            font-size: 2rem;
            line-height: 1.12;
        }

    .neighborhood-actions,
    .neighborhood-category-actions,
    .neighborhood-map-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .neighborhood-actions .mud-button-root,
        .neighborhood-category-actions .mud-button-root,
        .neighborhood-map-actions .mud-button-root {
            width: 100%;
            white-space: normal;
        }

    .neighborhood-map-panel {
        padding: 14px !important;
        border-radius: 16px !important;
        overflow-x: hidden;
    }
}

/* =========================================================
   Broadcast AI Assistant
   Page: /admin/broadcast
   ========================================================= */

.broadcast-ai-toggle-row,
.broadcast-ai-actions {
    flex-wrap: wrap;
}

    .broadcast-ai-actions .mud-button-root {
        min-height: 42px;
    }

@media (max-width: 600px) {
    .broadcast-ai-toggle-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

        .broadcast-ai-toggle-row .mud-button-root,
        .broadcast-ai-actions .mud-button-root {
            width: 100%;
            white-space: normal;
        }

    .broadcast-ai-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
}


/* =========================================================
   Building Events - Resident Page
   Page: /events
   ========================================================= */

.events-page-shell {
    max-width: 1100px;
    margin: 24px auto;
    border-radius: 18px;
}

.events-page-header {
    flex-wrap: wrap;
    gap: 12px;
}

.event-card {
    border-radius: 16px;
}

.event-card-title,
.event-card-description,
.event-card-location {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.event-card-meta {
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 600px) {
    .events-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .events-page-header {
        flex-direction: column !important;
        align-items: stretch !important;
    }

        .events-page-header .mud-typography-h4 {
            font-size: 2rem;
            line-height: 1.12;
        }

        .events-page-header .mud-button-root {
            width: 100%;
            min-height: 42px;
            white-space: normal;
        }

    .event-card {
        border-radius: 16px !important;
    }
}

/* =========================================================
   Building Events - Admin Page
   Page: /admin/events
   ========================================================= */

.admin-events-page-shell {
    max-width: 1200px;
    margin: 24px auto;
    border-radius: 18px;
}

.admin-events-header,
.admin-events-list-header,
.admin-events-header-actions,
.admin-events-list-actions,
.admin-events-row-actions,
.admin-events-form-actions,
.mobile-card-chip-row {
    flex-wrap: wrap;
}

.admin-events-form-card,
.admin-events-list-card {
    border-radius: 16px;
}

.admin-events-mobile-list {
    display: none;
}

.mobile-card-title,
.mobile-card-meta {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 600px) {
    .admin-events-page-shell {
        margin: 12px !important;
        padding: 16px !important;
        border-radius: 16px !important;
        max-width: calc(100vw - 24px) !important;
        overflow-x: hidden;
    }

    .admin-events-header,
    .admin-events-list-header,
    .admin-events-header-actions,
    .admin-events-list-actions,
    .admin-events-form-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .admin-events-header .mud-typography-h4 {
            font-size: 2rem;
            line-height: 1.12;
        }

        .admin-events-header-actions .mud-button-root,
        .admin-events-list-actions .mud-button-root,
        .admin-events-form-actions .mud-button-root,
        .mobile-card-actions .mud-button-root {
            width: 100%;
            min-height: 42px;
            white-space: normal;
        }

    .admin-events-form-card,
    .admin-events-list-card {
        padding: 14px !important;
        border-radius: 16px !important;
        overflow-x: hidden;
    }

    .admin-events-mobile-list {
        display: block !important;
    }
}

/* =========================================================
   Dashboard Upcoming Events
   Page: /dashboard
   ========================================================= */

.dashboard-events-card {
    border-radius: 16px;
}

.dashboard-events-actions,
.dashboard-event-chip-row {
    flex-wrap: wrap;
}

.dashboard-event-item {
    border-radius: 14px;
    height: 100%;
}

.dashboard-event-title,
.dashboard-event-location {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 600px) {
    .dashboard-events-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

        .dashboard-events-actions .mud-button-root {
            width: 100%;
            min-height: 42px;
            white-space: normal;
        }

    .dashboard-event-item {
        border-radius: 16px !important;
    }
}
.concierge-chat-status {
    padding: 6px 16px 10px 16px;
    font-size: 0.78rem;
    opacity: 0.85;
}