:root {
    --bz-primary: #005BFF;
    --bz-secondary: #0D6EFD;
    --bz-accent: #2EA8FF;
    --bz-bg: #F7FAFF;
    --bz-card: #FFFFFF;
    --bz-text: #1E293B;
    --bz-muted: #64748B;
    --bz-border: #E2E8F0;
    --bz-sidebar-width: 248px;
    --bz-sidebar-collapsed: 72px;
    --bz-navbar-height: 64px;
    --bz-radius: 14px;
    --bz-shadow: 0 10px 30px rgba(0, 91, 255, 0.08);
    --bz-gradient: linear-gradient(135deg, #005BFF 0%, #2EA8FF 100%);
    --bz-font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--bz-font);
    color: var(--bz-text);
    background: var(--bz-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--bz-primary); text-decoration: none; }
a:hover { color: var(--bz-secondary); }

/* Auth */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    background: var(--bz-bg);
}

.auth-visual {
    position: relative;
    overflow: hidden;
    background: var(--bz-gradient);
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-visual::before,
.auth-visual::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    animation: float 8s ease-in-out infinite;
}

.auth-visual::before {
    width: 320px; height: 320px; top: -80px; right: -60px;
}

.auth-visual::after {
    width: 220px; height: 220px; bottom: 40px; left: -40px;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

.auth-brand {
    position: relative;
    z-index: 2;
}

.auth-brand .logo-mark {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: rgba(255,255,255,0.18);
    display: grid; place-items: center;
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
}

.auth-brand h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 0.75rem;
}

.auth-brand p {
    max-width: 420px;
    opacity: 0.92;
    font-size: 1.05rem;
    line-height: 1.6;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bz-card);
    border: 1px solid var(--bz-border);
    border-radius: 24px;
    box-shadow: var(--bz-shadow);
    padding: 2.25rem;
    animation: fadeUp 0.55s ease;
}

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

.auth-card h2 {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

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

.form-control, .form-select {
    border-radius: 8px;
    border-color: #E2E8F0;
    padding: 0.55rem 0.8rem;
    color: var(--bz-text);
    font-size: 0.875rem;
    background: #FFFFFF;
}

.form-control:focus, .form-select:focus {
    border-color: #BFDBFE;
    box-shadow: 0 0 0 3px rgba(0, 91, 255, 0.08);
}

.btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 0.95rem;
}

.btn-primary {
    background: var(--bz-primary);
    border: none;
    box-shadow: none;
}

.btn-primary:hover, .btn-primary:focus {
    background: #0046CC;
    border: none;
}

.btn-soft {
    background: #F3F6FB;
    color: #475569;
    border: 1px solid transparent;
}

.btn-soft:hover { background: #E8EEF7; color: #0F172A; }

/* App shell */
.app-shell {
    min-height: 100vh;
    display: flex;
    background: #F7F8FA;
}

.sidebar {
    width: var(--bz-sidebar-width);
    background: #FFFFFF;
    border-right: 1px solid #EEF2F7;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease, transform 0.25s ease;
}

.sidebar.collapsed { width: var(--bz-sidebar-collapsed); }

.sidebar-brand {
    height: var(--bz-navbar-height);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0 1rem;
    border-bottom: 1px solid #EEF2F7;
    flex-shrink: 0;
}

.sidebar-brand .mark {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: var(--bz-gradient);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.sidebar-brand .brand-logo {
    height: 34px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
}

.sidebar.collapsed .brand-logo {
    height: 28px;
    max-width: 34px;
}

.sidebar-brand .brand-text { overflow: hidden; white-space: nowrap; }
.sidebar-brand .brand-text strong { display: block; font-size: 0.9rem; font-weight: 700; color: var(--bz-text); }
.sidebar-brand .brand-text small { color: var(--bz-muted); font-size: 0.68rem; }

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-footer-card,
.sidebar.collapsed .chevron,
.sidebar.collapsed .sidebar-submenu,
.sidebar.collapsed .sidebar-panel-setup { display: none !important; }

.sidebar-panels {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.sidebar-panel-main {
    flex: 1;
    min-height: 0;
}

.sidebar.setup-mode .sidebar-panel-main { display: none; }
.sidebar.setup-mode .sidebar-footer-card { display: none; }

.sidebar-panel-setup {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.65rem 0.55rem 1rem;
    background: #FFFFFF;
    scrollbar-width: thin;
}

.sidebar-panel-setup .setup-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0.65rem 0.75rem;
    margin: 0 0.2rem 0.35rem;
    border-bottom: 1px solid #EEF2F7;
}

.sidebar-panel-setup .setup-nav-head strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--bz-text);
    letter-spacing: 0;
}

