/* ═══════════════════════════════════════════
   TRACK360 ERP - Design System
   Light Professional Theme · Sober & Decent
   ═══════════════════════════════════════════ */

:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface2: #f0f3f7;
    --surface3: #e8ecf1;
    --border: #e2e7ef;
    --border-light: #eef1f6;
    --accent: #2563eb;
    --accent-light: #dbeafe;
    --accent-hover: #1d4ed8;
    --accent2: #059669;
    --accent2-light: #d1fae5;
    --accent3: #d97706;
    --accent3-light: #fef3c7;
    --accent4: #dc2626;
    --accent4-light: #fee2e2;
    --purple: #7c3aed;
    --purple-light: #ede9fe;
    --teal: #0d9488;
    --teal-light: #ccfbf1;
    --text: #1e293b;
    --text2: #334155;
    --muted: #64748b;
    --muted2: #94a3b8;
    --white: #ffffff;
    --sidebar-w: 240px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    padding-bottom: 84px;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ═══════ SIDEBAR ═══════ */
.sidebar {
    width: var(--sidebar-w);
    background: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 1px 0 4px rgba(0,0,0,0.03);
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-logo {
    display: flex; align-items: center; gap: 10px;
    padding: 0 18px 18px;
    border-bottom: 1px solid var(--border);
}

.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: #fff;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.logo-text { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.logo-sub  { font-size: 10px; color: var(--muted); font-weight: 500; }

.version-badge {
    margin: 12px 18px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    font-size: 10px; color: var(--muted);
    font-family: 'DM Mono', monospace;
}

.nav-section { padding: 6px 0; }

.nav-label {
    font-size: 10px; color: var(--muted);
    padding: 8px 18px 4px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 700;
}

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 18px;
    cursor: pointer;
    color: var(--muted);
    transition: all .15s;
    border-left: 3px solid transparent;
    font-size: 13px; font-weight: 500;
    text-decoration: none;
    margin: 1px 0;
}

.nav-item:hover {
    color: var(--text);
    background: var(--surface2);
}

.nav-item.active {
    color: var(--accent);
    background: var(--accent-light);
    border-left-color: var(--accent);
    font-weight: 600;
}

.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }

.sidebar-user {
    margin-top: auto;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
    cursor: pointer;
}

/* ═══════ COLLAPSIBLE NAV ═══════ */
.nav-label-toggle {
    cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    transition: color 0.15s;
}
.nav-label-toggle:hover { color: var(--text); }
.nav-label-toggle .section-arrow { width: 12px; height: 12px; transition: transform 0.25s ease; }
.nav-label-toggle.collapsed .section-arrow { transform: rotate(-90deg); }
.nav-items-group { overflow: hidden; max-height: 800px; transition: max-height 0.35s ease; }
.nav-items-group.collapsed { max-height: 0; }

/* ═══════ BADGE ═══════ */
.badge-red {
    background: var(--accent4);
    color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 10px;
    margin-left: auto;
}

.badge-count {
    background: var(--accent);
    color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 1px 6px; border-radius: 10px;
    margin-left: auto;
    min-width: 18px; text-align: center;
}

/* ═══════ MAIN CONTAINER ═══════ */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ═══════ TOPBAR ═══════ */
.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px;
    display: flex; align-items: center; gap: 16px;
    position: sticky; top: 0; z-index: 50;
    box-shadow: var(--shadow-sm);
}

.breadcrumb-nav { font-size: 12px; color: var(--muted); }
.breadcrumb-nav span { color: var(--text); font-weight: 600; }

