:root {
  --panel: rgba(255, 252, 247, 0.84);
  --panel-border: rgba(11, 20, 36, 0.09);
  --text: #101728;
  --muted: #5d6576;
  --accent: #ff6b2c;
  --accent-soft: rgba(255, 107, 44, 0.14);
  --success: #1f8f63;
  --danger: #c73a3a;
  --shadow: 0 24px 80px rgba(13, 22, 40, 0.14);
  --radius-xl: 32px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 141, 87, 0.32), transparent 22%),
    radial-gradient(circle at 85% 20%, rgba(39, 168, 122, 0.18), transparent 20%),
    linear-gradient(135deg, #f8f4ec 0%, #efe8dd 47%, #e8edf4 100%);
}

body {
  padding: 24px;
}

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

button,
a {
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

button:hover,
a:hover {
  transform: translateY(-1px);
}

.topbar,
.brand-inline,
.section-title-row,
.profile-summary,
.dialog-header,
.dialog-actions,
.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.topbar,
.brand-inline,
.profile-summary,
.comment-head {
  align-items: center;
}

.topbar {
  margin-bottom: 24px;
}

.topbar-logo {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.76);
  padding: 10px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.topbar h1,
.brand-block h2,
.feed-header h2,
.admin-header h2,
.upload-form h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.view-switch {
  display: flex;
  gap: 10px;
}

.view-tab,
.filter-pill,
.mini-button,
.primary-button,
.ghost-button,
.contact-button,
.close-button,
.side-action,
.grid-card,
.reel-nav,
.play-indicator {
  border: none;
  cursor: pointer;
}

.view-tab,
.filter-pill,
.mini-button {
  padding: 11px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(13, 22, 38, 0.1);
}

.view-tab.active,
.filter-pill.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.page-shell,
.explore-shell {
  display: grid;
  gap: 24px;
}

.explore-shell {
  grid-template-columns: 360px minmax(0, 1fr);
  align-items: start;
}

.left-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-block,
.panel-card,
.upload-form,
.admin-summary .stat-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand-block,
.panel-card {
  padding: 24px;
}

.brand-copy,
.profile-meta,
.inline-meta,
.comment-card span,
.empty-state,
.grid-location {
  color: var(--muted);
}

.live-pill,
.badge,
.status-chip,
.grid-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.live-pill {
  background: rgba(31, 143, 99, 0.12);
  color: var(--success);
}

.profile-name,
.section-title-row h2 {
  margin: 0;
}

.avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, #ffb16d 100%);
  color: white;
  font-weight: 800;
}

.select-input,
.upload-form input,
.upload-form textarea,
.upload-form select,
.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid rgba(13, 22, 38, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  padding: 14px 16px;
  color: var(--text);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.stats-grid,
.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card,
.comment-card,
.mini-meta {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(13, 22, 38, 0.08);
}

.stat-card strong,
.mini-meta strong {
  display: block;
}

.stat-card span,
.mini-meta span {
  display: block;
  margin-top: 5px;
  font-size: 0.82rem;
  color: var(--muted);
}

.filters-card,
.actions-card,
.comment-form {
  display: grid;
  gap: 12px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.ghost-button,
.contact-button {
  width: 100%;
  border-radius: 18px;
  padding: 14px 18px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.primary-button,
.contact-button {
  background: linear-gradient(135deg, var(--accent) 0%, #ff9157 100%);
  color: white;
}

.ghost-button,
.contact-button-secondary {
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  border: 1px solid rgba(13, 22, 38, 0.1);
}

.feed-header,
.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.feed-header-stats {
  display: flex;
  gap: 12px;
}

.mini-stat {
  min-width: 120px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(13, 22, 38, 0.08);
}

.mini-stat strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}

.mini-stat span {
  font-size: 0.82rem;
  color: var(--muted);
}

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

.grid-card {
  position: relative;
  min-height: 360px;
  border-radius: 30px;
  overflow: hidden;
  padding: 0;
  background: #111a30;
  box-shadow: var(--shadow);
  text-align: left;
}

.grid-image,
.reel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.grid-image {
  position: absolute;
  inset: 0;
}

.grid-overlay,
.reel-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 16, 29, 0.08) 0%, rgba(10, 16, 29, 0.78) 100%),
    linear-gradient(90deg, rgba(10, 16, 29, 0.5) 0%, transparent 45%, rgba(10, 16, 29, 0.2) 100%);
}

.grid-content {
  position: absolute;
  inset: auto 18px 18px 18px;
  z-index: 2;
  color: white;
}

.grid-content h3 {
  margin: 10px 0 6px;
  font-size: 1.15rem;
  line-height: 1.15;
}

.grid-price,
.grid-location {
  margin: 0;
}

