@import url('/css/workspace-list-standard.css');

/* Standard shell styling (header + shared UI) */
:root {
    --shell-bg: #fbf8f1;
    --shell-border: #ddd6c8;
    --shell-text: #111915;
    --shell-muted: #697770;
    --shell-accent: #0f7a61;
    --shell-accent-deep: #083f34;
    --shell-accent-soft: rgba(15, 122, 97, 0.11);
    --shell-sidebar: rgba(255, 253, 247, 0.94);
    --shell-header: rgba(255, 253, 247, 0.88);
    --shell-width: 280px;
    --shell-content-max-width: 100%;
    --shell-content-gutter-x: 0px;
    --shell-fab-right: clamp(0.95rem, 1.8vw, 1.5rem);
    --shell-fab-gap: clamp(0.9rem, 1.8vw, 1.35rem);
    --shell-visible-footer-height: 0px;
    --shell-fab-action-clearance: 0px;
    --shell-footer-height: 5.125rem;
    --shell-footer-padding-y: 1.25rem;
    --shell-footer-padding-x: 1.5rem;
    --shell-page-bg: #fbf8f1;
}

body {
    background:
        radial-gradient(circle at 8% 4%, rgba(215, 154, 55, 0.14), transparent 28rem),
        radial-gradient(circle at 86% 16%, rgba(15, 122, 97, 0.12), transparent 30rem),
        var(--shell-page-bg) !important;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: transparent;
}

.sidebar + .main-content {
    margin-left: var(--shell-width);
}

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

@media (max-width: 992px) {
    .sidebar + .main-content {
        margin-left: 0;
    }
}

.app-fab,
.admin-fab,
.leasing-fab,
.fab-container {
    position: fixed !important;
    right: var(--shell-fab-right) !important;
    bottom: calc(var(--shell-fab-gap) + var(--shell-visible-footer-height) + var(--shell-fab-action-clearance)) !important;
    z-index: 1200 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
    pointer-events: none;
}

.app-fab-trigger,
.fab-toggle,
.fab-btn,
.leasing-fab-trigger {
    width: 56px !important;
    height: 56px !important;
    min-height: 56px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: none !important;
    background: linear-gradient(135deg, var(--shell-accent-deep), var(--shell-accent)) !important;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.32rem !important;
    line-height: 1;
    font-weight: 500;
    text-decoration: none !important;
    box-shadow: 0 18px 34px -18px rgba(15, 122, 97, 0.85);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    pointer-events: auto;
}

.app-fab-trigger:hover,
.fab-toggle:hover,
.fab-btn:hover,
.leasing-fab-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 34px -20px rgba(15, 122, 97, 0.9);
}

.app-fab-trigger span,
.fab-toggle span,
.fab-btn span,
.leasing-fab-trigger span {
    display: none !important;
}

.app-fab-menu {
    min-width: 220px;
    padding: 0.6rem;
    border-radius: 18px;
    border: 1px solid var(--shell-border);
    background: rgba(255, 253, 247, 0.96);
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.14);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-fab.is-open .app-fab-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.app-fab-action {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 220px;
    padding: 0.78rem 0.88rem;
    border-radius: 14px;
    border: 1px solid transparent;
    background: rgba(255, 253, 247, 0.9);
    color: var(--shell-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.app-fab-action:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 122, 97, 0.22);
    background: #ffffff;
    color: var(--shell-accent);
}

.app-fab-action i {
    color: var(--shell-accent);
}

@media (max-width: 768px) {
    .app-fab,
    .admin-fab,
    .leasing-fab,
    .fab-container {
        right: 0.9rem !important;
    }

    .app-fab-trigger,
    .fab-toggle,
    .fab-btn,
    .leasing-fab-trigger {
        width: 52px !important;
        height: 52px !important;
        min-height: 52px !important;
    }
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 1rem;
    background: #111915;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    z-index: 2000;
}

.skip-link:focus {
    left: 1rem;
}

.shell-header {
    background: var(--shell-header);
    border-bottom: 1px solid var(--shell-border);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 900;
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 34px rgba(17, 25, 21, 0.07);
}

.shell-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--shell-text);
    letter-spacing: 0.01em;
}

.shell-title i {
    color: var(--shell-accent);
}

.shell-subtitle {
    font-size: 0.85rem;
    color: var(--shell-muted);
    margin-top: 0.2rem;
}

.shell-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.shell-inline-form {
    margin: 0;
}

.shell-action-primary,
.shell-action-secondary {
    border-radius: 10px;
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.shell-action-primary {
    background: linear-gradient(135deg, var(--shell-accent-deep), var(--shell-accent));
    color: #fff;
    border: 1px solid var(--shell-accent);
}

.shell-action-secondary {
    background: #fffdf7;
    color: var(--shell-text);
    border: 1px solid var(--shell-border);
}

.shell-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    background: #f5efe5;
    border-radius: 10px;
    border: 1px solid #ddd6c8;
    min-width: 180px;
}

.shell-search input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.85rem;
    color: var(--shell-text);
    width: 100%;
}

.shell-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--shell-border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--shell-text);
    position: relative;
}

