/* Plannor OS — admin theme (Bootstrap 5 based) */
:root {
    --ng-sidebar-w: 264px;
    --ng-primary: #4f46e5;
    --ng-primary-rgb: 79, 70, 229;
    --ng-accent: #0ea5a4;
    --ng-sidebar-bg: #0f172a;
    --ng-sidebar-bg-2: #111c33;
    --ng-sidebar-fg: #cbd5e1;
    --ng-sidebar-active: #6366f1;
}

body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background-color: #f1f4f9;
    font-size: 0.925rem;
}
[data-bs-theme="dark"] body { background-color: #0b1120; }

/* ---------- Layout shell ---------- */
.ng-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--ng-sidebar-w);
    background: linear-gradient(180deg, var(--ng-sidebar-bg) 0%, var(--ng-sidebar-bg-2) 100%);
    color: var(--ng-sidebar-fg);
    display: flex; flex-direction: column;
    z-index: 1040;
    transition: transform .25s ease;
    overflow-y: auto;
}
.ng-sidebar::-webkit-scrollbar { width: 6px; }
.ng-sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }

.ng-brand {
    display: flex; align-items: center; gap: .6rem;
    padding: 1.15rem 1.25rem;
    color: #fff; font-weight: 700; font-size: 1.15rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.ng-brand .ng-logo {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--ng-primary), var(--ng-accent));
    display: grid; place-items: center; color: #fff; font-size: 1.1rem;
}
.ng-nav { padding: .75rem .6rem; flex: 1; }
.ng-nav .nav-section {
    text-transform: uppercase; font-size: .68rem; letter-spacing: .08em;
    color: #64748b; padding: .9rem .85rem .35rem;
}
.ng-nav .nav-link {
    display: flex; align-items: center; gap: .7rem;
    color: var(--ng-sidebar-fg);
    padding: .58rem .85rem; border-radius: 8px; margin-bottom: 2px;
    font-weight: 500; font-size: .9rem;
}
.ng-nav .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.ng-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.ng-nav .nav-link.active {
    background: var(--ng-sidebar-active);
    color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,.35);
}
.ng-nav .nav-link .badge { margin-left: auto; }

.ng-main { margin-left: var(--ng-sidebar-w); min-height: 100vh; transition: margin .25s ease; }

.ng-topbar {
    height: 64px; background: #fff;
    border-bottom: 1px solid #e5e9f2;
    display: flex; align-items: center; gap: 1rem;
    padding: 0 1.5rem; position: sticky; top: 0; z-index: 1030;
}
[data-bs-theme="dark"] .ng-topbar { background: #0f172a; border-color: #1e293b; }
.ng-content { padding: 1.5rem; }

@media (max-width: 991.98px) {
    .ng-sidebar { transform: translateX(-100%); }
    .ng-sidebar.show { transform: translateX(0); }
    .ng-main { margin-left: 0; }
}

/* ---------- Cards / KPIs ---------- */
.card { border: 1px solid #e8ecf4; border-radius: 14px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
[data-bs-theme="dark"] .card { border-color: #1e293b; background: #0f172a; }
.kpi-card { position: relative; overflow: hidden; }
.kpi-card .kpi-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: grid; place-items: center; font-size: 1.4rem;
}
.kpi-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.kpi-label { color: #64748b; font-size: .82rem; font-weight: 500; }
.tint-primary { background: rgba(79,70,229,.12); color: #4f46e5; }
.tint-success { background: rgba(16,163,127,.12); color: #059669; }
.tint-warning { background: rgba(245,158,11,.14); color: #d97706; }
.tint-danger  { background: rgba(239,68,68,.12);  color: #dc2626; }
.tint-info    { background: rgba(14,165,164,.14);  color: #0ea5a4; }

.avatar-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
    background: var(--ng-primary); color:#fff; display:grid; place-items:center; font-weight:600; font-size:.85rem; }

.btn-primary { --bs-btn-bg: var(--ng-primary); --bs-btn-border-color: var(--ng-primary);
    --bs-btn-hover-bg:#4338ca; --bs-btn-hover-border-color:#4338ca; }
a { color: var(--ng-primary); }

.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content:''; position:absolute; left:6px; top:4px; bottom:4px; width:2px; background:#e5e9f2; }
.timeline-item { position: relative; padding-bottom: 1rem; }
.timeline-item::before { content:''; position:absolute; left:-1.5rem; top:4px; width:12px; height:12px;
    border-radius:50%; background:#fff; border:2px solid var(--ng-primary); }
