/* =============================================
   HundeStunde – Stylesheet
   Farben: Schokobraun #3D200A · Terrakotta #C94B2A · Creme #FFF4E8
   ============================================= */

:root {
  --brown:      #3D200A;
  --brown-mid:  #6B3A1F;
  --terra:      #C94B2A;
  --terra-dark: #A33A1E;
  --terra-light:#F0785A;
  --cream:      #FFF4E8;
  --cream-dark: #F5E6CC;
  --beige:      #F0D9A8;
  --white:      #FFFFFF;
  --gray-lt:    #F8F5F1;
  --gray:       #B8A898;
  --text:       #2E1A08;
  --text-light: #7A5C44;

  --radius:     12px;
  --radius-lg:  20px;
  --shadow:     0 4px 20px rgba(61,32,10,.10);
  --shadow-lg:  0 8px 40px rgba(61,32,10,.15);
  --transition: .2s ease;

  --font: 'Nunito', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}

a { color: var(--terra); text-decoration: none; }
a:hover { color: var(--terra-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── BUTTONS ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .65rem 1.4rem;
  border-radius: 50px;
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none !important;
  white-space: nowrap;
}
.btn-primary   { background: var(--terra); color: #fff; border-color: var(--terra); }
.btn-primary:hover { background: var(--terra-dark); border-color: var(--terra-dark); color:#fff; }
.btn-secondary { background: var(--brown); color: #fff; border-color: var(--brown); }
.btn-secondary:hover { background: var(--brown-mid); border-color: var(--brown-mid); color:#fff; }
.btn-outline   { background: transparent; color: var(--brown); border-color: var(--brown); }
.btn-outline:hover { background: var(--brown); color: #fff; }
.btn-sm  { padding: .4rem 1rem; font-size: .85rem; }
.btn-xs  { padding: .28rem .75rem; font-size: .78rem; }
.dash-profile-btns { display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.9rem; }
.btn-lg  { padding: .85rem 2rem; font-size: 1.05rem; }
.btn-full { width: 100%; }

/* ── HEADER ──────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--cream-dark);
  box-shadow: 0 2px 12px rgba(61,32,10,.07);
}
.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  padding-top: .75rem; padding-bottom: .75rem;
}
.logo-link { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.logo-img  { height: 42px; width: auto; }
.logo-text { font-size: 1.4rem; font-weight: 800; color: var(--brown); letter-spacing: -.5px; }
.main-nav  { display: flex; align-items: center; gap: 1.2rem; margin-left: auto; }
.main-nav a { font-weight: 600; color: var(--brown); font-size: .95rem; }
.main-nav a:hover { color: var(--terra); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--brown); margin-left: auto; }

/* ── FLASH ───────────────────────────────── */
.flash { padding: .75rem 0; font-weight: 600; text-align: center; }
.flash-success { background: #d4edda; color: #155724; }
.flash-error   { background: #f8d7da; color: #721c24; }
.flash-info    { background: var(--cream); color: var(--brown); }

/* ── HERO ────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
  padding: 4rem 0 3rem;
  border-bottom: 2px solid var(--beige);
}
.hero-inner {
  display: flex; align-items: center; gap: 3rem;
}
.hero-text { flex: 1; }
.hero-text h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(2.2rem,5vw,3.8rem); font-weight: 800; color: var(--brown); line-height: 1.15; margin-bottom: 1rem; }
.highlight { color: var(--terra); }
.hero-sub  { font-size: 1.1rem; color: var(--text-light); margin-bottom: 1.5rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-badges span { background: var(--white); border: 1.5px solid var(--beige); padding: .35rem .9rem; border-radius: 50px; font-size: .88rem; font-weight: 600; color: var(--brown); }
.hero-img { flex: 0 0 340px; }

/* ── CHOICE SECTION ──────────────────────── */
.choice-section { padding: 4rem 0 3rem; }
.section-title { text-align: center; font-size: 1.7rem; font-weight: 800; color: var(--brown); margin-bottom: 2rem; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.choice-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  border: 2.5px solid transparent;
  text-decoration: none !important;
  transition: var(--transition);
  box-shadow: var(--shadow);
  gap: 1rem;
}
.choice-owner  { background: var(--cream); border-color: var(--beige); }
.choice-sitter { background: #f5ede8; border-color: #e8d0c0; }
.choice-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.choice-owner:hover  { border-color: var(--terra); }
.choice-sitter:hover { border-color: var(--brown); }
.choice-icon { font-size: 4rem; }
.choice-card h3 { font-size: 1.35rem; font-weight: 800; color: var(--brown); }
.choice-card p  { color: var(--text-light); max-width: 300px; }
.choice-note { text-align: center; margin-top: 1.5rem; color: var(--text-light); }

/* ── HOW IT WORKS ────────────────────────── */
.how-section { background: var(--gray-lt); padding: 4rem 0; }
.steps-grid  { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }
.step { text-align: center; padding: 1.5rem 1rem; }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--terra); color: #fff; font-size: 1.3rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.step h4 { font-weight: 800; margin-bottom: .5rem; color: var(--brown); }
.step p  { font-size: .9rem; color: var(--text-light); }

/* ── SERVICES ────────────────────────────── */
.services-section { padding: 4rem 0; }
.services-grid { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.service-card { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.5rem; background: var(--cream); border: 2px solid var(--beige); border-radius: var(--radius); font-weight: 700; font-size: 1rem; color: var(--brown); }
.service-card span { font-size: .95rem; }

/* ── TRUST SECTION ───────────────────────── */
.trust-section { background: var(--brown); padding: 4rem 0; }
.trust-grid    { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; }
.trust-item    { text-align: center; color: var(--cream); }
.trust-icon    { font-size: 2.5rem; margin-bottom: .75rem; }
.trust-item h4 { font-size: 1.05rem; font-weight: 800; margin-bottom: .4rem; }
.trust-item p  { font-size: .9rem; color: var(--beige); }

/* ── FORM SECTION ────────────────────────── */
.form-section { padding: 3rem 0 4rem; background: var(--gray-lt); }
.form-container { max-width: 780px; margin: 0 auto; background: var(--white); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow-lg); }
.form-container--narrow { max-width: 480px; }
.form-header { text-align: center; margin-bottom: 2rem; }
.form-icon { font-size: 3rem; margin-bottom: .5rem; }
.form-header h1 { font-size: 1.7rem; font-weight: 800; color: var(--brown); }
.form-header p  { color: var(--text-light); margin-top: .3rem; }

fieldset { border: 2px solid var(--cream-dark); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
legend   { font-weight: 800; color: var(--brown); padding: 0 .5rem; font-size: 1rem; }

.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1 1 200px; }
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .5rem; }
.form-group label { font-weight: 700; font-size: .9rem; color: var(--brown); }
.form-group input, .form-group select, .form-group textarea {
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: .6rem .9rem;
  font-family: var(--font);
  font-size: .95rem;
  color: var(--text);
  transition: border-color var(--transition);
  background: var(--cream);
  width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--terra);
}
input[type="range"] { padding: 0; background: none; border: none; cursor: pointer; }
.range-label { font-weight: 700; color: var(--terra); }

.checkbox-row { flex-wrap: wrap; gap: 1rem; align-items: center; padding: .5rem 0; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-weight: 600; font-size: .9rem; }
.checkbox-label input { width: auto; }
.checkbox-grid { display: flex; flex-wrap: wrap; gap: .75rem; }
.checkbox-grid .checkbox-label { background: var(--cream); border: 2px solid var(--beige); padding: .5rem 1rem; border-radius: 50px; }
.checkbox-grid .checkbox-label:has(input:checked) { background: var(--terra); color: #fff; border-color: var(--terra); }

.alert { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.alert-error { background: #fde8e8; border: 1.5px solid #f5b4b4; color: #7a1a1a; }
.alert ul { padding-left: 1.2rem; }

.form-alt { text-align: center; color: var(--text-light); font-size: .9rem; margin-top: .75rem; }
.reg-form { display: flex; flex-direction: column; gap: .5rem; }

/* ── SEARCH ──────────────────────────────── */
.search-section { padding: 2.5rem 0 4rem; }
.search-section h1 { font-size: 1.7rem; font-weight: 800; color: var(--brown); margin-bottom: 1.5rem; }
.search-form { background: var(--cream); border: 2px solid var(--beige); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 2rem; }
.search-row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
.search-row .form-group { flex: 1 1 150px; }
.results-count { color: var(--text-light); margin-bottom: 1.5rem; font-weight: 600; }
.sitter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 1.5rem; }
.sitter-card {
  display: flex; flex-direction: column; gap: .5rem;
  background: var(--white); border: 2px solid var(--cream-dark); border-radius: var(--radius-lg);
  padding: 1.5rem; text-decoration: none !important; color: inherit;
  transition: var(--transition); box-shadow: var(--shadow);
}
.sitter-card:hover { border-color: var(--terra); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.sitter-avatar { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; border: 3px solid var(--beige); }
.sitter-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sitter-info h3 { font-weight: 800; color: var(--brown); font-size: 1.1rem; }
.sitter-location { font-size: .85rem; color: var(--text-light); }
.sitter-rating   { font-size: .9rem; font-weight: 700; }
.sitter-services { font-size: .85rem; color: var(--text-light); text-transform: capitalize; }
.sitter-price    { font-weight: 700; color: var(--terra); }
.sitter-bio      { font-size: .85rem; color: var(--text-light); }
.sitter-tags     { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .25rem; }
.tag { background: var(--cream); border: 1px solid var(--beige); padding: .2rem .7rem; border-radius: 50px; font-size: .78rem; font-weight: 600; color: var(--brown); }
.search-placeholder { text-align: center; padding: 4rem 1rem; }
.search-placeholder h2 { color: var(--text-light); font-size: 1.1rem; font-weight: 600; }
.empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-state { color: var(--text-light); font-style: normal; text-align: center; padding: 1.5rem; }
.empty-state.large { padding: 3rem; }

/* ── PROFILE ─────────────────────────────── */
.profile-section { padding: 2.5rem 0 4rem; }
.profile-grid { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.profile-header-card { background: var(--cream); border-radius: var(--radius-lg); padding: 2rem; display: flex; gap: 1.5rem; align-items: center; margin-bottom: 1.5rem; }
.profile-avatar-lg { width: 100px; height: 100px; border-radius: 50%; overflow: hidden; border: 3px solid var(--beige); flex-shrink: 0; }
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder-lg { width: 100px; height: 100px; border-radius: 50%; background: var(--terra); color: #fff; font-size: 2.5rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.avatar-placeholder { width: 100%; height: 100%; background: var(--terra); color: #fff; font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.profile-headline h1 { font-size: 1.5rem; font-weight: 800; color: var(--brown); }
.stars { color: #f0a000; font-weight: 700; }
.profile-card { background: var(--white); border: 2px solid var(--cream-dark); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.profile-card h2 { font-size: 1.1rem; font-weight: 800; color: var(--brown); margin-bottom: 1rem; }
.service-tags { display: flex; flex-wrap: wrap; gap: .6rem; }
.service-tag { background: var(--cream); border: 2px solid var(--beige); padding: .4rem 1rem; border-radius: 50px; font-weight: 700; font-size: .9rem; color: var(--brown); }
.detail-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.detail-list li { font-size: .95rem; }
.reviews-list { display: flex; flex-direction: column; gap: 1rem; }
.review { border-bottom: 1px solid var(--cream-dark); padding-bottom: 1rem; }
.review:last-child { border-bottom: none; }
.review-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .4rem; }
.review-header small { color: var(--text-light); font-size: .82rem; margin-left: auto; }

.booking-widget { background: var(--cream); border: 2px solid var(--beige); border-radius: var(--radius-lg); padding: 1.75rem; position: sticky; top: 90px; display: flex; flex-direction: column; gap: .75rem; }
.price-display { font-size: 1.3rem; color: var(--brown); text-align: center; }
.price-display strong { font-size: 1.6rem; color: var(--terra); }
.booking-note { text-align: center; font-size: .82rem; color: var(--text-light); }

/* ── DASHBOARD ───────────────────────────── */
.dashboard-section { padding: 2.5rem 0 4rem; }
.dashboard-header { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2rem; }
.dashboard-avatar { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; border: 3px solid var(--beige); flex-shrink: 0; }
.dashboard-card { background: var(--white); border: 2px solid var(--cream-dark); border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 1.5rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.card-header h2 { font-size: 1.1rem; font-weight: 800; color: var(--brown); }
.dog-grid { display: flex; flex-wrap: wrap; gap: 1rem; }
.dog-card { background: var(--cream); border: 2px solid var(--beige); border-radius: var(--radius); padding: 1.5rem 2rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; min-width: 210px; text-align: center; }
.dog-card .btn-outline { font-size: .78rem; padding: .3rem .9rem; border-color: var(--brown); color: #fff; background: var(--brown); margin-top: .25rem; }
.dog-card .btn-outline:hover { background: var(--brown); color: #fff; }
.dog-avatar { font-size: 2.5rem; width:80px; height:80px; border-radius:50%; overflow:hidden; display:flex; align-items:center; justify-content:center; background:var(--beige); }
.dog-avatar img { width:100%; height:100%; object-fit:cover; }
.dog-card strong { font-weight: 800; color: var(--brown); }
.dog-card span { font-size: .82rem; color: var(--text-light); }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
.stat { text-align: center; padding: 1rem; background: var(--cream); border-radius: var(--radius); }
.stat-num   { display: block; font-size: 2rem; font-weight: 800; color: var(--terra); }
.stat-label { font-size: .82rem; color: var(--text-light); font-weight: 600; }

.bookings-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.bookings-table th { background: var(--cream); padding: .6rem .75rem; font-weight: 700; color: var(--brown); text-align: left; border-bottom: 2px solid var(--beige); }
.bookings-table td { padding: .6rem .75rem; border-bottom: 1px solid var(--cream-dark); vertical-align: middle; }

.badge { display: inline-block; padding: .25rem .75rem; border-radius: 50px; font-size: .78rem; font-weight: 700; }
.badge-anfrage     { background: #fff3cd; color: #856404; }
.badge-bestätigt   { background: #d4edda; color: #155724; }
.badge-abgelehnt, .badge-abgesagt { background: #f8d7da; color: #721c24; }
.badge-abgeschlossen { background: var(--cream); color: var(--brown); }

/* ── FOOTER ──────────────────────────────── */
.site-footer { background: var(--brown); color: var(--cream); padding: 3rem 0 0; margin-top: 3rem; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-brand p { color: var(--beige); font-size: .9rem; margin-top: .4rem; }
.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-links h4 { font-weight: 800; margin-bottom: .25rem; color: var(--cream); }
.footer-links a { color: var(--beige); font-size: .9rem; }
.footer-links a:hover { color: var(--terra-light); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--brown-mid); padding: 1rem 0; font-size: .85rem; color: var(--beige); text-align: center; }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 900px) {
  .hero-inner, .choice-grid, .steps-grid, .trust-grid, .footer-inner { grid-template-columns: 1fr; }
  .hero-inner { flex-direction: column; }
  .hero-img { display: none; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .booking-widget { position: static; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .main-nav.open { display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); padding: 1.5rem; border-bottom: 2px solid var(--cream-dark); z-index: 200; }
}
@media (max-width: 600px) {
  .choice-grid { grid-template-columns: 1fr; }
  .steps-grid, .trust-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .search-row { flex-direction: column; }
  .form-container { padding: 1.5rem; }
}

.trust-logo img {
  max-height: 120px;
  width: auto;
  display: inline-block;
  opacity: .92;
  filter: brightness(0) invert(1);   /* weiß auf dunkelbraunem Hintergrund */
}

/* ── STEP-ICONS als runde Kreise ────────────── */
.step-num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--terra);
  color: #fff;
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}

/* ── SERVICE-CARD FA-ICONS ──────────────────── */
.service-card i { font-size: 1.3rem; color: var(--terra); }

/* ── TRUST-ICONS ────────────────────────────── */
.trust-icon i { font-size: 2.2rem; color: var(--terra-light); }
.trust-icon { margin-bottom: .75rem; }

/* ── HEADER: nur Symbol, kleiner ────────────── */
.logo-img { height: 48px; }

/* ── NEUER FOOTER (minimal, weißer Hintergrund) ── */
.site-footer { display: none; } /* alten Footer ausblenden falls noch referenziert */

.site-footer-bottom {
  background: var(--white);
  border-top: 2px solid var(--cream-dark);
  padding: 1.1rem 0;
  margin-top: 3rem;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.footer-copy { font-size: .88rem; color: var(--text-light); }
.footer-legal { display: flex; gap: 1.25rem; }
.footer-legal a { font-size: .88rem; color: var(--text-light); font-weight: 600; }
.footer-legal a:hover { color: var(--terra); text-decoration: underline; }

@media (max-width: 600px) {
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .footer-legal { justify-content: center; }
}

/* ── LEGAL PAGES ─────────────────────────── */
.legal-section { padding: 2.5rem 0 4rem; }
.legal-container { max-width: 800px; }
.legal-container h1 { font-size: 2rem; font-weight: 800; color: var(--brown); margin-bottom: 1.5rem; border-bottom: 3px solid var(--terra); padding-bottom: .75rem; }
.legal-container h2 { font-size: 1.1rem; font-weight: 800; color: var(--brown); margin: 2rem 0 .6rem; }
.legal-container p, .legal-container li { color: var(--text); line-height: 1.75; font-size: .96rem; margin-bottom: .5rem; }
.legal-container ul { padding-left: 1.4rem; margin-bottom: 1rem; }
.legal-container a { color: var(--terra); }
.legal-intro { background: var(--cream); border-left: 4px solid var(--terra); padding: .6rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; font-size: .88rem; color: var(--text-light); margin-bottom: 2rem; }

.empty-state p, .empty-state h3 { font-style: normal; }

/* ── AVATAR UPLOAD ───────────────────────── */
.avatar-upload-row {
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.avatar-preview {
  width: 110px; height: 110px; border-radius: 50%;
  overflow: hidden; border: 3px solid var(--beige);
  flex-shrink: 0; background: var(--cream);
  display: flex; align-items: center; justify-content: center;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload-info { display: flex; flex-direction: column; gap: .6rem; }
.avatar-hint { font-size: .82rem; color: var(--text-light); line-height: 1.5; margin: 0; }

/* ── MESSAGES ────────────────────────────── */
.messages-section { padding: 0; }
.messages-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: calc(100vh - 72px);
  overflow: hidden;
  gap: 0;
  max-width: 100%;
}

/* Sidebar */
.inbox-sidebar {
  border-right: 2px solid var(--cream-dark);
  display: flex; flex-direction: column;
  background: var(--white);
  overflow: hidden;
}
.inbox-header {
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--cream-dark);
  display: flex; align-items: center;
}
.inbox-header h2 { font-size: 1rem; font-weight: 800; color: var(--brown); display: flex; align-items: center; gap: .5rem; }
.unread-badge { background: var(--terra); color: #fff; font-size: .72rem; font-weight: 800; padding: .15rem .5rem; border-radius: 50px; }
.inbox-list { list-style: none; overflow-y: auto; flex: 1; }
.inbox-item a { display: flex; align-items: center; gap: .85rem; padding: .9rem 1.25rem; text-decoration: none !important; color: inherit; border-bottom: 1px solid var(--cream-dark); transition: background .15s; }
.inbox-item a:hover { background: var(--gray-lt); }
.inbox-item.active a { background: var(--cream); border-left: 3px solid var(--terra); }
.inbox-item.unread .inbox-name { font-weight: 800; }
.inbox-item.unread .inbox-preview { color: var(--text); font-weight: 600; }
.inbox-avatar { position: relative; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; overflow: visible; }
.inbox-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.dot-badge { position: absolute; top:-2px; right:-2px; background: var(--terra); color: #fff; font-size: .68rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 50px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; padding: 0 3px; }
.inbox-info { flex: 1; min-width: 0; }
.inbox-name { font-weight: 700; font-size: .9rem; color: var(--brown); display: flex; align-items: center; gap: .4rem; }
.inbox-type { font-weight: 400; font-size: .75rem; color: var(--text-light); }
.inbox-preview { font-size: .82rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-time { font-size: .75rem; color: var(--gray); margin-top: .15rem; }
.inbox-empty { padding: 2rem; text-align: center; color: var(--text-light); }
.inbox-empty i { font-size: 2rem; margin-bottom: .5rem; display: block; }

/* Thread */
.thread-panel { display: flex; flex-direction: column; overflow: hidden; background: var(--gray-lt); }
.thread-header {
  padding: .85rem 1.5rem; background: var(--white);
  border-bottom: 2px solid var(--cream-dark);
  display: flex; align-items: center; gap: 1rem; flex-shrink: 0;
}
.thread-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.thread-avatar img { width: 100%; height: 100%; object-fit: cover; }
.thread-header strong { display: block; font-size: .95rem; color: var(--brown); }
.thread-header small  { font-size: .78rem; color: var(--text-light); }
.thread-messages { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.thread-empty, .thread-start { text-align: center; color: var(--text-light); font-size: .9rem; margin: auto; }
.thread-empty i { font-size: 3rem; display: block; margin-bottom: 1rem; }
.thread-date-sep { text-align: center; font-size: .75rem; color: var(--gray); margin: .75rem 0 .25rem; }

/* Bubbles */
.msg-row { display: flex; align-items: flex-end; gap: .5rem; }
.msg-mine   { flex-direction: row-reverse; }
.msg-theirs { flex-direction: row; }
.msg-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-bubble {
  max-width: 68%; padding: .6rem .9rem;
  border-radius: 16px; font-size: .9rem; line-height: 1.5;
  position: relative; word-break: break-word;
}
.msg-mine   .msg-bubble { background: var(--terra); color: #fff; border-bottom-right-radius: 4px; }
.msg-theirs .msg-bubble { background: var(--white); color: var(--text); border-bottom-left-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.msg-time { display: block; font-size: .7rem; margin-top: .3rem; opacity: .7; text-align: right; }
.msg-mine .msg-time i { color: #fff; }

/* Input */
.thread-input {
  display: flex; align-items: flex-end; gap: .75rem;
  padding: .85rem 1.25rem; background: var(--white);
  border-top: 2px solid var(--cream-dark); flex-shrink: 0;
}
.thread-input textarea {
  flex: 1; border: 2px solid var(--cream-dark); border-radius: 20px;
  padding: .6rem 1rem; font-family: var(--font); font-size: .92rem;
  resize: none; overflow: hidden; min-height: 42px; max-height: 160px;
  transition: border-color .15s; line-height: 1.4; color: var(--text);
  background: var(--cream);
}
.thread-input textarea:focus { outline: none; border-color: var(--terra); }
.thread-input .btn { flex-shrink: 0; height: 42px; width: 42px; padding: 0; border-radius: 50%; }

/* Avatar-Letter */
.avatar-letter { width: 44px; height: 44px; border-radius: 50%; background: var(--terra); color: #fff; font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.avatar-letter.sm { width: 32px; height: 32px; font-size: .85rem; }

/* Responsive */
@media (max-width: 700px) {
  .messages-layout { grid-template-columns: 1fr; }
  .inbox-sidebar { display: none; }
  .inbox-sidebar.show { display: flex; }
}

/* ── ROLE-CHOICE MODAL ───────────────────── */
.role-modal-box { max-width: 580px; padding: 2rem; position: relative; }
.modal-close {
  position: absolute; top: .85rem; right: 1rem;
  background: none; border: none; font-size: 1.6rem; cursor: pointer;
  color: var(--text-light); line-height: 1;
}
.modal-close:hover { color: var(--brown); }
.role-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin-top: 1.25rem; }
.role-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 1.25rem .75rem; border-radius: var(--radius-lg);
  border: 2px solid var(--cream-dark); text-decoration: none !important;
  background: var(--cream); transition: var(--transition); gap: .5rem;
}
.role-card:hover { border-color: var(--terra); transform: translateY(-2px); box-shadow: var(--shadow); }
.role-card-both { background: #f5ede8; border-color: #e0c8b8; }
.role-card-both:hover { border-color: var(--brown); }
.role-icon { font-size: 2.5rem; }
.role-card strong { font-size: .95rem; font-weight: 800; color: var(--brown); }
.role-card span  { font-size: .8rem; color: var(--text-light); }
@media (max-width: 500px) { .role-cards { grid-template-columns: 1fr; } }

/* ── MODAL BASE (main site) ──────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(61,32,10,.5); backdrop-filter: blur(3px);
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: var(--shadow-lg); text-align: center;
}

/* ── PASSWORD RESET ──────────────────────── */
.reset-success, .reset-invalid {
  text-align: center; padding: 1rem 0;
}
.reset-success i { font-size: 3rem; color: #28a745; display: block; margin-bottom: 1rem; }
.reset-success h3, .reset-invalid h3 { font-size: 1.2rem; font-weight: 800; color: var(--brown); margin-bottom: .6rem; }
.reset-success p, .reset-invalid p   { color: var(--text-light); font-size: .95rem; }
