/**
 * NEXTDOT ERP - Modern admin theme
 * Inspired by professional ERP dashboards (Perfex-style layout patterns)
 */

:root {
    --erp-primary: #2563eb;
    --erp-primary-dark: #1d4ed8;
    --erp-primary-light: #3b82f6;
    --erp-sidebar: #0f172a;
    --erp-sidebar-hover: #1e293b;
    --erp-sidebar-active: #2563eb;
    --erp-bg: #f1f5f9;
    --erp-card: #ffffff;
    --erp-text: #0f172a;
    --erp-muted: #64748b;
    --erp-border: #e2e8f0;
    --erp-success: #10b981;
    --erp-danger: #ef4444;
    --erp-warning: #f59e0b;
    --erp-info: #06b6d4;
    --erp-sidebar-width: 270px;
    --erp-header-height: 64px;
    --erp-radius: 12px;
    --erp-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
    --erp-shadow-lg: 0 10px 40px rgba(15, 23, 42, 0.12);
    --erp-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }

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

/* ========== ADMIN LAYOUT ========== */
.erp-app {
    display: flex;
    min-height: 100vh;
}

.erp-sidebar {
    width: var(--erp-sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #cbd5e1;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.erp-sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

a.erp-sidebar-brand-link {
    text-decoration: none;
    cursor: pointer;
    color: inherit;
    transition: background 0.2s ease;
}

a.erp-sidebar-brand-link:hover {
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: inherit;
}

a.erp-sidebar-brand-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.25);
    outline-offset: -2px;
}

.erp-sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--erp-primary), #7c3aed);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.erp-sidebar-brand-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    padding: 4px;
    flex-shrink: 0;
}

.erp-sidebar-brand-text strong {
    display: block;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.erp-sidebar-brand-text small {
    color: #94a3b8;
    font-size: 0.7rem;
}

.erp-sidebar-profile {
    margin: 1rem;
    padding: 0.875rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--erp-radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* User profile avatars — img is absolutely positioned so native dimensions cannot expand flex parents */
.erp-avatar,
.erp-user-avatar {
    position: relative;
    width: 42px;
    height: 42px;
    min-width: 42px;
    max-width: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--erp-primary), #7c3aed);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
    overflow: hidden;
    vertical-align: middle;
}

.erp-user-avatar-sm,
.erp-avatar-sm {
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    font-size: 0.75rem;
}

.erp-avatar-md {
    width: 42px;
    height: 42px;
    min-width: 42px;
    max-width: 42px;
    font-size: 0.85rem;
}

.erp-user-avatar-lg,
.erp-avatar-lg {
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    font-size: 0.85rem;
}

.erp-avatar-xl {
    width: 64px;
    height: 64px;
    min-width: 64px;
    max-width: 64px;
    font-size: 1.25rem;
}

.erp-avatar-activity {
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    font-size: 0.75rem;
}

.erp-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.erp-sidebar-profile-info {
    overflow: hidden;
    min-width: 0;
}

.erp-sidebar-profile-info .name {
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-sidebar-profile-info .meta {
    color: #94a3b8;
    font-size: 0.75rem;
}

.erp-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0.75rem 1.5rem;
    -webkit-overflow-scrolling: touch;
}

.erp-nav-section {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 1rem 0.75rem 0.5rem;
}

/* Collapsible sidebar module groups */
.erp-nav-group {
    margin-bottom: 0.15rem;
}

.erp-nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0.75rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    text-align: left;
}

.erp-nav-group-toggle:hover,
.erp-nav-group-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    outline: none;
}

.erp-nav-group-toggle[aria-expanded="true"],
.erp-nav-group.has-active .erp-nav-group-toggle {
    color: #e2e8f0;
}

.erp-nav-group-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-nav-group-chevron {
    font-size: 0.7rem;
    opacity: 0.75;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.erp-nav-group-toggle[aria-expanded="true"] .erp-nav-group-chevron {
    transform: rotate(180deg);
}

.erp-nav-group-items {
    list-style: none;
    padding: 0.15rem 0 0.35rem;
    margin: 0;
}

.erp-nav-group-items > li {
    margin: 0;
}

.erp-nav-group-items .erp-nav-link {
    padding-left: 1.35rem;
    min-height: 44px;
}

.erp-nav-group-items.collapsing {
    transition: height 0.25s ease;
}

.erp-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.875rem;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
    position: relative;
}

.erp-nav-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    opacity: 0.85;
}

