* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--content-bg); overflow: hidden; height: 100vh; }

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

/* --- Unified Single Left Sidebar (260px Desktop, Slide-Over Drawer Mobile) --- */
.global-sidebar {
    width: var(--sidebar-width, 260px);
    min-width: var(--sidebar-width, 260px);
    background-color: var(--sidebar-bg, #0f172a);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    padding: 18px 14px 14px 14px;
    flex-shrink: 0;
    height: 100vh;
    overflow: hidden;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 4px;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 0;
}

.brand-box {
    width: 32px;
    height: 32px;
    background: var(--primary, #007a5a);
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
    overflow: hidden;
}

.brand-label {
    font-weight: 800;
    font-size: 16px;
    color: #ffffff;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-close-sidebar-btn {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.mobile-close-sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

/* Workspace / Organization Card & Switcher */
.sidebar-org-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-org-current {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-org-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #334155;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13.5px;
    flex-shrink: 0;
    overflow: hidden;
}
.sidebar-org-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-org-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-org-name {
    font-size: 13.5px;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-org-sub {
    font-size: 11.5px;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Compact Industry Suite Switcher */
.sidebar-suite-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-suite-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px;
}

.sidebar-suite-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.sidebar-suite-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar-all-suites-link {
    font-size: 11px;
    font-weight: 700;
    color: #34d399;
    text-decoration: none;
    transition: color 0.15s;
}
.sidebar-all-suites-link:hover {
    color: #6ee7b7;
    text-decoration: underline;
}

.sidebar-select {
    width: 100%;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #1e293b;
    color: #f8fafc;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}
.sidebar-select:hover,
.sidebar-select:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: #263449;
}
.sidebar-select option {
    background: #0f172a;
    color: #f8fafc;
}

/* Sidebar Navigation Middle (Scrollable) */
.nav-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0;
    min-height: 0;
}
.nav-list.scrollable {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}
.nav-list.scrollable::-webkit-scrollbar {
    width: 5px;
}
.nav-list.scrollable::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 4px;
}

.sidebar-section-label {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin: 14px 0 6px 10px;
}
.nav-list > .sidebar-section-label:first-child {
    margin-top: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border-radius: 9px;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav-link:hover {
    background: var(--sidebar-hover, #1e293b);
    color: #ffffff;
}
.nav-link.active {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.32);
    color: #ffffff;
    font-weight: 700;
}
.nav-link.active svg {
    color: #34d399;
}

.icon-frame {
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.link-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.org-box {
    width: 22px;
    height: 22px;
    background: #334155;
    color: #f8fafc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
}
.org-box.dashed {
    border: 1.5px dashed #64748b;
    background: transparent;
    color: #94a3b8;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 10px 4px;
}

/* --- Sidebar Bottom Footer --- */
.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    flex-shrink: 0;
}

.sidebar-utility-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 6px;
}

.sidebar-utility-row .nav-link {
    padding: 7px 8px;
    font-size: 12.5px;
    gap: 7px;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}
.sidebar-utility-row .nav-link:hover {
    background: var(--sidebar-hover, #1e293b);
    border-color: rgba(255, 255, 255, 0.14);
}

.sidebar-account-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    padding: 6px 8px;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 3px 4px;
    border-radius: 8px;
    text-decoration: none;
    flex: 1;
    min-width: 0;
    transition: background 0.15s;
}
.user-profile-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.base-sidebar-avatar {
    width: 28px;
    height: 28px;
    background: var(--primary, #007a5a);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #ffffff;
    font-size: 12px;
    flex-shrink: 0;
}

.user-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}
.u-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.u-role {
    font-size: 10.5px;
    color: #94a3b8;
    margin-top: 1px;
    font-weight: 600;
}

.logout-form-wrap {
    flex-shrink: 0;
}

.logout-link {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    padding: 6px 9px;
    border-radius: 7px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
    font-size: 11.5px;
    white-space: nowrap;
}
.logout-link:hover {
    color: #fda4af;
    background: rgba(244, 63, 94, 0.14);
    border-color: rgba(244, 63, 94, 0.3);
}

.sidebar-signin-link {
    justify-content: center;
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #ffffff;
    font-weight: 700;
}

/* --- Main Viewport & Clean Top Bar --- */
.main-viewport { flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.top-bar {
    height: 58px;
    background: #ffffff;
    border-bottom: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    flex-shrink: 0;
    position: relative;
    z-index: 2000;
}
.content-area { flex: 1; overflow-y: auto; overflow-x: hidden; min-width: 0; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    min-width: 0;
    overflow: hidden;
}
.b-link {
    color: #1e293b;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.15s;
}
.b-link:hover { background: #f0fdf4; color: #007a5a; }
.b-sep { color: #94a3b8; font-weight: 700; }
.b-current {
    color: #0f172a;
    font-weight: 800;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-bar-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.topbar-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 9px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.topbar-help-btn:hover {
    background: #f0fdf4;
    border-color: #86efac;
    color: #007a5a;
}

/* --- Commercial Sandbox & Trial Top Banners --- */
.commercial-top-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 24px;
    font-size: 12.5px;
    font-weight: 600;
    flex-shrink: 0;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    z-index: 1900;
}
.commercial-top-banner.sandbox-banner {
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
}
.commercial-top-banner.trial-banner {
    background: #ecfdf5;
    color: #065f46;
    border-bottom-color: #a7f3d0;
}
.commercial-banner-text {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}
.commercial-banner-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.35);
    white-space: nowrap;
}
.commercial-banner-pill.trial {
    background: #10b981;
    color: #ffffff;
    border-color: #059669;
}
.commercial-banner-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.commercial-banner-btn {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.commercial-banner-btn.primary {
    background: var(--primary, #10b981);
    color: #ffffff;
}
.commercial-banner-btn.primary:hover {
    filter: brightness(1.08);
}
.commercial-banner-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.commercial-banner-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* --- Landing Page Suite Switcher Compatibility --- */
.suite-switcher-wrap { position: relative; flex-shrink: 0; }
.suite-switcher-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
    border-radius: 10px; font-size: 14px; font-weight: 800; color: #0f172a;
    background: #ffffff; border: 1.5px solid #94a3b8;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06);
    cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
.suite-switcher-btn:hover { background: #f0fdf4; color: #007a5a; border-color: #007a5a; transform: translateY(-1px); }
.suite-btn-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.suite-dropdown-menu {
    display: none; position: absolute; top: calc(100% + 10px); right: 0;
    width: 310px; background: white; border: 1.5px solid #cbd5e1; border-radius: 18px;
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.22);
    padding: 10px; z-index: 6000; max-height: 82vh; overflow-y: auto;
}
.suite-dropdown-menu.open { display: block; }
.suite-dropdown-header {
    font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
    color: #475569; padding: 8px 12px 6px 12px;
}
.suite-dropdown-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 12px; text-decoration: none; color: #0f172a;
    transition: all 0.15s; border: 1px solid transparent;
}
.suite-item-logo {
    width: 34px; height: 34px; border-radius: 9px; object-fit: contain;
    background: #f8fafc; border: 1px solid #cbd5e1; padding: 4px; flex-shrink: 0;
}
.suite-dropdown-item div { display: flex; flex-direction: column; line-height: 1.3; }
.suite-dropdown-item strong { font-size: 14.5px; font-weight: 800; color: #0f172a; }
.suite-dropdown-item span { font-size: 12.5px; color: #334155; font-weight: 600; }
.suite-dropdown-item:hover { background: #f8fafc; border-color: #e2e8f0; }
.suite-dropdown-item.active { background: #f0fdf4; border-color: #bbf7d0; }
.suite-dropdown-divider { height: 1px; background: #f1f5f9; margin: 6px 4px; }

/* --- Mobile Menu Trigger, Backdrop & Bottom Nav --- */
.mobile-bottom-nav { display: none; }

.mobile-org-menu-btn {
    display: none;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    color: #0f172a;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
}
.mobile-org-menu-btn:hover { background: #f1f5f9; border-color: #94a3b8; }

.mobile-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    z-index: 4400;
}
.mobile-sidebar-backdrop.active { display: block; }

.table-scroll-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* --- Responsive Mobile Drawer & Top/Bottom Bars (<=900px) --- */
@media (max-width: 900px) {
    body { overflow-y: auto; height: auto; }
    .app-container { flex-direction: column; height: auto; min-height: 100vh; }

    .global-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px !important;
        min-width: 280px !important;
        max-width: 86vw;
        height: 100vh;
        height: 100dvh;
        z-index: 4500;
        transform: translateX(-105%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.45);
    }
    .global-sidebar.mobile-open {
        transform: translateX(0);
    }

    .mobile-close-sidebar-btn {
        display: inline-flex;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .brand-area,
    .sidebar-select,
    .sidebar-all-suites-link,
    .nav-link,
    .logout-link {
        min-height: 44px;
    }

    .sidebar-all-suites-link {
        display: inline-flex;
        align-items: center;
        padding: 0 8px;
    }

    .mobile-org-menu-btn {
        display: inline-flex;
        min-height: 44px;
        padding: 8px 12px;
    }
    .top-bar {
        padding: 0 12px;
        min-height: 56px;
        height: auto;
        gap: 8px;
    }
    .breadcrumb { font-size: 13px; gap: 5px; min-width: 0; overflow: hidden; }
    .topbar-help-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 8px 12px;
        font-size: 12.5px;
        justify-content: center;
    }
    .content-area { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

    .commercial-top-banner {
        padding: 8px 12px;
        gap: 8px;
    }
    .commercial-banner-text {
        font-size: 12px;
        gap: 6px;
        line-height: 1.35;
    }
    .commercial-banner-actions {
        width: 100%;
        display: flex;
        gap: 8px;
    }
    .commercial-banner-btn {
        flex: 1;
        justify-content: center;
        min-height: 40px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .mobile-bottom-nav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0;
        min-height: 62px;
        background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid #e2e8f0; z-index: 4000;
        align-items: center; justify-content: space-around;
        padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)) 4px;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
    }
    .mobile-bottom-item {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 3px; text-decoration: none; color: #475569; font-size: 10.5px; font-weight: 800;
        padding: 6px 8px; border-radius: 10px; transition: all 0.15s;
        min-width: 48px; min-height: 48px; flex: 1;
    }
    .mobile-bottom-item.active, .mobile-bottom-item:hover { color: #007a5a; background: #ecfdf5; }
}

@media (max-width: 480px) {
    .breadcrumb .b-root, .breadcrumb .b-sep { display: none; }
    .topbar-help-btn span { display: none; }
    .topbar-help-btn { padding: 8px; }
    .commercial-banner-text > span:not(.commercial-banner-pill) {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (max-width: 360px) {
    .mobile-bottom-item {
        font-size: 9.5px;
        padding: 6px 2px;
        white-space: nowrap;
        min-width: 0;
    }
}

/* --- Help Modal --- */
.help-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(8px); z-index: 10000;
    display: flex; align-items: center; justify-content: center; padding: 12px;
    opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease; pointer-events: none;
}
.help-modal-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }

.help-modal-content {
    width: min(500px, calc(100vw - 24px)); background: white; border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.3); overflow: hidden;
    transform: scale(0.96); opacity: 0;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s;
    pointer-events: auto;
}
.help-modal-overlay.active .help-modal-content { transform: scale(1); opacity: 1; }

.help-modal-header { padding: 24px 28px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid #f1f5f9; position: relative; user-select: none; }
.help-modal-icon { width: 46px; height: 46px; background: #f1f5f9; color: #0f172a; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.help-modal-title-group { flex-grow: 1; }
.help-modal-title { margin: 0; font-size: 18px; font-weight: 800; color: #0f172a; }
.help-modal-subtitle { margin: 2px 0 0 0; font-size: 13px; color: #64748b; font-weight: 600; }

.help-modal-actions { display: flex; gap: 8px; }
.help-modal-action-btn { background: transparent; border: none; color: #94a3b8; cursor: pointer; padding: 6px; border-radius: 8px; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.help-modal-action-btn:hover { color: #0f172a; background: #f1f5f9; }

.help-modal-body { padding: 28px; color: #475569; font-size: 15px; line-height: 1.6; max-height: 60vh; overflow-y: auto; }
.help-modal-body ul { padding-left: 20px; margin-top: 10px; }
.help-modal-body li { margin-bottom: 6px; }
.help-modal-footer { padding: 20px 28px; background: #f8fafc; display: flex; justify-content: flex-end; border-top: 1px solid #f1f5f9; }
.help-modal-btn { background: #0f172a; color: white; border: none; padding: 11px 22px; border-radius: 12px; font-weight: 700; font-size: 14px; cursor: pointer; transition: background 0.2s; }
.help-modal-btn:hover { background: #1e293b; }

@keyframes bell-ring {
    0% { transform: rotate(0); }
    5% { transform: rotate(15deg); }
    10% { transform: rotate(-15deg); }
    15% { transform: rotate(10deg); }
    20% { transform: rotate(-10deg); }
    25% { transform: rotate(5deg); }
    30% { transform: rotate(-5deg); }
    35% { transform: rotate(0); }
    100% { transform: rotate(0); }
}
.ringing-bell svg { animation: bell-ring 3s ease-in-out infinite; }

/* --- Dashboard Widgets --- */
.widget-grid { margin-bottom: 48px; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-bottom: 24px; }

.stat-card {
    background: white; border: 1px solid #e2e8f0; border-radius: 20px; padding: 24px;
    display: flex; align-items: center; gap: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); border-color: #cbd5e1; }

.s-icon {
    width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
}
.s-icon.medical { background: #eff6ff; }
.s-icon.workforce { background: #fff7ed; }
.s-icon.sales { background: #ecfdf5; }
.s-icon.crm { background: #faf5ff; }
.s-icon.dispatch { background: #ecfdf5; }
.s-icon.campus { background: #f1f5f9; }
.s-icon.recruit { background: #fdf2f8; }
.s-icon.asset { background: #f1f5f9; }
.s-icon.wait { background: #eff6ff; }
.s-icon.generic { background: #f1f5f9; }

.s-data { display: flex; flex-direction: column; }
.s-label { font-size: 13px; font-weight: 700; color: #64748b; margin-bottom: 4px; }
.s-value { font-size: 20px; font-weight: 800; color: #0f172a; }

.dashboard-alert {
    padding: 20px 24px; border-radius: 16px; display: flex; gap: 16px; align-items: center;
    margin-bottom: 24px; border: 1px solid transparent;
}
.hipaa-banner { background: #fef2f2; border-color: #fee2e2; color: #991b1b; }
.hipaa-banner .alert-icon { font-size: 24px; }
.hipaa-banner .alert-text strong { display: block; font-size: 15px; margin-bottom: 4px; }
.hipaa-banner .alert-text p { font-size: 13px; font-weight: 500; opacity: 0.9; }

.dashboard-action-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- Full-Width Single-Sidebar Workspace Frames --- */
.page-layout-with-sidebar {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: calc(100vh - 58px);
}

.vertical-page-layout {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: calc(100vh - 58px);
    background: #f8fafc;
}
.vertical-container {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 36px 44px 80px 44px;
    overflow-y: auto;
}
.vertical-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid #e2e8f0;
}
.vertical-title-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 680px;
}
.vertical-eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 8px;
    background: #dcfce7;
    color: #065f46 !important;
    font-size: 12.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.vertical-title-block h1,
.vertical-header-bar h1 {
    font-size: 30px !important;
    font-weight: 800 !important;
    letter-spacing: -0.025em;
    color: #0f172a !important;
    line-height: 1.2;
    margin: 0 !important;
}
.vertical-title-block p,
.vertical-header-bar p {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    line-height: 1.5;
    margin: 4px 0 0 0 !important;
}
.vertical-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* --- Openhour Signature Buttons (.v-btn) --- */
.v-btn, .v-btn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    border: 1.5px solid transparent;
}
.v-btn i {
    font-size: 14px;
}
.v-btn-secondary, .v-btn-secondary:visited {
    background: #ffffff;
    color: #1e293b !important;
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.v-btn-secondary:hover {
    background: #f0fdf4;
    color: #007a5a !important;
    border-color: #86efac;
    transform: translateY(-1px);
}
.v-btn-primary, .v-btn-primary:visited {
    background: #007a5a;
    color: #ffffff !important;
    border-color: #007a5a;
    box-shadow: 0 4px 12px rgba(0, 122, 90, 0.25);
}
.v-btn-primary:hover {
    background: #00664b;
    border-color: #00664b;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 122, 90, 0.35);
}

/* --- Signature KPI Stat Cards (.vertical-kpi-grid) --- */
.vertical-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}
.vertical-kpi-card, .v-kpi-card {
    background: #ffffff;
    border-radius: 16px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-left: 5px solid #007a5a !important;
    padding: 24px 26px;
    box-shadow: 0 4px 8px -1px rgba(15, 23, 42, 0.06) !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vertical-kpi-grid > :nth-child(2) {
    border-left-color: #0284c7 !important;
}
.vertical-kpi-grid > :nth-child(3) {
    border-left-color: #6366f1 !important;
}
.v-kpi-card:hover, .vertical-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.1) !important;
}
.v-kpi-label {
    font-size: 13.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #334155 !important;
}
.v-kpi-value {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #0f172a !important;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    margin: 2px 0;
}
.vertical-kpi-grid > :first-child .v-kpi-value {
    color: #007a5a !important;
}
.v-kpi-sub {
    font-size: 14px;
    font-weight: 600;
    color: #334155 !important;
}

/* --- Content Panels & Split Grid (.v-card) --- */
.vertical-split-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 24px;
    align-items: start;
}
.v-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 4px 8px -1px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    margin-bottom: 24px;
}
.v-card-header {
    padding: 20px 24px;
    border-bottom: 1.5px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: #ffffff;
}
.v-card-header h2 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.v-card-header h2::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 20px;
    border-radius: 4px;
    background: #007a5a;
}

/* --- Openhour Signature Data Tables (.v-table) --- */
.v-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.v-table thead th {
    padding: 16px 24px;
    background: #f1f5f9;
    border-bottom: 1.5px solid #cbd5e1;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1e293b !important;
    white-space: nowrap;
}
.v-table tbody td {
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 15.5px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    vertical-align: middle;
    transition: background 0.15s ease;
}
.v-table tbody tr:last-child td {
    border-bottom: none;
}
.v-table tbody tr:hover td {
    background: #f8fafc;
}

/* --- Soft-Tinted High-Contrast Badges (.v-badge) --- */
.v-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
}
.v-badge-info {
    background: #dcfce7;
    color: #065f46 !important;
    border-color: #86efac;
}
.v-badge-success {
    background: #d1fae5;
    color: #065f46 !important;
    border-color: #6ee7b7;
}
.v-badge-warning {
    background: #fef3c7;
    color: #92400e !important;
    border-color: #fcd34d;
}
.v-badge-danger {
    background: #fee2e2;
    color: #991b1b !important;
    border-color: #fca5a5;
}
.v-badge-neutral {
    background: #e0e7ff;
    color: #1e3a8a !important;
    border-color: #a5b4fc;
}

/* --- Empty States (.v-empty-state) --- */
.v-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #71717a;
}
.v-empty-state i {
    font-size: 20px;
    color: #a1a1aa;
    margin-bottom: 10px;
    display: block;
}
.v-empty-state h3 {
    font-size: 14px;
    font-weight: 600;
    color: #09090b;
    margin: 0 0 4px 0;
}
.v-empty-state p {
    font-size: 12.5px;
    color: #71717a;
    margin: 0;
}

/* --- Interactive Modals & Forms (.v-modal-*) --- */
.v-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(9, 9, 11, 0.45);
    backdrop-filter: blur(4px);
    z-index: 6500;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.v-modal-overlay.active {
    display: flex;
}
.v-modal-card {
    background: #ffffff;
    border-radius: 10px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
    border: 1px solid #e4e4e7;
}
.v-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e4e4e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.v-modal-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #09090b;
    margin: 0;
}
.v-modal-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.v-modal-footer {
    padding: 12px 20px;
    background: #fafafa;
    border-top: 1px solid #e4e4e7;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.v-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.v-form-group label {
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #3f3f46;
}
.v-input, .v-select, .v-textarea {
    width: 100%;
    padding: 8px 11px;
    border-radius: 6px;
    border: 1px solid #d4d4d8;
    background: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    color: #09090b;
    outline: none;
    transition: border-color 0.12s, box-shadow 0.12s;
}
.v-input:focus, .v-select:focus, .v-textarea:focus {
    border-color: #18181b;
    box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.08);
}

@media (max-width: 1024px) {
    .vertical-split-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .page-layout-with-sidebar,
    .vertical-page-layout { display: block; }
    .vertical-container { padding: 18px 14px calc(88px + env(safe-area-inset-bottom, 0px)) 14px !important; }
    .vertical-header-bar { flex-direction: column; align-items: stretch; gap: 14px; }
    .vertical-title-block h1,
    .vertical-header-bar h1 { font-size: 24px !important; }
    .vertical-title-block p,
    .vertical-header-bar p { font-size: 14.5px !important; }
    .vertical-actions { width: 100%; }
    .vertical-actions .v-btn { flex: 1 1 140px; min-height: 44px; white-space: normal; text-align: center; height: auto; padding: 10px 14px; }
    .vertical-kpi-grid { grid-template-columns: 1fr; gap: 12px; }
    .vertical-kpi-card, .v-kpi-card { padding: 18px 18px; }
    .v-kpi-value { font-size: 28px; }
    .vertical-split-grid { grid-template-columns: 1fr; gap: 14px; }
    .v-card-header { padding: 16px; }
    .v-modal-card { width: calc(100vw - 24px); max-width: 100%; }
    .v-input, .v-select, .v-textarea { min-height: 44px; font-size: 16px; padding: 10px 12px; }
    .v-modal-footer { flex-direction: column-reverse; gap: 8px; }
    .v-modal-footer .v-btn { width: 100%; }
    .v-table thead th, .v-table tbody td { padding: 10px 14px; }
}

/* --- Stacked Mobile Card Views for Vertical & Admin Tables (<=640px) --- */
@media (max-width: 640px) {
    .v-card .table-scroll-wrap {
        overflow-x: visible;
    }
    table.v-table,
    table.v-table tbody,
    table.v-table tr,
    table.v-table td {
        display: block;
        width: 100%;
        min-width: 0 !important;
    }
    table.v-table thead {
        display: none !important;
    }
    table.v-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
        background: #f8fafc;
    }
    table.v-table tbody tr {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 6px 14px;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    }
    table.v-table tbody tr.mobile-empty-row {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }
    table.v-table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 0 !important;
        border-bottom: 1px solid #f1f5f9 !important;
        font-size: 14px !important;
        text-align: right;
        word-break: break-word;
    }
    table.v-table tbody td:last-child {
        border-bottom: none !important;
    }
    table.v-table tbody td[data-label]::before {
        content: attr(data-label);
        font-size: 11.5px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #64748b;
        text-align: left;
        flex-shrink: 0;
        max-width: 46%;
    }
    table.v-table tbody tr.mobile-empty-row td {
        display: block;
        text-align: center;
        border-bottom: none !important;
    }
    table.v-table tbody tr.mobile-empty-row td::before {
        display: none;
    }
    .v-badge {
        white-space: normal;
        text-align: left;
    }
}
