html, body, #root { margin: 0; min-height: 100%; }
body { background: #070B14; }

.cc-root {
  --ds-page: #070B14;
  --ds-ink: #E9EDF7;
  --ds-ink-2: #9AA3B8;
  --ds-ink-4: #5b6272;
  --ds-hairline: rgba(148, 163, 199, 0.16);
  --ds-teal: #22d3ee;
  --ds-red: #f87171;
  font-family: Inter, "Segoe UI", system-ui, Tahoma, sans-serif;
  color: var(--ds-ink);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(800px 480px at 10% 0%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(700px 700px at 50% 110%, rgba(217, 70, 239, 0.10), transparent 60%),
    #070B14;
  min-height: 100vh;
  padding-bottom: 60px;
}
.cc-root * { box-sizing: border-box; }

.cc-shell { max-width: 1100px; margin: 0 auto; padding: 28px 20px 0; }

/* ---------- top bar ---------- */
.cc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cc-title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; background: linear-gradient(120deg, #22d3ee, #8b5cf6 55%, #d946ef); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cc-sub { margin: 6px 0 0; color: var(--ds-ink-2); font-size: 13px; }
.cc-sync { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ds-ink-2); border: 1px solid var(--ds-hairline); border-radius: 999px; padding: 7px 12px; background: rgba(255,255,255,0.03); max-width: 100%; }
.cc-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; animation: cc-pulse 2s infinite; }
@keyframes cc-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.cc-update { margin-top: 12px; border: 1px solid rgba(34,211,238,0.5); background: rgba(34,211,238,0.1); color: #a5f3fc; border-radius: 14px; padding: 10px 14px; font-size: 13px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }

/* ---------- tabs ---------- */
.cc-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0 26px; border: 1px solid var(--ds-hairline); border-radius: 16px; padding: 6px; background: rgba(255,255,255,0.03); position: sticky; top: 8px; z-index: 30; backdrop-filter: blur(14px); }
.cc-tab { border: 0; background: transparent; color: var(--ds-ink-2); font: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 14px; border-radius: 11px; cursor: pointer; transition: all .25s; min-height: 40px; }
.cc-tab:hover { color: var(--ds-ink); background: rgba(255,255,255,0.06); }
.cc-tab[aria-current="page"] { color: #06121c; background: linear-gradient(120deg, #22d3ee, #67e8f9); box-shadow: 0 0 18px rgba(34,211,238,0.35); }

/* ---------- generic card ---------- */
.cc-card { background: linear-gradient(160deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02)); border: 1px solid var(--ds-hairline); border-radius: 20px; padding: 18px; backdrop-filter: blur(12px); transition: transform .25s, box-shadow .25s, border-color .25s; }
.cc-card:hover { transform: translateY(-2px); border-color: rgba(34,211,238,0.4); box-shadow: 0 8px 30px rgba(34,211,238,0.12), 0 0 0 1px rgba(34,211,238,0.15); }
.cc-h2 { font-size: 17px; font-weight: 800; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.cc-h2 small { color: var(--ds-ink-2); font-weight: 500; font-size: 12px; }
.cc-section { margin-top: 30px; }

/* ---------- KPI ---------- */
.cc-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 720px) { .cc-kpis { grid-template-columns: repeat(2, 1fr); } }
.cc-kpi { position: relative; overflow: hidden; }
.cc-kpi::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, #22d3ee, #8b5cf6, #d946ef); border-radius: 3px; }
.cc-kpi-num { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.cc-kpi-label { color: var(--ds-ink-2); font-size: 12.5px; margin-top: 8px; }
.cc-kpi.violet .cc-kpi-num { color: #c4b5fd; } .cc-kpi.cyan .cc-kpi-num { color: #67e8f9; }
.cc-kpi.magenta .cc-kpi-num { color: #f0abfc; } .cc-kpi.green .cc-kpi-num { color: #6ee7b7; }

/* ---------- pills ---------- */
.cc-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 4px 10px; border: 1px solid; white-space: nowrap; }
.cc-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cc-st-done { color: #6ee7b7; border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.08); }
.cc-st-progress { color: #67e8f9; border-color: rgba(34,211,238,0.4); background: rgba(34,211,238,0.08); }
.cc-st-waiting { color: #fcd34d; border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.08); }
.cc-st-blocked { color: #fca5a5; border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.08); }
.cc-st-queued { color: #c4b5fd; border-color: rgba(167,139,250,0.4); background: rgba(167,139,250,0.08); }

/* ---------- timeline ---------- */
.cc-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.cc-timeline::before { content: ""; position: absolute; inset-inline-start: 15px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(180deg, rgba(34,211,238,0.5), rgba(139,92,246,0.4), rgba(217,70,239,0.3)); }
.cc-ev { position: relative; padding: 0 44px 18px 0; padding-inline-start: 44px; padding-inline-end: 0; }
.cc-ev-icon { position: absolute; inset-inline-start: 6px; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: #0c1424; border: 1px solid var(--ds-hairline); }
.cc-ev-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cc-ev-text { font-size: 13.5px; font-weight: 600; }
.cc-ev-meta { color: var(--ds-ink-2); font-size: 12px; margin-top: 3px; }

/* ---------- projects ---------- */
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cc-proj { cursor: pointer; text-align: start; font: inherit; color: inherit; width: 100%; }
.cc-proj-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cc-proj-name { font-weight: 800; font-size: 15px; }
.cc-proj-tag { color: var(--ds-ink-2); font-size: 12px; margin-top: 3px; }
.cc-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.07); margin: 14px 0 6px; overflow: hidden; }
.cc-bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #22d3ee, #8b5cf6, #d946ef); box-shadow: 0 0 12px rgba(139,92,246,0.5); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.cc-proj-meta { display: flex; justify-content: space-between; color: var(--ds-ink-2); font-size: 12px; }
.cc-proj-next { margin-top: 12px; font-size: 12.5px; color: var(--ds-ink-2); }
.cc-proj-next b { color: var(--ds-ink); font-weight: 600; }

/* ---------- dialog / drawer ---------- */
.cc-dialog { border: 1px solid var(--ds-hairline); border-radius: 20px; background: #0b1120; color: var(--ds-ink); padding: 0; width: min(640px, 92vw); max-height: 80vh; box-shadow: 0 20px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(139,92,246,0.2); }
.cc-dialog::backdrop { background: rgba(4, 7, 15, 0.7); backdrop-filter: blur(4px); }
.cc-dialog-body { padding: 20px; overflow: auto; max-height: calc(80vh - 8px); }
.cc-dialog-title { font-size: 17px; font-weight: 800; margin: 0 0 4px; padding-inline-end: 44px; }
.cc-close { position: absolute; top: 12px; inset-inline-end: 12px; }
.cc-mini { border: 1px solid var(--ds-hairline); border-radius: 12px; padding: 10px 12px; margin-top: 10px; background: rgba(255,255,255,0.03); }
.cc-mini-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.cc-mini-note { color: var(--ds-ink-2); font-size: 12px; margin-top: 4px; }

/* ---------- mind map ---------- */
.cc-map-wrap { position: relative; border: 1px solid var(--ds-hairline); border-radius: 20px; background: radial-gradient(600px 300px at 80% 0%, rgba(139,92,246,0.1), transparent 60%), rgba(255,255,255,0.02); overflow: hidden; height: 560px; touch-action: none; }
.cc-map-tools { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cc-tool { border: 1px solid var(--ds-hairline); background: rgba(12,20,36,0.9); color: var(--ds-ink); border-radius: 10px; min-width: 38px; height: 38px; padding: 0 10px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: all .2s; }
.cc-tool:hover { border-color: rgba(34,211,238,0.5); box-shadow: 0 0 12px rgba(34,211,238,0.25); }
.cc-select { border: 1px solid var(--ds-hairline); background: rgba(12,20,36,0.9); color: var(--ds-ink); border-radius: 10px; height: 38px; padding: 0 10px; font: inherit; font-size: 12.5px; max-width: 190px; }
.cc-map-canvas { position: absolute; inset: 0; cursor: grab; }
.cc-map-canvas.dragging { cursor: grabbing; }
.cc-map-inner { position: absolute; top: 0; right: 0; transform-origin: 0 0; }
.cc-map-svg { position: absolute; top: 0; right: 0; overflow: visible; pointer-events: none; }
.cc-node { position: absolute; width: 168px; border-radius: 14px; border: 1px solid; padding: 9px 12px; font-size: 12px; font-weight: 700; background: rgba(12,20,36,0.95); cursor: pointer; transition: box-shadow .2s, transform .2s; user-select: none; }
.cc-node small { display: block; font-weight: 500; color: var(--ds-ink-2); font-size: 10.5px; margin-top: 3px; }
.cc-node:hover { transform: scale(1.04); }
.cc-node.sel { box-shadow: 0 0 0 2px #22d3ee, 0 0 24px rgba(34,211,238,0.4); }
.cc-node-toggle { position: absolute; bottom: -9px; inset-inline-start: calc(50% - 9px); width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--ds-hairline); background: #101a2e; color: var(--ds-ink-2); font-size: 11px; line-height: 1; display: grid; place-items: center; }
.cc-map-detail { position: absolute; bottom: 12px; inset-inline-start: 12px; inset-inline-end: 12px; z-index: 5; border: 1px solid var(--ds-hairline); border-radius: 14px; background: rgba(10,16,30,0.95); backdrop-filter: blur(10px); padding: 12px 14px; font-size: 12.5px; }
.cc-map-detail b { font-size: 13.5px; }
.cc-map-hint { color: var(--ds-ink-2); font-size: 11px; margin-top: 8px; }
.cc-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 11px; color: var(--ds-ink-2); }
.cc-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cc-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ---------- kanban ---------- */
.cc-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.cc-kcol { border: 1px solid var(--ds-hairline); border-radius: 16px; background: rgba(255,255,255,0.025); padding: 12px; scroll-snap-align: start; min-height: 120px; }
.cc-kcol-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 800; margin-bottom: 10px; }
.cc-kcol-count { color: var(--ds-ink-2); font-size: 11px; border: 1px solid var(--ds-hairline); border-radius: 99px; padding: 2px 8px; }
.cc-kcard { border: 1px solid var(--ds-hairline); border-radius: 12px; background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); padding: 10px 12px; margin-bottom: 8px; transition: all .2s; }
.cc-kcard:hover { border-color: rgba(139,92,246,0.5); box-shadow: 0 4px 18px rgba(139,92,246,0.15); }
.cc-kcard-title { font-size: 12.5px; font-weight: 700; }
.cc-kcard-ch { color: var(--ds-ink-2); font-size: 11px; margin-top: 3px; }
.cc-kcard-rights { margin-top: 8px; font-size: 10.5px; color: #fcd34d; border-top: 1px dashed var(--ds-hairline); padding-top: 6px; }
.cc-kcard a { color: #67e8f9; font-size: 11.5px; }
.cc-scroll-hint { color: var(--ds-ink-2); font-size: 11px; margin-top: 2px; }

/* ---------- rules / log ---------- */
.cc-search { width: 100%; border: 1px solid var(--ds-hairline); background: rgba(255,255,255,0.04); color: var(--ds-ink); border-radius: 14px; padding: 12px 14px; font: inherit; font-size: 13.5px; margin-bottom: 14px; }
.cc-search:focus { outline: none; border-color: rgba(34,211,238,0.6); box-shadow: 0 0 0 3px rgba(34,211,238,0.15); }
.cc-rule { display: flex; gap: 12px; align-items: flex-start; }
.cc-rule-cat { flex-shrink: 0; font-size: 10.5px; font-weight: 800; color: #c4b5fd; border: 1px solid rgba(167,139,250,0.4); border-radius: 8px; padding: 3px 8px; margin-top: 2px; }
.cc-rule-text { font-size: 13.5px; line-height: 1.9; }
.cc-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.cc-chip { border: 1px solid var(--ds-hairline); background: transparent; color: var(--ds-ink-2); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .2s; min-height: 36px; }
.cc-chip.on { color: #06121c; background: linear-gradient(120deg, #22d3ee, #67e8f9); border-color: transparent; }
.cc-table-wrap { overflow-x: auto; border: 1px solid var(--ds-hairline); border-radius: 16px; }
.cc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 640px; }
.cc-table th { text-align: start; color: var(--ds-ink-2); font-size: 11px; font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--ds-hairline); background: rgba(255,255,255,0.03); white-space: nowrap; }
.cc-table td { padding: 10px 12px; border-bottom: 1px solid rgba(148,163,199,0.08); vertical-align: top; }
.cc-table tr:last-child td { border-bottom: 0; }
.cc-table tr { transition: background .15s; }
.cc-table tbody tr:hover { background: rgba(34,211,238,0.05); }
.cc-empty { text-align: center; color: var(--ds-ink-2); padding: 40px 16px; font-size: 13px; border: 1px dashed var(--ds-hairline); border-radius: 16px; }
.cc-csv-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0 4px; }
.cc-note { color: var(--ds-ink-2); font-size: 11.5px; }

/* ---------- accounts ---------- */
.cc-accs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.cc-acc { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid var(--ds-hairline); border-radius: 14px; padding: 11px 14px; background: rgba(255,255,255,0.03); transition: all .2s; }
.cc-acc:hover { border-color: rgba(217,70,239,0.4); box-shadow: 0 0 16px rgba(217,70,239,0.1); }
.cc-acc-name { font-size: 13px; font-weight: 700; }
.cc-acc-handle { color: var(--ds-ink-2); font-size: 11px; margin-top: 2px; direction: ltr; text-align: end; }
.cc-acc-status { font-size: 11px; color: #6ee7b7; white-space: nowrap; }
.cc-acc-status.warn { color: #fcd34d; } .cc-acc-status.bad { color: #fca5a5; }

.cc-foot { margin-top: 40px; color: var(--ds-ink-2); font-size: 11.5px; text-align: center; }
@media (max-width: 600px) {
  .cc-shell { padding: 20px 14px 0; }
  .cc-title { font-size: 21px; }
  .cc-top { flex-direction: column; }
  .cc-map-wrap { height: 480px; }
  .cc-tab { flex: 1 1 auto; text-align: center; }
}

/* ---------- static-hosting extras ---------- */
html { background: #070B14; }
body { background: #070B14; }
[hidden] { display: none !important; }
.cc-root { min-height: 100vh; }
.cc-install { border: 1px solid rgba(34,211,238,0.55); background: rgba(34,211,238,0.12); color: #a5f3fc; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; }
.cc-install:hover { background: rgba(34,211,238,0.2); }
.cc-top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cc-dl { border: 1px solid rgba(34,211,238,0.5); background: rgba(34,211,238,0.12); color: #a5f3fc; border-radius: 12px; padding: 9px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 40px; }
.cc-dl:hover { background: rgba(34,211,238,0.2); }
.cc-copy { border: 1px solid var(--ds-hairline); background: rgba(255,255,255,0.05); color: var(--ds-ink); border-radius: 12px; padding: 9px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 40px; }
.cc-dialog-close { position: absolute; top: 12px; inset-inline-start: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ds-hairline); background: rgba(255,255,255,0.06); color: var(--ds-ink); font-size: 18px; line-height: 1; cursor: pointer; }
.cc-dialog { position: fixed; inset: 0; margin: auto; }
@media (max-width: 560px) {
  .cc-shell { padding: 18px 14px 0; }
  .cc-title { font-size: 21px; }
  .cc-tab { font-size: 12.5px; padding: 8px 10px; }
}
