/* ComHub metrics — diekstrak dari metrics.html (tanpa perubahan) */
    @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

    * { margin: 0; padding: 0; box-sizing: border-box; }

    :root {
      --bg-primary: #0a0f1e;
      --bg-secondary: #111827;
      --bg-card: #1a2234;
      --bg-hover: #243049;
      --bg-input: #0f172a;
      --border: #2a3a52;
      --border-light: #374151;
      --text-primary: #f1f5f9;
      --text-secondary: #94a3b8;
      --text-muted: #64748b;
      --accent: #22d3ee;
      --accent-dim: rgba(34, 211, 238, 0.1);
      --green: #22c55e;
      --green-dim: rgba(34, 197, 94, 0.15);
      --yellow: #eab308;
      --red: #ef4444;
      --wa-green: #25d366;
      --radius: 12px;
      --radius-sm: 8px;
      --shadow: 0 4px 24px rgba(0,0,0,0.3);
    }

    body {
      font-family: 'Inter', -apple-system, sans-serif;
      background: var(--bg-primary);
      color: var(--text-primary);
      min-height: 100vh;
    }

    /* ===== HEADER ===== */
    .topbar {
      display: flex; align-items: center; justify-content: space-between; gap: 16px;
      padding: 18px 28px;
      background: var(--bg-secondary);
      border-bottom: 1px solid var(--border);
      position: sticky; top: 0; z-index: 10;
    }
    .brand { display: flex; align-items: center; gap: 12px; }
    .brand .logo-icon {
      width: 40px; height: 40px; border-radius: 10px; background: var(--wa-green);
      display: grid; place-items: center; font-size: 18px;
    }
    .brand .logo-text { font-weight: 700; font-size: 15px; }
    .brand .logo-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
    .brand a { text-decoration: none; color: inherit; }
    .brand a:hover .logo-text { color: var(--accent); }
    .topbar .controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    select, button {
      font-family: inherit; font-size: 13px; color: var(--text-primary);
      background: var(--bg-input); border: 1px solid var(--border);
      border-radius: var(--radius-sm); padding: 8px 12px; cursor: pointer;
    }
    select:hover, button:hover { border-color: var(--accent); }
    .btn-primary { background: var(--accent); color: #04222b; font-weight: 600; border-color: var(--accent); }
    .btn-primary:hover { filter: brightness(1.1); }
    .badge { font-size: 11px; padding: 4px 10px; border-radius: 99px; background: var(--accent-dim); color: var(--accent); border: 1px solid var(--border); }

    /* ===== LAYOUT ===== */
    .wrap { padding: 24px 28px 48px; max-width: 1200px; margin: 0 auto; }

    /* ===== OVERVIEW CARDS ===== */
    .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
    .card {
      background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 16px 18px;
    }
    .card .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
    .card .value { font-size: 26px; font-weight: 700; margin-top: 6px; }
    .card .sub { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
    .card.green .value { color: var(--green); }
    .card.accent .value { color: var(--accent); }
    .card.yellow .value { color: var(--yellow); }
    .card.red .value { color: var(--red); }

    /* ===== PANELS ===== */
    .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
    .panel {
      background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 18px;
    }
    .panel h3 { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
    .panel h3 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

    /* ===== BAR CHARTS (CSS) ===== */
    .bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; }
    .bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
    .bars .bar { width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--accent), rgba(34,211,238,.35)); min-height: 2px; transition: height .5s ease; }
    .bars .bar.alt { background: linear-gradient(180deg, var(--green), rgba(34,197,94,.35)); }
    .bars .lbl { font-size: 9px; color: var(--text-muted); white-space: nowrap; transform: rotate(-30deg); transform-origin: top left; margin-top: 2px; }
    .legend { display: flex; gap: 14px; margin-top: 10px; font-size: 11px; color: var(--text-secondary); flex-wrap: wrap; }
    .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
    .lg-pos { background: var(--green); } .lg-neg { background: var(--red); } .lg-neu { background: var(--border-light); } .lg-conv { background: var(--accent); }

    /* stacked sentiment bars */
    .stack { display: flex; height: 110px; gap: 4px; align-items: stretch; }
    .stack .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; min-width: 0; }
    .stack .seg { border-radius: 2px 2px 0 0; }
    .seg.pos { background: var(--green); }
    .seg.neg { background: var(--red); }
    .seg.neu { background: var(--border-light); }

    /* ===== TABLES ===== */
    table { width: 100%; border-collapse: collapse; font-size: 12px; }
    th { text-align: left; color: var(--text-muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
    td { padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
    td:first-child { color: var(--text-primary); }
    tr:hover td { background: var(--bg-hover); }
    .empty { text-align: center; color: var(--text-muted); padding: 22px 0; font-size: 12px; }
    .pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 10px; font-weight: 600; }
    .pill.green { background: var(--green-dim); color: var(--green); }
    .pill.yellow { background: rgba(234,179,8,.15); color: var(--yellow); }
    .pill.red { background: rgba(239,68,68,.15); color: var(--red); }

    /* ===== LOGIN OVERLAY ===== */
    .overlay { position: fixed; inset: 0; background: rgba(5,8,16,.85); display: none; align-items: center; justify-content: center; z-index: 50; backdrop-filter: blur(6px); }
    .overlay.show { display: flex; }
    .login-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 28px; width: 300px; box-shadow: var(--shadow); }
    .login-box h2 { font-size: 16px; margin-bottom: 16px; }
    .login-box input { width: 100%; margin-bottom: 12px; }
    .login-box .err { color: var(--red); font-size: 12px; min-height: 16px; }
    input { font-family: inherit; font-size: 13px; color: var(--text-primary); background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; outline: none; }
    input:focus { border-color: var(--accent); }

    @media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } .topbar { flex-direction: column; align-items: flex-start; } }
