    :root {
      --primary: #3b82f6;
      --primary-dark: #0f172a;
      --bg: #0f172a;
      --surface: #1e293b;
      --border: #334155;
      --text: #f1f5f9;
      --text-secondary: #94a3b8;
      --success: #10b981;
      --warning: #f59e0b;
      --error: #ef4444;
    }
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    body {
      margin: 0;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
      background-color: var(--bg);
      background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
      color: var(--text);
      height: 100vh;
      overflow: hidden;
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
    }

    /* 全局滚动条美化 */
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }
    ::-webkit-scrollbar-track {
      background: transparent;
    }
    ::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 3px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: rgba(255, 255, 255, 0.2);
    }
    .app {
      display: flex;
      height: 100vh;
      max-width: 1800px;
      margin: 0 auto;
      background: rgba(15, 23, 42, 0.6);
      backdrop-filter: blur(20px);
    }
    /* 侧边栏美化 */
    .sidebar {
      width: 260px;
      background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.8) 100%);
      padding: 24px 16px;
      display: flex;
      flex-direction: column;
      border-right: 1px solid rgba(255,255,255,0.05);
      z-index: 10;
      box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    }
    .logo {
      margin-bottom: 32px;
      padding: 0 12px;
    }
    .logo-title {
      font-size: 20px;
      font-weight: 700;
      background: linear-gradient(135deg, #60a5fa, #34d399);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      letter-spacing: -0.5px;
      text-shadow: 0 2px 10px rgba(96, 165, 250, 0.3);
    }
    .logo-sub {
      font-size: 12px;
      color: var(--text-secondary);
      margin-top: 6px;
      font-weight: 500;
    }
    .nav {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .nav-item {
      padding: 12px 16px;
      border-radius: 12px;
      color: var(--text-secondary);
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      border: 1px solid transparent;
      font-size: 14px;
      font-weight: 500;
      margin-bottom: 2px;
    }
    .nav-item:hover {
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      transform: translateX(4px);
    }
    .nav-item.active {
      background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
      border: 1px solid rgba(59, 130, 246, 0.2);
      border-left: 3px solid #60a5fa;
      color: white;
      box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
      transform: translateX(4px);
    }
    .nav-badge {
      font-size: 10px;
      padding: 2px 8px;
      border-radius: 6px;
      background: rgba(0,0,0,0.2);
      color: var(--text-secondary);
      font-weight: 600;
      letter-spacing: 0.5px;
    }
    .nav-item.active .nav-badge {
      background: rgba(59, 130, 246, 0.2);
      color: #60a5fa;
    }
    .nav-footer {
      padding: 16px;
      margin-top: auto;
      font-size: 12px;
      color: var(--text-secondary);
      background: rgba(255,255,255,0.02);
      border-radius: 12px;
      line-height: 1.6;
    }

    /* 主区域美化 */
    .main {
      flex: 1;
      padding: 24px 32px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      position: relative;
    }
    .topbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 24px;
      border-radius: 16px;
      background: rgba(30, 41, 59, 0.4);
      border: 1px solid rgba(255,255,255,0.05);
      margin-bottom: 24px;
      backdrop-filter: blur(12px);
    }
    .topbar-title {
      font-size: 18px;
      font-weight: 600;
      color: var(--text);
      letter-spacing: -0.3px;
    }
    .topbar-sub {
      color: var(--text-secondary);
      font-size: 13px;
      margin-top: 2px;
    }
    .status-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 12px;
      border-radius: 999px;
      background: rgba(16, 185, 129, 0.1);
      border: 1px solid rgba(16, 185, 129, 0.2);
      color: #34d399;
      font-size: 12px;
      font-weight: 500;
    }
    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #34d399;
      box-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
      animation: pulse 2s infinite;
    }

    /* 内容区域卡片化 */
    .content {
      flex: 1;
      border-radius: 20px;
      background: rgba(30, 41, 59, 0.3);
      border: 1px solid rgba(255,255,255,0.03);
      padding: 6px; /* 给内部滚动条留空间 */
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    .page {
      display: none;
      flex: 1;
      padding: 20px;
      overflow-y: auto;
      overflow-x: hidden;
      animation: fadeIn 0.4s ease-out;
    }
    .page.active {
      display: block;
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    /* 页面标题区 */
    .page-header {
      margin-bottom: 24px;
      padding: 0 4px;
    }
    .page-header-title {
      font-size: 24px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 6px;
    }
    .page-header-sub {
      color: var(--text-secondary);
      font-size: 14px;
    }

    /* 卡片通用样式 */
    .card {
      background: rgba(30, 41, 59, 0.4);
      border: 1px solid rgba(255,255,255,0.05);
      border-radius: 16px;
      padding: 20px;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
    }
    .card:hover {
      background: rgba(30, 41, 59, 0.6);
      transform: translateY(-2px);
      box-shadow: 0 12px 24px rgba(0,0,0,0.2);
      border-color: rgba(255,255,255,0.1);
    }
    .card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
    }
    .card-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .chip {
      font-size: 10px;
      padding: 2px 8px;
      border-radius: 4px;
      background: rgba(255,255,255,0.05);
      color: var(--text-secondary);
      border: 1px solid rgba(255,255,255,0.05);
    }

    /* Grid System */
    .grid {
      display: grid;
      gap: 20px;
    }
    .grid-3-cols {
      grid-template-columns: repeat(3, 1fr);
    }
    .grid-2-cols {
      grid-template-columns: repeat(2, 1fr);
    }
    .grid-3 {
      grid-template-columns: repeat(3, 1fr);
    }

    /* 按钮 */
    .btn {
      padding: 8px 16px;
      border-radius: 8px;
      border: 1px solid rgba(255,255,255,0.1);
      background: rgba(255,255,255,0.05);
      color: var(--text);
      cursor: pointer;
      font-size: 13px;
      transition: all 0.2s;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .btn:hover {
      background: rgba(255,255,255,0.1);
    }
    .btn-primary {
      background: var(--primary);
      border-color: var(--primary);
      color: white;
      box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }
    .btn-primary:hover {
      background: #2563eb;
      box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    }
    .btn-icon { font-size: 14px; }
    .btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      filter: grayscale(1);
    }

    /* 表格 */
    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }
    th {
      text-align: left;
      color: var(--text-secondary);
      padding: 12px 8px;
      font-weight: 500;
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    td {
      padding: 12px 8px;
      color: var(--text);
      border-bottom: 1px solid rgba(255,255,255,0.02);
    }
    tr:last-child td { border-bottom: none; }
    .clean-table tr:hover td {
      background: rgba(255,255,255,0.02);
    }
    .cell-missing { color: var(--error); font-weight: bold; }
    .cell-anomaly { color: var(--warning); font-weight: bold; }

    /* 进度条与状态 */
    .progress-bar {
      height: 6px;
      background: rgba(255,255,255,0.05);
      border-radius: 3px;
      overflow: hidden;
      margin: 10px 0;
    }
    .progress-fill {
      height: 100%;
      background: linear-gradient(90deg, #3b82f6, #60a5fa);
      border-radius: 3px;
      transition: width 1s ease;
    }
    
    .score-main {
      padding: 20px 0;
    }
    .score-number {
      font-size: 48px;
      font-weight: 800;
      background: linear-gradient(135deg, #fbbf24, #f59e0b);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      line-height: 1;
      margin-bottom: 8px;
    }
    .score-badge {
      font-size: 11px;
      padding: 4px 8px;
      border-radius: 4px;
      background: rgba(245, 158, 11, 0.1);
      color: #fbbf24;
      border: 1px solid rgba(245, 158, 11, 0.2);
    }

    /* 步骤指示器 */
    .steps {
      display: flex;
      justify-content: space-between;
      margin: 20px 0;
      position: relative;
    }
    .steps::before {
      content: '';
      position: absolute;
      top: 14px;
      left: 0;
      right: 0;
      height: 2px;
      background: rgba(255,255,255,0.05);
      z-index: 0;
    }
    .step-item {
      position: relative;
      z-index: 1;
      text-align: center;
      font-size: 12px;
      color: var(--text-secondary);
      flex: 1;
    }
    .step-dot {
      width: 10px;
      height: 10px;
      background: #334155;
      border: 2px solid #1e293b;
      border-radius: 50%;
      margin: 0 auto;
      transition: all 0.3s;
    }
    .step-item.active .step-dot {
      background: var(--primary);
      border-color: var(--primary);
      box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    }
    .step-item.active div:first-child {
      color: var(--primary);
      font-weight: 600;
    }

    /* 统计卡片 */
    .stats {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin-bottom: 16px;
    }
    .stat-item {
      background: rgba(255,255,255,0.03);
      padding: 12px;
      border-radius: 10px;
    }
    .stat-label {
      font-size: 11px;
      color: var(--text-secondary);
    }
    .stat-value {
      font-size: 20px;
      font-weight: 700;
      color: var(--text);
      margin-top: 4px;
    }

    /* 文件上传 */
    .file-drop {
      border: 2px dashed rgba(255,255,255,0.1);
      border-radius: 12px;
      padding: 32px 16px;
      text-align: center;
      color: var(--text-secondary);
      font-size: 13px;
      margin-bottom: 12px;
      transition: all 0.2s;
      cursor: pointer;
    }
    .file-drop:hover {
      border-color: var(--primary);
      background: rgba(59, 130, 246, 0.05);
      color: var(--primary);
    }
    .file-list {
      max-height: 120px;
      overflow-y: auto;
    }
    .file-item {
      display: flex;
      justify-content: space-between;
      padding: 8px;
      background: rgba(255,255,255,0.03);
      border-radius: 6px;
      margin-bottom: 4px;
      font-size: 12px;
    }

    /* 区块链流程 */
    .hash-flow {
      background: rgba(0,0,0,0.2);
      border-radius: 8px;
      padding: 12px;
      font-size: 12px;
      color: var(--text-secondary);
      margin-bottom: 12px;
      line-height: 1.6;
    }

    /* 验证面板 */
    .verify-panel {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .input {
      background: rgba(0,0,0,0.2);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 8px;
      padding: 8px 12px;
      color: var(--text);
      font-size: 13px;
      outline: none;
      flex: 1;
      transition: border-color 0.2s;
    }
    .input:focus {
      border-color: var(--primary);
    }
    .verify-result {
      background: rgba(16, 185, 129, 0.1);
      border: 1px solid rgba(16, 185, 129, 0.2);
      color: #34d399;
      padding: 12px;
      border-radius: 8px;
      font-size: 12px;
      line-height: 1.5;
    }

    /* 信用画像折叠面板 */
    .collapse {
      background: rgba(255,255,255,0.03);
      border-radius: 8px;
      margin-bottom: 8px;
      overflow: hidden;
      border: 1px solid transparent;
      transition: all 0.2s;
    }
    .collapse.open {
      border-color: rgba(255,255,255,0.1);
      background: rgba(255,255,255,0.05);
    }
    .collapse-header {
      padding: 10px 12px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      font-size: 13px;
      font-weight: 500;
      user-select: none;
    }
    .collapse-header:hover {
      background: rgba(255,255,255,0.05);
    }
    .collapse-body {
      padding: 0 12px 12px;
      display: none;
      font-size: 12px;
      color: var(--text-secondary);
    }
    .collapse.open .collapse-body {
      display: block;
    }
    .collapse-list {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    .collapse-list li {
      display: flex;
      gap: 8px;
      margin-top: 6px;
      line-height: 1.4;
    }
    
    .keyword {
      color: var(--primary);
      font-weight: 600;
      margin: 0 2px;
    }
    .chart, .chart-small {
      width: 100%;
      border-radius: 8px;
    }
    .chart { height: 200px; }
    .chart-small { height: 140px; }
    
    /* Toast */
    .toast {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%) translateY(100px);
      background: rgba(15, 23, 42, 0.9);
      color: white;
      padding: 12px 24px;
      border-radius: 999px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.5);
      border: 1px solid rgba(255,255,255,0.1);
      font-size: 14px;
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      z-index: 100;
      opacity: 0;
    }
    .toast.show {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
    }

    /* 补全缺失的样式 */
    .nav-item span {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .nav-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--text-secondary);
      transition: all 0.3s;
    }
    .nav-item.active .nav-dot {
      background: #60a5fa;
      box-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
    }
    
    .file-icon {
      width: 32px;
      height: 32px;
      background: rgba(255,255,255,0.1);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      font-weight: 700;
      color: var(--text);
      flex-shrink: 0;
    }
    .file-item {
      justify-content: flex-start;
      gap: 12px;
    }
    
    .hash-step {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 8px;
      animation: slideIn 0.3s ease-out;
    }
    @keyframes slideIn {
      from { opacity: 0; transform: translateX(-10px); }
      to { opacity: 1; transform: translateX(0); }
    }
    .hash-tag {
      background: rgba(59, 130, 246, 0.2);
      color: #60a5fa;
      font-size: 10px;
      padding: 2px 6px;
      border-radius: 4px;
      font-weight: 600;
      white-space: nowrap;
      margin-top: 2px;
    }
    
    .score-level {
      font-size: 18px;
      font-weight: 700;
      margin-right: 6px;
      color: #fff;
      vertical-align: middle;
    }
    .score-tag {
      font-size: 10px;
      background: rgba(0,0,0,0.2);
      padding: 2px 6px;
      border-radius: 4px;
      margin-left: 6px;
      vertical-align: middle;
    }

    /* Python 终端与代码展示 */
    .terminal-container {
      background: #1e1e1e;
      border-radius: 8px;
      padding: 12px;
      font-family: 'Consolas', 'Monaco', monospace;
      font-size: 12px;
      color: #d4d4d4;
      border: 1px solid #333;
      height: 200px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    }
    .terminal-header {
      display: flex;
      gap: 6px;
      margin-bottom: 8px;
      padding-bottom: 8px;
      border-bottom: 1px solid #333;
    }
    .term-dot { width: 10px; height: 10px; border-radius: 50%; }
    .term-dot.red { background: #ff5f56; }
    .term-dot.yellow { background: #ffbd2e; }
    .term-dot.green { background: #27c93f; }
    
    .code-view {
      background: #1e1e1e;
      border-radius: 8px;
      padding: 12px;
      font-family: 'Consolas', 'Monaco', monospace;
      font-size: 12px;
      color: #d4d4d4;
      border: 1px solid #333;
      height: 180px;
      overflow-y: auto;
      margin-bottom: 12px;
      cursor: text;
    }
    .code-line {
      display: flex;
      line-height: 1.5;
      padding: 0 4px;
      border-radius: 2px;
    }
    .code-line.active {
      background: #264f78;
    }
    .line-num {
      color: #858585;
      min-width: 24px;
      text-align: right;
      margin-right: 12px;
      user-select: none;
    }
    .log-line {
      margin-bottom: 2px;
      word-break: break-all;
    }
    .log-time { color: #569cd6; margin-right: 8px; }
    .log-level { margin-right: 8px; font-weight: bold; }
    .log-level.info { color: #9cdcfe; }
    .log-level.warn { color: #ce9178; }
    .log-level.error { color: #f44747; }
    
    /* Syntax Highlighting */
    .kwd { color: #c586c0; } /* keyword */
    .str { color: #ce9178; } /* string */
    .fun { color: #dcdcaa; } /* function */
    .num { color: #b5cea8; } /* number */
    .cmt { color: #6a9955; } /* comment */
    .cls { color: #4ec9b0; } /* class */
    /* Console Panel (Standalone IDE Style) */
    .console-panel {
      /* margin-top: 20px; Removed for flexibility */
      background: #1e1e1e;
      border: 1px solid #333;
      border-radius: 6px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.5);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      height: 100%; /* Changed from fixed 320px to fill container */
      min-height: 320px;
    }

    /* Modal Styles for Independent Console */
    .console-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(8px);
      z-index: 1000;
      display: none;
      justify-content: center;
      align-items: center;
      opacity: 0;
      transition: opacity 0.3s ease;
    }
    .console-modal-overlay.show {
      display: flex;
      opacity: 1;
    }
    .console-modal-content {
      width: 90%;
      height: 85%;
      background: #1e1e1e;
      border-radius: 12px;
      border: 1px solid #333;
      box-shadow: 0 20px 50px rgba(0,0,0,0.5);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transform: scale(0.95);
      transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .console-modal-overlay.show .console-modal-content {
      transform: scale(1);
    }
    .console-modal-header {
      height: 48px;
      background: #252526;
      border-bottom: 1px solid #333;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 16px;
    }
    .console-modal-title {
      color: #fff;
      font-weight: 600;
      font-size: 14px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .console-modal-close {
      width: 28px;
      height: 28px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: #ccc;
      transition: background 0.2s;
    }
    .console-modal-close:hover {
      background: rgba(255,255,255,0.1);
      color: #fff;
    }
    .console-modal-body {
      flex: 1;
      padding: 0;
      overflow: hidden;
    }
    
    /* Console Placeholder Card */
    .console-placeholder {
      background: rgba(30, 41, 59, 0.4);
      border: 1px dashed rgba(255,255,255,0.1);
      border-radius: 12px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 30px;
      gap: 16px;
      cursor: pointer;
      transition: all 0.2s;
      min-height: 200px;
    }
    .console-placeholder:hover {
      background: rgba(30, 41, 59, 0.6);
      border-color: var(--primary);
    }
    .console-placeholder-icon {
      width: 48px;
      height: 48px;
      background: rgba(59, 130, 246, 0.1);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--primary);
      font-size: 24px;
    }
    .console-placeholder-text {
      color: var(--text-secondary);
      font-size: 14px;
    }
    .console-header {
      background: #252526;
      padding: 0 16px;
      height: 36px;
      display: flex;
      align-items: center;
      border-bottom: 1px solid #333;
      gap: 20px;
    }
    .console-tab {
      font-size: 12px;
      color: #969696;
      cursor: pointer;
      height: 100%;
      display: flex;
      align-items: center;
      border-bottom: 2px solid transparent;
      transition: all 0.2s;
    }
    .console-tab.active {
      color: #fff;
      border-bottom-color: #3794ff;
    }
    .console-body {
      flex: 1;
      display: flex;
      overflow: hidden;
    }
    .console-pane {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      position: relative;
    }
    .console-pane-title {
      position: absolute;
      top: 0;
      right: 0;
      background: rgba(0,0,0,0.5);
      color: #858585;
      font-size: 10px;
      padding: 2px 6px;
      z-index: 10;
      pointer-events: none;
    }
    .console-pane.left {
      border-right: 1px solid #333;
    }
    
    /* Override embedded styles for panel */
    .console-panel .code-view, 
    .console-panel .terminal-container {
      border: none;
      border-radius: 0;
      box-shadow: none;
      height: 100% !important;
      margin: 0 !important;
      background: #1e1e1e;
    }

    /* Editable Code Editor */
    .code-editor {
      background: #1e1e1e;
      color: #d4d4d4;
      font-family: 'Consolas', 'Monaco', monospace;
      font-size: 12px;
      border: none;
      width: 100%;
      height: 100%;
      padding: 12px;
      resize: none;
      outline: none;
      line-height: 1.5;
    }

    /* Terminal Input */
    .terminal-input-line {
        display: flex;
        align-items: center;
        padding: 0 4px;
        margin-top: 4px;
        border-top: 1px solid rgba(255,255,255,0.05);
    }
    .term-input {
        background: transparent;
        border: none;
        color: #d4d4d4;
        font-family: 'Consolas', 'Monaco', monospace;
        font-size: 12px;
        flex: 1;
        outline: none;
        margin-left: 8px;
    }
    .prompt {
        color: #6a9955;
        font-weight: bold;
    }

    /* P1 Module Styles */
    .policy-list::-webkit-scrollbar {
      width: 4px;
    }
    .policy-list::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.1);
      border-radius: 2px;
    }
    .policy-item:hover {
      background: rgba(255,255,255,0.03);
      cursor: default;
    }

    /* IoT Metrics */
    .iot-metrics {
      display: flex;
      justify-content: space-around;
      margin-bottom: 16px;
    }
    .iot-item {
      text-align: center;
    }
    .iot-label {
      font-size: 11px;
      color: var(--text-secondary);
    }
    .iot-value {
      font-size: 16px;
      font-weight: bold;
      color: var(--success);
    }

    /* Dashboard Grid Layout (New Requirement) */
    .dashboard-grid {
      display: grid;
      grid-template-columns: 2fr 1fr;
      grid-template-rows: auto auto;
      gap: 20px;
    }
    
    .market-module {
      grid-column: 1 / 2;
      grid-row: 1 / 2;
    }
    
    .policy-module {
      grid-column: 2 / 3;
      grid-row: 1 / 3;
      display: flex;
      flex-direction: column;
    }
    
    .iot-module {
      grid-column: 1 / 2;
      grid-row: 2 / 3;
    }
    
    /* Make charts responsive to new container sizes */
    .market-module .chart {
      height: 280px !important; 
    }
    
    .policy-module .policy-list {
      flex: 1; 
      height: auto !important;
      min-height: 0; 
      overflow-y: auto;
    }
    
    .iot-module .chart {
      height: 180px !important;
    }


/* P2 Layout Specifics */
.etl-steps-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 15px;
}
.etl-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    flex: 1;
    opacity: 0.5;
    transition: all 0.3s;
}
.etl-step.active {
    opacity: 1;
}
.etl-step.completed .step-icon {
    background: var(--success);
    color: white;
    border-color: var(--success);
}
.etl-step::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.1);
    z-index: 0;
}
.etl-step:last-child::after {
    display: none;
}
.step-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 1;
    transition: all 0.3s;
}
.etl-step.active .step-icon {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}
.step-label {
    font-size: 11px;
    font-weight: 500;
}

.quality-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 10px 0;
}
.metric-box {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}
.metric-box-lg {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(255,255,255,0.05);
}
.metric-val {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin: 4px 0;
}
.metric-val.score {
    font-size: 36px;
    background: linear-gradient(135deg, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.metric-name {
    font-size: 11px;
    color: var(--text-secondary);
}

.flex-col {
    display: flex;
    flex-direction: column;
}
.gap-20 {
    gap: 20px;
}

/* Missing styles for P2 Data Preview & Terminal */
.row-duplicate {
    background: rgba(245, 158, 11, 0.1);
}
.cell-missing {
    color: var(--warning);
    font-weight: bold;
}
.cell-anomaly {
    color: var(--error);
    font-weight: bold;
}
.log-level.warning {
    color: var(--warning);
}