.erp-nav-link:hover {
    background: var(--erp-sidebar-hover);
    color: #fff;
}

.erp-nav-link.active {
    background: rgba(37, 99, 235, 0.2);
    color: #fff;
}

.erp-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--erp-primary-light);
    border-radius: 0 3px 3px 0;
}

.erp-nav-badge {
    margin-left: auto;
    background: var(--erp-warning);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.erp-main {
    flex: 1;
    margin-left: var(--erp-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
}

.erp-header {
    height: var(--erp-header-height);
    background: var(--erp-card);
    border-bottom: 1px solid var(--erp-border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--erp-shadow);
}

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

.erp-header-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--erp-muted);
}

.erp-header-search input {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.5rem;
    border: 1px solid var(--erp-border);
    border-radius: 10px;
    font-size: 0.875rem;
    background: var(--erp-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.erp-header-search input:focus {
    outline: none;
    border-color: var(--erp-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #fff;
}

.erp-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.erp-header-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--erp-border);
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--erp-muted);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.erp-header-btn:hover {
    background: var(--erp-bg);
    color: var(--erp-primary);
    border-color: var(--erp-primary);
}

.erp-header-btn .dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--erp-danger);
    border-radius: 50%;
    border: 2px solid #fff;
}

.erp-content {
    padding: 1.5rem;
    flex: 1;
}

.erp-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1035;
    backdrop-filter: blur(2px);
}

/* ========== STAT CARDS ========== */
.erp-stat-card {
    background: var(--erp-card);
    border-radius: var(--erp-radius);
    padding: 1.25rem;
    box-shadow: var(--erp-shadow);
    border: 1px solid var(--erp-border);
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.erp-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--erp-shadow-lg);
}

.erp-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.erp-stat-card .stat-icon.success { background: rgba(16, 185, 129, 0.12); color: var(--erp-success); }
.erp-stat-card .stat-icon.danger { background: rgba(239, 68, 68, 0.12); color: var(--erp-danger); }
.erp-stat-card .stat-icon.primary { background: rgba(37, 99, 235, 0.12); color: var(--erp-primary); }
.erp-stat-card .stat-icon.warning { background: rgba(245, 158, 11, 0.12); color: var(--erp-warning); }
.erp-stat-card .stat-icon.info { background: rgba(6, 182, 212, 0.12); color: var(--erp-info); }

.erp-stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--erp-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.erp-stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--erp-text);
    line-height: 1.2;
}

.erp-stat-card .stat-meta {
    font-size: 0.75rem;
    color: var(--erp-muted);
    margin-top: 0.5rem;
}

/* ========== KPI CHARTS ========== */
.erp-kpi-chart-panel .erp-kpi-chart-body,
.erp-panel-body.erp-chart-body {
    padding: 0.75rem 1rem 1rem;
    position: relative;
    min-height: 180px;
    max-height: 320px;
}

.erp-kpi-chart-body canvas,
.erp-chart-body canvas,
.erp-panel-body canvas {
    display: block;
    width: 100% !important;
    max-width: 100%;
    max-height: 280px !important;
}

.erp-kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.erp-kpi-trend.up {
    background: rgba(16, 185, 129, 0.12);
    color: var(--erp-success);
}

.erp-kpi-trend.down {
    background: rgba(239, 68, 68, 0.12);
    color: var(--erp-danger);
}

/* ========== SALES KPI & MOTIVATION ========== */
.erp-kpi-card {
    background: var(--erp-card);
    border-radius: var(--erp-radius);
    box-shadow: var(--erp-shadow);
    border: 1px solid var(--erp-border);
    padding: 1.25rem;
    height: 100%;
}

.erp-kpi-label {
    font-size: 0.8rem;
    color: var(--erp-muted);
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.erp-kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--erp-text);
    line-height: 1.2;
}

.erp-motivation-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    border-radius: var(--erp-radius);
    border: 1px solid var(--erp-border);
    box-shadow: var(--erp-shadow);
    height: 100%;
}

.erp-motivation-primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(16, 185, 129, 0.06) 100%);
}

.erp-motivation-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.15);
    color: var(--erp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.erp-motivation-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--erp-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.erp-motivation-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--erp-text);
    line-height: 1.4;
}

.erp-motivation-tip {
    font-size: 0.85rem;
    color: var(--erp-muted);
}

.erp-gap-alert {
    background: rgba(16, 185, 129, 0.1) !important;
}

