/* ===========================
   Gang dos Patinhas — Mobile-First Stylesheet
   =========================== */

/* --- Design Tokens --- */
:root {
  --bg-start: #F8F9FA;
  --bg-end: #F1F3F5;
  --glass: rgba(255,255,255,0.6);
  --glass-strong: rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.5);
  --primary: #E06B10;
  --primary-light: #F4A261;
  --primary-soft: rgba(237,104,9,0.06);
  --primary-mid: rgba(237,104,9,0.12);
  --primary-deep: #1E293B;
  --purple: #E06B10;
  --purple-light: #F4A261;
  --purple-soft: rgba(237,104,9,0.06);
  --purple-mid: rgba(237,104,9,0.12);
  --purple-deep: #1E293B;
  --blue: #3B82F6;
  --green: #16A34A;
  --orange: #ED6809;
  --red: #DC2626;
  --cyan: #0891B2;
  --text: #1E293B;
  --text-sub: #334155;
  --text-dim: #64748B;
  --text-light: rgba(255,255,255,0.9);
  --text-light-dim: rgba(255,255,255,0.55);
  --r: 18px;
  --rs: 14px;
  --rxs: 10px;
  --r-pill: 50px;
  --shadow: none;
  --shadow-lg: none;
  --t: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body {
  min-height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-start);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* --- Background --- */
.bg-atmosphere { display: none; }

/* --- Layout (Mobile-First: stacked) --- */
.dashboard {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* --- Sidebar (hidden on mobile) --- */
.sidebar { display: none; }

/* --- Main Content (Mobile base) --- */
.main-content {
  flex: 1;
  padding: 20px 16px 88px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- Mobile Bottom Bar (visible by default) --- */
.mobile-bar {
  display: flex;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(15,23,42,0.06);
  padding: 8px 16px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  align-items: center;
  justify-content: space-around;
  
}
.mobile-bar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 16px;
  border-radius: var(--rxs);
  color: var(--text-dim);
  font-size: 0.62rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--t-fast);
}
.mobile-bar-btn .material-symbols-rounded { font-size: 22px; }
.mobile-bar-btn.active { color: var(--purple); }
.mobile-bar-btn:active { opacity: 0.7; }

/* --- Page Header --- */
.page-header {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}
.page-header h1 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}
.page-header__back {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.page-header__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.page-header__actions form {
  display: flex;
  align-items: center;
}
.back-link {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--rxs);
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.8);
  transition: all var(--t);
  color: var(--text-dim);
  flex-shrink: 0;
}
.back-link:hover { background: #fff; color: var(--text); }

/* Page header: direct button alignment on mobile (full-width) */
.page-header > .aero-btn {
  width: 100%;
  justify-content: center;
}

/* Page header with back link + actions: row layout even on mobile */
.page-header:has(.page-header__back) {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 600px) {
  .page-header > .aero-btn {
    width: auto;
  }
}

/* --- Glass Card --- */
.glass-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--r);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge--green { background: rgba(22,163,74,0.1); color: var(--green); }
.badge--blue { background: rgba(59,130,246,0.1); color: var(--blue); }
.badge--orange { background: rgba(237,104,9,0.1); color: var(--orange); }
.badge--red { background: rgba(220,38,38,0.1); color: var(--red); }
.badge--purple { background: var(--purple-soft); color: var(--purple); }
.badge--default { background: rgba(0,0,0,0.04); color: var(--text-dim); }

/* --- User List (mobile-first card layout) --- */
.user-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}
.user-card__info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.user-card__avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple), #C85A0A);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 0.68rem;
  flex-shrink: 0;
}
.user-card__details { min-width: 0; flex: 1; }
.user-card__name {
  font-size: 0.88rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-card__email {
  font-size: 0.72rem; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.user-card__badge { margin-top: 6px; }
.user-card__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}
.user-card__actions form {
  display: flex;
  align-items: center;
}

/* Icon Buttons (touch-friendly) */
.btn-icon {
  width: 40px; height: 40px;
  border-radius: var(--rxs);
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(15,23,42,0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--t-fast);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  font-family: inherit;
  flex-shrink: 0;
}
.btn-icon .material-symbols-rounded { font-size: 18px; }
.btn-icon:hover { background: #fff; color: var(--purple); }
.btn-icon:active { transform: scale(0.92); }
.btn-icon--danger:hover { color: var(--red); }

/* --- Table (fallback, used elsewhere if needed) --- */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 500px; }
.data-table thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-dim);
  font-weight: 600;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  white-space: nowrap;
}
.data-table tbody tr { transition: background var(--t-fast); }
.data-table tbody tr:hover { background: rgba(15,23,42,0.03); }
.data-table tbody td {
  padding: 12px;
  font-size: 0.78rem;
  color: var(--text-sub);
  border-bottom: 1px solid rgba(0,0,0,0.02);
  vertical-align: middle;
}

