/* =========================================================
   سكني — Main Styles
   ========================================================= */

:root {
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-2: #eff6ff;
  --text: #152238;
  --muted: #66758a;
  --line: #dfe7f0;
  --primary: #1f63e9;
  --primary-dark: #174db8;
  --accent: #0f9d78;
  --warning: #f59e0b;
  --danger: #e04f5f;
  --shadow: 0 12px 30px rgba(23, 44, 74, 0.08);
  --shadow-sm: 0 6px 18px rgba(23, 44, 74, 0.06);
  --radius: 20px;
  --container: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

button, input, select, textarea {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin-inline: auto;
}

.section {
  padding: 88px 0;
}

.section-soft {
  background: #f1f6fb;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.small-label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: .2px;
  margin-bottom: 8px;
}

.eyebrow.light {
  color: rgba(255,255,255,.82);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(223,231,240,.75);
}

.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--primary);
  color: white;
  box-shadow: 0 8px 18px rgba(31,99,233,.24);
  font-size: 1.35rem;
}

.brand-text {
  font-size: 1.55rem;
  letter-spacing: -0.5px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #4f5f73;
  font-weight: 700;
  font-size: .92rem;
}

.desktop-nav a:hover {
  color: var(--primary);
}

.nav-ai, .ghost-btn {
  border: 1px solid var(--line);
  background: white;
  padding: 9px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.nav-ai:hover, .ghost-btn:hover {
  border-color: #bfd1f4;
  color: var(--primary);
}

.nav-count {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: #e8f0ff;
  color: var(--primary);
  font-size: .73rem;
  margin-inline-start: 3px;
}

.menu-btn {
  display: none;
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  padding: 10px 16px 16px;
  border-top: 1px solid var(--line);
  background: white;
}

.mobile-menu a,
.mobile-menu button {
  display: block;
  width: 100%;
  text-align: right;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 20%, rgba(31,99,233,.13), transparent 28%),
    radial-gradient(circle at 90% 80%, rgba(15,157,120,.10), transparent 30%),
    #f8fbff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 64px;
  align-items: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  line-height: 1.18;
  letter-spacing: -1.8px;
  max-width: 780px;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  margin: 22px 0 0;
  max-width: 700px;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 13px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 800;
  transition: .2s ease;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 9px 20px rgba(31,99,233,.18);
}

.primary-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.secondary-btn {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
}

.secondary-btn:hover {
  border-color: #bfd1f4;
  color: var(--primary);
  transform: translateY(-1px);
}

.large {
  padding: 13px 21px;
}

.full {
  width: 100%;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 26px;
  color: #536275;
  font-size: .9rem;
}

.hero-search-card {
  background: white;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.card-header h3 {
  margin: 2px 0 0;
  font-size: 1.45rem;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 6px 10px;
  background: #eef5ff;
  color: var(--primary);
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 800;
}

.hero-search-card label,
.search-panel label,
.stack-form label {
  display: block;
  font-weight: 800;
  margin: 12px 0 7px;
  font-size: .88rem;
}

select, input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 11px 13px;
  outline: 0;
  color: var(--text);
}

select:focus, input:focus, textarea:focus {
  border-color: #9fbaf4;
  box-shadow: 0 0 0 3px rgba(31,99,233,.08);
}

.hero-search-card .primary-btn {
  margin-top: 17px;
}

.journey-strip {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 72px 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-heading.center {
  display: block;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  letter-spacing: -.6px;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.journey-steps {
  margin-top: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.journey-step {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.journey-step b {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: var(--primary);
}

.journey-line {
  width: 44px;
  height: 1px;
  background: #cbd7e5;
}

.search-panel {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  background: white;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.field {
  min-width: 0;
}

.search-panel-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 3px;
}

.preference-notice {
  margin: 18px 0 0;
  padding: 12px 15px;
  border-radius: 12px;
  background: #e9f8f2;
  border: 1px solid #c7ecde;
  color: #176d56;
  font-size: .9rem;
}

.result-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-weight: 700;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-weight: 800;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.listing-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: .2s ease;
}

.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.listing-image {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: #dbe8f6;
}

.listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-top-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.match-badge {
  background: rgba(255,255,255,.92);
  color: var(--accent);
  padding: 5px 9px;
  border-radius: 9px;
  font-size: .76rem;
  font-weight: 800;
}

.heart-btn {
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  cursor: pointer;
  font-size: 1.1rem;
}

.heart-btn.saved {
  color: var(--danger);
}

.listing-body {
  padding: 17px;
}

.listing-title {
  margin: 0;
  font-size: 1.08rem;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 11px;
  margin: 8px 0;
  color: var(--muted);
  font-size: .84rem;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 10px;
}

.price {
  font-size: 1.22rem;
  font-weight: 900;
  color: var(--primary);
}

.price-sub {
  color: var(--muted);
  font-size: .78rem;
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.feature-chip,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fbff;
  color: #526176;
  font-size: .73rem;
  font-weight: 700;
}

.why-match {
  border-top: 1px dashed #d8e2ee;
  margin-top: 12px;
  padding-top: 10px;
  color: #4d5d71;
  font-size: .78rem;
}

.why-match strong {
  color: var(--text);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.card-actions button {
  flex: 1;
}

.empty-state {
  padding: 55px 25px;
  text-align: center;
  border: 1px dashed #c8d7e7;
  border-radius: 18px;
  background: white;
}

.empty-icon {
  margin: 0 auto 8px;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #eef5ff;
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 800;
}

.empty-state h3 {
  margin: 0;
}

.empty-state p {
  color: var(--muted);
}

.map-layout {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 18px;
}

.map-box {
  min-height: 560px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: #dce7f5;
}

.map-side-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  max-height: 560px;
  overflow-y: auto;
}

.map-target {
  padding: 13px;
  border-radius: 14px;
  background: #f3f7fc;
  margin-bottom: 12px;
}

.map-target span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
}

.map-target strong {
  display: block;
  margin-top: 2px;
}

.map-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 9px;
  cursor: pointer;
}

.map-card:hover {
  border-color: #bad0f3;
}

.map-card .top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.map-card .title {
  font-weight: 800;
}

.map-card .small {
  color: var(--muted);
  font-size: .78rem;
}

.map-card .score {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
}

.compare-area {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.compare-table th,
.compare-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: top;
}

.compare-table th {
  background: #f7fafc;
  font-weight: 900;
}

.compare-table .property-head {
  min-width: 230px;
}

.compare-table .best {
  color: var(--accent);
  font-weight: 900;
}

.roommate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.roommate-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eaf2ff;
  color: var(--primary);
  font-weight: 900;
  font-size: 1.15rem;
}