.erp-progress-ring {
    --pct: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: conic-gradient(var(--erp-success) calc(var(--pct) * 1%), #e5e7eb 0);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.erp-progress-ring::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: #fff;
}

.erp-progress-ring span {
    position: relative;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--erp-text);
}

.erp-progress-ring.sm {
    width: 52px;
    height: 52px;
}

.erp-progress-ring.sm::before {
    inset: 5px;
}

.erp-progress-ring.sm span {
    font-size: 0.7rem;
}

/* ========== PANELS ========== */
.erp-panel {
    background: var(--erp-card);
    border-radius: var(--erp-radius);
    box-shadow: var(--erp-shadow);
    border: 1px solid var(--erp-border);
    overflow: hidden;
}

.erp-panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--erp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.erp-panel-header h5 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.erp-panel-body {
    padding: 1.25rem;
}

.erp-panel-body.flush {
    padding: 0;
}

/* ========== WELCOME BANNER ========== */
.erp-welcome-banner {
    background: linear-gradient(135deg, var(--erp-primary) 0%, #7c3aed 100%);
    border-radius: var(--erp-radius);
    padding: 1.5rem 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.erp-welcome-banner::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 180px;
    height: 180px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.erp-welcome-banner h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.erp-welcome-banner p {
    opacity: 0.9;
    margin: 0;
    font-size: 0.9rem;
}

.erp-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.erp-quick-actions a {
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 0.4rem 0.875rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.2);
    transition: background 0.2s;
}

.erp-quick-actions a:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* ========== ACTIVITY FEED ========== */
.erp-activity-item {
    display: flex;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--erp-border);
    align-items: flex-start;
}

.erp-activity-item:last-child { border-bottom: none; }

.erp-activity-item .activity-body { flex: 1; min-width: 0; }
.erp-activity-item .activity-title { font-size: 0.875rem; font-weight: 500; }
.erp-activity-item .activity-meta { font-size: 0.75rem; color: var(--erp-muted); }

/* ========== LOGIN PAGE ========== */
.erp-login-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8fafc;
}

.erp-login-page {
    min-height: 100vh;
    display: flex;
}

.erp-login-hero {
    flex: 1.05;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 3rem;
    color: #fff;
    background: #0f172a;
    overflow: hidden;
    min-height: 100vh;
}

.erp-login-hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.erp-login-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.erp-login-slide.is-active {
    opacity: 1;
    z-index: 1;
}

.erp-login-slide--gradient-1 {
    background-image:
        linear-gradient(135deg, rgba(15, 23, 42, 0.35) 0%, rgba(30, 58, 95, 0.55) 100%),
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.35) 0%, transparent 50%),
        linear-gradient(160deg, #1e3a5f 0%, #0f172a 55%, #172554 100%);
}

.erp-login-slide--gradient-2 {
    background-image:
        linear-gradient(135deg, rgba(15, 23, 42, 0.35) 0%, rgba(30, 58, 95, 0.55) 100%),
        radial-gradient(circle at 75% 25%, rgba(14, 165, 233, 0.3) 0%, transparent 45%),
        linear-gradient(145deg, #0c4a6e 0%, #0f172a 50%, #1e293b 100%);
}

.erp-login-slide--gradient-3 {
    background-image:
        linear-gradient(135deg, rgba(15, 23, 42, 0.35) 0%, rgba(30, 58, 95, 0.55) 100%),
        radial-gradient(circle at 30% 70%, rgba(37, 99, 235, 0.32) 0%, transparent 48%),
        linear-gradient(155deg, #1e40af 0%, #0f172a 52%, #334155 100%);
}

.erp-login-slide--gradient-4 {
    background-image:
        linear-gradient(135deg, rgba(15, 23, 42, 0.35) 0%, rgba(30, 58, 95, 0.55) 100%),
        radial-gradient(circle at 80% 60%, rgba(99, 102, 241, 0.28) 0%, transparent 42%),
        linear-gradient(170deg, #312e81 0%, #0f172a 48%, #1e3a5f 100%);
}

.erp-login-slide--gradient-5 {
    background-image:
        linear-gradient(135deg, rgba(15, 23, 42, 0.35) 0%, rgba(30, 58, 95, 0.55) 100%),
        radial-gradient(circle at 45% 20%, rgba(56, 189, 248, 0.25) 0%, transparent 40%),
        linear-gradient(140deg, #164e63 0%, #0f172a 54%, #1e293b 100%);
}

.erp-login-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.25) 0%, rgba(15, 23, 42, 0.78) 72%, rgba(15, 23, 42, 0.9) 100%);
    pointer-events: none;
}

.erp-login-hero-content {
    position: relative;
    z-index: 3;
    max-width: 520px;
    padding-bottom: 1rem;
}

.erp-login-hero-brand {
    position: absolute;
    right: 2.5rem;
    bottom: 2.5rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.erp-login-hero-brand:hover {
    opacity: 0.9;
}

.erp-login-hero-brand-logo {
    height: 42px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    flex-shrink: 0;
}

.erp-login-hero-brand-fallback {
    display: none;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.erp-login-hero-brand-fallback span {
    color: #f87171;
}

.erp-login-hero-mark,
.erp-login-card-mark {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.erp-login-hero-logo {
    max-width: 140px;
    max-height: 64px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    margin-bottom: 1.5rem;
}

.erp-login-hero h1 {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.erp-login-hero-subheading {
    font-size: 1.05rem;
    line-height: 1.5;
    opacity: 0.92;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.erp-login-hero-points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.erp-login-hero-points li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0;
    font-size: 0.92rem;
    opacity: 0.95;
}

.erp-login-hero-points li i {
    color: #34d399;
    font-size: 1rem;
    flex-shrink: 0;
}

.erp-login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #f8fafc;
}

.erp-login-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    padding: 2rem 2rem 1.5rem;
}

.erp-login-company {
    text-align: center;
    margin-bottom: 1.5rem;
}

.erp-login-company-logo {
    max-width: 180px;
    max-height: 88px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto 0.75rem;
    display: block;
}

.erp-login-company-mark {
    width: 72px;
    height: 72px;
    margin: 0 auto 0.75rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--erp-primary-light), #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.35rem;
}

.erp-login-company-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--erp-text);
}