/* --- Forms --- */
.form-group { margin-bottom: 14px; }
.form-group > label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--rs);
  background: #fff;
  border: 1px solid rgba(15,23,42,0.1);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--t);
  outline: none;
  
  -webkit-appearance: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(237,104,9,0.15);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%237C6B99' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* Form row: single column on mobile */
.form-row { display: grid; grid-template-columns: 1fr; gap: 0; }

/* Form actions: stacked on mobile */
.form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.form-actions .aero-btn { width: 100%; justify-content: center; max-width: 100%; }

/* Toggle & Checkbox */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--rs);
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(15,23,42,0.04);
  margin-bottom: 14px;
}
.toggle-row .toggle-label { font-size: 0.82rem; color: var(--text-sub); font-weight: 500; }
.form-checkbox { display: flex; align-items: center; }
.form-checkbox input[type="checkbox"] {
  width: 44px; height: 24px;
  border-radius: 12px; border: none;
  background: rgba(0,0,0,0.1);
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  position: relative;
  transition: background 0.3s ease;
  flex-shrink: 0;
}
.form-checkbox input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.form-checkbox input[type="checkbox"]:checked { background: var(--green); }
.form-checkbox input[type="checkbox"]:checked::after { transform: translateX(20px); }

/* --- Buttons --- */
.aero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: var(--rxs);
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(15,23,42,0.06);
  color: var(--text-sub);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.aero-btn:hover { background: #fff; }
.aero-btn:active { transform: scale(0.96); opacity: 0.9; }
.aero-btn.primary {
  background: linear-gradient(135deg, var(--purple) 0%, #C85A0A 100%);
  color: #fff;
  border-color: transparent;
  
}
.aero-btn.primary:hover {  }
.aero-btn.danger { background: var(--red); color: #fff; border-color: transparent; }
.aero-btn.sm { padding: 8px 12px; font-size: 0.72rem; }

/* --- Search Bar --- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r);
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.8);
  margin-bottom: 16px;
  transition: all var(--t);
  width: 100%;
  max-width: 100%;
}
.search-bar:focus-within {
  border-color: rgba(237,104,9,0.2);
}
.search-bar__icon { color: var(--text-dim); flex-shrink: 0; opacity: 0.6; font-size: 20px; }
.search-bar__input {
  border: none; background: none; outline: none; flex: 1;
  font-size: 0.92rem; color: var(--text); font-family: inherit; font-weight: 500;
  min-width: 0;
}
.search-bar__input::placeholder { color: var(--text-dim); font-weight: 400; }

/* --- Animals Grid (mobile: 1 column) --- */
.animals-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.animal-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.88);
  border-radius: var(--r);
  display: block;
  transition: transform var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.animal-card:active { transform: scale(0.98); }
.animal-card__photo-wrap { position: relative; overflow: hidden; }
.animal-card__photo-container { width: 100%; height: 180px; overflow: hidden; background: rgba(0,0,0,0.03); }
.animal-card__photo-container img {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  background: rgba(0,0,0,0.03);
}
.animal-card__photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(237,104,9,0.06), rgba(244,162,97,0.12));
  color: var(--text-dim);
}
.animal-card__photo-placeholder .material-symbols-rounded { font-size: 40px; opacity: 0.35; }
.animal-card__badge-float { position: absolute; top: 10px; left: 10px; }
.animal-card__badge-float .badge {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  
}
.animal-card__body { padding: 14px 16px 16px; }
.animal-card__name {
  font-size: 1rem; font-weight: 700;
  color: var(--text); margin-bottom: 4px; letter-spacing: -0.02em;
}
.animal-card__meta { font-size: 0.72rem; color: var(--text-dim); }
.animal-card__health {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.68rem; font-weight: 600; margin-top: 8px;
}
.animal-card__health--green { color: var(--green); }
.animal-card__health--orange { color: var(--orange); }
.animal-card__health--red { color: var(--red); }
.animal-card__health--blue { color: var(--blue); }

