:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --line: #dde3ef;
    --brand: #0f6cbd;
    --brand-soft: #deecf9;
    --text: #1f2937;
    --muted: #6b7280;
    --sidebar: #ffffff;
    --sidebar-line: #e5e7eb;
}
body { background: var(--bg); color: var(--text); font-family: Segoe UI, Arial, sans-serif; }
.shell { min-height: 100vh; display: flex; }
.sidebar { width: 270px; background: var(--sidebar); border-right: 1px solid var(--sidebar-line); position: sticky; top: 0; height: 100vh; }
.brand { display:flex; gap:12px; align-items:center; border-bottom:1px solid var(--sidebar-line); }
.brand-badge { width:44px; height:44px; background: linear-gradient(135deg, #0f6cbd, #3b82f6); color:#fff; border-radius:14px; display:flex; align-items:center; justify-content:center; font-weight:700; }
.nav-link { color: #334155; border-radius: 12px; margin: 4px 8px; padding: 10px 14px; display:flex; gap:10px; align-items:center; }
.nav-link.active, .nav-link:hover { background: var(--brand-soft); color: var(--brand); }
.main-area { flex:1; }
.topbar { background: rgba(255,255,255,0.88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.page-title { font-size: 1.5rem; font-weight: 700; }
.content-area { padding-top: 24px; }
.card-k { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 8px 22px rgba(15, 23, 42, .05); }
.stat-card { padding: 22px; }
.stat-value { font-size: 1.9rem; font-weight: 700; }
.status-pill { background:#ecfdf5; color:#047857; padding:8px 12px; border-radius:999px; font-size:.9rem; }
.table thead th { background:#eef4fb; color:#334155; border-bottom:1px solid var(--line); }
.form-section { background: var(--panel); border:1px solid var(--line); border-radius: 20px; padding: 22px; margin-bottom: 24px; }
.btn-brand { background: var(--brand); border-color: var(--brand); color:#fff; }
.btn-brand:hover { background:#0b5ea6; border-color:#0b5ea6; color:#fff; }
.login-wrap { min-height: 100vh; display:grid; place-items:center; background: radial-gradient(circle at top left, #deecf9, #f5f7fb 50%); }
.login-card { width:min(960px, 96vw); display:grid; grid-template-columns: 1.15fr .85fr; background:#fff; border:1px solid var(--line); border-radius: 28px; overflow:hidden; box-shadow:0 20px 60px rgba(15, 23, 42, .12); }
.login-hero { padding:48px; background: linear-gradient(135deg, #0f6cbd, #2563eb); color:#fff; }
.login-form { padding:48px; }
.module-toolbar { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:16px; }
@media (max-width: 991px) { .sidebar { display:none; } .login-card { grid-template-columns:1fr; } }

.dashboard-hero {
    background: linear-gradient(135deg, rgba(15,108,189,.12), rgba(59,130,246,.06));
    border: 1px solid rgba(15,108,189,.12);
}
.hero-badge {
    display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:999px;
    background:#fff; color:var(--brand); font-weight:600; border:1px solid rgba(15,108,189,.12);
}
.hero-title { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; }
.hero-text { max-width: 760px; }
.hero-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; }
.hero-mini-card {
    background:#fff; border:1px solid var(--line); border-radius:18px; padding:18px; box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}
.mini-label { color: var(--muted); font-size: .88rem; }
.mini-value { font-size: 1.6rem; font-weight: 700; margin-top: 6px; }
.stat-card--accent { background: linear-gradient(135deg, #0f6cbd, #2563eb); color:#fff; }
.stat-card--accent .text-secondary, .stat-card--accent .stat-sub { color: rgba(255,255,255,.85) !important; }
.stat-sub { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.chart-wrap { position: relative; height: 320px; }
.chart-wrap--donut { height: 320px; }
.dashboard-table tbody tr:last-child td { border-bottom: 0; }
.soft-pill {
    display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px;
    background:#eff6ff; color:#1d4ed8; font-size:.85rem; font-weight:600;
}
.task-summary-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px; }
.task-summary-card {
    background:#f8fafc; border:1px solid var(--line); border-radius:16px; padding:16px;
    display:flex; flex-direction:column; gap:8px;
}
.task-summary-card span { color: var(--muted); font-size:.85rem; }
.task-summary-card strong { font-size:1.5rem; }
.task-summary-card--warn { background:#fff7ed; }
.list-stack { display:flex; flex-direction:column; gap:12px; }
.list-card-row {
    display:flex; justify-content:space-between; align-items:center; gap:12px;
    border:1px solid var(--line); border-radius:16px; padding:14px 16px; background:#fff;
}
.online-dot { width:10px; height:10px; border-radius:50%; background:#22c55e; display:inline-block; box-shadow:0 0 0 4px rgba(34,197,94,.15); }
.quick-links-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; }
.quick-link-card {
    border:1px solid var(--line); border-radius:18px; padding:18px; background:#fff; color:var(--text); text-decoration:none;
    display:flex; flex-direction:column; gap:10px; min-height:112px; box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}
.quick-link-card:hover { border-color: rgba(15,108,189,.25); color: var(--brand); }
.quick-link-card i { font-size:1.4rem; }
.insight-card {
    display:flex; flex-direction:column; gap:10px; border:1px solid var(--line); border-radius:18px; padding:18px; background:#f8fbff;
}
.insight-line { display:flex; justify-content:space-between; gap:12px; }
.insight-line span { color:var(--muted); }
@media (max-width: 991px) {
    .hero-grid, .quick-links-grid, .task-summary-grid { grid-template-columns:1fr; }
    .hero-title { font-size: 1.55rem; }
}


.filter-shell { background: linear-gradient(180deg, #fbfdff, #ffffff); }
.filter-stats { display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap:12px; }
.filter-stat-card { background:#fff; border:1px solid var(--line); border-radius:16px; padding:16px; box-shadow: 0 8px 18px rgba(15,23,42,.04); }
.filter-stat-card span { display:block; color:var(--muted); font-size:.85rem; margin-bottom:8px; }
.filter-stat-card strong { font-size:1.35rem; font-weight:700; }
.filter-table thead th { white-space:nowrap; }
@media (max-width: 991px){ .filter-stats { grid-template-columns:1fr 1fr; } }
@media (max-width: 575px){ .filter-stats { grid-template-columns:1fr; } }


.dashboard-hero--xl .hero-kpi-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.hero-kpi-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;display:flex;flex-direction:column;gap:6px;box-shadow:0 8px 18px rgba(15,23,42,.04)}.hero-kpi-card span{color:var(--muted);font-size:.85rem}.hero-kpi-card strong{font-size:1.35rem}.hero-kpi-card small{color:var(--muted)}.hero-grid--stats{grid-template-columns:repeat(2,minmax(0,1fr))}.chart-wrap--xl{height:360px}.ops-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.ops-summary-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;display:flex;flex-direction:column;gap:8px;box-shadow:0 8px 18px rgba(15,23,42,.04)}.ops-summary-card span{color:var(--muted);font-size:.85rem}.ops-summary-card strong{font-size:1.55rem}.ops-summary-card small{color:var(--muted)}.ops-summary-card--warn{background:#fff7ed}.ops-summary-card--green{background:#ecfdf5}.filter-shell--customers .filter-stat-card small,.filter-shell .filter-stat-card small{display:block;color:var(--muted);margin-top:6px;font-size:.8rem}.metric-bar{display:grid;grid-template-columns:160px 1fr 60px;align-items:center;gap:12px}.metric-bar span{font-weight:600}.metric-bar-track{height:10px;background:#e8eef8;border-radius:999px;overflow:hidden}.metric-bar-fill{height:100%;background:#0f6cbd;border-radius:999px}.metric-bar-fill--green{background:#22c55e}.quote-item-mini{display:flex;align-items:center;gap:10px}.quote-item-mini img,.stock-thumb,.quote-item-thumb{width:54px;height:54px;object-fit:cover;border-radius:12px;border:1px solid #dbe2ef}.quote-item-thumb--empty{display:grid;place-items:center;background:#f8fafc;color:#94a3b8}.badge-soft{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;font-size:.83rem;font-weight:700}.badge-soft--slate{background:#f1f5f9;color:#334155}.badge-soft--blue{background:#dbeafe;color:#1d4ed8}.badge-soft--amber{background:#fef3c7;color:#92400e}.badge-soft--green{background:#dcfce7;color:#166534}.badge-soft--red{background:#fee2e2;color:#b91c1c}.badge-soft--purple{background:#ede9fe;color:#6d28d9}.quote-view-doc .quote-total-box{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-radius:18px;background:#eff6ff;border:1px solid #dbeafe}.quote-view-doc .quote-total-box strong{font-size:1.4rem}.quote-view-doc .quote-footer-view{padding:16px 18px;border-radius:16px;background:#f8fafc;border:1px solid var(--line)}.quote-list-table td{vertical-align:middle}@media (max-width:991px){.hero-kpi-row,.ops-summary-grid,.hero-grid--stats{grid-template-columns:1fr}.metric-bar{grid-template-columns:1fr}.chart-wrap--xl{height:300px}}

.nav-section-title{padding:16px 18px 6px;color:#94a3b8;font-size:.74rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.nav-link span{flex:1}
.nav-link{font-weight:600}
.sidebar .nav{margin-bottom:6px}
.hero-text{font-size:1rem}
.calendar-box{background:#fff;border:1px solid var(--line);border-radius:20px;padding:16px;box-shadow:0 8px 18px rgba(15,23,42,.04)}
.calendar-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.calendar-weekdays,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.calendar-weekdays div{text-align:center;font-size:.8rem;font-weight:700;color:var(--muted);padding-bottom:4px}
.calendar-cell{min-height:64px;border:1px solid var(--line);border-radius:16px;background:#f8fafc;padding:8px;display:flex;flex-direction:column;justify-content:space-between}
.calendar-cell--empty{background:transparent;border-style:dashed;opacity:.45}
.calendar-cell--today{background:#eff6ff;border-color:#bfdbfe;box-shadow:inset 0 0 0 1px #93c5fd}
.calendar-cell--task{background:#fff7ed;border-color:#fed7aa}
.calendar-day{font-weight:700}
.calendar-task-dot{display:inline-flex;align-self:flex-start;padding:4px 6px;border-radius:999px;background:#fff;color:#9a3412;font-size:.7rem;font-weight:700}
.timeline-list{display:flex;flex-direction:column;gap:14px}
.timeline-item{display:flex;gap:12px;align-items:flex-start}
.timeline-dot{width:12px;height:12px;border-radius:50%;margin-top:6px;background:#94a3b8;box-shadow:0 0 0 4px rgba(148,163,184,.15)}
.timeline-item--quote .timeline-dot{background:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,.14)}
.timeline-item--customer .timeline-dot{background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.14)}
.timeline-item--task .timeline-dot{background:#f59e0b;box-shadow:0 0 0 4px rgba(245,158,11,.14)}
.timeline-item--message .timeline-dot{background:#8b5cf6;box-shadow:0 0 0 4px rgba(139,92,246,.14)}
.timeline-body{border:1px solid var(--line);background:#fff;border-radius:16px;padding:12px 14px;flex:1}
@media (max-width:991px){.calendar-weekdays,.calendar-grid{gap:6px}.calendar-cell{min-height:58px}.nav-section-title{padding-left:14px}}


/* v4.5 dashboard/menu stability */

.nav-section-title{display:flex;align-items:center;gap:10px;padding:14px 14px 8px;margin:6px 10px 2px;border-radius:16px;background:linear-gradient(180deg,#f8fbff,#eef5ff);border:1px solid #e4edf8;color:#334155;font-size:.76rem;font-weight:700;letter-spacing:.04em;text-transform:none}
.nav-section-title .nav-section-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:12px;background:#fff;color:#0f6cbd;box-shadow:0 6px 16px rgba(15,108,189,.10)}
.nav-section-title div{display:flex;flex-direction:column;line-height:1.1}
.nav-section-title strong{font-size:.86rem;color:#0f172a}
.nav-section-title small{font-size:.7rem;color:#64748b;font-weight:600}
.nav-section-title--sales{background:linear-gradient(180deg,#f7fbff,#eef8ff)}
.nav-section-title--ops{background:linear-gradient(180deg,#f8fafc,#f1f5f9)}
.nav-section-title--admin{background:linear-gradient(180deg,#fbf8ff,#f5f3ff)}
.nav-link{border:1px solid transparent}
.nav-link.active,.nav-link:hover{border-color:#cfe2f3;box-shadow:0 8px 18px rgba(15,108,189,.08)}
.dashboard-agenda .module-toolbar{align-items:flex-start}
.agenda-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.agenda-summary-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px;box-shadow:0 8px 18px rgba(15,23,42,.04)}
.agenda-summary-card span{display:block;color:var(--muted);font-size:.8rem;margin-bottom:6px}.agenda-summary-card strong{font-size:1.35rem}
.calendar-box--compact{padding:14px;background:linear-gradient(180deg,#fbfdff,#fff)}
.calendar-box--compact .calendar-weekdays div{font-size:.76rem}
.calendar-box--compact .calendar-cell{min-height:54px;border-radius:14px;padding:8px 7px}
.calendar-box--compact .calendar-task-dot{padding:3px 6px;font-size:.68rem}
.agenda-mini-list{display:flex;flex-direction:column;gap:10px}
.agenda-item{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px 14px}
.ops-summary-grid--compact{grid-template-columns:repeat(2,minmax(0,1fr))}
.chart-wrap--donut{height:300px}
@media (max-width:991px){.agenda-summary-grid,.ops-summary-grid--compact{grid-template-columns:1fr}.nav-section-title{margin-inline:8px;padding-inline:12px}}