.erp-login-card-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.erp-login-card-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 10px;
}

.erp-login-card-brand strong {
    display: block;
    font-size: 0.95rem;
    color: var(--erp-text);
    line-height: 1.2;
}

.erp-login-card-brand span {
    display: block;
    font-size: 0.72rem;
    color: var(--erp-muted);
}

.erp-login-card-head {
    margin-bottom: 1.75rem;
    text-align: center;
}

.erp-login-card-head h2 {
    font-size: 1.65rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    color: var(--erp-text);
}

.erp-login-accent-line {
    width: 72px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--erp-primary-light), var(--erp-primary-dark));
    margin: 0 auto 0.85rem;
}

.erp-login-card-head p {
    margin: 0;
    color: var(--erp-muted);
    font-size: 0.92rem;
}

.erp-login-alert {
    border-radius: 12px;
    font-size: 0.875rem;
}

.erp-login-form .erp-form-group {
    margin-bottom: 1.15rem;
}

.erp-login-form .erp-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.45rem;
    color: var(--erp-text);
}

.erp-login-form .erp-form-control {
    width: 100%;
    padding: 0.78rem 1rem;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    font-size: 0.92rem;
    background: #f1f5f9;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.erp-login-form .erp-form-control:focus {
    background: #fff;
    outline: none;
    border-color: var(--erp-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.erp-login-form .erp-input-icon {
    position: relative;
}

.erp-login-form .erp-input-icon > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.erp-login-form .erp-input-icon .erp-form-control {
    padding-left: 2.75rem;
}

.erp-input-icon-toggle .erp-form-control {
    padding-right: 2.75rem;
}

.erp-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #94a3b8;
    padding: 0.25rem 0.35rem;
    line-height: 1;
}

.erp-password-toggle:hover {
    color: #64748b;
}

.erp-btn-login {
    width: 100%;
    padding: 0.82rem 1rem;
    background: linear-gradient(135deg, var(--erp-primary), var(--erp-primary-dark));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.erp-btn-login:hover {
    background: linear-gradient(135deg, var(--erp-primary-light), var(--erp-primary));
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
    color: #fff;
}

.erp-login-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1rem;
    color: #64748b;
    font-size: 0.82rem;
}

.erp-login-secure i {
    color: var(--erp-primary);
}

.erp-login-powered {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eef2f7;
    text-align: center;
}

.erp-login-powered-label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.55rem;
}

.erp-login-powered-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.erp-login-powered-logo {
    height: 34px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    flex-shrink: 0;
}

.erp-login-powered-fallback {
    display: none;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.erp-login-powered-fallback span {
    color: var(--erp-primary);
}

.erp-login-copyright {
    text-align: center;
    margin: 1rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Legacy login classes kept for compatibility */
.erp-login-brand {
    display: none;
}

.erp-login-form-panel,
.erp-login-form-wrapper,
.erp-login-footer {
    all: unset;
}

.erp-form-group {
    margin-bottom: 1.25rem;
}

.erp-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--erp-text);
}