/* --- Detail Page (mobile: stacked) --- */
.detail-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.detail-photo { border-radius: var(--r); overflow: hidden; }
.detail-photo img { width: 100%; display: block; border-radius: var(--r); }
.detail-photo-gallery { display: flex; flex-direction: column; gap: 10px; }
.detail-photo-item--main img { max-height: 280px; object-fit: contain; border-radius: var(--r); width: 100%; background: rgba(0,0,0,0.03); }
.detail-photo-item img { width: 100%; max-height: 160px; object-fit: contain; border-radius: var(--rs); background: rgba(0,0,0,0.03); }
.detail-photo-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 200px;
  background: rgba(255,255,255,0.65);
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,0.7);
}
.detail-photo-placeholder .material-symbols-rounded { font-size: 56px; color: var(--text-dim); opacity: 0.3; }
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.detail-field__label {
  font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-dim);
  font-weight: 600; display: block; margin-bottom: 3px;
}
.detail-field__value { font-size: 0.86rem; color: var(--text); font-weight: 500; }
.detail-observations { padding-top: 14px; border-top: 1px solid rgba(0,0,0,0.04); }
.detail-observations p { font-size: 0.84rem; color: var(--text-sub); line-height: 1.6; margin-top: 6px; }

/* --- Photo Grid (form) --- */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid__item { position: relative; border-radius: var(--rxs); overflow: hidden; aspect-ratio: 1; }
.photo-grid__item img { width: 100%; height: 100%; object-fit: contain; background: rgba(0,0,0,0.03); }
.photo-grid__remove {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(239,68,68,0.9);
  border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* --- Alerts --- */
.alert {
  padding: 12px 16px;
  border-radius: var(--rs);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 16px;
}
.alert--success { background: rgba(22,163,74,0.08); color: var(--green); border: 1px solid rgba(22,163,74,0.12); }
.alert--error { background: rgba(220,38,38,0.08); color: var(--red); border: 1px solid rgba(220,38,38,0.12); }

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.empty-state__title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state__desc { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 16px; max-width: 260px; }

/* --- Login --- */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 1;
}
.login-card { width: 100%; max-width: 380px; }
.login-header { text-align: center; margin-bottom: 24px; }
.login-header h1 { font-size: 1.6rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; margin-top: 12px; }
.login-header p { font-size: 0.82rem; color: var(--text-dim); margin-top: 4px; }

/* --- Material Symbols --- */
.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* ==============================================
   TABLET BREAKPOINT (min-width: 600px)
   ============================================== */
@media (min-width: 600px) {
  .main-content { padding: 24px 24px 88px; }

  .animals-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .animal-card__photo-container { height: 160px; }

  .form-row { grid-template-columns: 1fr 1fr; gap: 12px; }

  .form-actions { flex-direction: row; }
  .form-actions .aero-btn { width: auto; max-width: none; }

  .glass-card { padding: 20px; }

  .photo-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }

  .page-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .page-header__actions { margin-left: auto; }
}

/* ==============================================
   DESKTOP BREAKPOINT (min-width: 900px)
   ============================================== */
