/* KarkhanaX - Premium Industrial Enterprise SaaS */
/* ============================================== */

:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fed7aa;
    --accent: #6366f1;
    --accent-light: #e0e7ff;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #0ea5e9;
    --info-light: #e0f2fe;
    --purple: #8b5cf6;
    --purple-light: #ede9fe;

    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;

    --topbar-height: 60px;
    --bg: #f1f5f9;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition: all 0.2s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text-primary); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: var(--font); border: none; outline: none; }
input, select, textarea { font-family: var(--font); outline: none; }
table { border-collapse: collapse; width: 100%; }

/* ============ TYPOGRAPHY ============ */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.8125rem; }
.text-base { font-size: 0.9375rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ============ UTILITIES ============ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
.w-full { width: 100%; }
.h-full { height: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }
.hidden { display: none !important; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.cursor-pointer { cursor: pointer; }
.whitespace-nowrap { white-space: nowrap; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: 0.5rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1.125rem; border-radius: var(--radius-sm);
    font-size: 0.8125rem; font-weight: 500; line-height: 1.5;
    transition: var(--transition); white-space: nowrap;
    border: 1px solid transparent;
}
.btn i { font-size: 1rem; }
.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 0.9375rem; }
.btn-xl { padding: 0.875rem 2rem; font-size: 1rem; font-weight: 600; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(249,115,22,0.3); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #4f46e5; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; }
.btn-info { background: var(--info); color: #fff; }
.btn-info:hover { background: #0284c7; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { background: var(--bg); border-color: var(--text-muted); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg); }
.btn-white { background: #fff; color: var(--text-primary); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.btn-white:hover { background: var(--bg); }
.btn-icon { padding: 0.5rem; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); }
.btn-icon:hover { background: var(--bg); color: var(--text-primary); }
.btn-group { display: flex; gap: 0; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ============ CARDS ============ */
.card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); border: 1px solid var(--border-light);
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: space-between;
}
.card-body { padding: 1.25rem; }
.card-footer { padding: 0.75rem 1.25rem; border-top: 1px solid var(--border-light); background: #fafbfc; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* KPI Cards */
.kpi-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 1.25rem; box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition); position: relative; overflow: hidden;
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kpi-card .kpi-icon {
    width: 44px; height: 44px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
}
.kpi-card .kpi-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin: 0.5rem 0 0.125rem; }
.kpi-card .kpi-label { font-size: 0.8125rem; color: var(--text-muted); }
.kpi-card .kpi-trend { font-size: 0.75rem; display: flex; align-items: center; gap: 0.25rem; margin-top: 0.5rem; }
.kpi-card .kpi-trend.up { color: var(--success); }
.kpi-card .kpi-trend.down { color: var(--danger); }

/* ============ STATUS PILLS ============ */
.badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.2rem 0.625rem; border-radius: 9999px;
    font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.01em;
    white-space: nowrap;
}
.badge-success { background: var(--success-light); color: #065f46; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-danger { background: var(--danger-light); color: #991b1b; }
.badge-info { background: var(--info-light); color: #075985; }
.badge-purple { background: var(--purple-light); color: #5b21b6; }
.badge-primary { background: var(--primary-light); color: #9a3412; }
.badge-neutral { background: #f1f5f9; color: #475569; }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.badge-dot.badge-success::before { background: var(--success); }
.badge-dot.badge-warning::before { background: var(--warning); }
.badge-dot.badge-danger::before { background: var(--danger); }
.badge-dot.badge-info::before { background: var(--info); }
.badge-dot.badge-purple::before { background: var(--purple); }

/* ============ TABLES ============ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-light); }
.table { width: 100%; border-collapse: collapse; }
.table thead { background: #f8fafc; }
.table th {
    padding: 0.75rem 1rem; font-size: 0.75rem; font-weight: 600;
    color: var(--text-muted); text-align: left; text-transform: uppercase;
    letter-spacing: 0.05em; border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: 0.75rem 1rem; font-size: 0.8125rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary); vertical-align: middle;
}
.table tbody tr { transition: var(--transition); }
.table tbody tr:hover { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: none; }
.table td.font-medium { color: var(--text-primary); font-weight: 500; }
.table .row-actions { display: flex; gap: 0.25rem; }
.table .row-actions .btn-icon { padding: 0.3rem; font-size: 0.875rem; }

/* ============ FORMS ============ */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.375rem; }
.form-control {
    width: 100%; padding: 0.5rem 0.875rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 0.875rem; color: var(--text-primary);
    background: #fff; transition: var(--transition);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { appearance: auto; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-control-sm { padding: 0.3rem 0.625rem; font-size: 0.8125rem; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.form-check { display: flex; align-items: center; gap: 0.5rem; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

/* ============ SIDEBAR ============ */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width); background: var(--sidebar-bg);
    z-index: 1000; display: flex; flex-direction: column;
    transition: width 0.3s ease; overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-brand {
    padding: 1rem 1.25rem; display: flex; align-items: center; gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.06); min-height: 60px;
}
.sidebar-brand img { height: 32px; width: auto; flex-shrink: 0; }
.sidebar-brand-text { font-size: 1.125rem; font-weight: 700; color: #fff; white-space: nowrap; }
.sidebar-brand-text span { font-size: 0.6875rem; font-weight: 400; color: var(--sidebar-text); display: block; }
.sidebar.collapsed .sidebar-brand-text { display: none; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.75rem 0; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.nav-section-title {
    padding: 0.75rem 1.25rem 0.375rem; font-size: 0.625rem; font-weight: 700;
    color: rgba(148,163,184,0.6); text-transform: uppercase; letter-spacing: 0.1em;
    white-space: nowrap;
}
.sidebar.collapsed .nav-section-title { text-align: center; padding: 0.75rem 0.5rem 0.375rem; font-size: 0; }
.sidebar.collapsed .nav-section-title::after { content: '•••'; font-size: 0.5rem; color: rgba(148,163,184,0.3); }

.nav-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.5rem 1.25rem; margin: 1px 0.5rem;
    border-radius: var(--radius-sm); color: var(--sidebar-text);
    font-size: 0.8125rem; font-weight: 400; transition: var(--transition);
    white-space: nowrap; cursor: pointer; position: relative;
}
.nav-item i { font-size: 1.125rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text-active); }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 500; }
.nav-item .nav-badge {
    margin-left: auto; background: var(--danger); color: #fff;
    font-size: 0.625rem; font-weight: 700; padding: 0.125rem 0.4rem;
    border-radius: 9999px; min-width: 18px; text-align: center;
}
.sidebar.collapsed .nav-item { padding: 0.5rem; justify-content: center; margin: 1px 0.35rem; }
.sidebar.collapsed .nav-item span:not(.nav-badge) { display: none; }
.sidebar.collapsed .nav-item .nav-badge { position: absolute; top: 2px; right: 2px; font-size: 0.5rem; padding: 0.1rem 0.3rem; }

.sidebar-footer {
    padding: 0.75rem 1.25rem; border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; gap: 0.75rem;
}
.sidebar-footer .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.8125rem; font-weight: 600; flex-shrink: 0; }
.sidebar-footer-info { overflow: hidden; }
.sidebar-footer-info .name { font-size: 0.8125rem; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer-info .role { font-size: 0.6875rem; color: var(--sidebar-text); white-space: nowrap; }
.sidebar.collapsed .sidebar-footer-info { display: none; }

/* ============ TOPBAR ============ */
.topbar {
    position: fixed; top: 0; right: 0;
    left: var(--sidebar-width); height: var(--topbar-height);
    background: #fff; z-index: 999;
    display: flex; align-items: center; padding: 0 1.5rem;
    border-bottom: 1px solid var(--border); transition: left 0.3s ease;
}
.sidebar.collapsed ~ .main-content .topbar,
body.sidebar-collapsed .topbar { left: var(--sidebar-collapsed); }

.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-right { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }

.sidebar-toggle { background: none; border: none; font-size: 1.25rem; color: var(--text-secondary); cursor: pointer; padding: 0.5rem; border-radius: var(--radius-sm); }
.sidebar-toggle:hover { background: var(--bg); }

.topbar-search {
    position: relative; width: 320px;
}
.topbar-search input {
    width: 100%; padding: 0.5rem 0.875rem 0.5rem 2.25rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 0.8125rem; background: var(--bg); transition: var(--transition);
}
.topbar-search input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }
.topbar-search i { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.875rem; }

.topbar-btn {
    position: relative; width: 38px; height: 38px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none; color: var(--text-secondary);
    font-size: 1.125rem; transition: var(--transition); cursor: pointer;
}
.topbar-btn:hover { background: var(--bg); color: var(--text-primary); }
.topbar-btn .notif-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid #fff; }

.plant-switcher {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 0.8125rem; color: var(--text-secondary); background: var(--bg);
    cursor: pointer; transition: var(--transition);
}
.plant-switcher:hover { border-color: var(--text-muted); }
.plant-switcher i { color: var(--primary); }

/* ============ MAIN CONTENT ============ */
.main-content {
    margin-left: var(--sidebar-width); padding-top: var(--topbar-height);
    transition: margin-left 0.3s ease; min-height: 100vh;
}
body.sidebar-collapsed .main-content { margin-left: var(--sidebar-collapsed); }
.content-area { padding: 1.5rem; }

/* Page Header */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.page-header .breadcrumb { display: flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }
.page-header .breadcrumb a { color: var(--text-secondary); }
.page-header .breadcrumb a:hover { color: var(--primary); }
.page-header .breadcrumb .sep { color: var(--border); }
.page-header-actions { display: flex; align-items: center; gap: 0.5rem; }

/* Filter Bar */
.filter-bar {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
    padding: 0.75rem 1rem; background: #fff;
    border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    margin-bottom: 1rem; box-shadow: var(--shadow-sm);
}
.filter-chip {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.3rem 0.75rem; border: 1px solid var(--border);
    border-radius: 9999px; font-size: 0.75rem; color: var(--text-secondary);
    background: #fff; cursor: pointer; transition: var(--transition);
    white-space: nowrap;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-chip i { font-size: 0.875rem; }
.filter-chip .remove { margin-left: 0.25rem; cursor: pointer; }

/* ============ TABS ============ */
.tabs {
    display: flex; gap: 0; border-bottom: 2px solid var(--border-light);
    margin-bottom: 1.5rem; overflow-x: auto;
}
.tab-item {
    padding: 0.75rem 1.25rem; font-size: 0.8125rem; font-weight: 500;
    color: var(--text-muted); border-bottom: 2px solid transparent;
    margin-bottom: -2px; cursor: pointer; transition: var(--transition);
    white-space: nowrap;
}
.tab-item:hover { color: var(--text-secondary); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,0.5);
    z-index: 2000; display: none; align-items: center; justify-content: center;
    padding: 1rem; backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl); width: 100%; max-width: 600px;
    max-height: 90vh; overflow-y: auto;
    animation: modalIn 0.2s ease;
}
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1000px; }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.125rem; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 1.25rem; color: var(--text-muted); cursor: pointer; padding: 0.25rem; border-radius: var(--radius-sm); }
.modal-close:hover { background: var(--bg); color: var(--text-primary); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.5rem; background: #fafbfc; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============ DRAWER / SLIDEOVER ============ */
.drawer-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,0.5);
    z-index: 2000; display: none; backdrop-filter: blur(4px);
}
.drawer-overlay.active { display: block; }
.drawer {
    position: fixed; top: 0; right: -480px; bottom: 0;
    width: 480px; background: #fff; z-index: 2001;
    box-shadow: var(--shadow-xl); transition: right 0.3s ease;
    display: flex; flex-direction: column;
}
.drawer.active { right: 0; }
.drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
}
.drawer-body { flex: 1; overflow-y: auto; padding: 1.5rem; }
.drawer-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.5rem; }