.erp-form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--erp-border);
    border-radius: 10px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.erp-form-control:focus {
    outline: none;
    border-color: var(--erp-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.erp-input-icon {
    position: relative;
}

.erp-input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--erp-muted);
}

.erp-input-icon .erp-form-control {
    padding-left: 2.75rem;
}

.erp-btn-primary {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--erp-primary), var(--erp-primary-dark));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.erp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    color: #fff;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) {
    .erp-login-page {
        flex-direction: column;
    }

    .erp-login-hero {
        min-height: 320px;
        padding: 2rem 1.5rem 4.5rem;
        align-items: flex-end;
    }

    .erp-login-hero-brand {
        right: 1.5rem;
        bottom: 1.25rem;
    }

    .erp-login-hero-brand-logo {
        height: 34px;
    }

    .erp-login-hero-points {
        display: none;
    }

    .erp-login-main {
        padding-top: 0;
        margin-top: -1.5rem;
    }

    .erp-login-card {
        box-shadow: 0 10px 40px rgba(15, 23, 42, 0.1);
    }
}

@media (max-width: 991.98px) {
    .erp-sidebar {
        transform: translateX(-100%);
        box-shadow: var(--erp-shadow-lg);
    }
    .erp-sidebar.show {
        transform: translateX(0);
    }
    .erp-sidebar-overlay.show {
        display: block;
    }
    .erp-main {
        margin-left: 0;
    }
    #sidebarToggle {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .erp-sidebar {
        transform: translateX(-100%);
    }
    .erp-sidebar.show {
        transform: translateX(0);
    }
    .erp-sidebar-overlay.show {
        display: block;
    }
    .erp-main {
        margin-left: 0;
    }
    .erp-content {
        padding: 1rem;
    }
    .erp-header-search {
        display: none;
    }
    .erp-welcome-banner {
        padding: 1.25rem;
    }
    .erp-welcome-banner h1 {
        font-size: 1.15rem;
    }
    .erp-stat-card .stat-value {
        font-size: 1.15rem;
    }
    .erp-stat-card {
        padding: 1rem;
    }
    .erp-stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    .erp-quick-actions {
        gap: 0.35rem;
    }
    .erp-quick-actions a {
        font-size: 0.75rem;
        padding: 0.35rem 0.65rem;
    }
}

/* Prevent unscoped uploads from breaking admin layout */
.erp-content img:not(.erp-avatar-img):not(.erp-sidebar-brand-img) {
    max-width: 100%;
    height: auto;
}

/* ========== UTILITIES ========== */
.erp-page-title {
    font-size: 0.8rem;
    color: var(--erp-muted);
    margin-bottom: 0.25rem;
}

.text-profit { color: var(--erp-success) !important; }
.text-loss { color: var(--erp-danger) !important; }

.table.erp-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--erp-muted);
    font-weight: 600;
    border-bottom-width: 1px;
    background: var(--erp-bg);
}

.table.erp-table tbody td {
    font-size: 0.875rem;
    vertical-align: middle;
}

.erp-empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--erp-muted);
}

.erp-empty-state i {
    font-size: 2.5rem;
    opacity: 0.4;
    margin-bottom: 0.75rem;
}

.erp-settings-tabs .nav-link {
    color: var(--erp-muted);
    font-size: 0.875rem;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.65rem 1rem;
}

.erp-settings-tabs .nav-link.active {
    color: var(--erp-primary);
    border-bottom-color: var(--erp-primary);
    background: transparent;
    font-weight: 600;
}

/* Task Kanban */
.erp-kanban-board {
    overflow-x: auto;
    flex-wrap: nowrap;
}