.sidebar-panel-setup .setup-nav-close {
    border: 0;
    background: transparent;
    color: #94A3B8;
    font-size: 1.25rem;
    line-height: 1;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-panel-setup .setup-nav-close:hover {
    color: #0F172A;
    background: #F3F6FB;
}

.sidebar-panel-setup .setup-sidebar-menu {
    display: flex;
    flex-direction: column;
}

.sidebar-panel-setup .setup-acc-top,
.sidebar-panel-setup .setup-acc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    width: calc(100% - 0.4rem);
    margin: 0.08rem 0.2rem;
    padding: 0.48rem 0.65rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-panel-setup .setup-acc-top:hover,
.sidebar-panel-setup .setup-acc-toggle:hover {
    background: #F3F6FB;
    color: #0F172A;
}

.sidebar-panel-setup .setup-acc-top.active,
.sidebar-panel-setup .setup-acc-item.is-active > .setup-acc-toggle,
.sidebar-panel-setup .setup-acc-item.open > .setup-acc-toggle {
    background: #EEF4FF;
    color: var(--bz-primary);
    font-weight: 600;
}

.sidebar-panel-setup .setup-chevron {
    width: 14px;
    height: 14px;
    margin-left: auto;
    flex-shrink: 0;
    color: #CBD5E1;
    transition: transform 0.2s ease, color 0.12s ease;
}

.sidebar-panel-setup .setup-acc-item.open .setup-chevron,
.sidebar-panel-setup .setup-acc-item.is-active .setup-chevron {
    transform: rotate(90deg);
    color: var(--bz-primary);
}

.sidebar-panel-setup .setup-acc-top.active:hover,
.sidebar-panel-setup .setup-acc-item.is-active > .setup-acc-toggle:hover,
.sidebar-panel-setup .setup-acc-item.open > .setup-acc-toggle:hover {
    background: #EEF4FF;
    color: var(--bz-primary);
}

.sidebar-panel-setup .setup-acc-panel {
    display: grid;
    gap: 0.05rem;
    padding: 0.1rem 0 0.35rem 1.15rem;
}

.sidebar-panel-setup .setup-acc-link {
    display: block;
    padding: 0.38rem 0.55rem;
    margin-right: 0.25rem;
    border-radius: 6px;
    color: #64748B;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-panel-setup .setup-acc-link:hover {
    background: #F3F6FB;
    color: #0F172A;
}

.sidebar-panel-setup .setup-acc-link.active {
    background: #EEF4FF;
    color: var(--bz-primary);
    font-weight: 600;
}

.setup-shell--content {
    grid-template-columns: 1fr;
}


.sidebar-nav {
    padding: 0.65rem 0.55rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    scrollbar-width: thin;
}

.nav-section-title { display: none; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.48rem 0.65rem;
    border-radius: 8px;
    color: #475569;
    margin: 0.08rem 0.2rem;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.2;
    border: 0;
    background: transparent;
    width: calc(100% - 0.4rem);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #94A3B8;
    stroke-width: 1.7;
}

.sidebar-link:hover {
    background: #F3F6FB;
    color: #0F172A;
}

.sidebar-link:hover svg { color: #64748B; }

.sidebar-link.active {
    background: #EEF4FF;
    color: var(--bz-primary);
    font-weight: 600;
}

.sidebar-link.active svg { color: var(--bz-primary); }

.sidebar-group-toggle .chevron {
    width: 14px;
    height: 14px;
    margin-left: auto;
    color: #CBD5E1;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.sidebar-group.open > .sidebar-group-toggle .chevron,
.sidebar-group-toggle[aria-expanded="true"] .chevron {
    transform: rotate(90deg);
    color: var(--bz-primary);
}

.sidebar-submenu {
    display: none;
    padding: 0.1rem 0 0.35rem 2.15rem;
}

.sidebar-submenu.is-open { display: grid; gap: 0.05rem; }

.sidebar-sublink {
    display: block;
    padding: 0.38rem 0.55rem;
    border-radius: 6px;
    color: #64748B;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    margin-right: 0.25rem;
    transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-sublink:hover {
    background: #F3F6FB;
    color: #0F172A;
}

.sidebar-sublink.active {
    background: #EEF4FF;
    color: var(--bz-primary);
    font-weight: 600;
}

.sidebar-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    font-size: 0.78rem;
}

.sidebar-task-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-task-due {
    flex-shrink: 0;
    font-size: 0.68rem;
    color: #94A3B8;
    font-weight: 500;
}

.sidebar-footer-card {
    margin: 0.5rem 0.75rem 0.85rem;
    padding: 0.75rem 0.8rem;
    border-top: 1px solid #EEF2F7;
    flex-shrink: 0;
}

.sfc-title {
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--bz-text);
    margin-bottom: 0.15rem;
}

.sfc-meta {
    font-size: 0.72rem;
    color: var(--bz-muted);
    margin-bottom: 0.55rem;
}

.sfc-progress {
    height: 4px;
    background: #E8EEF7;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.sfc-progress-bar {
    height: 100%;
    background: var(--bz-primary);
    border-radius: 99px;
    transition: width 0.35s ease;
}

.sfc-pct {
    font-size: 0.68rem;
    color: var(--bz-muted);
    font-weight: 600;
}

.app-main {
    margin-left: var(--bz-sidebar-width);
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #F7F8FA;
    transition: margin-left 0.25s ease;
}

body.sidebar-collapsed .app-main { margin-left: var(--bz-sidebar-collapsed); }
body.sidebar-collapsed .sidebar { width: var(--bz-sidebar-collapsed); }
body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 0.55rem;
    margin: 0.1rem auto;
    width: 44px;
}
body.sidebar-collapsed .sidebar-link svg { margin: 0; }

.topbar {
    height: var(--bz-navbar-height);
    background: #FFFFFF;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid #EEF2F7;
    box-shadow: none;
}

.topbar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

.topbar .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: #64748B;
    display: grid;
    place-items: center;
    transition: background 0.12s ease, color 0.12s ease;
}