.search-bar {
    flex: 1; max-width: 380px; margin: 0 auto;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 7px 14px;
    display: flex; align-items: center; gap: 8px;
    color: var(--muted); font-size: 13px;
    transition: border-color 0.15s;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar input {
    background: transparent; border: none; outline: none;
    color: var(--text); font-family: inherit; font-size: 13px; flex: 1;
}
.search-bar input::placeholder { color: var(--muted2); }

.kbd {
    font-size: 10px; background: var(--surface3);
    border-radius: 4px; padding: 2px 5px;
    font-family: 'DM Mono', monospace; color: var(--muted);
}

.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.role-toggle {
    display: flex; gap: 3px;
    background: var(--surface2);
    border-radius: var(--radius); padding: 3px;
    border: 1px solid var(--border);
}
.role-btn {
    padding: 5px 12px; border-radius: 7px;
    font-size: 11px; font-weight: 600;
    cursor: pointer; color: var(--muted); transition: .15s;
}
.role-btn:hover { color: var(--text); }
.role-btn.active { background: var(--accent); color: #fff; box-shadow: 0 1px 4px rgba(37,99,235,0.3); }

.date-tag { font-size: 11px; color: var(--muted); font-weight: 500; }

.user-avatar-sm {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 11px; color: #fff;
}

/* ═══════ NOTIFICATION ═══════ */
.topbar-notification {
    position: relative; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; cursor: pointer;
    color: var(--muted); transition: all 0.15s;
}
.topbar-notification:hover { background: var(--surface2); color: var(--text); }

.notif-dot {
    position: absolute; top: 6px; right: 6px;
    width: 7px; height: 7px;
    background: var(--accent4);
    border-radius: 50%;
    border: 1.5px solid var(--white);
}

.notif-panel {
    position: fixed; top: 54px; right: 20px;
    width: 360px; max-height: 420px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 200; display: none; overflow: hidden;
}
.notif-panel.show { display: block; }

.notif-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid var(--border);
}

.notif-mark-all {
    background: none; border: none;
    color: var(--accent); font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: 'DM Sans', sans-serif;
}
.notif-mark-all:hover { text-decoration: underline; }

.notif-list { max-height: 340px; overflow-y: auto; }

.notif-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.12s; cursor: pointer;
}
.notif-item:hover { background: var(--surface2); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(37,99,235,0.03); }

.notif-icon {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.notif-icon.green  { background: var(--accent2-light); color: var(--accent2); }
.notif-icon.amber  { background: var(--accent3-light); color: var(--accent3); }
.notif-icon.blue   { background: var(--accent-light);  color: var(--accent); }
.notif-icon.red    { background: var(--accent4-light);  color: var(--accent4); }

.notif-text { font-size: 12px; color: var(--text2); line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--muted2); margin-top: 2px; }

/* ═══════ CONTENT ═══════ */
.content { padding: 24px 24px 104px; flex: 1; }

/* ═══════ CARDS ═══════ */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 14px; font-weight: 700; color: var(--text);
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
}

