/* ══════════════════════════════════════════════════════════════
   מקלטינדר - Miklatinder Design System
   Mobile-first · RTL Hebrew · Shelter-themed dating satire
   ══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brand colors - warm dating pinks meets shelter urgency */
  --pink:        #E91E63;
  --pink-light:  #F8BBD0;
  --pink-dark:   #AD1457;
  --red-alert:   #D32F2F;
  --orange-warn: #FF6F00;
  --green:       #43A047;
  --green-light: #C8E6C9;

  /* Neutrals */
  --bg:          #FAF7F5;
  --bg-card:     #FFFFFF;
  --bg-input:    #F5F0EC;
  --text:        #1A1A1A;
  --text-muted:  #7A7A7A;
  --text-light:  #ABABAB;
  --border:      #E8E0D8;
  --border-focus:#E91E63;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 30px rgba(0,0,0,0.15);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06);

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;

  /* Radius */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* Typography */
  --font: 'Heebo', 'Segoe UI', Tahoma, sans-serif;
  --font-size-xs:  12px;
  --font-size-sm:  14px;
  --font-size-md:  16px;
  --font-size-lg:  20px;
  --font-size-xl:  24px;
  --font-size-2xl: 32px;
  --font-size-3xl: 40px;

  /* Layout */
  --max-width: 430px;
  --nav-height: 64px;
}

/* ── Dark Mode ────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:          #121212;
  --bg-card:     #1E1E1E;
  --bg-input:    #2A2A2A;
  --text:        #EFEFEF;
  --text-muted:  #9E9E9E;
  --text-light:  #6E6E6E;
  --border:      #383838;
  --border-focus:#F06292;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.35);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.45);
  --shadow-lg:   0 8px 30px rgba(0,0,0,0.55);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.30);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  text-align: right;
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* ── App Shell ────────────────────────────────────────────── */
.app {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

.page {
  padding: var(--space-lg);
  padding-bottom: calc(var(--nav-height) + var(--space-xl));
  min-height: 100dvh;
}

.page--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page--no-nav {
  padding-bottom: var(--space-lg);
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-md); font-weight: 600; }

.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.text-pink  { color: var(--pink); }
.text-sm    { font-size: var(--font-size-sm); }
.text-xs    { font-size: var(--font-size-xs); }
.text-center { text-align: center; }

/* ── Logo / Brand ─────────────────────────────────────────── */
.brand {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.brand__icon {
  font-size: 56px;
  margin-bottom: var(--space-sm);
  display: block;
}

.brand__name {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink), var(--red-alert));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand__tagline {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-top: var(--space-xs);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px var(--space-lg);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: var(--font-size-md);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.btn--primary:hover {
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

.btn--secondary {
  background: var(--bg-input);
  color: var(--text);
}

.btn--outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}

.btn--ghost {
  background: transparent;
  color: var(--pink);
}

.btn--danger {
  background: var(--red-alert);
  color: white;
}

.btn--small {
  padding: 8px var(--space-md);
  font-size: var(--font-size-sm);
}

.btn--icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xl);
}

.btn--icon-lg {
  width: 64px;
  height: 64px;
  font-size: var(--font-size-2xl);
}

/* ── Form Elements ────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text);
}

.input {
  width: 100%;
  padding: 14px var(--space-md);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: var(--font-size-md);
  background: var(--bg-card);
  color: var(--text);
  direction: rtl;
  transition: border-color 0.2s;
}

.input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.input::placeholder {
  color: var(--text-light);
}

.input--error {
  border-color: var(--red-alert);
}

.input-hint {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.input-error {
  font-size: var(--font-size-xs);
  color: var(--red-alert);
  margin-top: var(--space-xs);
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237A7A7A' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px center;
  padding-left: 36px;
}

textarea.input {
  resize: vertical;
  min-height: 100px;
}

/* ── Code Input (verification) ────────────────────────────── */
.code-input {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  direction: ltr;
}

.code-input__digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: var(--font-size-xl);
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font);
  transition: border-color 0.2s;
}

.code-input__digit:focus {
  outline: none;
  border-color: var(--pink);
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
}

.card--elevated {
  box-shadow: var(--shadow-md);
}

/* ── Avatar ───────────────────────────────────────────────── */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--pink-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--pink-dark);
  flex-shrink: 0;
}

.avatar--sm { width: 36px; height: 36px; font-size: var(--font-size-sm); }
.avatar--lg { width: 64px; height: 64px; font-size: var(--font-size-xl); }
.avatar--xl { width: 96px; height: 96px; font-size: var(--font-size-2xl); }

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
}

/* ── Navigation Bar ───────────────────────────────────────── */
.nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: var(--nav-height);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--font-size-xs);
  transition: color 0.2s;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font);
}

.nav-bar__item--active {
  color: var(--pink);
}

.nav-bar__icon {
  font-size: 22px;
}

.nav-bar__badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 20px);
  background: var(--red-alert);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── Top Bar ──────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  margin-bottom: var(--space-md);
}

