:root {
  --bg: #0b0f1a;
  --bg2: #11162a;
  --surface: #151b31;
  --border: #263152;
  --text: #e8edf7;
  --muted: #a0a8c6;
  --primary: #5d8aff;
  --primary-ink: #0e1a3b;
  --success: #22c55e;
  --danger: #ef4444;
  --shadow: 0 8px 30px rgba(0,0,0,.3);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1000px 500px at 20% 0%, #152047 20%, transparent 65%), linear-gradient(180deg, var(--bg), var(--bg2));
}
.hidden { display: none !important; }
.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 24px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: conic-gradient(from 180deg at 50% 50%, #7aa2ff, #59f3ff, #7aa2ff);
  display: grid; place-items: center; color: var(--primary-ink);
  font-weight: 800; font-size: 22px; box-shadow: var(--shadow);
}
.titles h1 { margin: 0; font-size: 22px; letter-spacing: .5px; }
.titles p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { background: linear-gradient(180deg, #6ea2ff, #4f7dff); border-color: #4b6ed6; color: #0d1a3b; }
.btn.ghost { background: transparent; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #3552a8;
  color: #b9ccff;
  background: rgba(93,138,255,.12);
  font-size: 12px; font-weight: 600;
}
.main { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card {
  background: rgba(21,27,49,.65);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.card-header h2 { margin: 0; font-size: 18px; letter-spacing: .3px; }
.list { list-style: none; margin: 0; padding: 8px; }
.list-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 10px; border-radius: 10px;
}
.list-item + .list-item { margin-top: 6px; }
.item-left { display: flex; align-items: center; gap: 10px; }
.link {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text);
  background: rgba(93,138,255,.12);
  border: 1px solid #3552a8;
  padding: 10px 12px; border-radius: 10px; font-weight: 600;
}
.favicon {
  width: 18px; height: 18px; border-radius: 4px; overflow: hidden; background: #1e2b50;
}
.item-actions { display: flex; gap: 8px; }
.btn.danger { color: #ffd7d7; border-color: #6b2a2a; background: linear-gradient(180deg, #ff6b6b, #ef4444); }
.form { padding: 16px; display: grid; gap: 12px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; color: var(--muted); }
.field input {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px; color: var(--text);
  outline: none;
}
.field input:focus { border-color: #4b6ed6; box-shadow: 0 0 0 3px rgba(93,138,255,.15); }
.form-actions { display: flex; gap: 8px; }
.modal {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: rgba(4,6,12,.55); backdrop-filter: blur(6px);
}
.modal-card {
  width: 100%; max-width: 420px;
  background: rgba(21,27,49,.9);
  border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow);
}
.modal-header { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 18px; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 20px; padding: 12px 16px; border-radius: 12px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  box-shadow: var(--shadow); font-weight: 600;
}
.toast.success { background: #11341e; border-color: #256e3d; color: #b6ffd1; }
.toast.error { background: #3a1414; border-color: #7a2e2e; color: #ffd7d7; }
@media (max-width: 640px) {
  .actions { width: 100%; justify-content: flex-end; }
  .titles h1 { font-size: 20px; }
  .logo { width: 40px; height: 40px; font-size: 20px; }
}
