﻿    :root {
      --bg-main: #0b0f19;
      --bg-card: #111827;
      --bg-card-alt: #161f30;
      --border-color: rgba(255, 255, 255, 0.08);
      --border-focus: #06b6d4;
      --text-main: #f8fafc;
      --text-muted: #94a3b8;
      --accent-cyan: #06b6d4;
      --accent-blue: #3b82f6;
      --accent-green: #10b981;
      --accent-amber: #f59e0b;
      --accent-rose: #f43f5e;
      --accent-purple: #8b5cf6;
    }

    body {
      background-color: var(--bg-main);
      color: var(--text-main);
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      margin: 0;
      padding: 0;
      min-height: 100vh;
    }

    .page-container {
      max-width: 1440px;
      margin: 0 auto;
      padding: 24px 20px 80px;
    }

    /* KPI Summary Cards Grid */
    .kpi-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }

    .kpi-card {
      background: linear-gradient(145deg, rgba(17, 24, 39, 0.8), rgba(22, 31, 48, 0.8));
      border: 1px solid var(--border-color);
      border-radius: 14px;
      padding: 18px 20px;
      backdrop-filter: blur(12px);
      transition: all 0.2s ease;
    }

    .kpi-card:hover {
      border-color: rgba(6, 182, 212, 0.3);
      transform: translateY(-2px);
    }

    .kpi-label {
      font-size: 0.75rem;
      font-family: 'JetBrains Mono', monospace;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 8px;
    }

    .kpi-value {
      font-size: 1.65rem;
      font-weight: 700;
      font-family: 'JetBrains Mono', monospace;
      color: #fff;
      line-height: 1.2;
    }

    .kpi-subtext {
      font-size: 0.8rem;
      color: var(--text-muted);
      margin-top: 6px;
    }

    /* Control Toolbar */
    .toolbar-panel {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: 14px;
      padding: 16px 20px;
      margin-bottom: 24px;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .search-box {
      position: relative;
      min-width: 280px;
      flex: 1;
    }

    .search-box input {
      width: 100%;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 10px 14px 10px 38px;
      color: #fff;
      font-size: 0.85rem;
      outline: none;
      transition: border 0.2s;
    }

    .search-box input:focus {
      border-color: var(--accent-cyan);
    }

    .search-box span {
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-muted);
      font-size: 1.1rem;
    }

    .filter-group {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .filter-btn {
      padding: 6px 12px;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border-color);
      color: var(--text-muted);
      font-size: 0.8rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s;
    }

    .filter-btn:hover, .filter-btn.active {
      color: #fff;
      background: rgba(6, 182, 212, 0.15);
      border-color: var(--accent-cyan);
    }

    /* Filter Selects & Badges */
    .filter-select-wrap {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 4px 10px;
      transition: all 0.2s;
    }
    .filter-select-wrap:hover, .filter-select-wrap:focus-within {
      border-color: var(--accent-cyan);
      background: rgba(6, 182, 212, 0.05);
    }
    .filter-label {
      font-size: 0.76rem;
      color: var(--text-muted);
      font-weight: 600;
      white-space: nowrap;
      user-select: none;
    }
    .filter-select {
      background: transparent;
      border: none;
      color: #fff;
      font-size: 0.82rem;
      font-weight: 500;
      outline: none;
      cursor: pointer;
    }
    .filter-select option {
      background: #0f172a;
      color: #f8fafc;
    }

    /* Table Container Overflow Prevention */
    .table-container {
      width: 100%;
      max-height: calc(100vh - 350px);
      min-height: 400px;
      overflow-y: auto;
      overflow-x: auto;
      position: relative;
    }
    .table-container::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }
    .table-container::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.2);
    }
    .table-container::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.15);
      border-radius: 4px;
    }
    .table-container::-webkit-scrollbar-thumb:hover {
      background: var(--accent-cyan);
    }

    /* Sticky table header */
    .erp-table thead th {
      position: sticky;
      top: 0;
      z-index: 10;
      background: #0b132b !important;
      box-shadow: 0 1px 0 var(--border-color);
    }

    /* Pagination Buttons */
    .pagination-btn {
      min-width: 30px;
      height: 30px;
      padding: 0 8px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 6px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border-color);
      color: var(--text-muted);
      font-size: 0.78rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s;
    }
    .pagination-btn:hover:not(:disabled) {
      background: rgba(6, 182, 212, 0.15);
      border-color: var(--accent-cyan);
      color: #fff;
    }
    .pagination-btn.active {
      background: var(--accent-cyan);
      border-color: var(--accent-cyan);
      color: #0f172a;
      font-weight: 700;
    }
    .pagination-btn:disabled {
      opacity: 0.35;
      cursor: not-allowed;
    }


    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 9px 16px;
      border-radius: 8px;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      border: none;
      transition: all 0.2s;
      text-decoration: none;
    }

    .btn-primary {
      background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
      color: #fff;
      box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
    }

    .btn-primary:hover {
      opacity: 0.95;
      transform: translateY(-1px);
    }

    .btn-ai {
      background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
      color: #fff;
      box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
    }

    .btn-secondary {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--border-color);
      color: #fff;
    }

    .btn-secondary:hover {
      background: rgba(255, 255, 255, 0.1);
    }

    .btn-sm {
      padding: 5px 10px;
      font-size: 0.75rem;
      border-radius: 6px;
    }

    /* Project Cards Table */
    .data-card {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: 14px;
      overflow: hidden;
      margin-bottom: 24px;
    }

    .erp-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      text-align: left;
      table-layout: fixed;
    }

    .erp-table th {
      position: relative;
      background: #131d2e;
      color: #94a3b8;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.72rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      padding: 10px 12px;
      border-bottom: 1px solid var(--border-color);
      user-select: none;
      box-sizing: border-box;
    }

    .erp-table th .col-resizer {
      position: absolute;
      top: 0;
      right: 0;
      width: 8px;
      cursor: col-resize;
      user-select: none;
      height: 100%;
      z-index: 25;
      transition: background-color 0.15s ease;
    }

    .erp-table th .col-resizer:hover,
    .erp-table th .col-resizer.resizing {
      background: var(--accent-cyan) !important;
      box-shadow: 0 0 8px rgba(6, 182, 212, 0.9);
    }

    .erp-table td {
      padding: 10px 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
      font-size: 0.82rem;
      vertical-align: middle;
      box-sizing: border-box;
    }

    .erp-table tr:hover td {
      background: rgba(255, 255, 255, 0.02);
    }

    /* Wrap Text / No Wrap classes */
    .erp-table.wrap-text td,
    .erp-table.wrap-text th {
      white-space: normal !important;
      word-break: break-word !important;
      line-height: 1.35;
    }

    .erp-table.no-wrap td,
    .erp-table.no-wrap th {
      white-space: nowrap !important;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    /* Badges */
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 9px;
      border-radius: 6px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.72rem;
      font-weight: 600;
    }
    .badge-green { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
    .badge-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
    .badge-amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
    .badge-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
    .badge-rose { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }

    /* Progress bar */
    .progress-bar-wrap {
      width: 100%;
      height: 6px;
      background: rgba(255, 255, 255, 0.06);
      border-radius: 999px;
      overflow: hidden;
      margin-top: 4px;
    }
    .progress-bar-fill {
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, #06b6d4, #10b981);
      transition: width 0.4s ease;
    }

    /* Detail View Container */
    .detail-view {
      display: none;
    }

    .detail-header {
      background: linear-gradient(135deg, rgba(22, 31, 48, 0.9), rgba(17, 24, 39, 0.9));
      border: 1px solid var(--border-color);
      border-radius: 14px;
      padding: 24px;
      margin-bottom: 20px;
    }

    /* Navigation Tabs inside Detail */
    .detail-tabs {
      display: flex;
      gap: 8px;
      border-bottom: 1px solid var(--border-color);
      margin-bottom: 20px;
      overflow-x: auto;
    }

    .detail-tab-btn {
      padding: 10px 18px;
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--text-muted);
      background: transparent;
      border: none;
      border-bottom: 2px solid transparent;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
    }

    .detail-tab-btn:hover {
      color: #fff;
    }

    .detail-tab-btn.active {
      color: var(--accent-cyan);
      border-bottom-color: var(--accent-cyan);
    }

    /* WBS Tree View */
    .wbs-phase-block {
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      margin-bottom: 16px;
      overflow: hidden;
    }

    .wbs-phase-header {
      background: rgba(255, 255, 255, 0.04);
      padding: 14px 18px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      border-bottom: 1px solid var(--border-color);
    }

    .wbs-task-row {
      padding: 12px 18px;
      display: grid;
      grid-template-columns: 70px 1fr 140px 130px 110px 100px 80px;
      gap: 12px;
      align-items: center;
      border-bottom: 1px solid rgba(255, 255, 255, 0.03);
      font-size: 0.83rem;
    }

    .wbs-task-row:hover {
      background: rgba(255, 255, 255, 0.02);
    }

    /* Modals */
    .modal-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0, 0, 0, 0.75);
      backdrop-filter: blur(8px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      padding: 20px;
    }

    .modal-overlay.active {
      display: flex !important;
    }

    .modal-dialog {
      background: #111827;
      border: 1px solid var(--border-color);
      border-radius: 16px;
      width: 100%;
      max-width: 800px;
      max-height: 90vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
      overflow: hidden;
    }

    .modal-header {
      padding: 18px 24px;
      border-bottom: 1px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .modal-body {
      padding: 20px 24px;
      overflow-y: auto;
      flex: 1;
    }

    .modal-footer {
      padding: 16px 24px;
      border-top: 1px solid var(--border-color);
      display: flex;
      justify-content: flex-end;
      gap: 12px;
      background: rgba(0, 0, 0, 0.2);
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 14px;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .form-group.full {
      grid-column: 1 / -1;
    }

    .form-group label {
      font-size: 0.78rem;
      font-weight: 600;
      color: var(--text-muted);
    }

    .form-control {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 10px 12px;
      color: #fff;
      font-size: 0.85rem;
      outline: none;
      transition: border 0.2s;
    }

    .form-control:focus {
      border-color: var(--accent-cyan);
    }

    /* Timeline visual items */
    .timeline-track {
      position: relative;
      padding-left: 28px;
      margin-top: 16px;
    }

    .timeline-track::before {
      content: '';
      position: absolute;
      left: 10px;
      top: 0;
      bottom: 0;
      width: 2px;
      background: rgba(6, 182, 212, 0.25);
    }

    .timeline-node {
      position: relative;
      margin-bottom: 20px;
    }

    .timeline-dot {
      position: absolute;
      left: -28px;
      top: 4px;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--accent-cyan);
      box-shadow: 0 0 10px var(--accent-cyan);
      border: 2px solid #0b0f19;
    }

    /* Interactive Gantt Chart Component Styles */
    .gantt-view-btn {
      padding: 5px 12px;
      font-size: 0.75rem;
      border: none;
      background: transparent;
      color: var(--text-muted);
      border-radius: 6px;
      cursor: pointer;
      font-weight: 500;
      transition: all 0.2s;
    }
    .gantt-view-btn.active {
      background: var(--accent-blue);
      color: #fff;
      font-weight: 600;
    }
    .gantt-viewport {
      display: grid;
      grid-template-columns: 340px 1fr;
      border: 1px solid var(--border-color);
      border-radius: 10px;
      overflow: hidden;
      background: #060913;
      min-height: 380px;
      position: relative;
    }
    @media (max-width: 960px) {
      .gantt-viewport {
        grid-template-columns: 220px 1fr;
      }
    }
    .gantt-sidebar {
      background: #0b101c;
      border-right: 1px solid var(--border-color);
      overflow-y: hidden;
    }
    .gantt-sidebar-header {
      display: flex;
      align-items: center;
      padding: 10px 12px;
      background: #131d2e;
      border-bottom: 1px solid var(--border-color);
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.72rem;
      font-weight: 600;
      color: #94a3b8;
      height: 42px;
      box-sizing: border-box;
    }
    .gantt-tasks-list {
      display: flex;
      flex-direction: column;
    }
    .gantt-task-row {
      display: flex;
      align-items: center;
      padding: 8px 12px;
      height: 40px;
      border-bottom: 1px solid rgba(255,255,255,0.04);
      font-size: 0.78rem;
      box-sizing: border-box;
      transition: background 0.15s;
    }
    .gantt-task-row:hover, .gantt-bar-row:hover {
      background: rgba(255,255,255,0.04);
    }
    .gantt-task-row.phase-row {
      background: rgba(6, 182, 212, 0.05);
      font-weight: 600;
      color: #fff;
    }
    .gantt-canvas-wrap {
      overflow-x: auto;
      overflow-y: hidden;
      background: #060913;
      position: relative;
    }
    .gantt-timeline-header {
      display: flex;
      height: 42px;
      background: #131d2e;
      border-bottom: 1px solid var(--border-color);
      position: sticky;
      top: 0;
      z-index: 2;
    }
    .gantt-time-col {
      flex: 0 0 38px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      border-right: 1px solid rgba(255,255,255,0.05);
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.65rem;
      color: #94a3b8;
      box-sizing: border-box;
    }
    .gantt-time-col.weekend {
      background: rgba(0,0,0,0.25);
    }
    .gantt-time-col.today {
      background: rgba(6, 182, 212, 0.15);
      color: var(--accent-cyan);
      font-weight: bold;
    }
    .gantt-bars-container {
      position: relative;
      display: flex;
      flex-direction: column;
    }
    .gantt-bar-row {
      height: 40px;
      position: relative;
      border-bottom: 1px solid rgba(255,255,255,0.04);
      display: flex;
      align-items: center;
      box-sizing: border-box;
    }
    .gantt-bar {
      position: absolute;
      height: 24px;
      border-radius: 6px;
      background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
      box-shadow: 0 2px 8px rgba(0,0,0,0.3);
      cursor: pointer;
      display: flex;
      align-items: center;
      padding: 0 8px;
      font-size: 0.7rem;
      color: #fff;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      transition: transform 0.2s, box-shadow 0.2s;
    }
    .gantt-bar:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
      z-index: 5;
    }
    .gantt-bar.cpm-critical {
      background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
      border: 1px solid #fda4af;
      box-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
    }
    .gantt-bar.phase-bar {
      background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
      height: 16px;
      border-radius: 4px;
    }
    .gantt-bar.completed {
      background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    }
    .gantt-bar-progress {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      background: rgba(255,255,255,0.22);
      border-radius: 4px;
    }
    .gantt-milestone-marker {
      position: absolute;
      top: 50%;
      transform: translateY(-50%) rotate(45deg);
      width: 14px;
      height: 14px;
      background: #00f2fe;
      border: 2px solid #fff;
      box-shadow: 0 0 10px #00f2fe;
      z-index: 4;
      cursor: pointer;
    }
    .gantt-today-line {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 2px;
      background: #00f2fe;
      box-shadow: 0 0 8px #00f2fe;
      z-index: 3;
      pointer-events: none;
    }