/* ═══════ KPI / STAT CARDS ═══════ */
.kpi-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 20px; }

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    position: relative; overflow: hidden;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}                                         
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.stat-card::after {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
}
.stat-card.blue::after   { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.stat-card.green::after  { background: linear-gradient(90deg, #059669, #10b981); }
.stat-card.amber::after  { background: linear-gradient(90deg, #d97706, #f59e0b); }
.stat-card.red::after    { background: linear-gradient(90deg, #dc2626, #ef4444); }
.stat-card.purple::after { background: linear-gradient(90deg, #7c3aed, #8b5cf6); }

.kpi-label {
    font-size: 11px; color: var(--muted);
    font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; margin-bottom: 6px;
    display: flex; align-items: center; gap: 6px;
}

.kpi-num {
    font-size: 30px; font-weight: 800;
    font-family: 'DM Mono', monospace; line-height: 1;
    color: var(--text);
}

.kpi-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

.kpi-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; margin-left: auto; }
.kpi-badge.up   { background: var(--accent2-light); color: var(--accent2); }
.kpi-badge.down { background: var(--accent4-light); color: var(--accent4); }

.kpi-card { /* compat with dashboard view */
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    position: relative; overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.kpi-card.blue::before  { background: var(--accent); }
.kpi-card.green::before { background: var(--accent2); }
.kpi-card.amber::before { background: var(--accent3); }

/* ═══════ GRID LAYOUTS ═══════ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }

/* ═══════ STATUS BADGES ═══════ */
.status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
}
.status-badge.present, .status-badge.approved  { background: var(--accent2-light); color: var(--accent2); }
.status-badge.late, .status-badge.pending       { background: var(--accent3-light); color: var(--accent3); }
.status-badge.absent, .status-badge.rejected    { background: var(--accent4-light); color: var(--accent4); }

/* ═══════ PAGE HEADER ═══════ */
.page-header {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.page-title {
    font-size: 20px; font-weight: 800; color: var(--text);
    display: flex; align-items: center; gap: 8px;
    letter-spacing: -0.01em;
}
.page-date { font-size: 12px; color: var(--muted); margin-top: 3px; }

.live-dot {
    display: flex; align-items: center; gap: 5px;
    background: var(--accent2-light);
    border: 1px solid rgba(5,150,105,0.2);
    padding: 3px 8px; border-radius: 20px;
    font-size: 11px; color: var(--accent2); font-weight: 600;
}
.live-dot::before {
    content: ''; width: 6px; height: 6px;
    background: var(--accent2); border-radius: 50%;
    animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ═══════ BUTTONS (base from ems.css, forms.css will extend) ═══════ */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none; padding: 9px 18px; border-radius: var(--radius);
    font-family: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none; transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(37,99,235,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.35); color:#fff; }
.btn-primary:active { transform: scale(0.98); }

.btn-success {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    border: none; padding: 9px 18px; border-radius: var(--radius);
    font-family: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none; transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(5,150,105,0.3);
}

/* ═══════ ACTION BUTTONS ═══════ */
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.action-btn {
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 10px 12px;
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; transition: .15s; color: var(--text);
    font-size: 12px; font-weight: 500; text-decoration: none;
}
.action-btn:hover { border-color: var(--accent); background: var(--accent-light); color: var(--text); }
.action-btn svg { width: 14px; height: 14px; color: var(--muted); }

/* ═══════ METRICS ═══════ */
.metrics-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.metric { text-align: center; }
.metric-num { font-size: 26px; font-weight: 800; font-family: 'DM Mono', monospace; }
.metric-num.blue  { color: var(--accent); }
.metric-num.green { color: var(--accent2); }
.metric-num.amber { color: var(--accent3); }
.metric-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ═══════ TABLE (compat with dashboard) ═══════ */
.ems-table { width: 100%; border-collapse: collapse; }
.ems-table th {
    font-size: 10px; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em;
    padding: 0 8px 10px; text-align: left; font-weight: 700;
}
.ems-table td { padding: 9px 8px; font-size: 12px; border-top: 1px solid var(--border); }

/* ═══════ STATUS DOTS ═══════ */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.online  { background: var(--accent2); box-shadow: 0 0 6px rgba(5,150,105,0.4); }
.status-dot.offline { background: var(--muted2); }
.status-dot.away    { background: var(--accent3); }

/* ═══════ PROGRESS BAR ═══════ */
.progress-bar { height: 4px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #60a5fa);
    border-radius: 2px;
    animation: progressBar 1s ease-out both;
}
@keyframes progressBar { from { width: 0; } to { width: var(--progress, 100%); } }

/* ═══════ MOBILE ═══════ */
.mobile-menu-btn {
    display: none; position: fixed;
    top: 14px; left: 14px; z-index: 150;
    width: 38px; height: 38px;
    align-items: center; justify-content: center;
    background: var(--white); border: 1px solid var(--border);
    border-radius: 8px; cursor: pointer; color: var(--text);
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .mobile-menu-btn { display: flex; }
    .main { margin-left: 0; }
}

/* ═══════ SCROLLBAR ═══════ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted2); }

/* ═══════ GLOBAL SEARCH MODAL ═══════ */
.search-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000; display: none;
    align-items: flex-start; justify-content: center;
    padding-top: 10vh;
    opacity: 0; transition: opacity 0.2s ease;
}
.search-modal-overlay.active { display: flex; opacity: 1; }

.search-modal {
    background: var(--white);
    width: 100%; max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    overflow: hidden;
    transform: translateY(-20px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.search-modal-overlay.active .search-modal {
    transform: translateY(0) scale(1);
}

.search-modal-header {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.search-modal-header svg { color: var(--accent); }
.search-modal-header input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 16px; color: var(--text); font-family: inherit;
}
.search-modal-header input::placeholder { color: var(--muted2); }

.search-modal-body { max-height: 60vh; overflow-y: auto; padding: 12px; }

.search-section { margin-bottom: 16px; }
.search-section:last-child { margin-bottom: 0; }
.search-section-title {
    font-size: 11px; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 8px 12px; margin-bottom: 4px;
}

.search-result-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px; border-radius: 10px;
    cursor: pointer; transition: all 0.15s ease;
    text-decoration: none; border: 1px solid transparent;
}
.search-result-item:hover, .search-result-item.selected {
    background: var(--surface2); border-color: var(--border);
}

.search-result-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--surface3); color: var(--text2);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; transition: all 0.2s;
}
.search-result-item:hover .search-result-icon.blue { background: var(--accent); color: var(--white); }
.search-result-item:hover .search-result-icon { background: var(--text); color: var(--white); }

.search-result-icon.blue { background: var(--accent-light); color: var(--accent); }

.search-result-content { flex: 1; }
.search-result-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.search-result-desc { font-size: 12px; color: var(--muted); }

.search-result-arrow { color: var(--muted2); opacity: 0; transform: translateX(-5px); transition: all 0.2s; }
.search-result-item:hover .search-result-arrow { opacity: 1; transform: translateX(0); }

.search-modal-footer {
    display: flex; align-items: center; gap: 16px;
    padding: 12px 20px; border-top: 1px solid var(--border);
    background: var(--surface2); font-size: 11px; color: var(--muted);
}
.search-modal-footer kbd {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 4px; padding: 2px 6px; font-family: 'DM Mono', monospace;
    font-size: 10px; font-weight: 600; color: var(--text2);
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

/* ERP shell and module placeholders */
.nav-status-badge {
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.22);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.erp-hero,
.module-coming-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: stretch;
    padding: 28px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(16, 185, 129, 0.06)),
        var(--white);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.module-coming-hero.inventory {
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(37, 99, 235, 0.06)),
        var(--white);
}

.module-coming-hero.projects {
    background:
        linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(37, 99, 235, 0.06)),
        var(--white);
}

.erp-hero::after,
.module-coming-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.16), transparent 70%);
}

.erp-eyebrow {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.erp-hero h1,
.module-coming-hero h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.08;
    color: var(--text);
    letter-spacing: -0.02em;
}

.erp-hero p,
.module-coming-hero p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    max-width: 720px;
}

.erp-hero-panel,
.module-orbit-card {
    min-width: 250px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(255,255,255,.72);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    backdrop-filter: blur(10px);
    z-index: 1;
}

.erp-hero-label,
.module-orbit-card span {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}

.erp-hero-panel strong,
.module-orbit-card strong {
    font-size: 17px;
    color: var(--text);
}

.erp-hero-panel small {
    color: var(--muted);
    line-height: 1.45;
}

.erp-module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.erp-module-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.erp-module-card,
.erp-feature-card,
.erp-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}

.erp-module-card {
    padding: 18px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 230px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.erp-module-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37,99,235,.28);
    box-shadow: var(--shadow);
    color: var(--text);
}