.topbar .btn-icon:hover {
    background: #F3F6FB;
    color: #0F172A;
}

.topbar .btn-quick {
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #334155;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
}

.topbar .btn-quick:hover {
    background: #F3F6FB;
    border-color: #CBD5E1;
    color: #0F172A;
}

.global-search {
    flex: 1;
    max-width: 420px;
    position: relative;
}

.global-search input {
    width: 100%;
    border: 1px solid #E8EEF7;
    border-radius: 8px;
    padding: 0.48rem 0.85rem 0.48rem 2.25rem;
    background: #F7F8FA;
    color: #334155;
    outline: none;
    font-size: 0.875rem;
}

.global-search input:focus {
    border-color: #BFDBFE;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(0, 91, 255, 0.08);
}

.global-search input::placeholder { color: #94A3B8; }
.global-search svg {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #94A3B8;
    z-index: 1;
    pointer-events: none;
}

.global-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    max-height: min(70vh, 480px);
    overflow: auto;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .14);
    z-index: 1040;
    padding: .4rem 0;
}

.global-search-meta,
.global-search-hint,
.global-search-empty {
    padding: .65rem 1rem;
    font-size: .8rem;
    color: #64748b;
}

.global-search-group-label {
    padding: .45rem 1rem .2rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #94A3B8;
}

.global-search-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0 .75rem;
    padding: .55rem 1rem;
    text-decoration: none;
    color: inherit;
    border-left: 3px solid transparent;
}
.global-search-item:hover,
.global-search-item.is-active {
    background: #F3F6FB;
    border-left-color: #005BFF;
}

