:root {
  --accent: #ff385c;
  --accent-dark: #e31c5f;
  --accent-soft: #fff1f3;
  --ink: #222222;
  --muted: #6a6a6a;
  --muted-strong: #4a4a4a;
  --surface: #ffffff;
  --surface-2: #f7f7f7;
  --surface-3: #f2f2f2;
  --border: #e6e6e6;
  --success: #008a05;
  --danger: #c13515;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.1);
  --font-display: 'DM Sans', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body.admin-shell {
  background: #f7f7f7;
}

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

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

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

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 72px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.navbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.navbar-links a {
  color: var(--muted-strong);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--ink);
  background: var(--surface-3);
  transform: translateY(-1px);
}

.btn-nav {
  background: var(--ink);
  color: #ffffff !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(255, 56, 92, 0.22);
}

.btn-dark {
  background: var(--ink);
  color: #ffffff;
}

.btn-ghost {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--border);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: rgba(34, 34, 34, 0.12);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 10px 14px;
  font-size: 0.86rem;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}

input,
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(255, 56, 92, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 56, 92, 0.12);
}

textarea {
  min-height: 136px;
  resize: vertical;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 36px;
  background: linear-gradient(135deg, #fffaf7 0%, #ffffff 46%, #fff1f3 100%);
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 56, 92, 0.12), transparent 34%),
    radial-gradient(circle at bottom left, rgba(255, 180, 90, 0.14), transparent 26%);
  pointer-events: none;
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.55) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.25;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.hero-tag,
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1,
.section-title,
.page-header h1,
.imovel-info h1,
.auth-hero h1,
.panel-top h2,
.profile-main h3 {
  font-family: var(--font-display);
  letter-spacing: -0.04em;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.96;
  max-width: 760px;
}

.hero p,
.page-header p,
.auth-hero p,
.quick-item p,
.profile-main p,
.empty-state p,
.agenda-feedback,
.property-address,
.card-location,
.descricao,
.results-head,
.selected-property span {
  color: var(--muted);
  line-height: 1.7;
}

.hero-search {
  display: grid;
  gap: 12px;
  margin: 26px 0 18px;
  padding: 14px;
  border: 1px solid rgba(34, 34, 34, 0.08);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.hero-search-field label {
  margin-bottom: 6px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hero-search-field input,
.hero-search-field select {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  min-height: auto;
}

.hero-search-action {
  display: flex;
  align-items: flex-end;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.hero-stats {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.hero-stat,
.stat-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.stat-card {
  position: relative;
}

.stat-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.84rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.stat-num,
.stat-value,
.price,
.card-price {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.stat-label {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.section-header,
.panel-top,
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 10px 0 6px;
}

.section-title {
  margin-top: 12px;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1;
}

.grid,
.grid-imoveis,
.admin-card-grid,
.thumb-grid {
  display: grid;
  gap: 18px;
}

.card-imovel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-imovel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img-wrap {
  position: relative;
  height: 260px;
  background: linear-gradient(135deg, #f3f3f3, #ececec);
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-img-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
}

.card-badge,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.badge-gold {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.badge-neutral {
  background: var(--surface-3);
  color: var(--muted-strong);
}

.card-body,
.form-card,
.admin-panel {
  padding: 22px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 1.22rem;
  line-height: 1.2;
}

.card-details,
.detalhes,
.profile-meta,
.inline-actions,
.inline-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-detail,
.detalhes span,
.profile-meta span {
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 600;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.home-insights,
.related-section,
.busca-destaques {
  margin-top: 44px;
}

.filtros,
.busca-mapa,
#calendar,
.imovel-info,
.selected-property,
.auth-card,
.auth-hero,
.table-wrap,
.profile-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.filtros {
  padding: 20px;
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

.results-head {
  margin-bottom: 14px;
  font-weight: 600;
}

.busca-layout,
.agenda-shell,
.imovel-container {
  display: grid;
  gap: 22px;
}

.busca-lista {
  min-width: 0;
}

.busca-cards {
  gap: 18px;
}

.busca-mapa {
  padding: 12px;
}

#mapa {
  width: 100%;
  height: 58vh;
  border-radius: 18px;
}

.imovel-galeria {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.img-principal {
  width: 100%;
  height: 360px;
  border-radius: 28px;
  object-fit: cover;
  background: var(--surface-2);
}

.image-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.thumbs img {
  width: 92px;
  height: 76px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid transparent;
  cursor: pointer;
}

.thumbs img.active {
  border-color: var(--accent);
}

.property-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.price {
  margin: 18px 0;
}

.descricao {
  margin-top: 18px;
  margin-bottom: 24px;
}

.form-card {
  background: #ffffff;
}

.form-group {
  margin-bottom: 18px;
}

.form-row,
.coords-row {
  display: grid;
  gap: 14px;
}

.form-divider,
.divider {
  height: 1px;
  background: var(--border);
  margin: 22px 0;
}

.agenda-card {
  max-width: none;
}

.selected-property strong {
  display: block;
  margin-bottom: 4px;
}

.auth-shell {
  display: grid;
  gap: 24px;
  align-items: center;
  min-height: calc(100vh - 120px);
}

.auth-hero,
.auth-card {
  padding: 28px;
}

.auth-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
}

.auth-error {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(193, 53, 21, 0.08);
  border: 1px solid rgba(193, 53, 21, 0.16);
  color: var(--danger);
  font-weight: 600;
}

.empty-state {
  padding: 36px 20px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 24px;
  background: #ffffff;
}

.small-empty {
  padding: 18px 0;
  background: transparent;
  border: none;
  text-align: left;
}

.animate-fade-up,
.animate-fade-in {
  animation: rise 0.6s ease both;
}

.delay-1 {
  animation-delay: 0.08s;
}

.delay-2 {
  animation-delay: 0.16s;
}

.delay-3 {
  animation-delay: 0.24s;
}

.delay-4 {
  animation-delay: 0.32s;
}

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

.fc .fc-toolbar-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.fc .fc-button-primary {
  background: var(--accent);
  border-color: var(--accent);
}

.fc .fc-daygrid-day.fc-day-today {
  background: rgba(255, 56, 92, 0.08);
}

[data-state="success"] {
  color: var(--success);
}

[data-state="error"] {
  color: var(--danger);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