.erp-module-card.soon {
    border-style: dashed;
}

.erp-module-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.erp-module-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
}

.erp-module-icon.blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.erp-module-icon.green { background: linear-gradient(135deg, #059669, #047857); }
.erp-module-icon.violet { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.erp-module-icon.amber { background: linear-gradient(135deg, #f59e0b, #b45309); }

.erp-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--surface2);
    color: var(--muted);
    border: 1px solid var(--border);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.erp-pill.live {
    background: rgba(16,185,129,.10);
    color: #047857;
    border-color: rgba(16,185,129,.22);
}

.erp-pill.partial {
    background: rgba(245,158,11,.10);
    color: #b45309;
    border-color: rgba(245,158,11,.22);
}

.erp-module-card h2,
.erp-feature-card h3 {
    margin: 0 0 8px;
    color: var(--text);
}

.erp-module-card h2 { font-size: 17px; }
.erp-feature-card h3 { font-size: 15px; }

.erp-module-card p,
.erp-feature-card p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    margin: 0;
}

.erp-module-metrics {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 18px;
}

.erp-module-metrics span {
    font-size: 10px;
    font-weight: 700;
    color: var(--text2);
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 7px;
}

.erp-two-col {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 14px;
}

.erp-panel {
    padding: 18px;
}

.erp-panel-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 14px;
}

.erp-flow {
    display: grid;
    gap: 10px;
}

.erp-flow.horizontal {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.erp-flow div,
.erp-steps li {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 10px;
    padding: 12px;
}

.erp-flow strong {
    display: block;
    font-size: 12px;
    color: var(--text);
    margin-bottom: 4px;
}

.erp-flow span,
.erp-steps li {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.erp-steps {
    padding-left: 18px;
    display: grid;
    gap: 9px;
    margin: 0;
}

.module-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.erp-feature-card {
    padding: 18px;
    min-height: 155px;
}

.erp-feature-card i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    color: var(--accent);
    margin-bottom: 12px;
}

.erp-data-checklist {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.erp-data-checklist span {
    padding: 10px 12px;
    border-radius: 9px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 1100px) {
    .erp-module-grid,
    .erp-module-grid.compact,
    .erp-two-col,
    .erp-flow.horizontal,
    .erp-data-checklist {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .erp-hero,
    .module-coming-hero {
        flex-direction: column;
        padding: 20px;
    }

    .erp-hero-panel,
    .module-orbit-card {
        min-width: 0;
    }

    .erp-module-grid,
    .erp-module-grid.compact,
    .erp-two-col,
    .erp-flow.horizontal,
    .erp-data-checklist {
        grid-template-columns: 1fr;
    }

    .erp-hero h1,
    .module-coming-hero h1 {
        font-size: 24px;
    }
}