.global-search-item-title {
    font-weight: 600;
    font-size: .875rem;
    color: #0F172A;
    grid-column: 1;
}
.global-search-item-sub {
    grid-column: 1;
    font-size: .78rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.global-search-item-meta {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: .7rem;
    color: #64748b;
    background: #F1F5F9;
    border-radius: 999px;
    padding: .15rem .5rem;
    text-transform: capitalize;
}

@media (max-width: 767.98px) {
    .global-search {
        max-width: none;
        flex: 1;
        min-width: 0;
    }
}

/* In-app dialogs & toasts (BzUi) */
.bz-toast-host {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 11050;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 2rem));
}
.bz-toast {
    pointer-events: auto;
    background: #0F172A;
    color: #fff;
    border-radius: 10px;
    padding: .7rem 1rem;
    font-size: .875rem;
    box-shadow: 0 12px 32px rgba(15,23,42,.2);
    opacity: 0;
    transform: translateY(-6px);
    transition: .18s ease;
}
.bz-toast.show { opacity: 1; transform: none; }
.bz-toast.tone-success { background: #166534; }
.bz-toast.tone-warning { background: #92400E; }
.bz-toast.tone-danger { background: #991B1B; }
.bz-toast.tone-info { background: #0F172A; }

.bz-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 11040;
    background: rgba(15, 23, 42, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.bz-dialog-backdrop.hidden { display: none !important; }
body.bz-dialog-open { overflow: hidden; }
.bz-dialog {
    width: min(420px, 100%);
    background: #fff;
    border-radius: 14px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 24px 60px rgba(15,23,42,.22);
    padding: 1.15rem 1.2rem 1rem;
}
.bz-dialog-title {
    margin: 0 0 .4rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0F172A;
}
.bz-dialog-body {
    margin: 0 0 1rem;
    color: #475569;
    font-size: .9rem;
    line-height: 1.45;
    white-space: pre-wrap;
}
.bz-dialog-input {
    width: 100%;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: .55rem .7rem;
    margin-bottom: 1rem;
    font-size: .9rem;
}
.bz-dialog-input:focus {
    outline: none;
    border-color: #BFDBFE;
    box-shadow: 0 0 0 3px rgba(0,91,255,.12);
}
.bz-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
}
.bz-dialog-btn {
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    color: #334155;
    font-weight: 600;
    font-size: .85rem;
    padding: .45rem .9rem;
    cursor: pointer;
}
.bz-dialog-btn:hover { background: #F1F5F9; }
.bz-dialog-ok {
    background: #005BFF;
    border-color: #005BFF;
    color: #fff;
}
.bz-dialog-ok:hover { background: #0047cc; border-color: #0047cc; }
.bz-dialog-cancel { background: #fff; }
.bz-dialog[data-tone="danger"] .bz-dialog-ok,
.bz-dialog-backdrop[data-tone="danger"] .bz-dialog-ok {
    background: #DC2626;
    border-color: #DC2626;
}
.bz-dialog-input.hidden,
.bz-dialog-cancel.hidden { display: none !important; }

.topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #E8EEF7;
}

.content-wrap {
    padding: 1.25rem 1.35rem 1.5rem;
    flex: 1;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.page-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    color: #0F172A;
}

.breadcrumb {
    margin: 0.2rem 0 0;
    background: transparent;
    padding: 0;
    font-size: 0.8rem;
}

.breadcrumb-item a { color: #64748B; }
.breadcrumb-item.active { color: #94A3B8; }

.card-bz {
    background: #FFFFFF;
    border: 1px solid #EEF2F7;
    border-radius: 10px;
    box-shadow: none;
}

.card-bz .card-header {
    background: transparent;
    border-bottom: 1px solid #EEF2F7;
    padding: 0.85rem 1.1rem;
    font-weight: 650;
    font-size: 0.92rem;
    color: #0F172A;
}

.card-bz .card-body { padding: 1.1rem; }
.stat-card {
    position: relative;
    overflow: hidden;
    padding: 1rem 1.1rem;
    height: 100%;
}

.stat-card .stat-icon {
    width: 38px; height: 38px;
    border-radius: 9px;
    display: grid; place-items: center;
    margin-bottom: 0.75rem;
    background: #EEF4FF;
    color: var(--bz-primary);
}

.stat-card .stat-label {
    color: var(--bz-muted);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.stat-card .stat-value {
    font-size: 1.35rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    margin-bottom: 0.15rem;
    color: #0F172A;
}

.stat-card .stat-meta { color: var(--bz-muted); font-size: 0.75rem; }

.stat-card::after { display: none; }

.table-bz {
    margin: 0;
}

.table-bz thead th {
    background: #FAFBFC;
    color: #64748B;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    border-bottom: 1px solid #EEF2F7;
    white-space: nowrap;
    padding: 0.7rem 0.85rem;
}

.table-bz td {
    vertical-align: middle;
    border-color: #EEF2F7;
    padding: 0.75rem 0.85rem;
    color: #334155;
    font-size: 0.875rem;
}

.avatar {
    width: 38px; height: 38px;
    border-radius: 12px;
    object-fit: cover;
}

.avatar-sm { width: 32px; height: 32px; border-radius: 10px; }

.badge-soft {
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-weight: 600;
    font-size: 0.75rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--bz-muted);
}

.dropdown-menu {
    border-radius: 14px;
    border-color: var(--bz-border);
    box-shadow: var(--bz-shadow);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 10px;
    padding: 0.55rem 0.8rem;
    font-weight: 500;
}

.alert {
    border-radius: 14px;
    border: none;
}

.permission-grid .form-check {
    padding: 0.45rem 0.25rem 0.45rem 1.75rem;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 12px; top: 0; bottom: 0;
    width: 2px;
    background: var(--bz-border);
}

.timeline-item {
    position: relative;
    padding-left: 2.25rem;
    margin-bottom: 1.25rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 6px; top: 4px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--bz-primary);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px rgba(0,91,255,0.2);
}

.footer-mini {
    color: var(--bz-muted);
    font-size: 0.75rem;
    padding: 0.85rem 1.35rem 1.25rem;
    border-top: 1px solid #EEF2F7;
    background: #FFFFFF;
}

.dropdown-menu {
    border: 1px solid #EEF2F7;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    padding: 0.35rem;
    font-size: 0.875rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.45rem 0.7rem;
    color: #475569;
}

.dropdown-item:hover {
    background: #F3F6FB;
    color: #0F172A;
}

@media (max-width: 991.98px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { min-height: 240px; padding: 2rem; }
    .sidebar {
        transform: translateX(-105%);
        width: var(--bz-sidebar-width) !important;
    }
    .sidebar.show { transform: translateX(0); }
    .app-main { margin-left: 0 !important; }
    body.sidebar-collapsed .sidebar { transform: translateX(-105%); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-backdrop {
        display: none;
        position: fixed; inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1035;
    }
    body.sidebar-open .sidebar-backdrop { display: block; }
}

/* Customer profile (Perfex-style) */
.customer-profile {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    align-items: start;
}
.customer-side-nav {
    position: sticky;
    top: 88px;
    overflow: hidden;
}
.customer-nav-list .list-group-item {
    border: 0;
    border-left: 3px solid transparent;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    color: var(--bz-text);
    background: transparent;
}
.customer-nav-list .list-group-item:hover {
    background: #F3F8FF;
    color: var(--bz-primary);
}
.customer-nav-list .list-group-item.active {
    background: #EEF4FF;
    color: var(--bz-primary);
    font-weight: 700;
    border-left-color: var(--bz-primary);
}
.customer-form-tabs .nav-link {
    color: var(--bz-muted);
    font-weight: 600;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.75rem 1rem;
}
.customer-form-tabs .nav-link.active {
    color: var(--bz-primary);
    background: transparent;
    border-bottom-color: var(--bz-primary);
}
.customer-zoho-form .cz-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    align-items: start;
    padding: .65rem 0;
    border-bottom: 1px solid #F1F5F9;
}
.customer-zoho-form .cz-label {
    font-size: .875rem;
    font-weight: 600;
    color: #334155;
    padding-top: .45rem;
    margin: 0;
}
.customer-zoho-form .cz-field { min-width: 0; }
.customer-zoho-form .cz-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #94A3B8;
    color: #64748B;
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
    margin-left: 4px;
    vertical-align: middle;
    cursor: help;
}
@media (max-width: 767.98px) {
    .customer-zoho-form .cz-row {
        grid-template-columns: 1fr;
        gap: .35rem;
    }
}
.form-check-input:checked {
    background-color: var(--bz-primary);
    border-color: var(--bz-primary);
}
@media (max-width: 991.98px) {
    .customer-profile { grid-template-columns: 1fr; }
    .customer-side-nav { position: static; }
    .customer-nav-list {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    .customer-nav-list .list-group-item {
        white-space: nowrap;
        border-left: 0;
        border-bottom: 3px solid transparent;
    }
    .customer-nav-list .list-group-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--bz-primary);
    }
}

.sales-list-card .table-bz thead th a:hover {
    color: var(--bz-primary) !important;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.module-tile {
    display: block;
    padding: 1.15rem 1.2rem;
    background: #fff;
    border: 1px solid var(--bz-border);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.module-tile:hover {
    border-color: #BFDBFE;
    box-shadow: 0 8px 20px rgba(0,91,255,.06);
    color: inherit;
}
.module-tile h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .35rem;
}
.module-tile p {
    margin: 0;
    color: var(--bz-muted);
    font-size: .85rem;
}

/* Setup panel */
.setup-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    min-height: 70vh;
}
.settings-side {
    background: #fff;
    border: 1px solid var(--bz-border);
    border-radius: 12px;
    padding: .75rem;
    max-height: calc(100vh - 7rem);
    overflow: auto;
    position: sticky;
    top: 1rem;
}
.setup-main { min-width: 0; }
.setup-main:has(.settings-side) {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1rem;
}
.settings-nav-group { margin-bottom: 1rem; }
.settings-nav-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #94A3B8;
    padding: .35rem .5rem;
}
.settings-nav-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .55rem;
    border-radius: 6px;
    color: #475569;
    font-size: .88rem;
    text-decoration: none;
}
.settings-nav-link:hover { background: #F8FAFC; color: var(--bz-text); }
.settings-nav-link.active { background: #EFF6FF; color: var(--bz-primary); font-weight: 600; }
.settings-nav-ico {
    width: 8px; height: 8px; border-radius: 50%;
    background: #CBD5E1; flex-shrink: 0;
}
.settings-nav-link.active .settings-nav-ico { background: var(--bz-primary); }
.setup-color-swatch {
    display: inline-block; width: 14px; height: 14px; border-radius: 3px;
    border: 1px solid var(--bz-border); vertical-align: middle; margin-right: .35rem;
}
.setup-logo-preview img { max-height: 48px; max-width: 100%; display: block; margin-bottom: .35rem; }
.setup-module-chip {
    display: flex; justify-content: space-between; align-items: center;
    padding: .75rem .9rem; border: 1px solid var(--bz-border); border-radius: 8px; background: #fff;
}
@media (max-width: 991.98px) {
    .setup-shell { grid-template-columns: 1fr; }
    .setup-nav, .settings-side { position: static; max-height: none; }
    .setup-main:has(.settings-side) { grid-template-columns: 1fr; }
}

/* Dashboard */
.dash-date-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: #EEF4FF;
    color: var(--bz-primary);
    font-size: 0.78rem;
    font-weight: 600;
}
.dash-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.25rem;
    padding: 1.35rem 1.45rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #005BFF 0%, #0D6EFD 48%, #2EA8FF 100%);
    color: #fff;
    box-shadow: 0 14px 34px rgba(0, 91, 255, 0.18);
}
.dash-hero-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 0.35rem;
}
.dash-hero-copy h2 {
    font-size: 1.45rem;
    font-weight: 750;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}
.dash-hero-copy p {
    margin: 0 0 0.9rem;
    opacity: 0.9;
    font-size: 0.92rem;
    max-width: 36rem;
}
.dash-hero-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dash-hero-actions .btn-outline-light {
    border-color: rgba(255,255,255,0.45);
    color: #fff;
}
.dash-hero-actions .btn-outline-light:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.dash-hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}
.dash-hero-stats > div {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    backdrop-filter: blur(6px);
}
.dash-hero-stats span {
    display: block;
    font-size: 0.72rem;
    opacity: 0.85;
    margin-bottom: 0.2rem;
}
.dash-hero-stats strong {
    font-size: 1.25rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}
.dash-hero-time {
    grid-column: 1 / -1;
}
.dash-hero-time strong {
    font-variant-numeric: tabular-nums;
    font-size: 1.35rem;
}
.dash-hero-time-meta {
    display: block;
    font-style: normal;
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 0.15rem;
}
.dash-hero-att-status {
    opacity: 0.88;
}
.dash-kpi {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--bz-border);
    border-radius: 14px;
    padding: 1.05rem 1.1rem;
    height: 100%;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    position: relative;
    overflow: hidden;
}
.dash-kpi::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--bz-primary);
}
.dash-kpi.tone-warning::before { background: #F59E0B; }
.dash-kpi.tone-accent::before { background: #2EA8FF; }
.dash-kpi.tone-success::before { background: #10B981; }
.dash-kpi:hover {
    border-color: #BFDBFE;
    box-shadow: 0 10px 24px rgba(0,91,255,0.08);
    transform: translateY(-1px);
    color: inherit;
}
.dash-kpi-label {
    color: var(--bz-muted);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.dash-kpi-value {
    font-size: 1.45rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: #0F172A;
    margin-bottom: 0.2rem;
}
.dash-kpi-meta { color: var(--bz-muted); font-size: 0.75rem; }
.dash-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}
.dash-mini {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--bz-border);
    border-radius: 12px;
    padding: 0.85rem 0.95rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
a.dash-mini:hover {
    border-color: #BFDBFE;
    box-shadow: 0 8px 18px rgba(0,91,255,0.06);
    color: inherit;
}
.dash-mini-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--bz-muted);
    margin-bottom: 0.2rem;
}
.dash-mini-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.02em;
}
.dash-mini-meta { font-size: 0.72rem; color: var(--bz-muted); margin-top: 0.15rem; }
.dash-legend {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--bz-muted);
    font-weight: 600;
}
.dash-legend i {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.dash-donut-legend {
    display: grid;
    gap: 0.35rem;
}
.dash-donut-legend > div {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: #64748B;
}
.dash-donut-legend .dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.dash-donut-legend strong {
    margin-left: auto;
    color: #0F172A;
    font-weight: 650;
}
.dash-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1.1rem;
    border-bottom: 1px solid #F1F5F9;
    text-decoration: none;
    color: inherit;
    transition: background .12s ease;
}
.dash-list-row:last-child { border-bottom: 0; }
a.dash-list-row:hover { background: #F8FAFC; color: inherit; }
.dash-list-row.static { cursor: default; }
.dash-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
@media (max-width: 1199.98px) {
    .dash-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .dash-hero { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .dash-mini-grid { grid-template-columns: 1fr; }
    .dash-hero-stats { grid-template-columns: 1fr 1fr; }
}

/* Domain manager */
.mw-form { max-width: 920px; }
.domain-row .row-actions {
    opacity: 0;
    transition: opacity .12s ease;
    margin-top: .15rem;
}
.domain-row:hover .row-actions { opacity: 1; }
.domain-row .row-actions a { text-decoration: none; }
.domain-row .row-actions .btn-link { font-size: inherit; text-decoration: none; }
.text-muted.fw-semibold { color: var(--bz-muted) !important; }

/* Uptime monitor */
.uptime-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.uptime-card {
    background: #fff;
    border: 1px solid var(--bz-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.uptime-card-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem 0.75rem;
}
.uptime-card-name { font-weight: 700; color: #0F172A; }
.uptime-card-url { font-size: 0.8rem; color: var(--bz-muted); word-break: break-all; }
.uptime-badge {
    display: inline-flex;
    align-items: center;
    height: fit-content;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: capitalize;
    flex-shrink: 0;
}
.uptime-badge.up { background: #DCFCE7; color: #166534; }
.uptime-badge.down { background: #FEE2E2; color: #991B1B; }
.uptime-badge.pending { background: #FEF3C7; color: #92400E; }
.uptime-card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 0.35rem 1.1rem 1rem;
}
.uptime-card-metrics span {
    display: block;
    font-size: 0.72rem;
    color: var(--bz-muted);
    margin-bottom: 0.15rem;
}
.uptime-card-metrics strong {
    font-size: 0.95rem;
    color: #0F172A;
}
.uptime-card-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.7rem 0.85rem;
    background: #F8FAFC;
    border-top: 1px solid #EEF2F7;
}
@media (max-width: 1199.98px) {
    .uptime-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .uptime-grid { grid-template-columns: 1fr; }
}

/* SEO Audit */
.seo-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    margin-right: 0.4rem;
    vertical-align: middle;
}
.seo-dot.success { background: #22C55E; }
.seo-dot.warning { background: #F59E0B; }
.seo-dot.danger { background: #EF4444; }

.seo-score-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
}
.seo-score-pill.success { background: #DCFCE7; color: #166534; }
.seo-score-pill.warning { background: #FEF3C7; color: #92400E; }
.seo-score-pill.danger { background: #FEE2E2; color: #991B1B; }

.seo-score-ring {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 10px solid #E2E8F0;
}
.seo-score-ring.success { border-color: #22C55E; }
.seo-score-ring.warning { border-color: #F59E0B; }
.seo-score-ring.danger { border-color: #EF4444; }
.seo-score-ring strong {
    font-size: 1.75rem;
    color: #0F172A;
    line-height: 1.1;
}
.seo-score-ring small {
    font-size: 0.85rem;
    color: var(--bz-muted);
    font-weight: 600;
}

.seo-issue-group-title {
    padding: 0.65rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bz-muted);
    background: #F8FAFC;
    border-top: 1px solid #EEF2F7;
}
.seo-issue-item {
    padding: 0.85rem 1rem 0.85rem 1.1rem;
    border-top: 1px solid #F1F5F9;
    border-left: 3px solid transparent;
}
.seo-issue-item.critical { border-left-color: #EF4444; }
.seo-issue-item.moderate { border-left-color: #F59E0B; }
.seo-issue-item.minor { border-left-color: #64748B; }

.seo-settings-tabs .nav-link {
    color: #94A3B8;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.6rem 1rem;
}
.seo-settings-tabs .nav-link.active {
    color: #0F172A;
    font-weight: 600;
    border-bottom-color: #0F172A;
    background: transparent;
}

/* Website Maintenance */
.wm-quicklink {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    padding: 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #F8FAFC;
    color: #0F172A;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: border-color .15s, background .15s;
}
.wm-quicklink:hover {
    border-color: #005BFF;
    background: #EFF6FF;
    color: #005BFF;
}
.wm-color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 0.35rem;
    border: 1px solid rgba(0,0,0,.08);
}

.zoho-side-nav .nav-link {
    color: #334155;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    font-weight: 500;
}
.zoho-side-nav .nav-link.active {
    background: #005BFF;
    color: #fff;
}

/* Mail (Gmail-like) */
.mail-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1rem;
    min-height: 70vh;
}
.mail-nav {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1rem;
}
.mail-folder-list { display: flex; flex-direction: column; gap: 0.15rem; }
.mail-folder-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
}
.mail-folder-link:hover { background: #F1F5F9; color: #0F172A; }
.mail-folder-link.active { background: #EFF6FF; color: #005BFF; font-weight: 700; }
.mail-badge {
    background: #005BFF;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    min-width: 1.35rem;
    text-align: center;
    padding: 0.1rem 0.35rem;
}
.mail-main {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.mail-toolbar { padding: 0.75rem 1rem; border-bottom: 1px solid #EEF2F7; }
.mail-search { max-width: 420px; }
.mail-list { flex: 1; }
.mail-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: stretch;
    border-bottom: 1px solid #F1F5F9;
}
.mail-row:hover { background: #F8FAFC; }
.mail-row.unread { background: #F8FBFF; }
.mail-row.unread .subj { font-weight: 800; color: #0F172A; }
.mail-row-link {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.7rem 1rem 0.7rem 0;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}
.mail-row-from { font-weight: 600; color: #0F172A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row.unread .mail-row-from { font-weight: 800; }
.mail-row-subject { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #334155; }
.mail-row-subject .preview { color: #94A3B8; font-weight: 400; }
.mail-row-meta { display: flex; align-items: center; gap: 0.4rem; color: #64748B; font-size: 0.8rem; white-space: nowrap; }
.mail-star-form { display: grid; place-items: center; }
.mail-star {
    border: 0;
    background: transparent;
    color: #CBD5E1;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}
.mail-star.on { color: #F59E0B; }
.mail-read { padding: 1.25rem 1.5rem; }
.mail-read-header { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #EEF2F7; }
.mail-attachments { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.mail-att-chip {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background: #F8FAFC;
    color: #0F172A;
    text-decoration: none;
    font-size: 0.85rem;
}
.mail-body {
    line-height: 1.6;
    color: #0F172A;
    overflow-x: auto;
    word-break: break-word;
}
.mail-body img { max-width: 100%; height: auto; }
.mail-compose .card-footer { background: #F8FAFC; border-top: 1px solid #EEF2F7; padding: 0.85rem 1.25rem; }
@media (max-width: 991.98px) {
    .mail-shell { grid-template-columns: 1fr; }
    .mail-row-link { grid-template-columns: 1fr auto; }
    .mail-row-from { grid-column: 1 / -1; }
}

/* Documentation */
.doc-preview {
    line-height: 1.65;
    color: #0B1220;
    font-size: 0.95rem;
    background: #EEF2F7;
    padding: 1.25rem !important;
}
.doc-sheet {
    background: #fff;
    border: 1px solid #E2E8F0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 1.5rem 1.75rem 1.25rem;
    max-width: 860px;
    margin: 0 auto;
}
.doc-sheet-meta {
    font-size: 0.75rem;
    color: #64748B;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    padding: 0.55rem 0.85rem;
    margin: 0.85rem 0 1.25rem;
}
.doc-sheet-meta strong { color: #0B1220; }
.doc-sheet-footer { margin-top: 1.5rem; }
.doc-preview h1 {
    color: #0B1220;
    letter-spacing: -0.02em;
}
.doc-preview h2 {
    color: #0B1220;
    font-size: 1.05rem;
}
.doc-preview table { width: 100%; }
.doc-preview img { max-height: 48px; }
.doc-letterhead-header img { max-height: 40px; }
.doc-sign-box {
    border: 1.5px dashed #94A3B8;
    padding: 20px;
    margin: 8px 0;
    color: #94A3B8;
    border-radius: 8px;
    min-height: 64px;
    text-align: center;
    font-size: 0.85rem;
    background: #F8FAFC;
}
.doc-qr {
    display: inline-block;
    border: 1px solid #E2E8F0;
    background: #fff;
    padding: 10px 14px;
    font-size: 0.75rem;
    color: #94A3B8;
    border-radius: 6px;
}

/* PWA install banner */
.pwa-install-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 1080;
}
.pwa-install-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #0B1220;
    color: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
    max-width: 560px;
    margin: 0 auto;
}
.pwa-install-icon {
    border-radius: 10px;
    flex-shrink: 0;
}
.pwa-install-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pwa-install-copy strong {
    font-size: 0.92rem;
}
.pwa-install-copy span {
    font-size: 0.78rem;
    color: #94A3B8;
}
.pwa-install-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
@media (max-width: 575.98px) {
    .pwa-install-inner { flex-wrap: wrap; }
    .pwa-install-actions { width: 100%; justify-content: flex-end; }
}

/* Notifications */
.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #EF4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.notif-dropdown {
    width: min(380px, calc(100vw - 24px));
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}
.notif-dropdown-head,
.notif-dropdown-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #F8FAFC;
    border-bottom: 1px solid #EEF2F7;
}
.notif-dropdown-foot {
    border-bottom: 0;
    border-top: 1px solid #EEF2F7;
}
.notif-dropdown-list {
    max-height: 360px;
    overflow: auto;
}
.notif-item {
    display: block;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #F1F5F9;
    text-decoration: none;
    color: inherit;
}
.notif-item:hover { background: #F8FAFC; }
.notif-item.unread { background: #EFF6FF; }
.notif-title { font-weight: 650; font-size: 0.9rem; }
.notif-body { font-size: 0.8rem; color: #64748B; margin-top: 2px; }
.notif-meta { font-size: 0.72rem; color: #94A3B8; margin-top: 6px; }
.notif-toast-host {
    position: fixed;
    top: 72px;
    right: 16px;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(340px, calc(100vw - 32px));
    pointer-events: none;
}
.notif-toast {
    background: #0B1220;
    color: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    border-left: 4px solid #005BFF;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
    opacity: 0;
    transform: translateY(-8px);
    transition: all .25s ease;
    pointer-events: auto;
}
.notif-toast.show { opacity: 1; transform: translateY(0); }
.notif-toast.border-success { border-left-color: #16A34A; }
.notif-toast.border-warning { border-left-color: #F59E0B; }
.notif-toast.border-danger { border-left-color: #EF4444; }
.notif-toast.border-primary { border-left-color: #005BFF; }
.notif-toast strong { display: block; margin-bottom: 4px; }

/* Global incoming chat call overlay (all app pages) */
.bz-global-call {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}
.bz-global-call[hidden] { display: none !important; }
.bz-global-call-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    width: min(360px, calc(100vw - 2rem));
    text-align: center;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
}
.bz-global-call-pulse {
    position: absolute;
    inset: 0.5rem;
    border-radius: 12px;
    border: 2px solid rgba(0, 91, 255, 0.4);
    animation: bzCallPulse 1.4s ease-out infinite;
    pointer-events: none;
}
.bz-global-call.is-ringing .bz-global-call-card { animation: bzCallShake 0.4s ease-in-out infinite alternate; }
@keyframes bzCallPulse {
    0% { transform: scale(0.96); opacity: 0.85; }
    100% { transform: scale(1.06); opacity: 0; }
}
@keyframes bzCallShake {
    from { transform: translateY(0); }
    to { transform: translateY(-2px); }
}
