:root {
  --ink: #172334;
  --ink-2: #26384d;
  --paper: #ffffff;
  --paper-deep: #f1f4f7;
  --white: #ffffff;
  --terracotta: #356df3;
  --terracotta-dark: #244fc0;
  --sage: #7e92aa;
  --sage-soft: #e7edf5;
  --gold: #e6a84f;
  --line: rgba(23, 35, 52, .12);
  --shadow: 0 22px 55px rgba(30, 49, 72, .12);
  --sans: "Plus Jakarta Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Plus Jakarta Sans", ui-sans-serif, sans-serif;
}

::selection { color: #fff; background: var(--terracotta); }
html { background: #cbd7df; }
body { color: var(--ink); background: var(--paper); font-family: var(--sans); letter-spacing: -.025em; }
button { transition: .2s ease; }
h1, h2, h3, .feature-content h2 { font-family: var(--sans); letter-spacing: -.055em; }

/* Header */
.topbar {
  min-height: 72px;
  padding: 0 clamp(24px, 4vw, 64px);
  gap: 34px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { gap: 11px; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #fff;
  background: var(--ink);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -.08em;
}
.brand strong { font-family: var(--sans); font-size: 14px; font-weight: 800; letter-spacing: -.045em; }
.brand small { margin-top: 2px; color: var(--terracotta); font-size: 6px; letter-spacing: .24em; }
.desktop-nav { gap: clamp(18px, 2.5vw, 38px); }
.nav-link { padding: 27px 0 24px; color: #6d7887; font-size: 10px; font-weight: 650; }
.nav-link:hover, .nav-link.is-active { color: var(--ink); border-bottom-color: var(--terracotta); }
.search-control { height: 39px; border: 0; border-radius: 999px; background: var(--paper-deep); }
.search-control input { font-size: 10px; }
.avatar-button { color: #fff; background: var(--ink); font-size: 9px; }
.demo-ribbon { min-height: 27px; color: #506175; background: #edf2f6; font-size: 7px; font-weight: 700; letter-spacing: .12em; }
.live-dot { background: #38b27b; box-shadow: 0 0 0 4px rgba(56,178,123,.14); }

/* Shared UI */
.eyebrow { margin-bottom: 13px; color: var(--terracotta); font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.primary-button, .secondary-button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}
.primary-button { border-color: var(--terracotta); background: var(--terracotta); box-shadow: 0 11px 24px rgba(53,109,243,.22); }
.primary-button:hover { border-color: var(--terracotta-dark); background: var(--terracotta-dark); transform: translateY(-1px); }
.secondary-button { border-color: var(--ink); }
.text-button { font-size: 10px; }
.status-pill { border-radius: 999px; }
.status-new { color: #22583f; background: #dff4e9; }
.status-review { color: #214c9b; background: #e1eafd; }
.status-resolved { color: #365e42; background: #dceede; }
.view { animation-duration: .25s; }

/* Photo-led hero */
.hero-grid {
  position: relative;
  isolation: isolate;
  max-width: 1380px;
  min-height: 650px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 24px;
  overflow: hidden;
  background: #4a6275;
}
.city-feature, .hero-copy { grid-area: 1 / 1; }
.city-feature { min-height: 650px; z-index: 0; background: #71849a; }
.feature-sky {
  background-image: linear-gradient(90deg, rgba(7,22,39,.72) 0%, rgba(7,22,39,.36) 48%, rgba(7,22,39,.05) 76%), url('./hero-tehuacan-clean.webp');
  background-size: cover;
  background-position: center;
}
.feature-sky > *, .city-silhouette { display: none; }
.hero-copy {
  z-index: 2;
  width: min(720px, 63%);
  padding: clamp(74px, 7vw, 112px) clamp(40px, 7vw, 104px);
  color: #fff;
  background: transparent;
}
.hero-copy .eyebrow { color: rgba(255,255,255,.74); }
.hero-copy h1 {
  margin: 0 0 24px;
  color: #fff;
  font-size: clamp(72px, 9.3vw, 132px);
  font-weight: 800;
  line-height: .84;
  letter-spacing: -.075em;
}
.hero-copy h1 em { color: #fff; font-style: normal; font-weight: 800; }
.hero-description { max-width: 550px; color: rgba(255,255,255,.78); font-size: 13px; line-height: 1.65; }
.hero-copy .primary-button { color: var(--ink); border-color: #fff; background: #fff; box-shadow: none; }
.hero-copy .primary-button:hover { color: #fff; border-color: var(--terracotta); background: var(--terracotta); }
.hero-copy .text-button { color: #fff; border-color: rgba(255,255,255,.65); }
.trust-row { margin-top: 44px; }
.avatar-stack span { color: var(--ink); background: #fff; border-color: rgba(15,34,51,.7); }
.trust-row p { color: rgba(255,255,255,.63); }.trust-row strong { color: #fff; }
.feature-content {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  width: min(350px, calc(100% - 48px));
  margin: 0;
  padding: 22px;
  color: var(--ink);
  background: rgba(255,255,255,.94);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(15,30,48,.2);
  backdrop-filter: blur(18px);
}
.feature-content h2 { margin: 13px 0 16px; font-size: 22px; font-weight: 700; line-height: 1.12; }
.feature-kicker { margin: 14px 0 0; color: #758293; font-size: 8px; }
.feature-footer { padding-top: 13px; color: #758293; }.feature-footer button { color: var(--ink); }

/* Home sections */
.content-section { max-width: 1280px; padding: 86px 32px; }
.section-heading { align-items: center; margin-bottom: 30px; }
.section-heading h2, .card-heading h2 { font-size: clamp(34px, 4vw, 50px); font-weight: 750; line-height: .98; }
.category-grid { grid-template-columns: repeat(4,1fr); gap: 12px; }
.category-card {
  min-height: 150px;
  padding: 20px;
  border-color: transparent;
  border-radius: 18px;
  background: var(--paper-deep);
}
.category-card:hover { transform: translateY(-3px); background: #e7edf4; box-shadow: none; }
.category-icon { width: 46px; height: 46px; border-radius: 14px; color: #fff; background: var(--ink-2); font-family: var(--sans); font-size: 18px; }
.category-card strong { font-family: var(--sans); font-size: 13px; font-weight: 750; }
.category-card small { color: #7a8796; font-size: 8px; }
.category-card > svg { color: #8190a1; }
.segmented { padding: 3px; border-radius: 999px; background: var(--paper-deep); }
.segmented button { border-radius: 999px; }
.segmented button.is-active { color: #fff; background: var(--ink); box-shadow: none; }
.report-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.report-card { border: 0; border-radius: 18px; background: var(--paper-deep); }
.report-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.report-visual { height: 230px; background-size: cover !important; background-position: center !important; }
.report-visual::before, .report-visual::after { display: none; }
.visual-bache { background: url('./report-bache.webp'); }
.visual-light { background: url('./report-alumbrado.webp'); }
.visual-trash { background: url('./report-limpieza.webp'); }
.visual-water { background: url('./report-agua.webp'); }
.report-visual .status-pill { top: 12px; left: 12px; }
.report-body { padding: 18px; }
.report-meta { color: #758293; font-size: 7px; }
.report-body h3 { min-height: 52px; margin: 11px 0 9px; font-family: var(--sans); font-size: 16px; font-weight: 750; line-height: 1.08; letter-spacing: -.045em; }
.report-body p { color: #687687; font-size: 9px; }
.report-card-footer { padding-top: 13px; }
.support-count, .report-card-footer button { font-size: 8px; }
.city-impact {
  padding: 74px max(32px, calc((100vw - 1216px)/2));
  grid-template-columns: 1.5fr repeat(3,1fr);
  color: #fff;
  background: var(--ink-2);
}
.city-impact .eyebrow { color: #9db9d6; }
.city-impact h2 { max-width: 520px; font-family: var(--sans); font-size: 38px; font-weight: 700; }
.impact-stat { border-left-color: rgba(255,255,255,.17); }.impact-stat strong { font-family: var(--sans); font-weight: 700; }.impact-stat span { color: rgba(255,255,255,.58); }

/* Interior page headers */
.page-intro {
  max-width: 1280px;
  min-height: 330px;
  margin: 24px auto 0;
  padding: 62px 56px 48px;
  color: #fff;
  background: linear-gradient(125deg, #1b2d42, #536d87);
  border-radius: 22px;
  overflow: hidden;
}
.page-intro::after { content: ""; position: absolute; width: 360px; height: 360px; right: -70px; top: -120px; border-radius: 50%; border: 65px solid rgba(255,255,255,.06); }
.page-intro .eyebrow { color: #afc9e6; }
.page-intro h1 { max-width: 760px; color: #fff; font-size: clamp(48px, 6vw, 76px); font-weight: 750; line-height: .95; }
.page-intro h1 em { color: #fff; font-style: normal; }
.page-intro > div > p:last-child { color: rgba(255,255,255,.68); font-size: 11px; }
.page-intro .secondary-button { color: #fff; border-color: rgba(255,255,255,.65); }

/* Map */
.map-toolbar { max-width: 1280px; margin: 18px auto; padding: 0; }
.filter-chip, .locate-button { border: 0; border-radius: 999px; background: var(--paper-deep); }
.filter-chip.is-active { color: #fff; background: var(--ink); }
.map-layout { height: min(680px, calc(100vh - 240px)); min-height: 540px; max-width: 1280px; margin: 0 auto 70px; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.map-canvas { background: #e4ebf0; }
.map-canvas::before { opacity: .5; }
.map-marker { border-radius: 14px 14px 14px 3px; border-color: #fff; background: var(--ink); }
.map-marker.is-orange { background: var(--terracotta); }.map-marker.is-sage { background: #6a927d; }
.map-results { background: #fff; }
.map-thumb { background-size: cover; background-position: center; }.map-list-item:nth-child(1) .map-thumb { background-image: url('./report-bache.webp'); }.map-list-item:nth-child(2) .map-thumb { background-image: url('./report-alumbrado.webp'); }.map-list-item:nth-child(3) .map-thumb { background-image: url('./report-limpieza.webp'); }.map-list-item:nth-child(4) .map-thumb { background-image: url('./report-agua.webp'); }.map-thumb::after { display: none; }
.map-list-item h3 { font-family: var(--sans); font-size: 13px; font-weight: 700; }

/* Form */
.report-form-layout { max-width: 1280px; min-height: calc(100vh - 120px); margin: 24px auto 70px; grid-template-columns: minmax(0,1.22fr) minmax(360px,.78fr); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.form-panel { padding: 54px clamp(32px, 5vw, 76px) 80px 48px; }
.back-link { margin-bottom: 42px; }
.form-panel h1 { max-width: 650px; font-size: clamp(46px, 5vw, 68px); font-weight: 750; line-height: .94; }
.form-panel h1 em { color: inherit; font-style: normal; }
.form-intro { font-size: 11px; }
.form-group { margin-top: 28px; }
input, textarea { border-color: transparent; border-radius: 12px; background: var(--paper-deep); }
input:focus, textarea:focus { border-color: var(--terracotta); background: #fff; }
.category-options span { border-color: transparent; border-radius: 14px; background: var(--paper-deep); font-family: var(--sans); }
.category-options input:checked + span { color: #fff; border-color: var(--terracotta); background: var(--terracotta); box-shadow: none; }
.location-card, .upload-card { border-color: transparent; border-radius: 14px; background: var(--paper-deep); }
.duplicate-alert { border-radius: 10px; border-left-color: var(--terracotta); background: #eaf0ff; }
.form-aside { padding: 54px 34px; color: var(--ink); background: var(--paper-deep); border-left: 1px solid var(--line); }
.phone-preview { max-width: 340px; border: 0; border-radius: 24px; box-shadow: 0 24px 55px rgba(32,50,70,.14); }
.tip-card { border-color: rgba(23,35,52,.1); }.tip-card > span { color: var(--terracotta); }.tip-card p { color: #6f7d8d; }

/* Dashboard */
.dashboard-stats { max-width: 1280px; padding: 24px 0; gap: 12px; }
.dashboard-stats article { border: 0; border-radius: 16px; background: var(--paper-deep); }
.dashboard-stats strong { font-family: var(--sans); font-size: 36px; font-weight: 750; }
.dashboard-grid { max-width: 1280px; padding: 0 0 18px; }
.chart-card, .resolution-card, .queue-card { border: 0; border-radius: 18px; background: var(--paper-deep); }
.bar-chart i { background: linear-gradient(var(--terracotta), #86a8ff); }
.donut { background: conic-gradient(var(--terracotta) 0 72%, #dce4ec 72% 100%); }.donut strong { font-family: var(--sans); font-weight: 750; }
.queue-card { width: min(1280px, calc(100% - 48px)); }

/* Profile and dialogs */
.profile-card { border: 0; border-radius: 20px; background: var(--paper-deep); box-shadow: none; }
.profile-avatar { border-radius: 16px; color: #fff; background: var(--ink); font-family: var(--sans); }
.profile-identity h1 { font-family: var(--sans); font-weight: 750; }
.profile-empty { border-radius: 20px; background: var(--paper-deep); }
.profile-empty .brand-mark { margin-inline: auto; }
dialog { border-radius: 20px !important; }
.auth-dialog { background: #fff; }.auth-dialog .brand-mark { margin-inline: auto; }.auth-tabs { background: var(--paper-deep); }.auth-tabs button.is-active { color: #fff; background: var(--ink); }.google-button { border-radius: 999px; }
.report-dialog { border-radius: 20px; }.detail-visual { background-size: cover; background-position: center; }.detail-side { background: var(--paper-deep); }.detail-stat strong { font-family: var(--sans); font-weight: 700; }
.toast { border-radius: 999px; background: var(--ink); }

/* Final functional layer */
.connection-badge {
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #24724f;
  background: #dff4e9;
  font-size: 6px;
  letter-spacing: .08em;
}
.connection-badge.is-offline { color: #8a4a1f; background: #fff0dc; }
.map-toolbar { gap: 12px; }
.map-selects { margin-left: auto; display: flex; gap: 8px; }
.map-selects label { color: #667587; font-size: 7px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.map-selects select {
  min-height: 38px;
  margin-left: 6px;
  padding: 0 30px 0 12px;
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  background: var(--paper-deep);
  font: 650 9px var(--sans);
}
#leafletMap { position: absolute; inset: 0; z-index: 3; opacity: 0; transition: opacity .25s ease; }
.map-canvas.leaflet-ready #leafletMap { opacity: 1; }
.map-canvas.leaflet-ready > .map-marker,
.map-canvas.leaflet-ready > .you-are-here { display: none; }
.leaflet-container { font-family: var(--sans); background: transparent; }
.leaflet-report-marker { position: relative; border-radius: 50% 50% 50% 8px; transform: rotate(-45deg); color: #fff; border: 3px solid #fff; background: var(--ink); box-shadow: 0 10px 24px rgba(22,39,60,.28); }
.leaflet-report-marker span { width: 100%; height: 100%; display: grid; place-items: center; transform: rotate(45deg); font: 800 10px var(--sans); }
.leaflet-report-marker.marker-review { background: var(--terracotta); }
.leaflet-report-marker.marker-resolved { background: #5a8f70; }
.map-thumb.visual-bache { background-image: url('./report-bache.webp') !important; }
.map-thumb.visual-light { background-image: url('./report-alumbrado.webp') !important; }
.map-thumb.visual-trash { background-image: url('./report-limpieza.webp') !important; }
.map-thumb.visual-water { background-image: url('./report-agua.webp') !important; }
.empty-filter { padding: 32px 18px; color: #728092; font-size: 10px; line-height: 1.6; }
.panel-access {
  width: min(660px, calc(100% - 36px));
  margin: 48px auto 100px;
  padding: 52px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper-deep);
}
.panel-access .brand-mark { margin: 0 auto 24px; }
.panel-access h2 { margin: 0 auto 16px; max-width: 510px; font-size: 38px; line-height: 1; }
.panel-access > p:not(.eyebrow) { margin: 0 auto 28px; max-width: 520px; color: #69788a; font-size: 11px; line-height: 1.7; }
.queue-actions { display: flex; justify-content: flex-end; gap: 6px; }
.queue-actions button { min-height: 32px; padding: 0 10px; border-radius: 999px; }
.queue-actions .advance-status { color: #fff; background: var(--terracotta); }
.admin-demo-button { width: 100%; min-height: 42px; margin-top: 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: #fff; font: 750 9px var(--sans); }
.comments { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.comments h3 { margin-bottom: 15px; font-size: 17px; }
.comment { padding: 13px 0; border-bottom: 1px solid var(--line); }
.comment strong { font-size: 10px; }.comment p { margin: 5px 0; color: #59687a; font-size: 10px; }.comment small, .empty-comments { color: #8a96a5; font-size: 8px; }
#commentForm { margin-top: 18px; display: flex; gap: 8px; }
#commentForm input { flex: 1; min-width: 0; }
#commentForm .secondary-button { min-height: 42px; }
.support-button:disabled { cursor: default; opacity: .68; transform: none; }

@media (max-width: 1050px) {
  .hero-grid { margin: 18px; }.hero-copy { width: 68%; padding: 76px 46px; }.hero-copy h1 { font-size: 84px; }
  .report-grid { grid-template-columns: repeat(2,1fr); }.category-grid { grid-template-columns: repeat(2,1fr); }
  .page-intro, .map-toolbar, .map-layout { margin-left: 20px; margin-right: 20px; }
  .dashboard-stats, .dashboard-grid { margin-inline: 20px; }
  .map-toolbar { flex-wrap: wrap; }.map-selects { order: 3; width: 100%; margin-left: 0; }
}

@media (max-width: 760px) {
  body { background: #fff; }
  .topbar { min-height: 64px; padding: 0 14px; }.brand-mark { width: 34px; height: 34px; border-radius: 10px; }.brand strong { font-size: 13px; }.demo-ribbon { min-height: 25px; font-size: 6.5px; }
  .hero-grid { min-height: 650px; margin: 12px; border-radius: 20px; }.city-feature { min-height: 650px; }.feature-sky { background-position: 58% center; }.hero-copy { width: 100%; min-height: 650px; padding: 60px 22px 180px; background: linear-gradient(90deg, rgba(8,22,38,.72), rgba(8,22,38,.1)); }.hero-copy h1 { max-width: 350px; font-size: clamp(58px, 18vw, 78px); line-height: .87; }.hero-description { max-width: 330px; }.hero-actions { width: 100%; }.hero-actions .primary-button { width: 100%; }.hero-actions .text-button { display: none; }.feature-content { right: 12px; bottom: 12px; left: 12px; width: auto; padding: 18px; border-radius: 16px; }.feature-content h2 { font-size: 18px; }.trust-row { display: none; }
  .content-section { padding: 64px 17px; }.section-heading h2 { font-size: 37px; }.category-grid, .report-grid { display: flex; overflow-x: auto; }.category-card { min-width: 245px; }.report-card { min-width: min(82vw,320px); }.report-visual { height: 205px; }
  .city-impact { grid-template-columns: repeat(2,1fr); padding: 58px 20px; }.city-impact > div:first-child { grid-column: 1/-1; }.city-impact h2 { font-size: 31px; }
  .page-intro { min-height: 350px; margin: 12px; padding: 48px 22px 34px; border-radius: 20px; }.page-intro h1 { font-size: 48px; }.page-intro .primary-button, .page-intro .secondary-button { width: 100%; }
  .map-toolbar { margin: 14px 12px; padding: 0; }.map-layout { margin: 0 12px 80px; border-radius: 20px; }.map-canvas { min-height: 410px; }
  .map-selects { display: grid; grid-template-columns: 1fr 1fr; }.map-selects label { display: grid; gap: 5px; }.map-selects select { width: 100%; margin-left: 0; }
  .report-form-layout { display: block; margin: 12px 12px 80px; border-radius: 20px; }.form-panel { padding: 44px 17px 64px; }.form-panel h1 { font-size: 48px; }.form-aside { padding: 48px 18px; border-left: 0; border-top: 1px solid var(--line); }
  .dashboard-stats { margin-inline: 12px; grid-template-columns: repeat(2,1fr); }.dashboard-grid { margin-inline: 12px; grid-template-columns: 1fr; }.queue-card { width: calc(100% - 24px); }
  .mobile-nav { background: rgba(255,255,255,.97); }.mobile-nav button.is-active { color: var(--terracotta); }.new-report-nav > span { color: #fff; background: var(--ink); }
  .panel-access { margin-top: 24px; padding: 38px 20px; }.panel-access h2 { font-size: 31px; }
  .queue-actions { flex-direction: column; }
  #commentForm { display: grid; }
}
