/* Keep the three public roles balanced in login and registration choices. */
.auth-card .demo-login-grid,
.auth-card .auth-register-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    align-items: stretch;
}
.auth-card .demo-pill-btn {
    flex-direction: column;
    min-width: 0;
    min-height: 86px;
    padding: .75rem .5rem;
    gap: .45rem;
    text-align: center;
    white-space: normal;
}
.auth-card .demo-pill-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.auth-card .demo-pill-btn span { display: grid; place-items: center; min-height: 2.5em; line-height: 1.25; }
.auth-card .auth-register-links { margin-top: 1rem; }
.auth-card .auth-register-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 64px !important;
    padding: .7rem .5rem;
    border-width: 1px;
    border-radius: 10px;
    font-size: .8rem;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
}
.auth-card .auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1.5rem 0 1rem; }
.auth-card .auth-divider::before,
.auth-card .auth-divider::after { content: ''; position: static; flex: 1; height: 1px; background: #334155; }
.auth-card .auth-divider span { padding: 0; background: transparent !important; max-width: 80%; line-height: 1.5; }
.auth-card .demo-pill-btn:focus-visible,
.auth-card .auth-register-links a:focus-visible,
.sidebar .demo-switch-link:focus-visible { outline: 2px solid #22d3ee; outline-offset: 3px; }

/* A narrow sidebar reads better as three equal, full-width rows. */
.sidebar .demo-switch-grid { grid-template-columns: minmax(0, 1fr) !important; gap: .5rem !important; }
.sidebar .demo-switch-link { justify-content: flex-start !important; min-height: 44px; padding: .65rem .85rem !important; font-size: .82rem !important; }
.sidebar .demo-switch-link:not(.active) { color: #cbd5e1 !important; }
.sidebar .demo-switch-link:hover { color: #fff !important; }
.sidebar .demo-switch-label { color: #94a3b8 !important; }

@media (max-width: 600px) {
    .auth-card .demo-login-grid,
    .auth-card .auth-register-links { grid-template-columns: minmax(0, 1fr); }
    .auth-card .demo-pill-btn { flex-direction: row; min-height: 48px; padding: .7rem 1rem; }
    .auth-card .demo-pill-btn span { min-height: 0; }
    .auth-card .auth-register-links a { min-height: 48px !important; }
}

/* Only the navigation list scrolls; demo controls and sign-out stay in view. */
.dashboard-v2 .sidebar { height: 100dvh !important; overflow: hidden !important; }
.dashboard-v2 .sidebar-brand,
.dashboard-v2 .sidebar-demo-controls,
.dashboard-v2 .sidebar-footer { flex: 0 0 auto; }
.dashboard-v2 .sidebar-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto !important; }
.sidebar-demo-controls { padding: .5rem .85rem .75rem; border-bottom: 1px solid rgba(148,163,184,.12); }
.sidebar-demo-controls .demo-switch-label { padding: .25rem .5rem .5rem !important; }
.sidebar-demo-controls .demo-switch-grid { padding: 0 !important; }
.sidebar-footer .sidebar-footer-link { min-height: 44px; }
.demo-mode .sidebar { padding-bottom: 44px; }
.demo-mode .dashboard-container { padding-bottom: 44px; }
@media (max-width: 767px) {
    .demo-mode .sidebar { padding-bottom: 56px; }
    .demo-mode .dashboard-container { padding-bottom: 56px; }
}