@media (min-width: 992px) {
    .erp-kanban-board {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

.erp-kanban-column {
    min-height: 120px;
}

.erp-kanban-column.erp-kanban-drop-target {
    background: rgba(13, 110, 253, 0.06);
    border-radius: 0.5rem;
    outline: 2px dashed rgba(13, 110, 253, 0.35);
}

.erp-kanban-card {
    cursor: grab;
    transition: box-shadow 0.15s ease;
}

.erp-kanban-card:active {
    cursor: grabbing;
}

.erp-kanban-card:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

/* AI Assistant floating widget */
.erp-ai-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1080;
    width: 3.25rem;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.erp-ai-panel {
    position: fixed;
    right: 1.25rem;
    bottom: 5rem;
    z-index: 1080;
    width: min(360px, calc(100vw - 2rem));
    background: #fff;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}

.erp-ai-panel-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
    max-height: 50vh;
    background: #f8fafc;
}

.erp-ai-msg-user {
    text-align: right;
    color: #0d6efd;
    font-weight: 500;
}

.erp-ai-msg-assistant {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}

/* ========== MONTH CALENDAR ========== */
.erp-month-calendar {
    padding: 1.25rem;
}

.erp-cal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.erp-cal-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.erp-cal-title {
    font-weight: 600;
    color: var(--erp-text);
    margin-left: 0.25rem;
}

.erp-cal-grid {
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    overflow: hidden;
    background: var(--erp-card);
}

.erp-cal-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.erp-cal-row-head {
    background: #f8fafc;
    border-bottom: 1px solid var(--erp-border);
}

.erp-cal-head-cell {
    padding: 0.65rem 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--erp-muted);
}

.erp-cal-row:not(.erp-cal-row-head) {
    border-bottom: 1px solid var(--erp-border);
}

.erp-cal-row:not(.erp-cal-row-head):last-child {
    border-bottom: none;
}

.erp-cal-day {
    min-height: 7.5rem;
    border-right: 1px solid var(--erp-border);
    padding: 0.4rem 0.45rem;
    background: #fff;
    transition: background 0.15s ease;
}

.erp-cal-day:last-child {
    border-right: none;
}

.erp-cal-day.is-other-month {
    background: #f8fafc;
}

.erp-cal-day.is-other-month .erp-cal-day-num {
    color: #94a3b8;
}

.erp-cal-day.is-today {
    background: #eff6ff;
}

.erp-cal-day.is-today .erp-cal-day-num {
    background: var(--erp-primary);
    color: #fff;
    border-radius: 999px;
    width: 1.65rem;
    height: 1.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.erp-cal-day-num {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--erp-text);
    margin-bottom: 0.35rem;
    line-height: 1.65rem;
}

.erp-cal-events {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.erp-cal-event {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-size: 0.72rem;
    line-height: 1.25;
    text-decoration: none;
    color: var(--erp-text);
    background: rgba(37, 99, 235, 0.08);
    border-left: 3px solid var(--erp-primary);
    overflow: hidden;
    transition: background 0.15s ease;
}

.erp-cal-event:hover {
    background: rgba(37, 99, 235, 0.14);
    color: var(--erp-text);
}

.erp-cal-event.is-danger {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: var(--erp-danger);
}

.erp-cal-event.is-danger:hover {
    background: rgba(239, 68, 68, 0.14);
}

.erp-cal-event.is-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--erp-warning);
}

.erp-cal-event.is-warning:hover {
    background: rgba(245, 158, 11, 0.16);
}

.erp-cal-event.is-info {
    background: rgba(6, 182, 212, 0.08);
    border-left-color: var(--erp-info);
}

.erp-cal-event.is-info:hover {
    background: rgba(6, 182, 212, 0.14);
}

.erp-cal-event.is-muted {
    opacity: 0.75;
}

.erp-cal-event-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-cal-more {
    font-size: 0.68rem;
    color: var(--erp-muted);
    padding: 0.1rem 0.35rem;
}

.erp-cal-empty {
    padding: 0 0.25rem;
}

@media (max-width: 991.98px) {
    .erp-cal-day {
        min-height: 5.5rem;
    }

    .erp-cal-event-text {
        display: none;
    }

    .erp-cal-event {
        justify-content: center;
        padding: 0.25rem;
        border-left-width: 0;
        border-radius: 999px;
        width: 0.55rem;
        height: 0.55rem;
        min-width: 0.55rem;
    }
}

@media (max-width: 575.98px) {
    .erp-month-calendar {
        padding: 0.75rem;
    }

    .erp-cal-day {
        min-height: 3.75rem;
        padding: 0.25rem;
    }

    .erp-cal-head-cell {
        font-size: 0.65rem;
        padding: 0.45rem 0.2rem;
    }
}

/* ── First-time onboarding wizard ── */
.erp-onboarding-body {
    min-height: 100vh;
    background: var(--erp-bg);
    font-family: var(--erp-font);
}

.erp-onboarding-shell {
    min-height: 100vh;
}

.erp-onboarding-topbar {
    padding: 0.75rem 1rem;
    background: var(--erp-card);
    border-bottom: 1px solid var(--erp-border);
}

