/* shared/styles.css — shared look for ozira-pro/ and ozira/, built on the brand gradient
   (violet → magenta → coral) and the Pro indigo, not the placeholder palette
   auth/index.html's own inline CSS still uses. Scope an accent per app via
   <body data-brand="pro"> (indigo) or <body data-brand="hyby"> (gradient). Class names are
   unchanged from the first pass — only this file moved. `.wordmark-text` is a temporary
   text logotype (no real Hyby logo image exists yet) — swap back to an <img> once one does. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #16181f;
  --ink-soft: #666c7a;
  --ink-faint: #9aa0ad;
  --ground: #f4f3f8;
  --surface: #ffffff;
  --border: #e6e4ee;
  --error: #c0392b;
  --error-soft: #fbeae8;
  --success: #1c8a5a;
  --success-soft: #e8f7f0;
  --accent: #6810e0;
  --accent-soft: #efe6fb;
  --accent-2: #c03090;
  --grad: linear-gradient(120deg, #6810e0 0%, #c03090 55%, #f84850 100%);
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(22, 24, 31, 0.06);
  --shadow-md: 0 10px 28px rgba(40, 20, 70, 0.1);
  --shadow-lift: 0 16px 36px rgba(40, 20, 70, 0.16);
}
body[data-brand="pro"] {
  --accent: #241c84;
  --accent-2: #4b3fc9;
  --accent-soft: #e9e7f8;
  --grad: linear-gradient(120deg, #241c84 0%, #4b3fc9 100%);
}
body[data-brand="hyby"] {
  --accent: #6810e0;
  --accent-soft: #efe6fb;
  --grad: linear-gradient(120deg, #6810e0 0%, #c03090 55%, #f84850 100%);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 100% -10%, var(--accent-soft), transparent 60%),
    var(--ground);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 3px;
  background: var(--grad);
  opacity: 0.9;
}
.topbar img { height: 26px; display: block; }
.wordmark-text {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
.topbar .spacer { flex: 1; }
.topbar a, .topbar button {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.topbar a:hover, .topbar button:hover { background: var(--accent-soft); color: var(--accent); }

main { max-width: 640px; margin: 0 auto; padding: 28px 20px 70px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
  animation: rise 0.35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

h1 { font-size: 1.35rem; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 12px; }
p.subtitle { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.5; margin: 0 0 20px; }

/* ---------- forms ---------- */
label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  margin-bottom: 12px;
  background: var(--ground);
  color: var(--ink);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { resize: vertical; min-height: 76px; line-height: 1.45; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }

.input-mode-row { display: flex; gap: 8px; margin: -4px 0 12px; }
.input-mode-row button {
  flex: 1;
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.input-mode-row button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.input-mode-row button.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--grad);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(104, 16, 224, 0.35); }
  50% { box-shadow: 0 0 0 7px rgba(104, 16, 224, 0); }
}
.input-mode-row button:disabled { opacity: 0.4; cursor: not-allowed; }

.phone-row { display: flex; gap: 8px; }
.phone-row select { flex: 0 0 102px; width: 102px; }
.phone-row input { flex: 1; min-width: 0; }

/* ---------- buttons ---------- */
.primary {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  background: var(--grad);
  color: white;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(104, 16, 224, 0.22);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(104, 16, 224, 0.3); }
.primary:active:not(:disabled) { transform: translateY(0); }

/* ---------- status ---------- */
.status {
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 11px 14px;
  min-height: 1.1em;
  margin-top: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}
.status.error { color: var(--error); background: var(--error-soft); }
.status::before { content: "● "; font-size: 0.6rem; vertical-align: middle; opacity: 0.6; }
.status.error::before { content: "⚠ "; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--grad);
  border-radius: 999px;
  padding: 4px 11px 4px 9px;
  margin: 2px 6px 6px 0;
  box-shadow: var(--shadow-sm);
  animation: pop 0.25s ease both;
}
.chip::before { content: "✓"; font-size: 0.7rem; }
@keyframes pop { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: scale(1); } }

/* ---------- chat ---------- */
.chat-thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.bubble {
  max-width: 85%;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
  animation: rise 0.25s ease both;
  white-space: pre-wrap;
}
.bubble.provider { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.bubble.ozira { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }

/* ---------- provider cards ---------- */
.provider-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.provider-card::before {
  content: attr(data-initial);
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.provider-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.provider-card h3 { margin: 0 0 3px; font-size: 1rem; font-weight: 700; }
.provider-card p { margin: 0; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.4; }

/* ---------- otp ---------- */
.otp-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 22px; }
.otp-digit {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0;
}

/* ---------- chat-style input row (dashboard "ask", onboarding send) ---------- */
.chat-row { display: flex; gap: 8px; }
.chat-row textarea {
  flex: 1;
  min-width: 0;
  border-radius: 16px;
  min-height: 44px;
  max-height: 44px;
  resize: none;
  margin-bottom: 0;
}
.chat-row .send-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 11px 20px;
  border: none;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease;
  text-decoration: none;
}
.chat-row .send-btn:hover { transform: translateY(-1px); }
.chat-row .send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- avatar (top-right, initial letter) ---------- */
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex: 0 0 auto;
  transition: box-shadow 0.15s ease;
}
.avatar:hover { box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- rail nav (left icon sidebar, e.g. Pro dashboard sections) ---------- */
.rail-nav { flex: 0 0 56px; display: flex; flex-direction: column; gap: 10px; }
.rail-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink-soft);
  background: var(--surface);
  transition: all 0.15s ease;
}
.rail-btn.active { border-color: var(--accent); color: #fff; background: var(--grad); }

/* ---------- sections (tab-switched panels) ---------- */
.section { display: none; }
.section.active { display: block; }

/* ---------- add-on cards ---------- */
.addon-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.addon-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.addon-card h3 { margin: 0 0 3px; font-size: 0.92rem; font-weight: 700; }
.addon-card p { margin: 0; font-size: 0.8rem; color: var(--ink-soft); }
.addon-card .badge {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
}

/* ---------- splash ---------- */
.splash-screen {
  cursor: pointer;
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--grad);
}
.splash-card { background: #fff; border-radius: 20px; padding: 18px 32px; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18); }
.splash-card img { height: 40px; display: block; }
.splash-card .wordmark-text { font-size: 30px; }
.splash-tagline { font-size: 0.86rem; font-weight: 500; color: rgba(255, 255, 255, 0.85); text-decoration: none; border: none; }

/* ---------- centered auth card (welcome / login / otp / name) ---------- */
.auth-wrap {
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card.boxed { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 30px; box-shadow: var(--shadow-md); }
.auth-card.centered { text-align: center; }
.auth-card img.wordmark { height: 26px; display: block; margin-bottom: 18px; }
.auth-card .wordmark-text { display: block; margin-bottom: 18px; }
.auth-card.centered img.wordmark { margin-left: auto; margin-right: auto; }
.auth-card.centered .wordmark-text { text-align: center; }

/* ---------- facts ---------- */
.facts-group { margin-bottom: 16px; }
.facts-group h4 {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.facts-group ul { margin: 0; padding-left: 0; list-style: none; font-size: 0.9rem; }
.facts-group li {
  padding: 8px 12px;
  background: var(--ground);
  border-radius: 8px;
  margin-bottom: 6px;
  line-height: 1.4;
}
.empty-note { color: var(--ink-faint); font-size: 0.85rem; font-style: italic; }
