  * { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --bg: #0c1a1e; --surface: #132027; --surface2: #1a2d35; --border: #1f3540;
    --teal: #3a8a96; --teal-light: #4db8c8; --teal-dim: rgba(58,138,150,0.15);
    --green: #4caf7d; --yellow: #e8b84b; --red: #e05c5c; --purple: #9b8ce0;
    --text: #c8dde2; --text-dim: #6a8e97; --text-bright: #e8f4f7;
  }
  body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; font-size: 13px; }
  .mono { font-family: 'Consolas', 'SF Mono', monospace; }
  .header { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .logo { display: flex; align-items: center; gap: 10px; }
  .logo-icon { width: 32px; height: 32px; background: linear-gradient(135deg, var(--teal), var(--teal-light)); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
  .logo-text { font-weight: 700; font-size: 15px; color: var(--text-bright); letter-spacing: -0.3px; }
  .logo-sub { font-size: 10px; color: var(--text-dim); letter-spacing: 0.5px; text-transform: uppercase; }
  .status-pill { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; background: rgba(76,175,125,0.12); border: 1px solid rgba(76,175,125,0.3); font-size: 11px; color: var(--green); }
  .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
  @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
  .layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 57px); }
  .sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 16px 0; overflow-y: auto; }
  .nav-section-label { font-size: 10px; font-weight: 600; letter-spacing: 1px; color: var(--text-dim); text-transform: uppercase; padding: 8px 16px 6px; }
  .file-card { display: flex; align-items: center; gap: 9px; padding: 8px 14px; cursor: pointer; border-left: 2px solid transparent; transition: all 0.12s; }
  .file-card:hover { background: var(--teal-dim); }
  .file-card.active { background: var(--teal-dim); border-left-color: var(--teal-light); }
  .file-card .fc-icon { font-size: 15px; flex-shrink: 0; }
  .file-card .fc-name { font-size: 11.5px; font-weight: 600; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .file-card .fc-meta { font-size: 10px; color: var(--text-dim); margin-top: 1px; }
  .file-card .fc-dot { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; flex-shrink: 0; }
  .fc-dot.ok { background: var(--green); } .fc-dot.warn { background: var(--yellow); } .fc-dot.err { background: var(--red); }
  .nav-divider { height: 1px; background: var(--border); margin: 10px 14px; }
  .nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--text-dim); border-left: 2px solid transparent; transition: all 0.15s; }
  .nav-item:hover { background: var(--teal-dim); color: var(--text); }
  .nav-item.active { color: var(--teal-light); border-left-color: var(--teal-light); background: var(--teal-dim); }
  .nav-item .icon { font-size: 14px; width: 18px; text-align: center; }
  .main { padding: 22px 26px; overflow-y: auto; max-height: calc(100vh - 57px); }
  .section-title { font-size: 15px; font-weight: 600; color: var(--text-bright); }
  .section-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
  .page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; gap: 16px; }
  .btn { padding: 7px 14px; border-radius: 6px; border: none; cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 500; transition: all 0.15s; }
  .btn-primary { background: var(--teal); color: #fff; }
  .btn-primary:hover { background: var(--teal-light); }
  .btn-outline { background: transparent; color: var(--teal-light); border: 1px solid rgba(58,138,150,0.4); }
  .btn-outline:hover { background: var(--teal-dim); }
  .btn:disabled { opacity: 0.5; cursor: not-allowed; }
  .upload-zone { border: 1.5px dashed var(--border); border-radius: 12px; padding: 46px 28px; text-align: center; cursor: pointer; transition: all 0.2s; background: rgba(19,32,39,0.5); }
  .upload-zone:hover, .upload-zone.drag { border-color: var(--teal); background: var(--teal-dim); }
  .upload-icon { font-size: 38px; margin-bottom: 12px; }
  .upload-title { font-size: 15px; font-weight: 600; color: var(--text-bright); margin-bottom: 5px; }
  .upload-sub { font-size: 12px; color: var(--text-dim); }
  .format-chips { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
  .chip { padding: 3px 9px; border-radius: 4px; font-size: 10px; font-weight: 600; background: var(--surface2); border: 1px solid var(--border); color: var(--text-dim); }
  .stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
  .stat-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 13px 15px; }
  .stat-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
  .stat-value { font-size: 22px; font-weight: 700; color: var(--text-bright); }
  .stat-sub { font-size: 11px; color: var(--text-dim); margin-top: 3px; }
  .stat-card.warn { border-color: rgba(232,184,75,0.4); } .stat-card.warn .stat-value { color: var(--yellow); }
  .stat-card.ok .stat-value { color: var(--green); }
  .stat-card.accent .stat-value { color: var(--teal-light); }
  .panel { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
  .panel-header { padding: 11px 15px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
  .panel-title { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
  .panel-body { padding: 15px; }
  .meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 22px; }
  .meta-item .ml { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.4px; }
  .meta-item .mv { font-size: 12.5px; color: var(--text-bright); font-weight: 500; margin-top: 2px; word-break: break-word; }
  table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
  th { text-align: left; padding: 6px 9px; color: var(--text-dim); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface2); }
  td { padding: 5px 9px; font-size: 11.5px; color: var(--text); border-bottom: 1px solid rgba(31,53,64,0.5); }
  td.num { font-family: 'Consolas', monospace; text-align: right; }
  tr:hover td { background: rgba(58,138,150,0.06); }
  .toggle-pill { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
  .toggle-pill button { background: transparent; border: none; color: var(--text-dim); padding: 5px 11px; cursor: pointer; font-size: 11px; font-family: inherit; }
  .toggle-pill button.on { background: var(--teal-dim); color: var(--teal-light); }
  .legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 11px; color: var(--text-dim); }
  .legend .lg { display: flex; align-items: center; gap: 6px; }
  .legend .sw { width: 14px; height: 3px; border-radius: 2px; }
  canvas { display: block; width: 100%; }
  .chart-wrap { position: relative; }
  .tooltip { position: absolute; pointer-events: none; background: var(--bg); border: 1px solid var(--teal); border-radius: 6px; padding: 7px 10px; font-size: 11px; color: var(--text-bright); display: none; z-index: 10; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,0.4); }
  .tooltip .tt-t { color: var(--text-dim); margin-bottom: 3px; }
  .empty { color: var(--text-dim); text-align: center; padding: 40px; font-size: 12px; }
  .warn-list { list-style: none; font-size: 11.5px; }
  .warn-list li { padding: 5px 0; display: flex; gap: 8px; align-items: baseline; }
  .badge-q { padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }
  .q-ok { background: rgba(76,175,125,0.15); color: var(--green); } .q-warn { background: rgba(232,184,75,0.15); color: var(--yellow); } .q-err { background: rgba(224,92,92,0.15); color: var(--red); }
  ::-webkit-scrollbar { width: 7px; height: 7px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
  .hidden { display: none !important; }
  select { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; font-family: inherit; font-size: 11px; }
  .meta-inp { background: var(--surface); color: var(--text-bright); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; font-family: 'Consolas', monospace; font-size: 12px; margin-top: 3px; }
  .meta-inp:focus { outline: none; border-color: var(--teal-light); }
  .meta-inp:disabled { opacity: 0.55; cursor: not-allowed; }
  .avatar-wrap { position: relative; }
  .avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--teal-light)); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 2px solid transparent; transition: border-color .15s; user-select: none; }
  .avatar:hover { border-color: var(--teal-light); }
  .avatar-menu { position: absolute; right: 0; top: 44px; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; min-width: 234px; box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 60; overflow: hidden; }
  .avatar-menu .am-head { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .avatar-menu .am-name { font-weight: 600; color: var(--text-bright); font-size: 12.5px; }
  .avatar-menu .am-mail { font-size: 11px; color: var(--text-dim); margin-top: 2px; word-break: break-all; }
  .avatar-menu .am-role { display: inline-block; margin-top: 6px; font-size: 10px; padding: 2px 8px; border-radius: 10px; background: var(--teal-dim); color: var(--teal-light); text-transform: uppercase; letter-spacing: .4px; }
  .avatar-menu .am-item { display: flex; align-items: center; gap: 9px; padding: 10px 14px; cursor: pointer; font-size: 12.5px; color: var(--text); }
  .avatar-menu .am-item:hover { background: var(--teal-dim); color: var(--text-bright); }
  .auth-overlay { position: fixed; inset: 0; background: var(--bg); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
  .auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 38px 40px; max-width: 440px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
  .auth-card .ac-logo { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, var(--teal), var(--teal-light)); display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 18px; }
  .auth-card h1 { font-size: 19px; color: var(--text-bright); margin-bottom: 6px; }
  .auth-card p { font-size: 12.5px; color: var(--text-dim); line-height: 1.6; margin-bottom: 20px; }
  .auth-card .btn-ms { display: inline-flex; align-items: center; gap: 10px; background: var(--teal); color: #fff; border: none; border-radius: 8px; padding: 11px 22px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
  .auth-card .btn-ms:hover { background: var(--teal-light); }
  .nav-collapse-hd { display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
  .nav-collapse-hd .caret { transition: transform .15s; font-size: 9px; color: var(--text-dim); }
  .nav-collapse-hd.collapsed .caret { transform: rotate(-90deg); }
  .role-select { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-family: inherit; font-size: 11px; }
  a.dl { color: var(--teal-light); text-decoration: none; }