@media (min-width: 900px) {
  html, body { height: 100%; overflow: hidden; }

  .dashboard {
    display: grid;
    grid-template-columns: 230px 1fr;
    grid-template-rows: 1fr;
    height: 100%;
  }

  /* Show sidebar, hide mobile bar */
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px 14px;
    background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
    overflow: hidden;
    position: relative;
  }
  .sidebar::before {
    display: none;
  }

  .mobile-bar { display: none; }

  .main-content {
    grid-column: 2;
    padding: 32px 36px;
    padding-bottom: 32px;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .main-content::-webkit-scrollbar { width: 6px; }
  .main-content::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.1); border-radius: 3px; }

  /* Sidebar items */
  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: var(--rs);
    color: var(--text-light-dim);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--t);
    position: relative;
  }
  .sidebar-item .icon {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--rxs);
    transition: all var(--t);
  }
  .sidebar-item:hover { background: rgba(255,255,255,0.06); color: var(--text-light); }
  .sidebar-item.active {
    background: rgba(237,104,9,0.15);
    color: #fff;
    font-weight: 600;
  }
  .sidebar-item.active .icon { background: rgba(255,255,255,0.12); }
  .sidebar-item.active::after {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 24px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--purple-light), var(--purple));
  }

  /* Desktop page header */
  .page-header h1 { font-size: 1.5rem; }

  /* Search bar max width on desktop */
  .search-bar { max-width: 480px; }

  /* Desktop grid: 3+ columns */
  .animals-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
  .animal-card__photo-container { height: 160px; }
  .animal-card:hover {
    transform: translateY(-2px);
      border-color: rgba(237,104,9,0.12);
  }
  .animal-card:hover .animal-card__photo-container img { transform: scale(1.04); }
  .animal-card__photo-container img { transition: transform 0.5s ease; }

  /* Detail: side by side */
  .detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .detail-photo-item--main img { max-height: 400px; }
  .detail-photo-placeholder { height: 300px; }

  /* Desktop glass card */
  .glass-card { padding: 24px; }

  /* Photo grid */
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
}

/* ==============================================
   LARGE DESKTOP (min-width: 1200px)
   ============================================== */
@media (min-width: 1200px) {
  .animals-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .main-content { padding: 36px 48px; }
}


/* ==============================================
   FILTER PILLS
   ============================================== */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(15,23,42,0.08);
  color: var(--text-sub);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
}
.filter-pill:hover {
  background: #fff;
  border-color: rgba(237,104,9,0.2);
}
.filter-pill--active {
  background: var(--orange);
  color: #fff;
  border-color: transparent;
}
.filter-pill--active:hover {
  background: var(--purple);
}
.filter-pill__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(0,0,0,0.06);
  font-size: 0.68rem;
  font-weight: 700;
}
.filter-pill--active .filter-pill__count {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

/* ==============================================
   INTEREST LIST (INTERNAL)
   ============================================== */
.interest-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.interest-card {
  display: block;
  text-decoration: none;
  padding: 14px 16px;
  transition: all var(--t-fast);
}
.interest-card:hover {
}
.interest-card__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.interest-card__info { flex: 1; min-width: 0; }
.interest-card__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.interest-card__phone {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.interest-card__animal {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.interest-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.interest-card__date {
  font-size: 0.64rem;
  color: var(--text-dim);
}

.interest-filters { margin-bottom: 16px; }
.interest-filters__form { display: flex; }
.interest-filters__row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Interest mini cards in animal show page */
.interest-mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--rxs);
  margin-bottom: 4px;
  transition: background var(--t-fast);
  text-decoration: none;
}
.interest-mini-card:hover { background: rgba(237,104,9,0.05); }
.interest-mini-card__name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.interest-mini-card__phone {
  font-size: 0.68rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ==============================================
   PUBLIC PORTAL STYLES
   ============================================== */
.public-body {
  overflow-y: auto;
  min-height: 100vh;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(15,23,42,0.06);
  padding: 14px 20px;
}
.public-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.public-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.public-header__logo { height: 36px; width: auto; }

.public-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  position: relative;
  z-index: 1;
}

.public-footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 0.72rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(15,23,42,0.04);
}

.public-hero {
  text-align: center;
  margin-bottom: 32px;
  padding: 20px 0;
}
.public-hero h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.public-hero p {
  font-size: 0.92rem;
  color: var(--text-dim);
  max-width: 400px;
  margin: 0 auto;
}

/* Adoption Grid (public) */
.adoption-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  justify-content: center;
}
.adoption-card {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform var(--t-fast);
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}
.adoption-card__photo {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
  background: rgba(0,0,0,0.03);
}
.adoption-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: rgba(0,0,0,0.03);
}
.adoption-card__photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(237,104,9,0.06), rgba(244,162,97,0.12));
}
.adoption-card__photo-placeholder .material-symbols-rounded {
  font-size: 48px;
  color: var(--text-dim);
  opacity: 0.3;
}
.adoption-card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.adoption-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.adoption-card__meta {
  display: flex;
  gap: 12px;
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.adoption-card__meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}
.adoption-card__age {
  font-size: 0.74rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.adoption-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.adoption-card__btn { width: 100%; margin-top: auto; }

/* Public detail page */
.public-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 20px;
  transition: color var(--t-fast);
}
.public-back:hover { color: var(--purple); }

