:root {
  --fyp-navy: #1a1a2e;
  --fyp-navy-mid: #16213e;
  --fyp-navy-deep: #0f3460;
  --fyp-accent: #e94560;
  --fyp-accent-dark: #d63851;
  --fyp-muted: #5c6578;
  --fyp-muted-light: #8892a8;
  --fyp-bg: #eef1f6;
  --fyp-surface: #fff;
  --fyp-border: #e4e8ef;
  --fyp-radius: 16px;
  --fyp-radius-lg: 24px;
  --fyp-shadow: 0 4px 20px rgba(26, 26, 46, 0.08);
  --fyp-font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--fyp-font);
  color: var(--fyp-navy);
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
}

/* ── LANDING ── */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem;
}
.hero .logo { font-size: 4rem; margin-bottom: 1rem; }
.hero h1 { font-size: 3rem; color: #fff; margin-bottom: 1rem; }
.hero h1 span { color: #e94560; }
.hero p { font-size: 1.2rem; color: #a8b2d8; max-width: 600px; margin-bottom: 2rem; }
.btn { display: inline-block; padding: .8rem 2rem; border-radius: 50px; text-decoration: none;
  font-weight: 600; transition: transform .2s, box-shadow .2s; }
.btn-primary { background: #e94560; color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(233,69,96,.4); }
.btn-outline { border: 2px solid #e94560; color: #e94560; margin-left: 1rem; }
.btn-outline:hover { background: #e94560; color: #fff; }

.steps { background: #f8f9fa; padding: 5rem 2rem; text-align: center; }
.steps h2 { font-size: 2rem; margin-bottom: 3rem; color: #1a1a2e; }
.steps-grid { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; max-width: 900px; margin: 0 auto; }
.step-card { background: #fff; border-radius: 16px; padding: 2rem; width: 240px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.step-card .icon { font-size: 2.5rem; margin-bottom: 1rem; }
.step-card h3 { color: #1a1a2e; margin-bottom: .5rem; }
.step-card p { color: #666; font-size: .9rem; }

.features { background: #1a1a2e; padding: 5rem 2rem; text-align: center; }
.features h2 { color: #fff; font-size: 2rem; margin-bottom: 3rem; }
.features-grid { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; max-width: 900px; margin: 0 auto; }
.feature { background: #16213e; border-radius: 12px; padding: 1.5rem; width: 200px; color: #a8b2d8; }
.feature .icon { font-size: 2rem; margin-bottom: .5rem; }
.feature h4 { color: #fff; margin-bottom: .3rem; }

footer { background: var(--fyp-navy-deep); color: #a8b2d8; text-align: center; padding: 2rem; }
footer a { color: var(--fyp-accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.site-footer-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; flex-direction: column; gap: .35rem; font-size: .9rem;
}

/* ── MASCOTAS PERDIDAS LANDING ── */
.lost-pets { background: #f8f9fa; padding: 5rem 2rem; text-align: center; }
.lost-pets h2 { font-size: 2rem; margin-bottom: 2rem; color: #1a1a2e; }
.pets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
.pet-card { background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,.08); transition: transform .2s; }
.pet-card:hover { transform: translateY(-4px); }
.pet-card img { width: 100%; height: 180px; object-fit: cover; }
.pet-card-noimg { width: 100%; height: 180px; display: flex; align-items: center;
  justify-content: center; background: #eee; font-size: 3rem; }
.pet-card-info { padding: 1rem; }
.pet-card-info h4 { color: #1a1a2e; margin-bottom: .3rem; }
.pet-card-info p { color: #666; font-size: .85rem; }

/* ── ADMIN ── */
.admin-body { background: #f0f2f5; min-height: 100vh; }
.topbar { background: #1a1a2e; color: #fff; padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between; }
.topbar h1 { font-size: 1.3rem; }
.topbar span { color: #e94560; }
.topbar a { color: #a8b2d8; text-decoration: none; font-size: .9rem; }
.topbar a:hover { color: #e94560; }

.sidebar { width: 220px; background: #16213e; min-height: calc(100vh - 60px);
  padding: 1.5rem 0; position: fixed; top: 60px; left: 0; z-index: 100; }
.sidebar a { display: block; padding: .8rem 1.5rem; color: #a8b2d8; text-decoration: none;
  transition: background .2s; font-size: .95rem; }
.sidebar a:hover, .sidebar a.active { background: #0f3460; color: #fff; border-left: 3px solid #e94560; }
.sidebar .icon { margin-right: .5rem; }

.main-content { margin-left: 220px; padding: 2rem; }

.stat-cards { display: flex; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.stat-card { background: #fff; border-radius: 12px; padding: 1.5rem 2rem;
  flex: 1; min-width: 180px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.stat-card .number { font-size: 2.5rem; font-weight: 700; color: #e94560; }
.stat-card .label { color: #666; font-size: .9rem; }

.card { background: var(--fyp-surface); border-radius: var(--fyp-radius); padding: 1.35rem;
  box-shadow: var(--fyp-shadow); margin-bottom: 1.25rem; }
.card h2 { margin-bottom: 1.2rem; color: var(--fyp-navy); font-size: 1.1rem; font-weight: 700; }

table { width: 100%; border-collapse: collapse; }
th { background: #f0f2f5; padding: .7rem 1rem; text-align: left; font-size: .85rem;
  color: #666; text-transform: uppercase; letter-spacing: .05em; }
td { padding: .7rem 1rem; border-bottom: 1px solid #f0f2f5; font-size: .9rem; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

.badge { display: inline-block; padding: .2rem .7rem; border-radius: 50px; font-size: .75rem; font-weight: 600; }
.badge-perdido { background: #ffe0e0; color: #c0392b; }
.badge-encontrado { background: #d5f5e3; color: #1e8449; }

.btn-sm { padding: .3rem .8rem; border-radius: 6px; font-size: .8rem; text-decoration: none;
  border: none; cursor: pointer; font-weight: 600; }
.btn-edit { background: #3498db; color: #fff; }
.btn-delete { background: #e74c3c; color: #fff; }
.btn-edit:hover { background: #2980b9; }
.btn-delete:hover { background: #c0392b; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .3rem; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: .85rem; font-weight: 600; color: #555; }
input, select, textarea {
  padding: .7rem 1rem; border: 1.5px solid var(--fyp-border); border-radius: 12px;
  font-size: .92rem; transition: border-color .2s, box-shadow .2s;
  font-family: inherit; width: 100%; background: var(--fyp-surface);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--fyp-accent);
  box-shadow: 0 0 0 3px rgba(233,69,96,.12);
}
textarea { resize: vertical; min-height: 88px; }
.btn-submit {
  background: linear-gradient(135deg, var(--fyp-accent), var(--fyp-accent-dark));
  color: #fff; border: none; padding: .75rem 1.35rem;
  border-radius: 14px; cursor: pointer; font-weight: 600; font-size: .92rem;
  margin-top: .5rem; font-family: inherit;
  box-shadow: 0 4px 16px rgba(233,69,96,.3);
  transition: transform .15s, box-shadow .2s;
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(233,69,96,.38); }
.btn-back {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-bottom: 1.25rem; color: var(--fyp-muted); text-decoration: none;
  font-size: .88rem; font-weight: 500; transition: color .2s;
}
.btn-back:hover { color: var(--fyp-accent); }

.btn-mp { background: linear-gradient(135deg, #009ee3, #007eb5) !important; box-shadow: 0 4px 16px rgba(0,158,227,.3) !important; }
.btn-mp:hover { box-shadow: 0 6px 20px rgba(0,158,227,.38) !important; }

.landing-body { font-family: var(--fyp-font); }

label { font-size: .85rem; font-weight: 600; color: var(--fyp-navy); }
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }

.alert { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.alert-error { background: #ffe0e0; color: #c0392b; }
.alert-success { background: #d5f5e3; color: #1e8449; }

/* LOGIN */
.login-body { background: linear-gradient(135deg, #1a1a2e, #0f3460);
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { background: #fff; border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-card .logo { text-align: center; font-size: 2.5rem; margin-bottom: .5rem; }
.login-card h2 { text-align: center; color: #1a1a2e; margin-bottom: .3rem; }
.login-card p { text-align: center; color: #888; font-size: .85rem; margin-bottom: 1.5rem; }
.login-card .form-group { margin-bottom: 1rem; }

.pet-thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; }

/* ── TABLE RESPONSIVE ── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .btn { padding: .6rem 1.5rem; font-size: .9rem; }
  .btn-outline { margin-left: 0; margin-top: .5rem; }
  .hero > div { display: flex; flex-direction: column; align-items: center; gap: .5rem; }

  .steps { padding: 3rem 1rem; }
  .steps h2 { font-size: 1.5rem; margin-bottom: 2rem; }
  .step-card { width: 100%; max-width: 300px; }

  .features { padding: 3rem 1rem; }
  .features h2 { font-size: 1.5rem; }
  .feature { width: 45%; min-width: 140px; }

  .lost-pets { padding: 3rem 1rem; }
  .lost-pets h2 { font-size: 1.5rem; }
  .pets-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
  .pet-card img { height: 140px; }

  .app-nav, .app-user-menu { display: none; }
  .app-bottom-nav { display: flex; }
  .app-main { padding-bottom: 5.5rem; }
  .app-topbar { justify-content: center; }
  .app-brand { margin: 0 auto; }

  .admin-sidebar { display: none; }
  .admin-bottom-nav { display: flex; }
  .admin-main { padding: 1rem 1rem 5rem; }

  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 1rem; }

  .topbar { padding: .8rem 1rem; }
  .topbar h1 { font-size: 1.1rem; }

  .stat-cards { flex-direction: column; }
  .stat-card { min-width: auto; }

  .form-grid { grid-template-columns: 1fr; }

  .card { padding: 1rem; }

  table { font-size: .8rem; }
  th, td { padding: .5rem .6rem; }

  .auth-card, .login-card { padding: 1.5rem; }
  .pet-tiles { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .hero .logo { font-size: 3rem; }
  .features-grid { flex-direction: column; align-items: center; }
  .feature { width: 100%; max-width: 280px; }
  .pets-grid { grid-template-columns: 1fr 1fr; }
}

/* ── LANDING UX ── */
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.section-lead { text-align: center; color: #666; max-width: 520px; margin: -1rem auto 2rem; }
.pets-grid-public { max-width: 1100px; }
.pet-card-public { text-align: left; display: flex; flex-direction: column; }
.pet-card-public .pet-card-info { flex: 1; display: flex; flex-direction: column; }
.pet-meta { color: #666; font-size: .82rem; margin-bottom: .25rem; }
.btn-chat {
  display: block; margin-top: .85rem; padding: .65rem 1rem; border-radius: 12px;
  background: linear-gradient(135deg, var(--fyp-accent), var(--fyp-accent-dark));
  color: #fff; text-align: center; font-weight: 600; font-size: .88rem;
  text-decoration: none; transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(233,69,96,.28);
}
.btn-chat:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(233,69,96,.35); }
.empty-state { text-align: center; padding: 2.5rem 1.5rem; }

/* ── APP SHELL (usuario + admin base) ── */
.app-body { background: var(--fyp-bg); min-height: 100vh; min-height: 100dvh; }

.app-shell { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.app-main {
  flex: 1; width: 100%; max-width: 960px; margin: 0 auto;
  padding: 1.5rem 1.25rem 5.5rem;
}

.app-topbar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .85rem 1.25rem;
  background: linear-gradient(135deg, var(--fyp-navy) 0%, var(--fyp-navy-mid) 100%);
  color: #fff; box-shadow: 0 2px 16px rgba(26,26,46,.15);
  position: sticky; top: 0; z-index: 50;
}
.app-topbar--admin { justify-content: space-between; }

.app-brand {
  display: flex; align-items: center; gap: .5rem;
  text-decoration: none; color: #fff; font-weight: 600; font-size: 1rem;
}
.app-brand-icon { font-size: 1.35rem; }
.app-brand-text strong { color: var(--fyp-accent); font-weight: 700; }
.app-brand-tag {
  font-style: normal; font-size: .72rem; font-weight: 600;
  background: rgba(233,69,96,.2); color: #ffb3c0;
  padding: .15rem .45rem; border-radius: 6px; margin-left: .35rem;
}

.app-nav { display: flex; align-items: center; gap: .35rem; flex: 1; }
.app-nav-link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .85rem; border-radius: 12px;
  color: #a8b2d8; text-decoration: none; font-size: .88rem; font-weight: 500;
  transition: background .2s, color .2s; position: relative;
}
.app-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.app-nav-link.is-active { background: rgba(233,69,96,.2); color: #fff; }
.app-nav-icon { font-size: 1rem; }
.app-nav-badge {
  background: var(--fyp-accent); color: #fff; font-size: .65rem; font-weight: 700;
  padding: .1rem .4rem; border-radius: 999px; min-width: 1.1rem; text-align: center;
}

.app-user-menu {
  display: flex; align-items: center; gap: .75rem; margin-left: auto;
}
.app-user-name { font-size: .85rem; color: #a8b2d8; }
.app-logout {
  font-size: .85rem; color: #a8b2d8; text-decoration: none;
  padding: .4rem .65rem; border-radius: 8px; transition: color .2s, background .2s;
}
.app-logout:hover { color: #fff; background: rgba(255,255,255,.08); }

.app-bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--fyp-surface); border-top: 1px solid var(--fyp-border);
  padding: .45rem .75rem;
  padding-bottom: max(.45rem, env(safe-area-inset-bottom));
  z-index: 50; box-shadow: 0 -4px 20px rgba(0,0,0,.06);
  justify-content: space-around; align-items: center;
}
.app-bottom-link {
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  text-decoration: none; color: var(--fyp-muted-light); font-size: .68rem; font-weight: 600;
  padding: .35rem .75rem; border-radius: 12px; position: relative;
  min-width: 64px;
}
.app-bottom-link span:first-child { font-size: 1.25rem; }
.app-bottom-link.is-active { color: var(--fyp-accent); }
.app-bottom-link--fab {
  width: 52px; height: 52px; border-radius: 50%; min-width: auto;
  background: linear-gradient(135deg, var(--fyp-accent), var(--fyp-accent-dark));
  color: #fff; font-size: 1.5rem; margin-top: -1.25rem;
  box-shadow: 0 6px 20px rgba(233,69,96,.4);
}
.app-bottom-link--fab span { font-size: 1.5rem; line-height: 1; }
.app-bottom-badge {
  position: absolute; top: 0; right: .5rem;
  background: var(--fyp-accent); color: #fff; font-size: .6rem; font-weight: 700;
  padding: .1rem .35rem; border-radius: 999px;
}

.app-footer {
  text-align: center; padding: 1rem 1.25rem 1.5rem;
  font-size: .78rem; color: var(--fyp-muted-light);
  display: flex; flex-direction: column; gap: .25rem;
}
.app-footer a { color: var(--fyp-accent); text-decoration: none; }
.app-footer a:hover { text-decoration: underline; }

.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--fyp-navy); margin: 0; }
.page-subtitle { font-size: .9rem; color: var(--fyp-muted); margin: .25rem 0 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.panel {
  background: var(--fyp-surface); border-radius: var(--fyp-radius);
  box-shadow: var(--fyp-shadow); margin-bottom: 1.25rem; overflow: hidden;
}
.panel-header {
  padding: 1.15rem 1.35rem; border-bottom: 1px solid var(--fyp-border);
  font-size: 1.05rem; font-weight: 700; color: var(--fyp-navy);
}
.panel-body { padding: 1.35rem; }

.empty-panel {
  text-align: center; padding: 2.5rem 1.5rem;
}
.empty-panel-icon {
  width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 1rem;
  background: var(--fyp-bg); display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.empty-panel h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.empty-panel p { color: var(--fyp-muted); font-size: .9rem; max-width: 320px; margin: 0 auto 1.25rem; }

.alert-banner {
  display: flex; align-items: flex-start; gap: .65rem;
  padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1.25rem;
  font-size: .88rem; line-height: 1.45;
}
.alert-banner--success { background: #e8f8ef; color: #1e7e4a; border: 1px solid #b8e6cc; }
.alert-banner--warning { background: #fff8e6; color: #9a6700; border: 1px solid #ffe08a; }
.alert-banner-icon { font-size: 1.15rem; flex-shrink: 0; }

.fee-notice {
  display: flex; align-items: center; gap: .65rem;
  background: #fff5f7; border: 1px solid #fadbd8; border-radius: 12px;
  padding: .85rem 1rem; margin-bottom: 1.25rem; font-size: .88rem; color: var(--fyp-muted);
}
.fee-notice strong { color: var(--fyp-accent); font-size: 1.05rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .75rem 1.35rem; border-radius: 14px; font-family: inherit;
  font-size: .92rem; font-weight: 600; text-decoration: none; border: none;
  cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn--primary {
  background: linear-gradient(135deg, var(--fyp-accent), var(--fyp-accent-dark));
  color: #fff; box-shadow: 0 4px 16px rgba(233,69,96,.3);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(233,69,96,.38); }
.btn--ghost { background: #f3f5f9; color: var(--fyp-navy); }
.btn--ghost:hover { background: #e8ebf0; }
.btn--outline {
  background: transparent; border: 2px solid var(--fyp-accent); color: var(--fyp-accent);
}
.btn--outline:hover { background: var(--fyp-accent); color: #fff; }
.btn--sm { padding: .45rem .9rem; font-size: .82rem; border-radius: 10px; }
.btn--block { width: 100%; }

.pet-tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem;
}
.pet-tile {
  background: var(--fyp-surface); border-radius: var(--fyp-radius);
  overflow: hidden; box-shadow: var(--fyp-shadow);
  transition: transform .2s, box-shadow .2s;
}
.pet-tile:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(26,26,46,.12); }
.pet-tile-photo { width: 100%; height: 160px; object-fit: cover; }
.pet-tile-photo--empty {
  height: 160px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f0f2f5, #e8ebf0); font-size: 2.5rem;
}
.pet-tile-body { padding: 1rem 1.15rem 1.15rem; }
.pet-tile-body h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.pet-tile-meta { font-size: .82rem; color: var(--fyp-muted); margin-bottom: .2rem; }
.pet-tile-actions { display: flex; gap: .5rem; margin-top: .85rem; flex-wrap: wrap; }

.pending-list { display: flex; flex-direction: column; gap: .65rem; }
.pending-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 1rem; background: #fffbf0; border-radius: 12px;
  border: 1px solid #ffe08a; flex-wrap: wrap;
}
.pending-item strong { font-size: .9rem; }

/* Auth pages (login, register, pago) */
.auth-page, .login-body, .chat-gate-body {
  min-height: 100vh; min-height: 100dvh;
  background: linear-gradient(160deg, var(--fyp-navy) 0%, var(--fyp-navy-mid) 45%, var(--fyp-navy-deep) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.auth-card, .login-card, .payment-card, .chat-gate-card {
  background: var(--fyp-surface); border-radius: var(--fyp-radius-lg);
  padding: 2rem 1.75rem; width: 100%; max-width: 420px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.auth-card--wide, .chat-gate-card--wide { max-width: 460px; }
.auth-card .logo, .login-card .logo {
  text-align: center; font-size: 2.75rem; margin-bottom: .5rem;
}
.auth-card h1, .auth-card h2, .login-card h2, .payment-card h2 {
  text-align: center; color: var(--fyp-navy); font-size: 1.35rem; margin-bottom: .5rem;
}
.auth-lead, .login-card p, .payment-lead {
  text-align: center; color: var(--fyp-muted); font-size: .9rem;
  line-height: 1.55; margin-bottom: 1.25rem;
}
.auth-back {
  display: inline-block; color: var(--fyp-muted-light); text-decoration: none;
  font-size: .85rem; margin-bottom: 1rem;
}
.auth-back:hover { color: var(--fyp-accent); }
.auth-footer {
  text-align: center; margin-top: 1.25rem; font-size: .88rem; color: var(--fyp-muted);
}
.auth-footer a { color: var(--fyp-accent); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* Admin shell */
.admin-shell { background: var(--fyp-bg); }
.admin-layout { display: flex; min-height: calc(100vh - 60px); }
.admin-sidebar {
  width: 240px; background: var(--fyp-navy-mid); padding: 1.25rem 0;
  flex-shrink: 0; position: sticky; top: 56px; height: calc(100vh - 56px);
  overflow-y: auto;
}
.admin-nav-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .85rem 1.35rem; color: #a8b2d8; text-decoration: none;
  font-size: .92rem; font-weight: 500; transition: background .2s, color .2s;
  border-left: 3px solid transparent;
}
.admin-nav-link:hover { background: rgba(15,52,96,.5); color: #fff; }
.admin-nav-link.is-active {
  background: var(--fyp-navy-deep); color: #fff;
  border-left-color: var(--fyp-accent);
}
.admin-nav-link--muted { margin-top: 1rem; opacity: .75; font-size: .85rem; }
.admin-main { flex: 1; padding: 1.5rem; min-width: 0; }
.admin-bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--fyp-surface); border-top: 1px solid var(--fyp-border);
  padding: .5rem; z-index: 50;
  padding-bottom: max(.5rem, env(safe-area-inset-bottom));
}
.admin-bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  text-decoration: none; color: var(--fyp-muted-light); font-size: .68rem; font-weight: 600;
  padding: .35rem; border-radius: 10px;
}
.admin-bottom-nav a span:first-child { font-size: 1.2rem; }
.admin-bottom-nav a.is-active { color: var(--fyp-accent); }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.stat-tile {
  background: var(--fyp-surface); border-radius: var(--fyp-radius);
  padding: 1.35rem 1.5rem; box-shadow: var(--fyp-shadow);
}
.stat-tile-value { font-size: 2.25rem; font-weight: 700; color: var(--fyp-accent); line-height: 1; }
.stat-tile-label { font-size: .88rem; color: var(--fyp-muted); margin-top: .35rem; }

.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; }
.quick-link {
  display: flex; align-items: center; gap: .75rem; padding: 1rem 1.15rem;
  background: var(--fyp-bg); border-radius: 12px; text-decoration: none;
  color: var(--fyp-navy); font-weight: 600; font-size: .9rem;
  transition: background .2s, transform .15s;
}
.quick-link:hover { background: #e8ebf0; transform: translateX(4px); }
.quick-link span { font-size: 1.35rem; }

/* ── USER AREA (legacy aliases) ── */
.topbar-nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .9rem; }
.topbar-nav a { color: #a8b2d8; text-decoration: none; }
.topbar-nav a:hover { color: #e94560; }
.page-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.page-header-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.btn-outline-sm {
  display: inline-block; padding: .55rem 1rem; border-radius: 8px; border: 2px solid #e94560;
  color: #e94560; text-decoration: none; font-weight: 600; font-size: .85rem; background: transparent;
}
.fee-notice {
  background: #fff5f7; border: 1px solid #fadbd8; border-radius: 8px; padding: .75rem 1rem;
  margin-bottom: 1rem; font-size: .9rem; color: #555;
}

/* ── PAYMENT ── */
.payment-card {
  background: #fff; border-radius: 16px; padding: 2rem; width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); text-align: center;
}
.payment-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.payment-lead { color: #666; font-size: .95rem; margin-bottom: 1.25rem; line-height: 1.5; }
.payment-summary {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--fyp-bg); border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1rem;
}
.payment-summary strong { font-size: 1.4rem; color: var(--fyp-accent); }
.payment-features { text-align: left; list-style: none; margin: 0 0 1.25rem; padding: 0; font-size: .88rem; color: var(--fyp-muted); }
.payment-features li { padding: .4rem 0; border-bottom: 1px solid var(--fyp-border); }
.payment-features li:last-child { border-bottom: none; }

/* ── INBOX ── */
.inbox-list { display: flex; flex-direction: column; gap: .65rem; }
.inbox-item {
  display: flex; gap: 1rem; align-items: center; padding: 1rem 1.15rem;
  background: var(--fyp-surface); border-radius: var(--fyp-radius);
  text-decoration: none; color: inherit; box-shadow: var(--fyp-shadow);
  transition: transform .15s, box-shadow .15s; border: 1px solid transparent;
}
.inbox-item:hover {
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,26,46,.1);
  border-color: rgba(233,69,96,.15);
}
.inbox-thumb {
  width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--fyp-border);
}
.inbox-thumb-placeholder {
  width: 56px; height: 56px; border-radius: 14px; background: var(--fyp-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.inbox-body { flex: 1; min-width: 0; }
.inbox-top {
  display: flex; align-items: center; gap: .5rem; margin-bottom: .2rem;
}
.inbox-top strong { font-size: .95rem; color: var(--fyp-navy); }
.inbox-meta { font-size: .82rem; color: var(--fyp-muted); }
.inbox-time { font-size: .75rem; color: var(--fyp-muted-light); flex-shrink: 0; }
.inbox-chevron { color: var(--fyp-muted-light); font-size: 1.1rem; flex-shrink: 0; }
.inbox-badge {
  background: var(--fyp-accent); color: #fff; font-size: .68rem; font-weight: 700;
  padding: .15rem .45rem; border-radius: 999px; min-width: 1.2rem; text-align: center;
}

/* ── CHAT ── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.chat-page {
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  max-width: 720px; margin: 0 auto;
  background: #eef1f6;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  color: #1a1a2e;
}

.chat-topbar {
  display: flex; align-items: center; gap: .5rem;
  padding: .75rem 1rem;
  padding-top: max(.75rem, env(safe-area-inset-top));
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 16px rgba(26,26,46,.18);
  z-index: 10;
}

.chat-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  border: none; background: rgba(255,255,255,.08);
  color: #fff; cursor: pointer; text-decoration: none;
  transition: background .2s, transform .15s;
  flex-shrink: 0;
}
.chat-icon-btn:hover { background: rgba(255,255,255,.14); }
.chat-icon-btn:active { transform: scale(.96); }

.chat-topbar-main {
  display: flex; align-items: center; gap: .75rem;
  flex: 1; min-width: 0;
}

.chat-topbar-avatar {
  width: 44px; height: 44px; border-radius: 14px;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(233,69,96,.45);
}
.chat-topbar-avatar--placeholder {
  display: flex; align-items: center; justify-content: center;
  background: #0f3460; font-size: 1.25rem;
}

.chat-topbar-text { min-width: 0; }
.chat-topbar-text h1 {
  font-size: 1rem; font-weight: 700; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-topbar-text p {
  margin: .15rem 0 0; font-size: .75rem; color: #a8b2d8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.chat-context-panel {
  background: #fff;
  border-bottom: 1px solid #e4e8ef;
  padding: 1rem 1.25rem;
  flex-shrink: 0;
  animation: chatSlideDown .25s ease;
}
.chat-context-panel[hidden] { display: none; }

@keyframes chatSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-context-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem 1rem; margin-bottom: .75rem;
}
.chat-context-item { display: flex; flex-direction: column; gap: .15rem; }
.chat-context-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  color: #8892a8; font-weight: 600;
}
.chat-context-item strong { font-size: .9rem; font-weight: 600; }
.chat-context-muted { font-size: .82rem; color: #666; }

.chat-context-tip {
  display: flex; align-items: flex-start; gap: .5rem;
  margin: 0; padding: .65rem .85rem;
  background: #f0f7ff; border-radius: 10px;
  font-size: .78rem; line-height: 1.45; color: #1565c0;
}
.chat-context-tip svg { flex-shrink: 0; margin-top: .1rem; }

.chat-thread {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 1rem 1rem 1.25rem;
  display: flex; flex-direction: column; gap: .35rem;
  background:
    radial-gradient(circle at 20% 10%, rgba(233,69,96,.04) 0%, transparent 45%),
    radial-gradient(circle at 80% 90%, rgba(15,52,96,.05) 0%, transparent 40%),
    #eef1f6;
  scroll-behavior: smooth;
}

.chat-date-divider {
  display: flex; align-items: center; justify-content: center;
  margin: .75rem 0 .5rem;
}
.chat-date-divider span {
  font-size: .72rem; font-weight: 600; color: #6b7280;
  background: rgba(255,255,255,.85); padding: .35rem .85rem;
  border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.chat-msg {
  display: flex; flex-direction: column; max-width: 85%;
  animation: chatMsgIn .28s ease;
}
@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-msg--mine { align-self: flex-end; align-items: flex-end; }
.chat-msg--theirs { align-self: flex-start; align-items: flex-start; }

.chat-msg-bubble {
  padding: .7rem 1rem; border-radius: 18px;
  font-size: .94rem; line-height: 1.5; word-break: break-word;
}
.chat-msg-bubble p { margin: 0; }

.chat-msg--mine .chat-msg-bubble {
  background: linear-gradient(135deg, #e94560 0%, #d63851 100%);
  color: #fff; border-bottom-right-radius: 6px;
  box-shadow: 0 4px 14px rgba(233,69,96,.28);
}
.chat-msg--theirs .chat-msg-bubble {
  background: #fff; color: #1a1a2e;
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
}

.chat-msg time {
  font-size: .68rem; color: #8892a8; margin-top: .25rem; padding: 0 .35rem;
}
.chat-msg--pending { opacity: .65; }
.chat-msg--pending .chat-msg-bubble { box-shadow: none; }

.chat-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 2rem 1.5rem;
  max-width: 360px; margin: auto;
}
.chat-empty-icon {
  width: 72px; height: 72px; border-radius: 22px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.chat-empty h2 { font-size: 1.15rem; margin-bottom: .5rem; color: #1a1a2e; }
.chat-empty p { font-size: .88rem; color: #5c6578; line-height: 1.55; margin-bottom: 1rem; }
.chat-empty-tips {
  list-style: none; text-align: left; width: 100%;
  background: #fff; border-radius: 14px; padding: .85rem 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.chat-empty-tips li {
  font-size: .82rem; color: #5c6578; padding: .35rem 0 .35rem 1.25rem;
  position: relative; line-height: 1.45;
}
.chat-empty-tips li::before {
  content: ''; position: absolute; left: 0; top: .72rem;
  width: 6px; height: 6px; border-radius: 50%; background: #e94560;
}

.chat-footer {
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid #e4e8ef;
  padding: .65rem 1rem;
  padding-bottom: max(.65rem, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0,0,0,.04);
}

.chat-quick-replies {
  display: flex; gap: .45rem; overflow-x: auto;
  padding-bottom: .65rem; margin-bottom: .15rem;
  scrollbar-width: none;
}
.chat-quick-replies::-webkit-scrollbar { display: none; }

.chat-quick-reply {
  flex-shrink: 0; border: 1px solid #e0e4ea;
  background: #f8f9fb; color: #1a1a2e;
  font-family: inherit; font-size: .78rem; font-weight: 500;
  padding: .45rem .85rem; border-radius: 999px;
  cursor: pointer; transition: background .2s, border-color .2s, transform .15s;
}
.chat-quick-reply:hover {
  background: #fff; border-color: #e94560; color: #e94560;
}
.chat-quick-reply:active { transform: scale(.97); }

.chat-composer {
  display: flex; align-items: flex-end; gap: .5rem;
}

.chat-composer-field {
  flex: 1; background: #f3f5f9; border-radius: 22px;
  border: 1.5px solid transparent; transition: border-color .2s, background .2s;
  padding: .5rem .85rem;
}
.chat-composer-field:focus-within {
  background: #fff; border-color: rgba(233,69,96,.35);
  box-shadow: 0 0 0 3px rgba(233,69,96,.1);
}

.chat-composer textarea {
  width: 100%; border: none; background: transparent;
  font-family: inherit; font-size: .95rem; line-height: 1.45;
  resize: none; max-height: 120px; outline: none; color: #1a1a2e;
}
.chat-composer textarea::placeholder { color: #9aa3b5; }

.chat-send-btn {
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, #e94560, #d63851);
  color: #fff; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, opacity .2s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(233,69,96,.35);
  position: relative;
}
.chat-send-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(233,69,96,.4);
}
.chat-send-btn:disabled {
  opacity: .45; cursor: not-allowed; box-shadow: none;
}
.chat-send-btn.is-sending .chat-send-icon { opacity: 0; }
.chat-send-btn.is-sending .chat-send-spinner { opacity: 1; }

.chat-send-spinner {
  position: absolute; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%;
  opacity: 0; animation: chatSpin .7s linear infinite;
}
@keyframes chatSpin { to { transform: rotate(360deg); } }

.chat-footer-note {
  text-align: center; font-size: .68rem; color: #aab2c0;
  margin: .45rem 0 0;
}

.chat-toast {
  position: fixed; bottom: 5.5rem; left: 50%; transform: translateX(-50%);
  background: #1a1a2e; color: #fff; font-size: .82rem; font-weight: 500;
  padding: .65rem 1.1rem; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  z-index: 100; max-width: 90%;
  animation: chatToastIn .3s ease;
}
.chat-toast[hidden] { display: none; }
@keyframes chatToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Chat gate (iniciar / sin acceso) */
.chat-gate-body {
  min-height: 100vh; min-height: 100dvh;
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
}

.chat-gate-card {
  background: #fff; border-radius: 24px;
  padding: 2rem 1.75rem; width: 100%; max-width: 420px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  text-align: center;
}
.chat-gate-card--wide { max-width: 460px; }

.chat-gate-back {
  display: inline-block; align-self: flex-start;
  color: #8892a8; text-decoration: none; font-size: .85rem;
  margin-bottom: 1rem;
}
.chat-gate-back:hover { color: #e94560; }

.chat-gate-photo {
  width: 96px; height: 96px; border-radius: 20px;
  object-fit: cover; margin: 0 auto 1.25rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.chat-gate-photo--placeholder {
  display: flex; align-items: center; justify-content: center;
  background: #f0f2f5; font-size: 2.5rem; margin-left: auto; margin-right: auto;
}

.chat-gate-card h1 {
  font-size: 1.35rem; color: #1a1a2e; margin-bottom: .65rem; line-height: 1.3;
}
.chat-gate-lead, .chat-gate-card > p {
  font-size: .9rem; color: #5c6578; line-height: 1.55; margin-bottom: 1rem;
}
.chat-gate-meta {
  font-size: .85rem; color: #666; margin-bottom: 1.25rem;
  padding: .65rem 1rem; background: #f8f9fb; border-radius: 12px;
}

.chat-gate-form { text-align: left; margin-bottom: 1.25rem; }
.chat-gate-form .form-group { margin-bottom: 1rem; }
.chat-gate-form label {
  display: block; font-size: .85rem; font-weight: 600;
  color: #1a1a2e; margin-bottom: .4rem;
}
.chat-gate-form input {
  width: 100%; padding: .75rem 1rem; border: 1.5px solid #e0e4ea;
  border-radius: 12px; font-family: inherit; font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.chat-gate-form input:focus {
  outline: none; border-color: #e94560;
  box-shadow: 0 0 0 3px rgba(233,69,96,.12);
}
.chat-gate-form small {
  display: block; margin-top: .35rem; font-size: .78rem; color: #8892a8;
}

.chat-gate-actions {
  display: flex; flex-direction: column; gap: .65rem;
}

.chat-gate-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.25rem; border-radius: 14px;
  font-family: inherit; font-size: .95rem; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer;
  transition: transform .15s, box-shadow .2s;
}
.chat-gate-btn--full { width: 100%; }
.chat-gate-btn--primary {
  background: linear-gradient(135deg, #e94560, #d63851);
  color: #fff; box-shadow: 0 6px 20px rgba(233,69,96,.35);
}
.chat-gate-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(233,69,96,.4);
}
.chat-gate-btn--ghost {
  background: #f3f5f9; color: #1a1a2e;
}
.chat-gate-btn--ghost:hover { background: #e8ebf0; }

.chat-gate-link {
  display: block; margin-top: .5rem;
  font-size: .85rem; color: #8892a8; text-decoration: none;
}
.chat-gate-link:hover { color: #e94560; }

.chat-gate-trust {
  list-style: none; text-align: left;
  margin-top: 1.5rem; padding-top: 1.25rem;
  border-top: 1px solid #eef1f6;
}
.chat-gate-trust li {
  display: flex; align-items: center; gap: .65rem;
  font-size: .82rem; color: #5c6578; padding: .4rem 0;
}
.chat-gate-trust span { font-size: 1.1rem; }

@media (max-width: 768px) {
  .topbar-nav span { display: none; }
  .pets-grid-public { grid-template-columns: 1fr; }
  .chat-page { max-width: none; }
  .chat-msg { max-width: 90%; }
  .page-header { flex-direction: column; }
}