.grid-price {
  margin-top: 10px;
  font-weight: 800;
}

.sale-pill {
  background: rgba(44, 125, 255, 0.24);
  color: white;
}

.rent-pill {
  background: rgba(39, 168, 122, 0.24);
  color: white;
}

.empty-grid {
  padding: 48px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
}

.admin-view.hidden-view,
.explore-view.hidden-view,
.hidden-view {
  display: none !important;
}

.admin-table-wrap {
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid rgba(13, 22, 38, 0.08);
  vertical-align: top;
}

.admin-table td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-button-danger {
  color: var(--danger);
}

.status-approved {
  background: rgba(31, 143, 99, 0.12);
  color: var(--success);
}

.status-pending {
  background: rgba(255, 107, 44, 0.14);
  color: var(--accent);
}

.status-rejected {
  background: rgba(199, 58, 58, 0.12);
  color: var(--danger);
}

.upload-dialog,
.reel-dialog {
  border: none;
  padding: 0;
  background: transparent;
}

.upload-dialog::backdrop,
.reel-dialog::backdrop {
  background: rgba(10, 16, 29, 0.72);
  backdrop-filter: blur(4px);
}

.upload-form {
  width: min(860px, calc(100vw - 32px));
  padding: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.form-grid label {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}

.full-span {
  grid-column: 1 / -1;
}

.hidden-field {
  display: none !important;
}

.close-button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(13, 22, 38, 0.08);
}

.reel-shell {
  width: min(1180px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 54px minmax(0, 420px) minmax(280px, 360px) 54px;
  gap: 16px;
  align-items: center;
}

.reel-phone {
  position: relative;
  height: min(88vh, 860px);
  border-radius: 42px;
  overflow: hidden;
  background: #101728;
  box-shadow: var(--shadow);
}

.reel-image {
  position: absolute;
  inset: 0;
  animation: drift 10s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: scale(1.03) translateY(0);
  }
  to {
    transform: scale(1.09) translateY(-10px);
  }
}

.reel-top,
.reel-actions,
.reel-info {
  position: absolute;
  z-index: 2;
}

.reel-top {
  top: 20px;
  left: 20px;
  display: flex;
  gap: 8px;
}

.badge {
  background: rgba(44, 125, 255, 0.24);
  color: white;
}

.badge-soft {
  background: rgba(255, 107, 44, 0.22);
  color: white;
}

.badge-rent {
  background: rgba(39, 168, 122, 0.24);
}

.reel-play-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

.reel-actions {
  right: 18px;
  bottom: 152px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-action {
  width: 72px;
  padding: 12px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(12px);
}

.reel-info {
  left: 20px;
  right: 98px;
  bottom: 20px;
  color: white;
}

.reel-info h3 {
  margin: 6px 0;
  font-size: 2rem;
  line-height: 1.02;
}

.listing-location,
.listing-price,
.listing-description {
  margin: 0;
}

.listing-location {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.listing-price {
  margin-top: 8px;
  color: #ffcf9f;
  font-size: 1.2rem;
  font-weight: 800;
}

.listing-description {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.78);
}

.compact-copy {
  max-width: 300px;
}

.reel-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.mini-meta {
  background: rgba(255, 255, 255, 0.14);
  color: white;
  min-width: 96px;
}

.contact-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.reel-comments {
  height: min(88vh, 860px);
  padding: 22px;
  border-radius: 32px;
  background: rgba(255, 252, 247, 0.96);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.comment-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  margin: 10px 0 14px;
  padding-right: 4px;
}

.comment-card p {
  margin: 8px 0 0;
}

.reel-nav {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(13, 22, 38, 0.08);
  box-shadow: var(--shadow);
  font-size: 1.1rem;
}

.reel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
}

@media (max-width: 1180px) {
  .explore-shell {
    grid-template-columns: 1fr;
  }

  .grid-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reel-shell {
    grid-template-columns: minmax(0, 1fr);
    width: min(900px, calc(100vw - 24px));
  }

  .reel-nav {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    padding: 14px;
  }

  .topbar,
  .feed-header,
  .admin-header,
  .dialog-header,
  .dialog-actions,
  .brand-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .view-switch,
  .feed-header-stats,
  .contact-row,
  .form-grid,
  .stats-grid,
  .admin-summary,
  .grid-feed {
    grid-template-columns: 1fr;
  }

  .view-switch,
  .feed-header-stats {
    display: grid;
  }

  .grid-feed {
    display: grid;
  }

  .reel-phone,
  .reel-comments {
    height: auto;
    min-height: 72vh;
  }

  .reel-info {
    right: 20px;
  }

  .reel-actions {
    bottom: 210px;
  }

  .contact-row {
    display: grid;
  }
}
