/* assets/css/app.css — TyrionTek ID */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600&family=Barlow+Condensed:wght@500;600;700&display=swap');

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Barlow', sans-serif;
  background: #f4f4f4;
  color: #222;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0 0 40px;
}
.card-wrap {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  border-top: none;
}
@media (min-width: 480px) {
  .app-shell { padding: 32px 16px 64px; align-items: center; }
  .card-wrap { border-top: 1px solid #e8e8e8; border-radius: 16px; }
}

/* ── Card Header ───────────────────────────────────────────────────────────── */
.card-header {
  background: #fff;
  padding: 1rem 1.25rem 0;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
}
.brand-link { display: flex; align-items: center; gap: 9px; }
.brand-logo { width: 32px; height: 32px; object-fit: contain; }
.brand-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  text-transform: uppercase;
}
.brand-name span { color: #E62427; }
.red-bar { height: 4px; background: #E62427; margin: 0 -1.25rem; }

/* ── Pills ─────────────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.pill-active { background: #f0faf4; border: 0.5px solid #a7e3bb; color: #1a6e3a; }
.pill-dot { width: 5px; height: 5px; border-radius: 50%; background: #22c55e; }
.pill-step { background: #fff0f0; border: 0.5px solid #fcc; color: #E62427; }
.pill-inactive { background: #fafafa; border: 0.5px solid #e0e0e0; color: #aaa; }

/* ── Avatar ────────────────────────────────────────────────────────────────── */
.avatar-row {
  display: flex; justify-content: center;
  position: relative; margin-top: -2.2rem; z-index: 2;
}
.avatar {
  border-radius: 50%; border: 3px solid #E62427; overflow: hidden;
  background: #f5f5f5;
  box-shadow: 0 2px 16px rgba(230,36,39,0.15);
}
.avatar-lg { width: 84px; height: 84px; }
.avatar-sm { width: 52px; height: 52px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-emoji { font-size: 28px; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }

/* ── Pet Identity ──────────────────────────────────────────────────────────── */
.pet-identity { text-align: center; padding: 0.5rem 1.25rem 0; }
.pet-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 27px; font-weight: 700; color: #111;
  letter-spacing: 0.03em;
}
.pet-sub { font-size: 12px; color: #999; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* ── Sections & Labels ─────────────────────────────────────────────────────── */
.section { padding: 0 1.25rem 1.25rem; }
.sec-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: #bbb; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.sec-label::after { content: ''; flex: 1; height: 0.5px; background: #f0f0f0; }
.divider { border: none; border-top: 1px solid #f2f2f2; margin: 0 1.25rem 1rem; }

/* ── Tags ──────────────────────────────────────────────────────────────────── */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; font-weight: 500;
  padding: 4px 11px; border-radius: 20px; letter-spacing: 0.02em;
}
.tag-dim { background: #f7f7f7; color: #777; border: 0.5px solid #ebebeb; }
.tag-red { background: #fff0f0; color: #a32323; border: 0.5px solid #f5c0c0; }

/* ── Alerts ────────────────────────────────────────────────────────────────── */
.alert {
  border-radius: 10px; padding: 10px 14px;
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0 1.25rem 1rem; font-size: 12px; line-height: 1.6;
}
.alert p { margin: 0; }
.alert-warn { background: #fffbf0; border: 0.5px solid #f5d88a; color: #92600a; }
.alert-icon { font-size: 13px; margin-top: 1px; flex-shrink: 0; }
.alert-info { background: #f0f7ff; border: 0.5px solid #b8d8f8; color: #1e4d8c; }
.alert-info strong { font-weight: 600; }
.alert-success { background: #f0faf4; border: 0.5px solid #a7e3bb; color: #1a6e3a; }
.alert-error { background: #fff0f0; border: 0.5px solid #f5c0c0; color: #a32323; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 10px; padding: 13px 16px;
  font-size: 13px; font-weight: 600; font-family: 'Barlow', sans-serif;
  letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer;
  border: none; text-decoration: none; transition: opacity .18s;
}
.btn:active { opacity: .8; }
.btn-red { background: #E62427; color: #fff; }
.btn-red:hover { opacity: .9; }
.btn-green { background: #1DB954; color: #fff; }
.btn-green:hover { opacity: .9; }
.btn-ghost { background: #fff; color: #aaa; border: 1px solid #eee; font-size: 11px; text-transform: none; letter-spacing: 0.03em; width: 100%; }
.btn-ghost:hover { color: #555; background: #fafafa; }
.btn-full { width: 100%; }
.btn-lg { padding: 14px; font-size: 14px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-text { background: none; border: none; color: #E62427; font-size: 11px; font-family: 'Barlow', sans-serif; cursor: pointer; padding: 0; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.field { margin-bottom: 1rem; padding: 0 1.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 1.25rem; margin-bottom: 1rem; }
.field-row .field { padding: 0; margin-bottom: 0; }
.field-label { font-size: 11px; font-weight: 600; color: #555; margin-bottom: 5px; display: block; letter-spacing: 0.02em; }
.req { color: #E62427; font-size: 10px; }
.field-input {
  width: 100%; border: 1px solid #ebebeb; border-radius: 8px;
  padding: 10px 12px; font-size: 13px;
  font-family: 'Barlow', sans-serif; color: #222; background: #fff;
  outline: none; transition: border-color .2s;
  appearance: none;
}
.field-input:focus { border-color: #E62427; }
.field-input::placeholder { color: #ccc; }
textarea.field-input { resize: none; line-height: 1.5; }
.field-error { font-size: 11px; color: #E62427; margin-top: 4px; }

/* ── Photo Upload ──────────────────────────────────────────────────────────── */
.photo-upload-wrap { display: flex; flex-direction: column; align-items: center; padding: 1.25rem 1.25rem 0.75rem; }
.photo-ring {
  width: 88px; height: 88px; border-radius: 50%;
  border: 2.5px dashed #ddd; background: #fafafa;
  cursor: pointer; overflow: hidden; transition: border-color .2s;
  display: flex; align-items: center; justify-content: center;
}
.photo-ring:hover { border-color: #E62427; }
.photo-ring.has-photo { border-style: solid; border-color: #E62427; }
.photo-hint { font-size: 10px; color: #ccc; margin-top: 6px; letter-spacing: 0.03em; }
.photo-change { font-size: 10px; color: #E62427; margin-top: 6px; cursor: pointer; font-weight: 500; }

/* ── Steps bar ─────────────────────────────────────────────────────────────── */
.steps-bar {
  display: flex; align-items: center;
  padding: 0.85rem 1.25rem 0.65rem; background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}
.step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: 'Barlow Condensed', sans-serif;
  background: #f0f0f0; color: #bbb; flex-shrink: 0;
}
.step-dot.active { background: #E62427; color: #fff; box-shadow: 0 0 0 3px rgba(230,36,39,.15); }
.step-dot.done { background: #22c55e; color: #fff; }
.step-line { flex: 1; height: 1.5px; background: #e8e8e8; margin: 0 4px; }
.step-line.done { background: #22c55e; }

/* ── Hero center ───────────────────────────────────────────────────────────── */
.hero-center {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 2rem 1.5rem 1.5rem;
}
.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px; font-weight: 700; color: #111;
  letter-spacing: 0.02em; margin-bottom: 0.5rem; line-height: 1.1;
}
.hero-sub { font-size: 13px; color: #999; line-height: 1.65; max-width: 290px; }
.text-red { color: #E62427; }

/* ── Icon rings ────────────────────────────────────────────────────────────── */
.icon-ring {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.icon-ring-dashed { background: #fafafa; border: 2px dashed #ddd; }
.icon-ring-red { background: #fff0f0; border: 1.5px solid #fcc; }
.icon-ring-green { background: #f0faf4; border: 1.5px solid #a7e3bb; }

/* ── Tag ID badge ──────────────────────────────────────────────────────────── */
.tag-id-badge {
  font-family: monospace; font-size: 10px; color: #ccc;
  letter-spacing: 0.1em; margin-top: -0.75rem; margin-bottom: 1rem;
}

/* ── Step list ─────────────────────────────────────────────────────────────── */
.step-list { display: flex; flex-direction: column; gap: 1rem; }
.step-item { display: flex; align-items: flex-start; gap: 12px; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: #fff0f0; border: 0.5px solid #fcc;
  color: #E62427; font-size: 11px; font-weight: 700;
  font-family: 'Barlow Condensed', sans-serif;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.step-title { font-size: 12px; font-weight: 600; color: #333; margin-bottom: 2px; }
.step-sub { font-size: 11px; color: #aaa; line-height: 1.5; }

/* ── CTA note ──────────────────────────────────────────────────────────────── */
.cta-note { font-size: 10px; color: #bbb; text-align: center; margin-top: 10px; line-height: 1.5; }
.cta-note a { color: #E62427; }

/* ── Summary card ──────────────────────────────────────────────────────────── */
.summary-card {
  margin: 0 1.25rem 1rem;
  background: #fafafa; border: 0.5px solid #ebebeb; border-radius: 12px; overflow: hidden;
}
.summary-header {
  display: flex; align-items: center; gap: 12px;
  padding: 1rem; border-bottom: 0.5px solid #ebebeb;
}
.summary-table { width: 100%; font-size: 12px; padding: 0.75rem 1rem; border-collapse: collapse; }
.summary-table td { padding: 5px 0; border-bottom: 0.5px solid #f2f2f2; color: #999; }
.summary-table td:last-child { text-align: right; color: #444; font-weight: 500; }
.summary-table tr:last-child td { border-bottom: none; }
.val-red { color: #E62427 !important; font-family: monospace; font-weight: 700 !important; }
.val-blue { color: #3b82f6 !important; }

/* ── Auth box ──────────────────────────────────────────────────────────────── */
.auth-box {
  margin: 0 1.25rem 1.25rem;
  background: #fafafa; border: 0.5px solid #ebebeb; border-radius: 12px;
  padding: 1rem 1.25rem;
}
.auth-box-title { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 700; color: #111; margin-bottom: 4px; }
.auth-box-sub { font-size: 12px; color: #999; margin-bottom: 1rem; line-height: 1.5; }
.auth-box .field { padding: 0; margin-bottom: 0.75rem; }
.auth-box .btn { margin-bottom: 0; }
.sent-msg { font-size: 12px; color: #1a6e3a; margin: 0.75rem 0 0.25rem; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.card-footer {
  text-align: center; padding: 0.65rem 0 0.55rem;
  font-size: 9px; color: #ccc; letter-spacing: 0.09em; text-transform: uppercase;
  border-top: 1px solid #f5f5f5;
}

/* ── Utility ───────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