.top-bar__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
}

.top-bar__action {
  background: none;
  border: none;
  font-size: var(--font-size-xl);
  cursor: pointer;
  color: var(--text);
  padding: var(--space-sm);
}

/* ── Mode Toggle ──────────────────────────────────────────── */
.mode-toggle {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  padding: 3px;
  margin-bottom: var(--space-lg);
}

.mode-toggle__option {
  flex: 1;
  padding: 10px var(--space-md);
  text-align: center;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.3s ease;
}

.mode-toggle__option--active {
  background: var(--bg-card);
  color: var(--pink);
  box-shadow: var(--shadow-sm);
}

.mode-toggle__option--active.mode-toggle__option--platonic {
  color: var(--green);
}

/* ── Swipe Card ───────────────────────────────────────────── */
.swipe-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
}

.swipe-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--pink-light), #E8D5E0);
}

.swipe-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-xl) var(--space-lg);
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
}

.swipe-card__name {
  font-size: var(--font-size-xl);
  font-weight: 700;
}

.swipe-card__detail {
  font-size: var(--font-size-sm);
  opacity: 0.9;
  margin-top: var(--space-xs);
}

.swipe-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
}

/* ── Match Overlay ────────────────────────────────────────── */
.match-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(233,30,99,0.95), rgba(173,20,87,0.95));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  color: white;
  text-align: center;
  padding: var(--space-xl);
}

.match-overlay__title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.match-overlay__subtitle {
  font-size: var(--font-size-md);
  opacity: 0.9;
  margin-bottom: var(--space-xl);
}