.erp-onboarding-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--erp-text);
    font-weight: 700;
    font-size: 0.95rem;
}

.erp-onboarding-brand-mark {
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--erp-primary), #7c3aed);
    color: #fff;
    font-size: 0.75rem;
}

.erp-onboarding-brand-img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    border-radius: 0.5rem;
}

.erp-onboarding-layout {
    display: flex;
    min-height: calc(100vh - 57px);
}

@media (min-width: 992px) {
    .erp-onboarding-layout {
        min-height: 100vh;
    }
}

.erp-onboarding-sidebar {
    flex: 0 0 100%;
    max-width: 100%;
    background: var(--erp-card);
    border-bottom: 1px solid var(--erp-border);
    padding: 1.25rem 1.25rem 1rem;
}

@media (min-width: 992px) {
    .erp-onboarding-sidebar {
        flex: 0 0 34%;
        max-width: 380px;
        min-height: 100vh;
        border-bottom: none;
        border-right: 1px solid var(--erp-border);
        padding: 2rem 1.75rem;
    }
}

.erp-onboarding-greeting h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.erp-onboarding-greeting p {
    color: var(--erp-muted);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}

.erp-onboarding-stepper-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.erp-onboarding-step {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    position: relative;
    padding-bottom: 1.25rem;
}

.erp-onboarding-step:last-child {
    padding-bottom: 0;
}

.erp-onboarding-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 1rem;
    top: 2.1rem;
    bottom: 0.15rem;
    width: 2px;
    background: var(--erp-border);
}

.erp-onboarding-step--done:not(:last-child)::after {
    background: var(--erp-success);
}

.erp-onboarding-step-indicator {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid var(--erp-border);
    background: #fff;
    color: var(--erp-muted);
    position: relative;
    z-index: 1;
}

.erp-onboarding-step--active .erp-onboarding-step-indicator {
    border-color: var(--erp-primary);
    background: var(--erp-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.erp-onboarding-step--done .erp-onboarding-step-indicator {
    border-color: var(--erp-success);
    background: var(--erp-success);
    color: #fff;
}

.erp-onboarding-step-label {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding-top: 0.2rem;
}

.erp-onboarding-step-label strong {
    font-size: 0.92rem;
    font-weight: 600;
}

.erp-onboarding-step-label small {
    color: var(--erp-muted);
    font-size: 0.78rem;
}

.erp-onboarding-step--pending .erp-onboarding-step-label strong {
    color: var(--erp-muted);
    font-weight: 500;
}

.erp-onboarding-main {
    flex: 1;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .erp-onboarding-main {
        padding: 2.5rem 3rem;
    }
}

.erp-onboarding-panel {
    background: var(--erp-card);
    border-radius: calc(var(--erp-radius) + 4px);
    box-shadow: var(--erp-shadow-lg);
    border: 1px solid var(--erp-border);
    overflow: hidden;
    flex: 1;
}

.erp-onboarding-panel-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--erp-border);
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.erp-onboarding-step-badge {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    color: var(--erp-primary);
    font-size: 1.35rem;
}

.erp-onboarding-step-count {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--erp-muted);
    font-weight: 600;
}

.erp-onboarding-panel-title {
    font-size: 1.35rem;
    font-weight: 700;
}

.erp-onboarding-panel-body {
    padding: 1.75rem;
}

.erp-onboarding-intro {
    font-size: 1rem;
    color: #334155;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.erp-onboarding-bullets {
    margin: 0 0 1.5rem;
    padding-left: 1.2rem;
    color: #475569;
}

.erp-onboarding-bullets li {
    margin-bottom: 0.55rem;
    line-height: 1.55;
}

.erp-onboarding-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.erp-onboarding-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--erp-border);
}

.erp-onboarding-mobile-steps {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 1rem 0 0.25rem;
    margin-top: auto;
    -webkit-overflow-scrolling: touch;
}

.erp-onboarding-mobile-step {
    flex: 0 0 auto;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid var(--erp-border);
    color: var(--erp-muted);
    background: #fff;
}

.erp-onboarding-mobile-step--active {
    border-color: var(--erp-primary);
    background: var(--erp-primary);
    color: #fff;
}

.erp-onboarding-mobile-step--done {
    border-color: var(--erp-success);
    background: var(--erp-success);
    color: #fff;
}

@media (min-width: 992px) {
    .erp-onboarding-mobile-steps,
    .erp-onboarding-topbar {
        display: none !important;
    }
}