.public-detail__layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.public-detail__photos { border-radius: var(--r); overflow: hidden; }
.public-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.public-gallery__item img {
  width: 100%;
  border-radius: var(--r);
  display: block;
}
.public-gallery__item--main img {
  max-height: 300px;
  object-fit: contain;
  background: rgba(0,0,0,0.03);
}
.public-gallery__item:not(.public-gallery__item--main) img {
  max-height: 180px;
  object-fit: contain;
  border-radius: var(--rs);
  background: rgba(0,0,0,0.03);
}
.public-detail__photo-placeholder {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.65);
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,0.7);
}
.public-detail__photo-placeholder .material-symbols-rounded {
  font-size: 56px;
  color: var(--text-dim);
  opacity: 0.3;
}
.public-detail__name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.public-detail__badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.public-detail__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.public-detail__field-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  font-weight: 600;
  display: block;
  margin-bottom: 3px;
}
.public-detail__field-value {
  font-size: 0.86rem;
  color: var(--text);
  font-weight: 500;
}
.public-detail__notes {
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.04);
  margin-bottom: 20px;
}
.public-detail__notes h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 6px;
}
.public-detail__notes p {
  font-size: 0.84rem;
  color: var(--text-sub);
  line-height: 1.6;
}

/* Interest form (public) */
.public-interest-form {
  margin-top: 24px;
  padding: 20px;
}
.public-interest-form h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.public-interest-form__desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

/* Success page */
.public-success {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 40px 20px;
}
.public-success__card {
  text-align: center;
  max-width: 420px;
  padding: 40px 32px;
}
.public-success__icon {
  margin-bottom: 16px;
}
.public-success__icon .material-symbols-rounded {
  font-size: 56px;
  color: var(--green);
}
.public-success__card h1 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.public-success__card p {
  font-size: 0.88rem;
  color: var(--text-sub);
  margin-bottom: 8px;
}
.public-success__sub {
  font-size: 0.78rem !important;
  color: var(--text-dim) !important;
  margin-bottom: 24px !important;
}

/* ==============================================
   PUBLIC PORTAL — TABLET (min-width: 600px)
   ============================================== */
@media (min-width: 600px) {
  .adoption-grid { grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; }
  .adoption-card { max-width: none; margin: 0; }
  .public-detail__layout { flex-direction: row; }
  .public-detail__photos { flex: 1; }
  .public-detail__info { flex: 1; }
  .public-gallery__item--main img { max-height: 400px; }
}

/* ==============================================
   PUBLIC PORTAL — DESKTOP (min-width: 900px)
   ============================================== */
@media (min-width: 900px) {
  .adoption-grid { grid-template-columns: repeat(3, minmax(0, 360px)); }
  .adoption-card:hover {
    transform: translateY(-2px);
    }
  .public-hero h1 { font-size: 2rem; }
}


/* ==============================================
   PHOTO UPLOAD AREA (STYLED)
   ============================================== */
.photo-upload-area {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--rs);
  border: 1px dashed rgba(15,23,42,0.15);
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all var(--t);
}
.photo-upload-area:hover {
  border-color: var(--orange);
  background: rgba(237,104,9,0.03);
}
.photo-upload-area__icon {
  font-size: 20px;
  color: var(--orange);
}
.photo-upload-area__title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-sub);
}




/* ==============================================
   PHOTO GALLERY — COMPACT (FORM)
   ============================================== */
.pg { margin-bottom: 14px; padding: 14px; }
.pg__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.pg__title { font-size: 0.78rem; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: 0.4px; }
.pg__counter { font-size: 0.68rem; font-weight: 700; color: var(--text-dim); background: rgba(0,0,0,0.04); padding: 3px 8px; border-radius: var(--r-pill); }
.pg__hint { font-size: 0.68rem; color: var(--text-dim); margin: 0 0 12px; }

/* Body: side-by-side on desktop */
.pg__body { display: flex; gap: 10px; align-items: flex-start; }