.roommate-card .person-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.compatibility {
  margin-top: 15px;
  background: #effaf6;
  color: #157258;
  border-radius: 11px;
  padding: 9px 11px;
  font-weight: 800;
  font-size: .82rem;
}

.compatibility.relevant {
  background: #eef5ff;
  color: #1a57be;
}

.cta-section {
  padding: 72px 0;
  background: #153f8e;
  color: white;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-inner h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.cta-inner p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.8);
}

.light-btn {
  background: white !important;
  color: var(--text) !important;
  border-color: white !important;
}

.site-footer {
  background: #0d1c30;
  color: white;
  padding: 35px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-end;
}

.footer-brand .brand-mark {
  background: white;
  color: #153f8e;
}

.footer-brand .brand-text {
  color: white;
}

.site-footer p,
.footer-note {
  color: rgba(255,255,255,.68);
  font-size: .83rem;
}

.footer-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

/* ========================= MODALS ========================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(6, 17, 32, .58);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  position: relative;
  width: min(960px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  background: white;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,.2);
  padding: 24px;
}

.small-modal {
  width: min(530px, 100%);
}

.modal-close {
  position: sticky;
  top: 0;
  float: left;
  z-index: 4;
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f2f5f9;
  cursor: pointer;
  font-size: 1.4rem;
}

.property-modal {
  padding: 0;
}

.property-hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  min-height: 410px;
}

.property-hero-image {
  min-height: 410px;
  background: #dbe8f6;
}

.property-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-detail {
  padding: 28px;
}

.property-detail h2 {
  margin: 0 0 6px;
  font-size: 1.7rem;
}

.detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 9px;
  margin: 20px 0;
}

.stat-box {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px;
  background: #fafcff;
}

.stat-box span {
  display: block;
  color: var(--muted);
  font-size: .73rem;
}

.stat-box strong {
  display: block;
  margin-top: 1px;
  font-size: .9rem;
}

.verify-banner {
  padding: 11px 12px;
  border-radius: 12px;
  background: #e9f8f2;
  color: #176d56;
  font-weight: 800;
  font-size: .82rem;
}

.reason-list {
  margin: 12px 0 0;
  padding-right: 19px;
  color: #556376;
  font-size: .82rem;
}

.property-section {
  padding: 24px 28px;
  border-top: 1px solid var(--line);
}

.reviews-list {
  display: grid;
  gap: 10px;
}

.review {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
}

.review .rating {
  color: #d18a00;
}

.visit-card {
  padding: 6px;
}

.chat-modal {
  width: min(650px, 100%);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.chat-header h3 {
  margin: 1px 0 0;
}

.chat-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.chat-messages {
  min-height: 360px;
  max-height: 55vh;
  overflow: auto;
  padding: 17px 4px;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 15px;
  margin: 8px 0;
  font-size: .88rem;
  white-space: pre-wrap;
}

.chat-bubble.bot {
  background: #f1f5f9;
  margin-left: auto;
  border-bottom-right-radius: 5px;
}

.chat-bubble.user {
  background: #eaf2ff;
  color: #174da8;
  margin-right: auto;
  border-bottom-left-radius: 5px;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0;
}

.chat-suggestion {
  cursor: pointer;
}

.chat-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.stack-form {
  display: grid;
  gap: 4px;
}

.stack-form label {
  margin-top: 10px;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.checkbox-row input {
  width: auto;
}

.visit-slots {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 10px;
  margin: 15px 0;
}

.visit-slot {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 11px;
  cursor: pointer;
  text-align: center;
  font-weight: 800;
}

.visit-slot.selected {
  border-color: var(--primary);
  background: #eef5ff;
  color: var(--primary);
}

.toast {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 5000;
  background: #0d1c30;
  color: white;
  padding: 11px 15px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: .2s ease;
  font-size: .84rem;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ========================= RESPONSIVE ========================= */