/* ========== DASHBOARD SCOPED DARK THEME ========== */
#dashboard-content.dashboard-theme-dark {
    --dash-bg: #0f172a;
    --dash-card: #1e293b;
    --dash-card-hover: #334155;
    --dash-border: #334155;
    --dash-text: #f1f5f9;
    --dash-muted: #94a3b8;
    background: var(--dash-bg);
    color: var(--dash-text);
    margin: -1.5rem;
    padding: 1.5rem;
    min-height: calc(100vh - var(--erp-header-height));
}

#dashboard-content.dashboard-theme-dark .erp-stat-card {
    background: var(--dash-card);
    border-color: var(--dash-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

#dashboard-content.dashboard-theme-dark .erp-stat-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

#dashboard-content.dashboard-theme-dark .erp-stat-card .stat-label,
#dashboard-content.dashboard-theme-dark .erp-stat-card .stat-meta {
    color: var(--dash-muted);
}

#dashboard-content.dashboard-theme-dark .erp-stat-card .stat-value {
    color: var(--dash-text);
}

#dashboard-content.dashboard-theme-dark .erp-stat-card .stat-meta a {
    color: var(--erp-primary-light);
}

#dashboard-content.dashboard-theme-dark .erp-panel {
    background: var(--dash-card);
    border-color: var(--dash-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

#dashboard-content.dashboard-theme-dark .erp-panel-header {
    background: rgba(15, 23, 42, 0.5);
    border-bottom-color: var(--dash-border);
}

#dashboard-content.dashboard-theme-dark .erp-panel-header h5,
#dashboard-content.dashboard-theme-dark .erp-panel-header h6 {
    color: var(--dash-text);
}

#dashboard-content.dashboard-theme-dark .erp-panel-body {
    color: var(--dash-text);
}

#dashboard-content.dashboard-theme-dark .erp-welcome-banner {
    background: linear-gradient(135deg, #1e293b 0%, #312e81 50%, #4338ca 100%);
}

#dashboard-content.dashboard-theme-dark .text-muted,
#dashboard-content.dashboard-theme-dark .small.text-muted {
    color: var(--dash-muted) !important;
}

#dashboard-content.dashboard-theme-dark .erp-activity-item {
    border-bottom-color: var(--dash-border);
}

#dashboard-content.dashboard-theme-dark .erp-activity-item .activity-title,
#dashboard-content.dashboard-theme-dark .erp-activity-item .activity-title strong {
    color: var(--dash-text);
}

#dashboard-content.dashboard-theme-dark .erp-activity-item .activity-meta {
    color: var(--dash-muted);
}

#dashboard-content.dashboard-theme-dark .erp-empty-state {
    color: var(--dash-muted);
}

#dashboard-content.dashboard-theme-dark .list-group-item {
    background: transparent;
    border-color: var(--dash-border);
    color: var(--dash-text);
}

#dashboard-content.dashboard-theme-dark .border-bottom {
    border-color: var(--dash-border) !important;
}

#dashboard-content.dashboard-theme-dark .badge.bg-light {
    background: var(--dash-card-hover) !important;
    color: var(--dash-text) !important;
    border-color: var(--dash-border) !important;
}

#dashboard-content.dashboard-theme-dark code {
    background: rgba(15, 23, 42, 0.6);
    color: #cbd5e1;
}

#dashboard-content.dashboard-theme-dark .border-warning {
    border-color: rgba(245, 158, 11, 0.5) !important;
}

#dashboard-content.dashboard-theme-dark .btn-outline-warning {
    color: var(--erp-warning);
    border-color: rgba(245, 158, 11, 0.5);
}

#dashboard-content.dashboard-theme-dark .btn-outline-warning:hover {
    background: rgba(245, 158, 11, 0.15);
    color: var(--erp-warning);
}

#dashboard-content.dashboard-theme-dark .activity-title .text-primary {
    color: var(--erp-primary-light) !important;
}

#dashboard-content.dashboard-theme-dark .erp-panel-header .text-primary,
#dashboard-content.dashboard-theme-dark .erp-panel-header .text-info,
#dashboard-content.dashboard-theme-dark .erp-panel-header .text-success,
#dashboard-content.dashboard-theme-dark .erp-panel-header .text-warning,
#dashboard-content.dashboard-theme-dark .erp-panel-header .text-danger {
    opacity: 0.95;
}

@media (max-width: 991.98px) {
    #dashboard-content.dashboard-theme-dark {
        margin: -1rem;
        padding: 1rem;
    }
}