/* ============ TOAST ============ */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 3000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.875rem 1.25rem; border-radius: var(--radius);
    background: #fff; box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--text-muted);
    animation: toastIn 0.3s ease; min-width: 300px; max-width: 420px;
    font-size: 0.8125rem;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }
.toast i { font-size: 1.125rem; flex-shrink: 0; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }
.toast .toast-close { margin-left: auto; cursor: pointer; color: var(--text-muted); padding: 0.25rem; }
.toast .toast-close:hover { color: var(--text-primary); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ PROGRESS BARS ============ */
.progress { height: 8px; background: var(--border-light); border-radius: 9999px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 9999px; transition: width 0.5s ease; }
.progress-bar.green { background: var(--success); }
.progress-bar.orange { background: var(--primary); }
.progress-bar.red { background: var(--danger); }
.progress-bar.blue { background: var(--info); }
.progress-bar.purple { background: var(--purple); }

/* ============ TIMELINE ============ */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content: ''; position: absolute; left: 0.5rem; top: 0.5rem; bottom: 0.5rem; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 1.25rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: ''; position: absolute; left: -1.25rem; top: 0.375rem;
    width: 10px; height: 10px; border-radius: 50%; background: var(--border);
    border: 2px solid #fff;
}
.timeline-item.success::before { background: var(--success); }
.timeline-item.warning::before { background: var(--warning); }
.timeline-item.danger::before { background: var(--danger); }
.timeline-item.info::before { background: var(--info); }
.timeline-time { font-size: 0.6875rem; color: var(--text-muted); }
.timeline-text { font-size: 0.8125rem; color: var(--text-secondary); }
.timeline-user { font-size: 0.75rem; color: var(--text-muted); font-style: italic; }