/* Primary */
.pg__primary {
  position: relative;
  width: 200px;
  min-width: 200px;
  height: 150px;
  border-radius: var(--rs);
  overflow: hidden;
  flex-shrink: 0;
}
.pg__primary-img { width: 100%; height: 100%; object-fit: contain; display: block; cursor: pointer; background: rgba(0,0,0,0.03); }
.pg__badge {
  position: absolute; top: 6px; left: 6px;
  padding: 2px 7px; border-radius: var(--r-pill);
  background: var(--orange); color: #fff;
  font-size: 0.58rem; font-weight: 700; z-index: 2;
}
.pg__primary-actions {
  position: absolute; bottom: 6px; right: 6px;
  display: flex; gap: 4px; z-index: 2;
  opacity: 0; transition: opacity 0.15s;
}
.pg__primary:hover .pg__primary-actions { opacity: 1; }

/* Action buttons (shared) */
.pg__action {
  width: 28px; height: 28px; border-radius: 6px;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-sub); padding: 0;
  transition: all var(--t-fast);
}
.pg__action:hover { background: #fff; color: var(--purple); }
.pg__action--danger:hover { color: var(--red); }
.pg__action .material-symbols-rounded { font-size: 16px; }
.pg__action--xs { width: 24px; height: 24px; border-radius: 5px; }
.pg__action--xs .material-symbols-rounded { font-size: 14px; }

/* Thumbs grid */
.pg__thumbs {
  display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; flex: 1;
}
.pg__thumb {
  position: relative; width: 72px; height: 72px;
  border-radius: var(--rxs); overflow: hidden;
  cursor: grab; transition: all 0.12s ease; background: #f0f0f0;
}
.pg__thumb:hover { box-shadow: 0 0 0 2px rgba(237,104,9,0.3); }
.pg__thumb--dragging { opacity: 0.4; transform: scale(0.9); }
.pg__thumb-img { width: 100%; height: 100%; object-fit: contain; display: block; background: rgba(0,0,0,0.03); }
.pg__thumb-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center; gap: 3px;
  opacity: 0; transition: opacity 0.12s;
}
.pg__thumb:hover .pg__thumb-overlay { opacity: 1; }
.pg__thumb-overlay .pg__action--xs { background: rgba(255,255,255,0.9); }

/* +N more */
.pg__thumb--more { cursor: pointer; }
.pg__more {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5); color: #fff;
  font-size: 0.78rem; font-weight: 700; border-radius: var(--rxs);
}

/* Add button */
.pg__add {
  width: 72px; height: 72px;
  border-radius: var(--rxs);
  border: 2px dashed rgba(15,23,42,0.12);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; cursor: pointer; color: var(--text-dim);
  font-size: 0.6rem; font-weight: 600;
  transition: all var(--t-fast);
}
.pg__add .material-symbols-rounded { font-size: 20px; color: var(--orange); }
.pg__add:hover { border-color: var(--orange); background: rgba(237,104,9,0.03); }
.pg__add--lg { width: 120px; height: 100px; font-size: 0.7rem; gap: 4px; }
.pg__add--lg .material-symbols-rounded { font-size: 28px; }

/* Empty */
.pg__empty { display: flex; justify-content: center; padding: 12px 0; }

/* Preview */
.pg__preview { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,0.04); }
.pg__preview-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.pg__preview-item { width: 60px; height: 60px; border-radius: var(--rxs); overflow: hidden; border: 2px solid var(--orange); }
.pg__preview-item img { width: 100%; height: 100%; object-fit: contain; display: block; background: rgba(0,0,0,0.03); }

/* Photo modal (reuse lightbox from app.js for view) */
.photo-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.photo-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.85); }
.photo-modal__content { position: relative; max-width: 90vw; max-height: 90vh; z-index: 1; }
.photo-modal__content img { max-width: 90vw; max-height: 85vh; border-radius: var(--r); display: block; }
.photo-modal__close { position: absolute; top: -12px; right: -12px; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.photo-modal__close .material-symbols-rounded { font-size: 18px; color: var(--text); }

/* Mobile: stack vertically */
@media (max-width: 599px) {
  .pg__body { flex-direction: column; }
  .pg__primary { width: 100%; min-width: unset; height: 160px; }
  .pg__primary-actions { opacity: 1; }
  .pg__thumbs { width: 100%; }
}
@media (min-width: 600px) {
  .pg__primary { width: 220px; min-width: 220px; height: 160px; }
  .pg__thumb { width: 80px; height: 80px; }
  .pg__add { width: 80px; height: 80px; }
}


/* ==============================================
   FORM SECTIONS & CHECKBOX GRID
   ============================================== */
.form-section {
  border: none;
  padding: 0;
  margin: 0 0 24px;
}
.form-section__title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(237,104,9,0.12);
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.checkbox-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(15,23,42,0.08);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
}
.checkbox-tag:hover {
  border-color: var(--orange);
  background: rgba(237,104,9,0.03);
}
.checkbox-tag input[type="checkbox"] {
  display: none;
}
.checkbox-tag:has(input:checked) {
  background: var(--orange);
  color: #fff;
  border-color: transparent;
}

