/* UnitCare shared styles – dark theme */
:root {
  --bg: #020617;
  --surface: #0f172a;
  --surface-2: #131c33;
  --line: #1e293b;
  --line-2: #273449;
  --text: #f8fafc;
  --text-2: #94a3b8;
  --muted: #64748b;
  --faint: #475569;
  --accent: #6366f1;
  --accent-2: #818cf8;
  --accent-soft: rgba(99, 102, 241, 0.1);
  --accent-line: rgba(99, 102, 241, 0.28);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.09);
  --danger-line: rgba(239, 68, 68, 0.35);
  --ok: #10b981;
  --ok-soft: rgba(16, 185, 129, 0.1);
  --radius: 20px;
  --radius-sm: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
.ic { display: inline-block; flex-shrink: 0; vertical-align: middle; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Text */
.eyebrow { font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.label { display: block; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px 4px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 800; font-size: 14px; letter-spacing: .04em; text-decoration: none !important;
  transition: background .15s, border-color .15s, transform .05s, opacity .15s;
}
.btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #575ae6; border-color: #575ae6; }
.btn-danger { color: var(--danger); border-color: var(--danger-line); background: var(--danger-soft); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.15); border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 12px; border-radius: 12px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 13px; display: inline-grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.icon-btn:hover { border-color: var(--line-2); color: var(--text); }

/* Forms */
.field { margin-bottom: 18px; }
.input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 16px;
  transition: border-color .15s;
}
.input-wrap:focus-within { border-color: var(--accent); }
.input-wrap .ic { color: var(--muted); }
.input, .input-wrap input, textarea.input {
  width: 100%; border: 0; outline: 0; background: transparent; color: var(--text);
  font: inherit; font-weight: 600; padding: 15px 0; min-width: 0;
}
textarea.input {
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  resize: vertical; min-height: 120px; line-height: 1.5;
}
textarea.input:focus { border-color: var(--accent); }
.on-surface .input-wrap { background: var(--bg); }
::placeholder { color: var(--faint); opacity: 1; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 20px; }

/* Messages */
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 600; margin-bottom: 16px;
}
.alert-error { background: var(--danger-soft); color: #fca5a5; }
.alert-ok { background: var(--ok-soft); color: #6ee7b7; }
.alert-info { background: var(--accent-soft); color: #c7d2fe; }

/* Toast */
.toast-host { position: fixed; left: 0; right: 0; bottom: 24px; display: grid; justify-items: center; gap: 8px; z-index: 100; pointer-events: none; padding: 0 16px; }
.toast {
  background: #1e293b; color: var(--text); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 12px 18px; font-weight: 700; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4);
  animation: toast-in .2s ease-out; max-width: 480px;
}
.toast.error { border-color: var(--danger-line); color: #fecaca; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: currentColor;
  animation: spin .7s linear infinite; display: inline-block;
}
.spinner.lg { width: 36px; height: 36px; color: var(--accent); border-color: var(--line); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.center-fill { min-height: 60vh; display: grid; place-items: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (min-width: 1024px) { .toast-host { justify-items: end; right: 24px; left: auto; } }
