/* ===== netcreation Command Center – dark tech theme ===== */
:root {
  --bg: #0a0e17;
  --bg2: #0f1523;
  --card: rgba(20, 27, 45, .72);
  --border: rgba(120, 150, 220, .14);
  --text: #e6ecf7;
  --muted: #8b98b8;
  --accent: #22d3ee;
  --accent2: #a78bfa;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0,0,0,.45);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Inter, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(34,211,238,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(167,139,250,.10), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100dvh;
}
.hidden { display: none !important; }
code { background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 6px; font-size: .85em; }

/* ===== Login ===== */
.login-screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(800px 400px at 50% 20%, rgba(34,211,238,.12), transparent 60%), var(--bg);
}
.login-card {
  position: relative; width: min(92vw, 380px); padding: 40px 32px; text-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 24px;
  backdrop-filter: blur(18px); box-shadow: var(--shadow); overflow: hidden;
}
.logo-glow {
  position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 180px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,.45), transparent 70%);
  filter: blur(10px); animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .55; transform: translateX(-50%) scale(1.15); } }
.login-card h1 { font-size: 1.9rem; letter-spacing: .5px; }
.login-card .sub { color: var(--muted); margin: 4px 0 24px; letter-spacing: 3px; text-transform: uppercase; font-size: .72rem; }
.login-card input {
  width: 100%; padding: 14px 16px; margin-bottom: 12px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(255,255,255,.05); color: var(--text);
  font-size: 1rem; outline: none; transition: border-color .2s, box-shadow .2s;
}
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34,211,238,.18); }
.login-card button, .btn {
  width: 100%; padding: 13px; border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #06121a; font-weight: 700; font-size: .95rem;
  transition: transform .15s, filter .2s;
}
.btn { width: auto; padding: 9px 18px; }
.login-card button:hover, .btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.error { color: var(--bad); font-size: .85rem; min-height: 1.2em; margin-top: 8px; }

/* ===== Topbar ===== */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; background: rgba(10,14,23,.82); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; white-space: nowrap; }
.brand em { font-style: normal; color: var(--muted); font-weight: 500; font-size: .8rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 12px var(--good); animation: breathe2 2s infinite; }
@keyframes breathe2 { 50% { opacity: .5; } }
.tabs { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  background: none; border: none; color: var(--muted); padding: 8px 14px; border-radius: 10px;
  cursor: pointer; font-size: .88rem; white-space: nowrap; transition: all .2s;
}
.tabs button:hover { color: var(--text); background: rgba(255,255,255,.05); }
.tabs button.active { color: var(--accent); background: rgba(34,211,238,.12); }
.top-right { display: flex; align-items: center; gap: 10px; }
.live-badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 700;
  color: var(--good); background: rgba(52,211,153,.12); padding: 5px 11px; border-radius: 999px;
  letter-spacing: 1px;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
#logout-btn { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 10px; padding: 6px 10px; cursor: pointer; }
#logout-btn:hover { color: var(--bad); border-color: var(--bad); }

/* ===== Layout ===== */
main { padding: 22px; max-width: 1280px; margin: 0 auto; }
.tab { display: none; animation: fadeUp .35s ease; }
.tab.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.card h2 { font-size: 1rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-head h2 { margin-bottom: 0; }
.hint { color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.live-inline { color: var(--good); display: inline-flex; }

/* KPI */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.kpi {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; position: relative; overflow: hidden; animation: fadeUp .4s ease backwards;
}
.kpi:nth-child(2) { animation-delay: .06s; } .kpi:nth-child(3) { animation-delay: .12s; }
.kpi:nth-child(4) { animation-delay: .18s; } .kpi:nth-child(5) { animation-delay: .24s; }
.kpi .label { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; }
.kpi .value { font-size: 1.7rem; font-weight: 800; margin-top: 6px; }
.kpi .bar { height: 4px; border-radius: 4px; margin-top: 10px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transform-origin: left; animation: grow 1s ease backwards; }
@keyframes grow { from { transform: scaleX(0); } }

/* Fortschritt */
.proj-row { margin-bottom: 16px; }
.proj-top { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }
.proj-top b { font-weight: 600; }
.proj-top span { color: var(--muted); }
.track { height: 10px; border-radius: 8px; background: rgba(255,255,255,.06); overflow: hidden; }
.fill { height: 100%; border-radius: 8px; transition: width .8s cubic-bezier(.22,1,.36,1); box-shadow: 0 0 12px currentColor; }

/* Activity */
.activity-feed { list-style: none; max-height: 320px; overflow-y: auto; }
.activity-feed li {
  padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: .87rem;
  display: flex; gap: 10px; align-items: baseline; animation: fadeUp .3s ease;
}
.activity-feed li .t { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.activity-feed li .k { font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; }
.k-task_done, .k-measure { color: var(--good); } .k-job { color: var(--accent2); }
.k-task, .k-project, .k-login, .k-finance { color: var(--accent); }

/* Listen */
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px;
  background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 12px;
  animation: fadeUp .3s ease; flex-wrap: wrap;
}
.row .grow { flex: 1; min-width: 140px; }
.row .title { font-weight: 600; font-size: .92rem; }
.row .meta { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.tag { font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .4px; text-transform: uppercase; }
.tag-todo, .tag-idea, .tag-backlog, .tag-queued { background: rgba(139,152,184,.18); color: var(--muted); }
.tag-doing, .tag-active, .tag-evaluating, .tag-running, .tag-building { background: rgba(34,211,238,.16); color: var(--accent); }
.tag-done, .tag-live, .tag-paid { background: rgba(52,211,153,.16); color: var(--good); }
.tag-blocked, .tag-failed, .tag-critical { background: rgba(248,113,113,.16); color: var(--bad); }
.tag-high { background: rgba(251,191,36,.16); color: var(--warn); }
.tag-medium, .tag-planned, .tag-recurring { background: rgba(251,191,36,.10); color: var(--warn); }
.tag-low, .tag-paused, .tag-dropped, .tag-archived { background: rgba(139,152,184,.12); color: var(--muted); }
.row button.icon {
  background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 8px;
  padding: 5px 9px; cursor: pointer; font-size: .8rem; transition: all .15s;
}
.row button.icon:hover { color: var(--text); border-color: var(--accent); }
.row button.icon.danger:hover { color: var(--bad); border-color: var(--bad); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(4,7,14,.7); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeUp .2s ease;
}
.modal {
  width: min(94vw, 520px); max-height: 86dvh; overflow-y: auto;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 20px; padding: 24px;
  box-shadow: var(--shadow);
}
.modal h3 { margin-bottom: 16px; }
.modal label { display: block; color: var(--muted); font-size: .78rem; margin: 12px 0 5px; text-transform: uppercase; letter-spacing: .6px; }
.modal input, .modal select, .modal textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(255,255,255,.05); color: var(--text); font-size: .95rem; font-family: inherit; outline: none;
}
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--accent); }
.modal textarea { min-height: 90px; resize: vertical; }
.modal .actions { display: flex; gap: 10px; margin-top: 20px; }
.modal .actions .btn { flex: 1; }
.modal .actions .btn.ghost { background: rgba(255,255,255,.06); color: var(--muted); }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200;
  background: var(--bg2); border: 1px solid var(--accent); color: var(--text);
  padding: 12px 22px; border-radius: 999px; font-size: .88rem; box-shadow: var(--shadow);
  animation: toastIn .3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

/* Mobile */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; padding: 10px 12px; }
  .tabs { order: 3; width: 100%; }
  main { padding: 14px; }
  .brand em { display: none; }
}