.detail-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.04);
}





/* ==============================================
   FORM REQUIRED INDICATOR
   ============================================== */
.form-required {
  color: var(--red);
  font-weight: 700;
  font-size: 0.9em;
}


/* ==============================================
   STORAGE WIDGET (SIDEBAR)
   ============================================== */
.storage-widget {
  padding: 8px 10px;
  border-radius: var(--rxs);
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 4px;
}
.storage-widget:hover { background: rgba(255,255,255,0.06); }
.storage-widget:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.storage-widget__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 5px;
}
.storage-widget__label .material-symbols-rounded { font-size: 13px; }
.storage-widget__value {
  margin-left: auto;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
}
.storage-widget__bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.storage-widget__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.storage-widget__fill--normal { background: var(--green); }
.storage-widget__fill--warning { background: var(--orange); }
.storage-widget__fill--critical { background: var(--red); }
.storage-widget__fill--blocked { background: var(--red); }
.storage-widget__alert {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--red);
  margin-top: 3px;
  opacity: 0.9;
}

/* ==============================================
   STORAGE MODAL
   ============================================== */
.storage-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.storage-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.storage-modal__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  padding: 24px;
}
.storage-modal__bar-wrap { margin-bottom: 16px; }
.storage-modal__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.storage-modal__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.storage-modal__stat-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-dim);
  font-weight: 600;
}
.storage-modal__stat-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}


/* ==============================================
   READONLY GALLERY
   ============================================== */
.ro-gallery { }
.ro-gallery__main {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 8px;
}
.ro-gallery__main-img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  display: block;
  background: rgba(0,0,0,0.03);
  transition: opacity 0.2s ease;
}
.ro-gallery__main:hover .ro-gallery__main-img { opacity: 0.92; }
.ro-gallery__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--orange);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
}
.ro-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.ro-gallery__thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--rxs);
  overflow: hidden;
  transition: opacity 0.15s ease;
}
.ro-gallery__thumb:hover { opacity: 0.85; }
.ro-gallery__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: rgba(0,0,0,0.03);
}
.ro-gallery__thumb--more { position: relative; }
.ro-gallery__more-count {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--rxs);
}

@media (min-width: 600px) {
  .ro-gallery__main-img { height: 300px; }
  .ro-gallery__thumbs { grid-template-columns: repeat(5, 1fr); gap: 8px; }
}
@media (min-width: 900px) {
  .ro-gallery__main-img { height: 360px; }
}

/* ==============================================
   LIGHTBOX
   ============================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
}
.lightbox__wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 90vh;
}
.lightbox__img {
  max-width: 88vw;
  max-height: 82vh;
  border-radius: var(--rs);
  display: block;
  object-fit: contain;
}
.lightbox__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lightbox__close:hover { background: rgba(255,255,255,0.3); }
.lightbox__close .material-symbols-rounded { font-size: 22px; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
  z-index: 2;
}
.lightbox__nav:hover { background: rgba(255,255,255,0.25); }
.lightbox__nav .material-symbols-rounded { font-size: 24px; }
.lightbox__nav--prev { left: -52px; }
.lightbox__nav--next { right: -52px; }
.lightbox__counter {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.76rem;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
}

@media (max-width: 600px) {
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
  .lightbox__close { top: 8px; right: 8px; }
  .lightbox__counter { bottom: 16px; }
  .lightbox__img { max-width: 96vw; max-height: 75vh; border-radius: var(--rxs); }
}


/* ==============================================
   CUSTOM MODAL (CONFIRM/ALERT)
   ============================================== */