/* ============ EMPTY STATE ============ */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state i { font-size: 3rem; color: var(--border); margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.125rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.875rem; color: var(--text-muted); }

/* ============ CHARTS ============ */
.chart-container { position: relative; width: 100%; }
.chart-container canvas { width: 100% !important; }

/* ============ INSIGHT CARDS ============ */
.insight-card {
    background: #fff; border-radius: var(--radius-lg); padding: 1.25rem;
    border: 1px solid var(--border-light); box-shadow: var(--shadow);
    display: flex; gap: 1rem; transition: var(--transition);
}
.insight-card:hover { box-shadow: var(--shadow-md); }
.insight-icon { width: 42px; height: 42px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.125rem; flex-shrink: 0; }
.insight-content { flex: 1; }
.insight-content h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.375rem; }
.insight-content p { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 0.5rem; }
.insight-impact { font-size: 0.75rem; color: var(--text-muted); font-style: italic; }
.insight-actions { display: flex; gap: 0.375rem; margin-top: 0.75rem; }

/* ============ HOMEPAGE ============ */
.home-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.home-nav.scrolled { box-shadow: var(--shadow-md); }
.home-nav-inner {
    max-width: 1280px; margin: 0 auto;
    padding: 0 2rem; height: 72px;
    display: flex; align-items: center; justify-content: space-between;
}
.home-nav-logo { display: flex; align-items: center; gap: 0.75rem; }
.home-nav-logo img { height: 36px; }
.home-nav-logo .logo-text { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
.home-nav-logo .logo-text span { color: var(--primary); }
.home-nav-links { display: flex; align-items: center; gap: 2rem; }
.home-nav-links a { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); transition: var(--transition); }
.home-nav-links a:hover { color: var(--primary); }
.home-nav-cta { display: flex; align-items: center; gap: 0.75rem; }