.shell-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #EF4444;
    position: absolute;
    top: 6px;
    right: 6px;
}

.shell-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--shell-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
}

.shell-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.shell-user-meta {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    color: var(--shell-muted);
}

.shell-user-meta strong {
    font-size: 0.85rem;
    color: var(--shell-text);
    font-weight: 500;
}

.shell-dropdown-wrapper {
    position: relative;
}

.shell-dropdown {
    position: absolute;
    top: 44px;
    right: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--shell-border);
    border-radius: 12px;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
    padding: 0.75rem;
    z-index: 999;
    display: none;
}

.shell-dropdown.is-open {
    display: block;
}

.shell-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--shell-text);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.shell-dropdown-heading {
    font-size: 0.85rem;
    font-weight: 500;
}

.shell-dropdown-chip {
    font-size: 0.7rem;
    color: #697770;
    background: #f5efe5;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
}

.shell-dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.shell-dropdown-item {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    text-decoration: none;
    color: var(--shell-text);
    padding: 0.5rem;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.shell-dropdown-item:hover {
    background: #fbf8f1;
}

.shell-dropdown-item.unread .shell-dropdown-title {
    font-weight: 500;
}

.shell-dropdown-title {
    font-size: 0.85rem;
    font-weight: 500;
}

.shell-dropdown-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.shell-dropdown-icon--maintenance {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.shell-dropdown-icon--applications {
    background: rgba(15, 122, 97, 0.1);
    color: #0f7a61;
}

.shell-dropdown-icon--payments {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.shell-dropdown-icon--leasing {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.shell-dropdown-icon--compliance {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.shell-dropdown-sub {
    font-size: 0.75rem;
    color: var(--shell-muted);
    margin-top: 0.1rem;
}

.shell-dropdown-meta {
    font-size: 0.7rem;
    color: #697770;
    margin-top: 0.25rem;
}

.shell-dropdown-footer {
    justify-content: center;
    font-size: 0.75rem;
    color: var(--shell-muted);
}

.shell-dropdown .empty-state {
    padding: 1rem;
}

.shell-dropdown .empty-state i {
    font-size: 1.4rem;
}

.maintenance-notif-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.maintenance-notif-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.maintenance-notif-modal__panel {
    width: min(700px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #ddd6c8;
    border-radius: 20px;
    box-shadow: 0 35px 70px rgba(15, 23, 42, 0.35);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.2s ease;
}

.maintenance-notif-modal.show .maintenance-notif-modal__panel {
    transform: translateY(0) scale(1);
}

.maintenance-notif-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #ddd6c8;
    background: #fbf8f1;
}

.maintenance-notif-modal__header h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 500;
    color: #111915;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.01em;
}

.maintenance-notif-modal__close {
    border: 0;
    background: transparent;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #27342f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.maintenance-notif-modal__close:hover {
    background: #ddd6c8;
    color: #111915;
    transform: translateY(-1px);
}

.maintenance-notif-modal__body {
    padding: 1.15rem 1.25rem 1.1rem;
}

.maintenance-notif-modal__eyebrow {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #083f34;
    margin-bottom: 0.38rem;
}

.maintenance-notif-modal__title {
    font-size: 1.23rem;
    font-weight: 500;
    color: #111915;
    margin-bottom: 0.62rem;
    line-height: 1.32;
}

.maintenance-notif-modal__message {
    margin: 0 0 1rem;
    color: #27342f;
    line-height: 1.6;
    white-space: pre-wrap;
    font-size: 0.95rem;
    background: #fbf8f1;
    border: 1px solid #ddd6c8;
    border-radius: 12px;
    padding: 0.75rem 0.8rem;
}

.maintenance-notif-modal__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.maintenance-notif-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid #D6E2F1;
    background: #fbf8f1;
    color: #27342f;
    border-radius: 999px;
    padding: 0.24rem 0.66rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.maintenance-notif-pill--priority.is-urgent {
    color: #B91C1C;
    border-color: #FECACA;
    background: #FEF2F2;
}

.maintenance-notif-pill--priority.is-high {
    color: #B45309;
    border-color: #FDE68A;
    background: #FFFBEB;
}

.maintenance-notif-pill--priority.is-medium {
    color: #083f34;
    border-color: #BFDBFE;
    background: #EFF6FF;
}

.maintenance-notif-pill--priority.is-low {
    color: #27342f;
    border-color: #CBD5E1;
    background: #fbf8f1;
}

.maintenance-notif-pill--state.is-unread {
    color: #083f34;
    border-color: #BFDBFE;
    background: #EFF6FF;
}

.maintenance-notif-pill--state.is-read {
    color: #047857;
    border-color: #A7F3D0;
    background: #ECFDF5;
}

.maintenance-notif-modal__time {
    margin-top: 0.9rem;
    font-size: 0.79rem;
    color: #697770;
    font-weight: 500;
}

.maintenance-notif-modal__footer {
    border-top: 1px solid #ddd6c8;
    padding: 0.95rem 1.25rem 1.1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
}

.maintenance-notif-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    padding: 0.62rem 0.9rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.maintenance-notif-btn:focus-visible {
    outline: 2px solid rgba(15, 122, 97, 0.35);
    outline-offset: 2px;
}

.maintenance-notif-btn--ghost {
    color: #27342f;
    border-color: #D6E2F1;
    background: #ffffff;
}

.maintenance-notif-btn--ghost:hover {
    color: #111915;
    border-color: #BFD2E8;
    background: #fbf8f1;
    transform: translateY(-1px);
}

.maintenance-notif-btn--primary {
    color: #ffffff;
    border-color: #083f34;
    background: #083f34;
    box-shadow: 0 8px 18px rgba(15, 122, 97, 0.28);
}

.maintenance-notif-btn--hidden {
    display: none;
}

.maintenance-notif-btn--primary:hover {
    color: #ffffff;
    border-color: #071b16;
    background: #071b16;
    transform: translateY(-1px);
}

body.maintenance-notif-modal-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .maintenance-notif-modal {
        padding: 0.7rem;
    }
    .maintenance-notif-modal__panel {
        width: 100%;
        border-radius: 16px;
    }
    .maintenance-notif-modal__title {
        font-size: 1.08rem;
    }
    .maintenance-notif-modal__footer {
        flex-wrap: wrap;
        justify-content: stretch;
    }
    .maintenance-notif-btn {
        flex: 1;
        justify-content: center;
    }
}

.empty-state {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--shell-muted);
}

.empty-state i {
    font-size: 2rem;
    opacity: 0.4;
    display: block;
    margin-bottom: 0.6rem;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.data-table th {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #697770;
    padding: 1rem 1.25rem;
    text-align: left;
    background: #ffffff;
}

.data-table td {
    padding: 0 1.25rem;
    height: 72px;
    vertical-align: middle;
    background: #ffffff;
    box-shadow: inset 0 -1px 0 #f5efe5;
}

.data-table tbody tr:hover td {
    background: #fbf8f1;
}

.table-pagination {
    padding: 0.85rem 1rem;
    border-top: 1px solid #ddd6c8;
    background: rgba(248, 250, 252, 0.86);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.table-pagination-info {
    font-size: 0.8rem;
    color: #697770;
    font-weight: 500;
}

.table-pagination-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.table-pagination-pages {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.table-pagination-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 0.55rem;
    border-radius: 8px;
    border: 1px solid #D6E2F1;
    background: #ffffff;
    color: #1E293B;
    font-size: 0.79rem;
    font-weight: 500;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.table-pagination-btn:hover:not(:disabled) {
    border-color: #0f7a61;
    color: #083f34;
    background: rgba(15, 122, 97, 0.1);
}

.table-pagination-btn.is-active {
    border-color: #0f7a61;
    color: #ffffff;
    background: #0f7a61;
}

.table-pagination-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

@media (max-width: 768px) {
    .table-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .table-pagination-controls {
        justify-content: space-between;
    }
}

.logout-btn {
    width: 100%;
    padding: 0.65rem;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid var(--shell-border);
    border-radius: 10px;
    color: var(--shell-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1.35;
    text-decoration: none;
    appearance: none;
}

.logout-btn:link,
.logout-btn:visited {
    color: var(--shell-text);
    text-decoration: none;
}

.logout-btn:hover {
    background: rgba(15, 23, 42, 0.1);
    color: var(--shell-text);
    text-decoration: none;
}

.app-footer {
    background: #ffffff;
    border-top: 1px solid #ddd6c8;
    padding: var(--shell-footer-padding-y) var(--shell-footer-padding-x);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #697770;
    margin-top: auto;
    min-height: var(--shell-footer-height);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #111915;
}

.footer-brand i {
    color: #0f7a61;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #697770;
    text-decoration: none;
    font-size: 0.8rem;
}

.footer-links a:hover {
    color: #0f7a61;
}

.footer-copyright {
    color: #697770;
}

.nav-link:focus-visible,
.shell-action-primary:focus-visible,
.shell-action-secondary:focus-visible,
.logout-btn:focus-visible,
.shell-icon-btn:focus-visible,
.shell-search input:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 3px solid #083f34;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .app-footer {
        padding: 0.95rem 1rem;
    }

    .footer-links {
        gap: 0.85rem 1rem;
    }

    .app-fab-menu,
    .app-fab-action {
        min-width: min(220px, calc(100vw - 2rem));
    }
}

/* Shared quick actions: bounded two-column admin menu and faint centre divider. */
.app-fab-menu {
    max-height: calc(100dvh - 56px - 3 * var(--shell-fab-gap) - var(--shell-visible-footer-height) - var(--shell-fab-action-clearance));
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
}
.app-fab.is-open .app-fab-menu { visibility: visible; }
.app-fab-menu[data-fab-columns] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(34rem, calc(100vw - 2 * var(--shell-fab-right)));
    min-width: 0;
    gap: 0;
}
[data-fab-column] { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; padding-inline-end: 0.6rem; }
[data-fab-column] + [data-fab-column] { border-inline-start: 1px solid var(--shell-border); padding-inline-start: 0.6rem; padding-inline-end: 0; }
[data-fab-columns] .app-fab-action { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