.tmodal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.tmodal--visible { opacity: 1; }
.tmodal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
}
.tmodal__card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: var(--r);
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.tmodal--visible .tmodal__card { transform: scale(1); }
.tmodal__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.tmodal__icon .material-symbols-rounded { font-size: 24px; }
.tmodal__icon--danger { background: rgba(220,38,38,0.1); color: var(--red); }
.tmodal__icon--warning { background: rgba(237,104,9,0.1); color: var(--orange); }
.tmodal__icon--info { background: rgba(59,130,246,0.1); color: var(--blue); }
.tmodal__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.tmodal__message {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 20px;
}
.tmodal__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.tmodal__actions .aero-btn {
  flex: 1;
  justify-content: center;
  padding: 10px 16px;
}


/* ==============================================
   STICKY FORM HEADER
   ============================================== */
.page-header--sticky {
  position: relative;
}
.fab-save {
  box-shadow: 0 2px 12px rgba(237,104,9,0.25);
}


/* ==============================================
   PUBLIC TABS
   ============================================== */
.public-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  justify-content: center;
}
.public-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(15,23,42,0.08);
  color: var(--text-sub);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--t-fast);
}
.public-tab:hover { background: #fff; border-color: rgba(237,104,9,0.2); }
.public-tab--active {
  background: var(--orange);
  color: #fff;
  border-color: transparent;
}
.public-tab--active:hover { background: var(--orange); }

/* Record type cards (modal) */
.record-type-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.record-type-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--rs);
  border: 1px solid rgba(15,23,42,0.06);
  background: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all var(--t-fast);
}
.record-type-card:hover {
  background: #fff;
  border-color: var(--orange);
  transform: translateY(-1px);
}
.record-type-card__icon { font-size: 28px; flex-shrink: 0; }
.record-type-card__text { display: flex; flex-direction: column; gap: 2px; }
.record-type-card__text strong { font-size: 0.88rem; color: var(--text); }
.record-type-card__text span { font-size: 0.72rem; color: var(--text-dim); }

/* Status badge on photo card */
.adoption-card__status-badge {
  position: absolute;
  top: 8px;
  left: 8px;
}
.adoption-card__photo { position: relative; }


/* ==============================================
   ACTION BUTTONS: icon-only on mobile, labeled on desktop
   ============================================== */
.action-btn-labeled {
  padding: 8px;
}
.action-btn-labeled .action-btn-text { display: none; }
@media (min-width: 600px) {
  .action-btn-labeled { padding: 10px 16px; }
  .action-btn-labeled .action-btn-text { display: inline; }
}


/* ==============================================
   INPUT PREFIX (+55)
   ============================================== */
.input-prefix-wrap {
  display: flex;
  align-items: stretch;
}
.input-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: rgba(15,23,42,0.04);
  border: 1px solid rgba(15,23,42,0.1);
  border-right: none;
  border-radius: var(--rs) 0 0 var(--rs);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  user-select: none;
}
.input-prefix-field {
  border-radius: 0 var(--rs) var(--rs) 0 !important;
}


/* ==============================================
   SECTION TABS (PRE-FILTER)
   ============================================== */
.section-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.section-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--rs);
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(15,23,42,0.06);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--t-fast);
}
.section-tab:hover { background: #fff; color: var(--text); }
.section-tab--active {
  background: var(--text);
  color: #fff;
  border-color: transparent;
}
.section-tab--active:hover { background: var(--text); color: #fff; }


/* ==============================================
   SHARE BAR → CTA + SHARE SECTION
   ============================================== */
/* CTA Principal (interesse/contato) */
.cta-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--rs);
  background: #25D366;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--t-fast);
  margin-top: 24px;
}
.cta-primary:hover { background: #1EBE5A; transform: translateY(-1px); }
.cta-primary:active { transform: scale(0.98); }
.cta-primary svg { flex-shrink: 0; }

/* Share section (secundário) */
.share-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.share-section__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}
.share-section__actions {
  display: flex;
  gap: 8px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: var(--rxs);
  background: transparent;
  border: 1px solid rgba(15,23,42,0.1);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
  white-space: nowrap;
}
.share-btn:hover { background: rgba(0,0,0,0.03); border-color: rgba(15,23,42,0.2); color: var(--text-sub); }
