    :root {
      --bg: #0a0e1a;
      --surface: #111827;
      --surface2: #1a2234;
      --border: #1e2d45;
      --accent: #00d4ff;
      --accent2: #7c3aed;
      --success: #10b981;
      --warning: #f59e0b;
      --danger: #ef4444;
      --text: #e2e8f0;
      --muted: #64748b;
      --font: 'Sora', sans-serif;
      --mono: 'JetBrains Mono', monospace;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body { font-family: var(--font); background: var(--bg); color: var(--text); overflow-x: hidden; }
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: var(--bg); }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--muted); }

    /* ── SIDEBAR ── */
    #sidebar {
      width: 240px; min-height: 100vh;
      background: var(--surface);
      border-right: 1px solid var(--border);
      position: fixed; left: 0; top: 0; z-index: 50;
      display: flex; flex-direction: column;
      transition: transform 0.3s ease;
    }
    #sidebar.collapsed { transform: translateX(-240px); }
    .sidebar-logo {
      padding: 24px 20px 20px;
      border-bottom: 1px solid var(--border);
    }
    .sidebar-logo .brand {
      font-size: 18px; font-weight: 800; letter-spacing: -0.5px;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    }
    .sidebar-logo .sub { font-size: 10px; color: var(--muted); font-family: var(--mono); margin-top: 2px; }
    .nav-section { padding: 16px 12px 8px; font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); font-family: var(--mono); }
    .nav-item {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 16px; margin: 2px 8px;
      border-radius: 8px; cursor: pointer;
      font-size: 13.5px; font-weight: 500; color: var(--muted);
      transition: all 0.15s; text-decoration: none;
    }
    .nav-item:hover { background: var(--surface2); color: var(--text); }
    .nav-item.active { background: rgba(0,212,255,0.1); color: var(--accent); border: 1px solid rgba(0,212,255,0.2); }
    .nav-item .icon { font-size: 16px; width: 20px; text-align: center; }
    .sidebar-footer {
      margin-top: auto; padding: 16px; border-top: 1px solid var(--border);
    }

    /* ── MAIN ── */
    #main {
      margin-left: 240px;
      transition: margin-left 0.3s ease;
      min-height: 100vh;
    }
    #main.expanded { margin-left: 0; }

    /* ── TOP BAR ── */
    #topbar {
      position: sticky; top: 0; z-index: 40;
      background: rgba(10,14,26,0.95);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
      padding: 12px 24px;
      display: flex; align-items: center; gap: 12px;
    }
    #topbar .breadcrumb { font-size: 12px; color: var(--muted); font-family: var(--mono); }
    #topbar .page-title { font-size: 18px; font-weight: 700; color: var(--text); }
    .live-badge {
      display: flex; align-items: center; gap: 6px;
      background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3);
      border-radius: 20px; padding: 4px 10px;
      font-size: 11px; color: var(--success); font-family: var(--mono);
    }
    .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: pulse 1.5s infinite; }
    @keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(1.3)} }

    /* ── PAGES ── */
    .page { display: none; padding: 24px; animation: fadeIn 0.2s ease; }
    .page.active { display: block; }
    @keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

    /* ── STAT CARDS ── */
    .stat-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 12px; padding: 20px;
      position: relative; overflow: hidden;
    }
    .stat-card::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
      background: var(--card-accent, var(--accent));
    }
    .stat-card .value { font-size: 32px; font-weight: 800; font-family: var(--mono); line-height: 1; margin: 8px 0 4px; }
    .stat-card .label { font-size: 12px; color: var(--muted); font-weight: 500; }
    .stat-card .change { font-size: 11px; font-family: var(--mono); }

    /* ── CHARTS ── */
    .chart-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 12px; padding: 20px;
    }
    .chart-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 16px; }

    /* ── TABLES ── */
    .data-table { width: 100%; border-collapse: collapse; }
    .data-table th {
      background: var(--surface2); padding: 10px 14px;
      text-align: left; font-size: 11px; text-transform: uppercase;
      letter-spacing: 0.8px; color: var(--muted); font-family: var(--mono);
      border-bottom: 1px solid var(--border);
    }
    .data-table td {
      padding: 12px 14px; font-size: 13px;
      border-bottom: 1px solid rgba(30,45,69,0.5);
      vertical-align: middle;
    }
    .data-table tr:hover td { background: rgba(255,255,255,0.02); }

    /* ── BADGES ── */
    .badge {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 3px 8px; border-radius: 20px; font-size: 11px;
      font-family: var(--mono); font-weight: 600;
    }
    .badge-pending { background: rgba(100,116,139,0.2); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
    .badge-progress { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
    .badge-finish { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
    .badge-urgent { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
    .badge-high { background: rgba(249,115,22,0.15); color: #fb923c; border: 1px solid rgba(249,115,22,0.3); }
    .badge-medium { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
    .badge-low { background: rgba(100,116,139,0.2); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }

    /* ── BUTTONS ── */
    .btn {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 8px 16px; border-radius: 8px; font-size: 13px;
      font-weight: 600; cursor: pointer; border: none;
      transition: all 0.15s; font-family: var(--font);
    }
    .btn-primary { background: var(--accent); color: #000; }
    .btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
    .btn-ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
    .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
    .btn-danger { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
    .btn-danger:hover { background: rgba(239,68,68,0.25); }
    .btn-sm { padding: 5px 10px; font-size: 12px; }
    .btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }

    /* ── MODAL ── */
    .modal-overlay {
      position: fixed; inset: 0; z-index: 100;
      background: rgba(0,0,0,0.7);
      backdrop-filter: blur(4px);
      display: flex; align-items: center; justify-content: center;
      padding: 20px;
    }
    .modal-overlay.hidden { display: none; }
    .modal {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 16px; padding: 28px;
      width: 100%; max-width: 680px;
      max-height: 90vh; overflow-y: auto;
      animation: modalIn 0.2s ease;
    }
    @keyframes modalIn { from{opacity:0;transform:scale(0.95)} to{opacity:1;transform:scale(1)} }
    .modal h2 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }

    /* ── FORM FIELDS ── */
    .field { margin-bottom: 16px; }
    .field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.5px; }
    .field input, .field select, .field textarea {
      width: 100%; padding: 10px 14px;
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: 8px; color: var(--text); font-family: var(--font); font-size: 13px;
      outline: none; transition: border-color 0.15s;
    }
    .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
    .field select option { background: var(--surface2); }
    .field textarea { resize: vertical; min-height: 80px; }

    /* ── BOM TREE ── */
    .tree-node { position: relative; }
    .tree-node::before {
      content: ''; position: absolute; left: -16px; top: 20px;
      width: 16px; height: 1px; background: var(--border);
    }
    .tree-children { padding-left: 24px; border-left: 1px solid var(--border); margin-left: 8px; }

    /* ── GANTT ── */
    .gantt-container { overflow-x: auto; }
    .gantt-bar {
      height: 22px; border-radius: 4px;
      position: absolute; top: 50%; transform: translateY(-50%);
      display: flex; align-items: center; padding: 0 6px;
      font-size: 10px; font-weight: 600; white-space: nowrap;
      overflow: hidden; cursor: default;
    }

    /* ── LOGIN SCREEN ── */
    #loginScreen {
      position: fixed; inset: 0; z-index: 200;
      background: var(--bg);
      display: flex; align-items: center; justify-content: center;
    }
    #loginScreen.hidden { display: none; }

    /* ── PROCESS CHIPS ── */
    .process-chip {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 2px 8px; border-radius: 4px;
      font-size: 10px; font-family: var(--mono); font-weight: 600;
    }
    .proc-Cutting { background: rgba(59,130,246,0.15); color: #60a5fa; }
    .proc-Bending { background: rgba(168,85,247,0.15); color: #c084fc; }
    .proc-Welding { background: rgba(239,68,68,0.15); color: #f87171; }
    .proc-Painting { background: rgba(16,185,129,0.15); color: #34d399; }
    .proc-Assembly { background: rgba(245,158,11,0.15); color: #fbbf24; }
    .proc-Subcon { background: rgba(100,116,139,0.2); color: #94a3b8; }

    /* ── ACTIVITY FEED ── */
    .activity-item {
      display: flex; align-items: flex-start; gap: 12px;
      padding: 12px 0; border-bottom: 1px solid rgba(30,45,69,0.5);
    }
    .activity-icon {
      width: 32px; height: 32px; border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 14px; flex-shrink: 0;
      background: rgba(16,185,129,0.1); color: var(--success);
    }

    /* ── WO PRINT ── */
    @media print {
      body { background: white; color: black; }
      #sidebar, #topbar, .no-print { display: none !important; }
      #main { margin-left: 0 !important; }
      .print-area { display: block !important; }
    }

    /* ── GRID HELPERS ── */
    .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
    @media(max-width:1280px) { .grid-4{grid-template-columns:repeat(2,1fr)} }
    @media(max-width:900px) { .grid-2,.grid-3,.grid-4{grid-template-columns:1fr} #sidebar{transform:translateX(-240px)} #main{margin-left:0} }