:root {
  color-scheme: dark;
  --bg: #070b14;
  --bg-elev: #0e1626;
  --bg-card: #121c2f;
  --line: rgba(148, 163, 184, 0.16);
  --text: #e8eefc;
  --muted: #93a4c3;
  --accent: #56f0c8;
  --accent-2: #6ea8ff;
  --danger: #ff7b8a;
  --warn: #f5c26b;
  --ok: #56f0c8;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font: "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(86, 240, 200, 0.12), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(110, 168, 255, 0.12), transparent 50%),
    linear-gradient(180deg, #0a101d 0%, var(--bg) 40%, #05080f 100%);
}

.app {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.brand { display: flex; gap: 0.85rem; align-items: center; }
.mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(86, 240, 200, 0.9), rgba(110, 168, 255, 0.75));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 10px 30px rgba(86, 240, 200, 0.2);
}
.brand-name { font-weight: 700; letter-spacing: 0.02em; }
.brand-sub { color: var(--muted); font-size: 0.85rem; }
.top-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }

.card, .panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 40%), var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card { padding: 1.5rem; max-width: 560px; }
.auth-card h1 { margin: 0 0 0.5rem; font-size: 1.6rem; }

.lede { color: var(--muted); line-height: 1.5; margin: 0 0 1rem; }
.field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.field span { color: var(--muted); font-size: 0.9rem; }
input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  padding: 0.85rem 0.95rem;
  font: inherit;
}
input:focus {
  outline: none;
  border-color: rgba(86, 240, 200, 0.5);
  box-shadow: 0 0 0 3px rgba(86, 240, 200, 0.12);
}

.row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { border-color: rgba(255,255,255,0.25); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(135deg, rgba(86, 240, 200, 0.95), rgba(110, 168, 255, 0.9));
  color: #041018;
  border-color: transparent;
}
.btn.ghost { background: transparent; }
.btn.danger {
  border-color: rgba(255, 123, 138, 0.35);
  color: #ffd0d6;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tab {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.tab.active {
  color: #041018;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.panel { padding: 1.25rem; }
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.panel h2 { margin: 0 0 0.35rem; font-size: 1.25rem; }

.list { display: grid; gap: 0.75rem; }
.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.45);
}
.item-title { font-weight: 650; margin-bottom: 0.25rem; }
.item-meta {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
}
.item-actions { display: flex; gap: 0.5rem; align-items: start; }

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  font-size: 0.8rem;
  color: var(--text);
}
.pill.muted { color: var(--muted); }
.pill.ok { color: var(--ok); border-color: rgba(86, 240, 200, 0.3); }
.pill.warn { color: var(--warn); border-color: rgba(245, 194, 107, 0.3); }
.pill.danger { color: var(--danger); border-color: rgba(255, 123, 138, 0.3); }

.empty {
  color: var(--muted);
  padding: 1.5rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  text-align: center;
}
.error { color: var(--danger); margin: 0.75rem 0 0; }
.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: #122038;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: min(420px, calc(100% - 2rem));
  z-index: 20;
}

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