/* ============================================================
   components.css — Cards, Buttons, Badges, Modals, Alerts
   Europydas  |  Miami Vice theme
   ============================================================ */

/* ── CARDS ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover          { border-color: var(--border-strong); }
.card-interactive:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(0,245,212,0.12), 0 12px 40px rgba(0,0,0,0.4);
}
.card-pad    { padding: 22px; }
.card-pad-sm { padding: 16px; }

.card-glow-primary { box-shadow: var(--card-glow-primary) !important; border-color: rgba(0,245,212,0.2) !important; }
.card-glow-accent  { box-shadow: var(--card-glow-accent)  !important; border-color: rgba(184,176,255,0.2) !important; }
.card-glow-danger  {
  box-shadow: 0 0 0 1px rgba(255,107,138,0.2), 0 8px 32px rgba(255,107,138,0.08) !important;
  border-color: rgba(255,107,138,0.25) !important;
}

/* ── PHASE BADGES ───────────────────────────────────────────── */
.phase-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; padding: 4px 10px; border-radius: 20px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
}
.phase-draft     { background: rgba(100,116,139,0.15); color: #64748b; border: 1px solid rgba(100,116,139,0.25); }
.phase-review    { background: rgba(255,186,8,0.12);   color: var(--gold);    border: 1px solid rgba(255,186,8,0.3); }
.phase-active    { background: rgba(0,245,212,0.1);    color: var(--primary); border: 1px solid rgba(0,245,212,0.25); }
.phase-concluded { background: rgba(184,176,255,0.12); color: var(--accent);  border: 1px solid rgba(184,176,255,0.28); }
.phase-declined  { background: rgba(255,107,138,0.1);  color: var(--danger);  border: 1px solid rgba(255,107,138,0.25); }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 13px; cursor: pointer;
  border: 1px solid transparent; transition: all .2s;
  text-decoration: none; white-space: nowrap; font-family: inherit;
}
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; }

/* Primary — teal */
.btn-primary {
  background: var(--primary); color: #07090f; border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(0,245,212,0.2);
}
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 20px rgba(0,245,212,0.35);
  transform: translateY(-1px);
}

/* Accent — violet */
.btn-accent {
  background: var(--accent); color: #07090f; border-color: var(--accent);
}
.btn-accent:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* Danger — coral */
.btn-danger {
  background: var(--danger-dim); color: var(--danger); border-color: rgba(255,107,138,0.35);
}
.btn-danger:hover { background: var(--danger); color: #07090f; }

/* Ghost */
.btn-ghost {
  background: transparent; color: var(--text-dim);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-dim); }

/* Outline */
.btn-outline {
  background: transparent; color: var(--primary); border-color: rgba(0,245,212,0.35);
}
.btn-outline:hover { background: var(--primary-dim); }

/* Disabled */
.btn:disabled, .btn[disabled] {
  opacity: .45; cursor: not-allowed; pointer-events: none;
}

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .8px;
  padding: 2px 8px; border-radius: 20px; text-transform: uppercase;
}
.badge-teal   { background: rgba(0,245,212,0.1);   color: var(--primary); border: 1px solid rgba(0,245,212,0.22); }
.badge-coral  { background: rgba(255,107,138,0.1);  color: var(--danger);  border: 1px solid rgba(255,107,138,0.22); }
.badge-violet { background: rgba(184,176,255,0.12); color: var(--accent);  border: 1px solid rgba(184,176,255,0.24); }
.badge-gold   { background: rgba(255,186,8,0.1);    color: var(--gold);    border: 1px solid rgba(255,186,8,0.24); }
.badge-muted  { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }

/* ── ALERTS ─────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.55; margin-bottom: 14px;
  display: none;
}
.alert.visible { display: block; }
.alert-error   { background: rgba(255,107,138,0.08); border: 1px solid rgba(255,107,138,0.25); color: #ff8fa3; }
.alert-success { background: rgba(0,245,212,0.08);   border: 1px solid rgba(0,245,212,0.25);   color: #00f5d4; }
.alert-warn    { background: rgba(255,186,8,0.08);   border: 1px solid rgba(255,186,8,0.25);   color: var(--gold); }
.alert-info    { background: rgba(184,176,255,0.08); border: 1px solid rgba(184,176,255,0.22); color: var(--accent); }

/* ── MODAL OVERLAY ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #0b0e18; border: 1px solid rgba(0,245,212,0.18);
  border-radius: 16px; padding: 28px; width: 100%; max-width: 520px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  animation: modalIn .18s ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(.97) translateY(8px); } to { opacity:1; transform:none; } }
.modal-title {
  font-size: 17px; font-weight: 800; margin-bottom: 18px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-close {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  transition: all .2s;
}
.modal-close:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-dim); }

/* ── TOASTS ─────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 18px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: #0e1120; border: 1px solid rgba(0,245,212,0.25);
  color: var(--text); box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: toastIn .2s ease;
  max-width: 320px;
}
.toast.error   { border-color: rgba(255,107,138,0.4); }
.toast.success { border-color: rgba(0,245,212,0.4); color: var(--primary); }
@keyframes toastIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:none; } }

/* ── TABS ───────────────────────────────────────────────────── */
.tab-bar {
  display: flex; gap: 2px; padding: 4px;
  background: var(--surface); border-radius: 10px;
  border: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 7px 14px; border-radius: 8px; font-size: 12px; font-weight: 700;
  cursor: pointer; border: none; background: transparent; color: var(--muted);
  white-space: nowrap; transition: all .15s; font-family: inherit;
}
.tab-btn:hover    { color: var(--text); background: var(--surface-hover); }
.tab-btn.active   { background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(0,245,212,0.2); }
.tab-panel        { display: none; }
.tab-panel.active { display: block; }

/* ── PROGRESS BAR ───────────────────────────────────────────── */
.progress-bar { height: 6px; background: var(--surface); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #00c8b8); transition: width .4s ease; }

/* ── AVATAR ─────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; flex-shrink: 0;
  background: rgba(0,245,212,0.12); border: 1px solid rgba(0,245,212,0.25);
  color: var(--primary);
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-md { width: 38px; height: 38px; font-size: 14px; }
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }

/* ── SEPARATOR ──────────────────────────────────────────────── */
.sep { height: 1px; background: var(--border); margin: 16px 0; }

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,245,212,0.2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,245,212,0.35); }