.match-overlay__avatars {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.match-overlay__avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  border: 3px solid white;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.match-overlay .btn {
  max-width: 280px;
  margin-bottom: var(--space-sm);
}

.match-overlay .btn--primary {
  background: white;
  color: var(--pink);
  box-shadow: none;
}

.match-overlay .btn--ghost {
  color: white;
}

/* Platonic match overlay — green gradient instead of pink */
.match-overlay--platonic {
  background: linear-gradient(135deg, rgba(76,175,80,0.95), rgba(46,125,50,0.95));
}

.match-overlay--platonic .btn--primary,
.match-overlay .btn--green {
  background: white;
  color: var(--green);
  box-shadow: none;
}

/* Green button utility */
.btn--green {
  background: var(--green);
  color: white;
}

/* ── Chat / DM ────────────────────────────────────────────── */
.chat-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.chat-list__item--admin {
  background: linear-gradient(135deg, #E8F5E9, #F1F8E9);
  border-radius: var(--radius-md);
  margin-bottom: 2px;
  padding-right: var(--space-sm);
  padding-left: var(--space-sm);
}

[data-theme="dark"] .chat-list__item--admin {
  background: linear-gradient(135deg, #1B2E1C, #1E2D1E);
}

.chat-list__content {
  flex: 1;
  min-width: 0;
}

.chat-list__name {
  font-weight: 600;
  font-size: var(--font-size-md);
}

.chat-list__preview {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list__meta {
  text-align: left;
  flex-shrink: 0;
}

.chat-list__time {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.chat-list__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--pink);
  color: white;
  font-size: var(--font-size-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
  margin-top: var(--space-xs);
}

/* Chat messages */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  flex: 1;
  overflow-y: auto;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px var(--space-md);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-md);
  line-height: 1.4;
}

.chat-bubble--mine {
  align-self: flex-start;
  background: var(--pink);
  color: white;
  border-bottom-right-radius: var(--space-xs);
}

.chat-bubble--theirs {
  align-self: flex-end;
  background: var(--bg-input);
  color: var(--text);
  border-bottom-left-radius: var(--space-xs);
}

.chat-bubble__time {
  font-size: var(--font-size-xs);
  opacity: 0.7;
  margin-top: 2px;
}

/* ── Announcement Bubble ──────────────────────────────────── */
.msg__ann-title {
  font-size: var(--font-size-md);
  font-weight: 700;
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.msg__ann-body {
  font-size: var(--font-size-sm);
  line-height: 1.5;
  opacity: 0.92;
}

/* ── Date Separator ───────────────────────────────────────── */
.date-separator {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.date-separator::before,
.date-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.date-separator__label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Matches Grid ─────────────────────────────────────────── */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.match-card {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: white;
}

.match-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--pink-light), #E0C8D5);
}

.match-card__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.match-card__name {
  font-weight: 600;
  font-size: var(--font-size-sm);
}

/* ── Settings List ────────────────────────────────────────── */
.settings-list {
  list-style: none;
}

.settings-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.settings-list__label {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-weight: 500;
}

.settings-list__icon {
  font-size: var(--font-size-lg);
}

.settings-list__arrow {
  color: var(--text-light);
}

/* ── Toggle Switch ────────────────────────────────────────── */
.toggle {
  position: relative;
  width: 50px;
  height: 28px;
  background: var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.3s;
  border: none;
}

.toggle--active {
  background: var(--pink);
}

.toggle::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: var(--radius-full);
  top: 3px;
  right: 3px;
  transition: transform 0.3s;
  box-shadow: var(--shadow-sm);
}

.toggle--active::after {
  transform: translateX(-22px);
}

/* ── Badges & Tags ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.badge--pink    { background: var(--pink-light); color: var(--pink-dark); }
.badge--green   { background: var(--green-light); color: var(--green); }
.badge--red     { background: #FFCDD2; color: var(--red-alert); }
.badge--orange  { background: #FFE0B2; color: var(--orange-warn); }
.badge--neutral { background: var(--bg-input); color: var(--text-muted); }

/* Shelter type badges */
.badge--shelter-mamad    { background: linear-gradient(135deg, #FFD700, #FFC107); color: #5D4037; font-weight: 700; border: 1px solid #FFB300; }
.badge--shelter-binyan   { background: linear-gradient(135deg, #E0E0E0, #BDBDBD); color: #424242; font-weight: 700; border: 1px solid #9E9E9E; }
.badge--shelter-tziburi  { background: linear-gradient(135deg, #BBDEFB, #90CAF9); color: #1565C0; font-weight: 600; }
.badge--shelter-chenyon  { background: linear-gradient(135deg, #D7CCC8, #BCAAA4); color: #4E342E; font-weight: 600; }

/* ── Admin Stat Cards ─────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
}

.stat-card__value {
  font-size: var(--font-size-2xl);
  font-weight: 800;
}

.stat-card__label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* ── Admin Table ──────────────────────────────────────────── */
.user-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
}

.user-list__info {
  flex: 1;
  min-width: 0;
}

.user-list__name {
  font-weight: 600;
}

.user-list__email {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ── Report Item ──────────────────────────────────────────── */
.report-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  box-shadow: var(--shadow-card);
  border-right: 4px solid var(--orange-warn);
}

.report-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.report-item__reason {
  font-weight: 600;
}

.report-item__body {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* ── Modal / Overlay ──────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  z-index: 150;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-xl) var(--space-lg);
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  max-height: 80dvh;
  overflow-y: auto;
}

.modal__handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-lg);
}

.modal__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.empty-state__icon {
  font-size: 64px;
  margin-bottom: var(--space-md);
}

.empty-state__title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.empty-state__text {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

/* ── Onboarding Steps ─────────────────────────────────────── */
.steps-indicator {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.steps-indicator__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border);
  transition: all 0.3s;
}

.steps-indicator__dot--active {
  width: 24px;
  background: var(--pink);
}

.steps-indicator__dot--done {
  background: var(--pink-light);
}

/* ── Photo Upload Grid ────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.photo-slot {
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  color: var(--text-light);
  cursor: pointer;
  transition: border-color 0.2s;
  background: var(--bg-input);
  overflow: hidden;
  position: relative;
}

.photo-slot:hover {
  border-color: var(--pink);
}

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.photo-slot__delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-slot--filled {
  border: none;
}

/* ── Search Bar ───────────────────────────────────────────── */
.search-bar {
  position: relative;
  margin-bottom: var(--space-lg);
}

.search-bar .input {
  padding-right: 44px;
  border-radius: var(--radius-full);
}

.search-bar__icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--text-light);
  font-size: var(--font-size-sm);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Spacing Utilities ────────────────────────────────────── */
.mt-xs  { margin-top: var(--space-xs); }
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mb-xs  { margin-bottom: var(--space-xs); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

/* ── Flex Utilities ───────────────────────────────────────── */
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; }
.flex-1     { flex: 1; }
.items-center { align-items: center; }

/* ── Link ─────────────────────────────────────────────────── */
a {
  color: var(--pink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Shelter Alert Banner ─────────────────────────────────── */
.shelter-alert {
  background: linear-gradient(135deg, var(--red-alert), var(--orange-warn));
  color: white;
  padding: 10px var(--space-md);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

/* ── Admin sidebar indicator ──────────────────────────────── */
.admin-badge {
  background: linear-gradient(135deg, #1A1A2E, #16213E);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 0;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.animate-fade-in { animation: fadeIn 0.3s ease; }
.animate-slide-up { animation: slideUp 0.3s ease; }

/* ── Flash Messages ───────────────────────────────────────── */
.flash-messages {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  z-index: 300;
  padding: var(--space-sm);
}

.flash {
  padding: 12px var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  animation: slideDown 0.3s ease;
  cursor: pointer;
}

.flash--error {
  background: #FFCDD2;
  color: var(--red-alert);
}

.flash--success {
  background: var(--green-light);
  color: var(--green);
}

.flash--info {
  background: #E3F2FD;
  color: #1565C0;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Shelter info card (profile view) ─────────────────────── */
.shelter-info-card {
  background: linear-gradient(135deg, #FFF3E0, #FFECB3);
  color: #4E342E;
}

[data-theme="dark"] .shelter-info-card {
  background: linear-gradient(135deg, #3E2723, #4E342E);
  color: #FFE0B2;
}
