/* Modern SaaS shell overrides (DashLite-based) */
:root {
    --rt-header-height: 64px;
    --rt-sidebar-radius: 12px;
    --rt-sidebar-link-radius: 10px;
    --rt-sidebar-border: rgba(15, 34, 58, 0.08);
    --rt-sidebar-surface: #ffffff;
    --rt-sidebar-text: rgba(15, 34, 58, 0.75);
    --rt-sidebar-muted: rgba(15, 34, 58, 0.55);
    --rt-sidebar-hover: rgba(7, 150, 229, 0.06);
    --rt-sidebar-active: rgba(7, 150, 229, 0.10);
    --rt-sidebar-active-border: var(--rt-primary, #0796e5);
}

.dark-mode {
    --rt-sidebar-border: rgba(255, 255, 255, 0.10);
    --rt-sidebar-surface: rgba(9, 14, 26, 0.92);
    --rt-sidebar-text: rgba(255, 255, 255, 0.90);
    --rt-sidebar-muted: rgba(255, 255, 255, 0.70);
    --rt-sidebar-hover: rgba(255, 255, 255, 0.06);
    --rt-sidebar-active: rgba(7, 150, 229, 0.18);
}

/* Fixed header height */
.nk-header.nk-header-fixed {
    height: var(--rt-header-height);
}

.nk-header.nk-header-fixed .nk-header-wrap {
    min-height: var(--rt-header-height);
    padding-top: 0;
    padding-bottom: 0;
}

/* Sidebar surface + flat menu treatment (branding aware via .is-light/.is-dark) */
.nk-sidebar {
    background: var(--rt-sidebar-surface);
    border-right: 1px solid var(--rt-sidebar-border);
    box-shadow: 0 10px 35px rgba(15, 34, 58, 0.06);
}

.nk-sidebar.is-light {
    --rt-sidebar-surface: #ffffff;
}

.nk-sidebar.is-dark {
    --rt-sidebar-surface: radial-gradient(circle at top, rgba(18, 35, 65, 0.96) 0%, rgba(11, 23, 43, 0.96) 45%, rgba(7, 12, 26, 0.98) 100%);
    --rt-sidebar-text: rgba(255, 255, 255, 0.92);
    --rt-sidebar-muted: rgba(255, 255, 255, 0.70);
    --rt-sidebar-hover: rgba(255, 255, 255, 0.08);
    --rt-sidebar-active: rgba(7, 150, 229, 0.18);
    --rt-sidebar-border: rgba(255, 255, 255, 0.10);
}

.nk-sidebar .nk-menu-heading {
    color: var(--rt-sidebar-muted);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 11px;
    padding: 12px 16px 6px;
}

.nk-sidebar .nk-menu-link {
    border-radius: var(--rt-sidebar-link-radius);
    margin: 2px 10px;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
    color: var(--rt-sidebar-text);
    position: relative;
}

.nk-sidebar .nk-menu-link:hover {
    background: var(--rt-sidebar-hover);
}

.nk-sidebar .nk-menu-item.current > .nk-menu-link,
.nk-sidebar .nk-menu-item.active > .nk-menu-link {
    background: var(--rt-sidebar-active);
    color: var(--rt-sidebar-text);
}

.nk-sidebar .nk-menu-item.current > .nk-menu-link::before,
.nk-sidebar .nk-menu-item.active > .nk-menu-link::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 2px;
    background: var(--rt-sidebar-active-border);
}

.nk-sidebar .nk-menu-icon {
    opacity: 0.95;
}

.nk-sidebar .nk-menu-badge.badge-soft {
    border-radius: 999px;
}

/* Footer: minimal, modern */
.nk-footer {
    border-top: 1px solid rgba(15, 34, 58, 0.06);
    background: transparent;
}

.dark-mode .nk-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* Mobile drawer overlay */
.nk-sidebar-overlay {
    background: rgba(15, 34, 58, 0.45);
    backdrop-filter: blur(2px);
}

.dark-mode .nk-sidebar-overlay {
    background: rgba(0, 0, 0, 0.65);
}

/* Optional quick panel */
.nk-sidebar .sidebar-quick-panel {
    background: rgba(7, 150, 229, 0.06);
    border: 1px solid rgba(7, 150, 229, 0.10);
    border-radius: var(--rt-sidebar-radius);
    margin: 16px 14px 10px;
    padding: 14px;
}

.nk-sidebar .sidebar-quick-panel .label {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .75;
    display: block;
    margin-bottom: 8px;
}

.nk-sidebar .sidebar-quick-panel .quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--rt-sidebar-link-radius);
    background: rgba(255, 255, 255, 0.65);
    color: var(--rt-sidebar-text);
    text-decoration: none;
    margin-bottom: 8px;
    font-size: 13px;
    border: 1px solid rgba(15, 34, 58, 0.06);
}

.dark-mode .nk-sidebar .sidebar-quick-panel .quick-link {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
    color: var(--rt-sidebar-text);
}

.nk-sidebar .sidebar-quick-panel .quick-link:hover {
    background: rgba(7, 150, 229, 0.08);
}

.nk-sidebar .sidebar-quick-panel .copy-link-btn {
    width: 100%;
    border: 1px dashed rgba(15, 34, 58, 0.25);
    background: transparent;
    color: var(--rt-sidebar-text);
    border-radius: var(--rt-sidebar-link-radius);
    padding: 10px 12px;
    font-size: 13px;
    transition: border .2s ease, background .2s ease;
}

.dark-mode .nk-sidebar .sidebar-quick-panel .copy-link-btn {
    border-color: rgba(255, 255, 255, 0.25);
}

.nk-sidebar .sidebar-quick-panel .copy-link-btn:hover {
    border-color: rgba(7, 150, 229, 0.65);
    background: rgba(7, 150, 229, 0.08);
}