.hero-section {
    padding: 8rem 2rem 4rem; background: linear-gradient(135deg, #fff 0%, #f8fafc 50%, #f1f5f9 100%);
    position: relative; overflow: hidden;
}
.hero-section::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(249,115,22,0.06) 0%, transparent 70%);
}
.hero-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-content h1 { font-size: 3rem; font-weight: 800; line-height: 1.15; color: var(--text-primary); margin-bottom: 1.25rem; }
.hero-content h1 span { color: var(--primary); }
.hero-content p { font-size: 1.125rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 2rem; max-width: 540px; }
.hero-cta { display: flex; gap: 0.75rem; margin-bottom: 2.5rem; }
.hero-stats { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.hero-stat {
    background: #fff; padding: 0.75rem 1rem; border-radius: var(--radius);
    box-shadow: var(--shadow-md); border: 1px solid var(--border-light);
    display: flex; align-items: center; gap: 0.625rem; min-width: 180px;
}
.hero-stat .stat-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.hero-stat .stat-value { font-size: 0.9375rem; font-weight: 700; }
.hero-stat .stat-label { font-size: 0.6875rem; color: var(--text-muted); }

.hero-visual {
    position: relative;
}
.hero-mockup {
    background: var(--sidebar-bg); border-radius: var(--radius-xl);
    padding: 0.5rem; box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255,255,255,0.1);
}
.hero-mockup-inner {
    background: var(--bg); border-radius: calc(var(--radius-xl) - 4px);
    padding: 1.5rem; min-height: 350px; position: relative; overflow: hidden;
}
.hero-mockup-inner .mock-sidebar { position: absolute; left: 0; top: 0; bottom: 0; width: 60px; background: var(--sidebar-bg); border-radius: calc(var(--radius-xl) - 4px) 0 0 calc(var(--radius-xl) - 4px); }
.hero-mockup-inner .mock-content { margin-left: 72px; }
.mock-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-bottom: 0.75rem; }
.mock-kpi { background: #fff; border-radius: var(--radius-sm); padding: 0.5rem; box-shadow: var(--shadow-sm); }
.mock-kpi .mock-val { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.mock-kpi .mock-label { font-size: 0.5rem; color: var(--text-muted); text-transform: uppercase; }
.mock-chart { background: #fff; border-radius: var(--radius-sm); padding: 0.75rem; height: 120px; box-shadow: var(--shadow-sm); }
.mock-table { background: #fff; border-radius: var(--radius-sm); padding: 0.5rem; margin-top: 0.75rem; box-shadow: var(--shadow-sm); }
.mock-table-row { display: flex; gap: 0.5rem; padding: 0.25rem 0; border-bottom: 1px solid var(--border-light); font-size: 0.5rem; color: var(--text-secondary); }
.mock-table-row:last-child { border-bottom: none; }

/* Floating cards */
.hero-float-card {
    position: absolute; background: #fff; padding: 0.625rem 0.875rem;
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    font-size: 0.75rem; display: flex; align-items: center; gap: 0.5rem;
    animation: float 3s ease-in-out infinite; z-index: 5;
    border: 1px solid var(--border-light);
}
.hero-float-card:nth-child(1) { top: 10%; right: -20px; animation-delay: 0s; }
.hero-float-card:nth-child(2) { bottom: 30%; right: -30px; animation-delay: 0.5s; }
.hero-float-card:nth-child(3) { bottom: 10%; left: -15px; animation-delay: 1s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Homepage sections */
.section { padding: 5rem 2rem; }
.section-dark { background: var(--sidebar-bg); color: #fff; }
.section-alt { background: #f8fafc; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.section-header p { font-size: 1.0625rem; color: var(--text-secondary); max-width: 640px; margin: 0 auto; }
.section-dark .section-header p { color: rgba(255,255,255,0.7); }

.feature-card {
    background: #fff; border-radius: var(--radius-lg); padding: 1.75rem;
    border: 1px solid var(--border-light); box-shadow: var(--shadow);
    transition: var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.feature-card-icon {
    width: 48px; height: 48px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.6; }

.pain-card {
    background: #fff; border-radius: var(--radius-lg); padding: 1.5rem;
    border-left: 4px solid var(--danger); box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 0.75rem;
    transition: var(--transition);
}
.pain-card:hover { box-shadow: var(--shadow-md); }
.pain-card .pain-icon { font-size: 1.5rem; color: var(--danger); }
.pain-card h4 { font-size: 0.9375rem; font-weight: 600; }
.pain-card .pain-text { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.5; }
.pain-card .solution { font-size: 0.8125rem; color: var(--success); font-weight: 500; display: flex; align-items: center; gap: 0.375rem; }

.industry-card {
    background: rgba(255,255,255,0.06); border-radius: var(--radius-lg);
    padding: 1.5rem; text-align: center; border: 1px solid rgba(255,255,255,0.08);
    transition: var(--transition);
}
.industry-card:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.industry-card i { font-size: 2rem; margin-bottom: 0.75rem; color: var(--primary); }
.industry-card h4 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.375rem; }
.industry-card p { font-size: 0.8125rem; color: rgba(255,255,255,0.6); }

.role-card {
    background: #fff; border-radius: var(--radius-lg); padding: 1.5rem;
    box-shadow: var(--shadow); border: 1px solid var(--border-light);
    display: flex; gap: 1rem; transition: var(--transition);
}
.role-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.role-card .role-icon { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.375rem; flex-shrink: 0; }
.role-card h4 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.25rem; }
.role-card p { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.5; }

.flow-steps {
    display: flex; align-items: center; gap: 0; flex-wrap: wrap; justify-content: center;
}
.flow-step {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem;
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    font-size: 0.8125rem; font-weight: 500; white-space: nowrap;
    border: 1px solid var(--border-light);
}
.flow-step .step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.flow-arrow { font-size: 1.25rem; color: var(--text-muted); padding: 0 0.25rem; }

.home-footer {
    background: var(--sidebar-bg); color: #fff; padding: 3rem 2rem 1.5rem;
}
.home-footer-inner { max-width: 1200px; margin: 0 auto; }
.home-footer .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.home-footer .footer-col h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem; }
.home-footer .footer-col a { display: block; font-size: 0.8125rem; color: rgba(255,255,255,0.6); margin-bottom: 0.5rem; transition: var(--transition); }
.home-footer .footer-col a:hover { color: #fff; }
.home-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1.5rem; font-size: 0.8125rem; color: rgba(255,255,255,0.4); display: flex; justify-content: space-between; }

/* ============ LOGIN PAGE ============ */
.login-page {
    min-height: 100vh; background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.login-container { width: 100%; max-width: 960px; }
.login-header { text-align: center; margin-bottom: 2rem; }
.login-header img { height: 44px; margin-bottom: 0.75rem; }
.login-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.375rem; }
.login-header p { font-size: 0.9375rem; color: var(--text-secondary); }
.login-subtitle { text-align: center; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.role-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.role-select-card {
    background: #fff; border-radius: var(--radius-lg); padding: 1.25rem;
    border: 2px solid var(--border-light); cursor: pointer;
    transition: var(--transition); text-align: center;
}
.role-select-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.role-select-card .role-icon-big {
    width: 56px; height: 56px; border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin: 0 auto 0.75rem;
}
.role-select-card h3 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; }
.role-select-card p { font-size: 0.6875rem; color: var(--text-muted); line-height: 1.4; }
.login-factory-note {
    text-align: center; padding: 1rem; background: #fff;
    border-radius: var(--radius); border: 1px solid var(--border-light);
    font-size: 0.8125rem; color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}
.login-factory-note i { color: var(--info); margin-right: 0.25rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
    .grid-6 { grid-template-columns: repeat(3, 1fr); }
    .role-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .hero-content h1 { font-size: 2.25rem; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .home-footer .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: var(--sidebar-width); }
    .sidebar.mobile-open { transform: translateX(0); }
    .topbar { left: 0 !important; }
    .main-content { margin-left: 0 !important; }
    .content-area { padding: 1rem; }
    .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .role-grid { grid-template-columns: repeat(2, 1fr); }
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-header-actions { width: 100%; flex-wrap: wrap; }
    .filter-bar { flex-direction: column; align-items: flex-start; }
    .hero-section { padding: 6rem 1.5rem 3rem; }
    .hero-content h1 { font-size: 1.75rem; }
    .hero-stats { flex-direction: column; }
    .section { padding: 3rem 1.5rem; }
    .section-header h2 { font-size: 1.75rem; }
    .home-nav-links { display: none; }
    .modal { margin: 0.5rem; }
    .drawer { width: 100%; right: -100%; }
    .topbar-search { width: 200px; }
    .flow-steps { flex-direction: column; }
    .flow-arrow { transform: rotate(90deg); }
    .home-footer .footer-grid { grid-template-columns: 1fr; }
    .home-footer .footer-bottom { flex-direction: column; gap: 0.5rem; }
    .mock-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .role-grid { grid-template-columns: 1fr; }
    .topbar-search { display: none; }
    .plant-switcher span { display: none; }
}

/* ============ MOBILE OVERLAY ============ */
.mobile-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 999; display: none;
}
.mobile-overlay.active { display: block; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============ ANIMATION ============ */
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.slide-up { animation: slideUp 0.3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ============ PRINT ============ */
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; padding-top: 0 !important; }
}

/* Quick action menu */
.quick-actions-menu {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 1500;
}
.quick-actions-btn {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--primary); color: #fff; border: none;
    box-shadow: 0 4px 16px rgba(249,115,22,0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.375rem; cursor: pointer; transition: var(--transition);
}
.quick-actions-btn:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(249,115,22,0.5); }
.quick-actions-panel {
    position: absolute; bottom: 60px; right: 0; width: 280px;
    background: #fff; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl); border: 1px solid var(--border);
    padding: 0.5rem; display: none;
}
.quick-actions-panel.active { display: block; animation: slideUp 0.2s ease; }
.quick-action-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.625rem 0.75rem; border-radius: var(--radius-sm);
    font-size: 0.8125rem; color: var(--text-secondary);
    cursor: pointer; transition: var(--transition);
}
.quick-action-item:hover { background: var(--bg); color: var(--text-primary); }
.quick-action-item i { width: 20px; text-align: center; font-size: 1rem; }

/* Notification dropdown */
.notif-dropdown {
    position: absolute; top: calc(100% + 0.5rem); right: 0;
    width: 360px; background: #fff; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl); border: 1px solid var(--border);
    display: none; z-index: 100;
}
.notif-dropdown.active { display: block; animation: slideUp 0.2s ease; }
.notif-dropdown-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.notif-dropdown-header h4 { font-size: 0.9375rem; font-weight: 600; }
.notif-list { max-height: 320px; overflow-y: auto; }
.notif-item { padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border-light); display: flex; gap: 0.75rem; transition: var(--transition); cursor: pointer; }
.notif-item:hover { background: var(--bg); }
.notif-item:last-child { border-bottom: none; }
.notif-item .notif-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; flex-shrink: 0; }
.notif-item .notif-text { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.4; }
.notif-item .notif-time { font-size: 0.6875rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; top: calc(100% + 0.25rem); right: 0;
    min-width: 200px; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow-xl); border: 1px solid var(--border);
    padding: 0.375rem; display: none; z-index: 100;
}
.dropdown-menu.active { display: block; animation: slideUp 0.15s ease; }
.dropdown-item {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
    font-size: 0.8125rem; color: var(--text-secondary); cursor: pointer;
    transition: var(--transition);
}
.dropdown-item:hover { background: var(--bg); color: var(--text-primary); }
.dropdown-item i { width: 18px; text-align: center; }
.dropdown-divider { height: 1px; background: var(--border-light); margin: 0.25rem 0; }

/* Role switcher bar */
.role-switcher-bar {
    background: var(--accent); color: #fff; padding: 0.5rem 1.5rem;
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    font-size: 0.8125rem; position: fixed; bottom: 0; left: var(--sidebar-width);
    right: 0; z-index: 998; transition: left 0.3s ease;
}
body.sidebar-collapsed .role-switcher-bar { left: var(--sidebar-collapsed); }
.role-switcher-bar select {
    background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
    color: #fff; padding: 0.25rem 0.5rem; border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}
.role-switcher-bar select option { color: #000; }

/* ============ CTA SECTION ============ */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 5rem 2rem; text-align: center; color: #fff;
}
.cta-section h2 { font-size: 2.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.cta-section p { font-size: 1.0625rem; opacity: 0.9; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-section .btn { font-size: 1rem; padding: 0.875rem 2rem; }