@media (max-width: 1000px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .listing-grid,
  .roommate-grid {
    grid-template-columns: repeat(2,1fr);
  }

  .search-panel {
    grid-template-columns: repeat(3,1fr);
  }

  .map-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .desktop-nav { display: none; }
  .menu-btn { display: block; }
  .mobile-menu.open { display: block; }

  .section {
    padding: 65px 0;
  }

  .hero {
    padding-top: 55px;
  }

  .hero h1 {
    font-size: 2.25rem;
    letter-spacing: -1px;
  }

  .search-panel {
    grid-template-columns: 1fr 1fr;
  }

  .listing-grid,
  .roommate-grid {
    grid-template-columns: 1fr;
  }

  .property-hero {
    grid-template-columns: 1fr;
  }

  .property-hero-image {
    min-height: 270px;
  }

  .cta-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .journey-line {
    display: none;
  }

  .journey-steps {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(calc(100% - 22px), var(--container));
  }

  .nav {
    min-height: 68px;
  }

  .brand-text {
    font-size: 1.35rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn,
  .hero-actions button,
  .hero-actions a {
    width: 100%;
    text-align: center;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

  .search-panel-actions {
    flex-direction: column;
  }

  .property-detail,
  .property-section,
  .modal {
    padding: 17px;
  }

  .property-modal {
    padding: 0;
  }

  .visit-slots {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   AUTH / PROFILE / OWNER DASHBOARD  (إضافات جزء تسجيل الدخول)
   ========================================================= */

.auth-modal { max-height: 88vh; overflow-y: auto; }

.tiny { font-size: .82rem; }
.optional { color: var(--muted); font-weight: 400; font-size: .8rem; }

/* ---------- Tabs ---------- */
.auth-tabs {
  display: flex;
  gap: 6px;
  background: var(--surface-2);
  padding: 5px;
  border-radius: 14px;
  margin: 14px 0 18px;
}
.auth-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}
.auth-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ---------- Role picker ---------- */
.role-picker { margin-bottom: 6px; }
.role-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.role-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  padding: 14px 10px;
  border: 2px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  transition: .2s;
  background: var(--surface);
}
.role-card:hover { border-color: #b9ccea; }
.role-card input { position: absolute; opacity: 0; pointer-events: none; }
.role-card .role-icon { font-size: 1.6rem; }
.role-card strong { font-size: .92rem; }
.role-card small { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.role-card.active {
  border-color: var(--primary);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}

/* ---------- Conditional field groups ---------- */
.role-fields {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.role-fields-head {
  font-weight: 700;
  color: var(--primary);
  font-size: .92rem;
}

/* ---------- Profile ---------- */
.logged-in { border-color: var(--primary) !important; color: var(--primary) !important; }

.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 16px;
}
.profile-head h3 { margin: 0; }
.profile-avatar, .owner-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  flex: none;
}
.role-pill {
  display: inline-block;
  font-size: .78rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary);
  font-weight: 600;
}
.role-pill.owner { background: #e7f7f1; color: var(--accent); }

.profile-list { list-style: none; margin: 0; padding: 0; }
.profile-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
.profile-list li:last-child { border-bottom: 0; }
.profile-list span { color: var(--muted); }

.profile-block {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
}
.profile-block.owner-block { background: #eefaf5; }
.profile-block > strong { display: block; margin-bottom: 6px; }
.profile-block .primary-btn { margin-top: 10px; }

/* ---------- Owner dashboard ---------- */
.owner-dash { background: linear-gradient(180deg, #f2f8ff 0%, var(--bg) 100%); }

.owner-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.owner-identity-text { display: flex; flex-direction: column; }
.owner-identity .verify-badge { margin-inline-start: auto; }

.verify-badge {
  font-size: .8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: #e7f7f1;
  color: var(--accent);
}
.verify-badge.pending { background: #fff4e0; color: var(--warning); }

.owner-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}
.owner-stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.owner-stat span { color: var(--muted); font-size: .84rem; }
.owner-stat strong { font-size: 1.5rem; color: var(--primary); }

.owner-subtitle { margin: 26px 0 12px; }

.owner-unit-card { border: 1px solid var(--line); }
.secondary-btn.danger { color: var(--danger); border-color: #f3c8ce; }

.owner-visits { display: flex; flex-direction: column; gap: 10px; }
.owner-visit-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
  font-size: .9rem;
}

.unit-flags {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
}

@media (max-width: 760px) {
  .owner-stats { grid-template-columns: 1fr 1fr; }
  .role-options { grid-template-columns: 1fr; }
  .owner-identity { flex-wrap: wrap; }
  .owner-identity .verify-badge { margin-inline-start: 0; }
}
