/*CidadeOrganizada/css/style.css */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f4f4;
}

body {
  overflow: hidden;
}

body.body--landing {
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(192, 57, 43, 0.12), transparent 34%),
    linear-gradient(180deg, #f6efe8 0%, #f8f5f1 38%, #efe6db 100%);
}

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

button,
textarea,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.landing {
  min-height: 100vh;
  padding: 24px;
  color: #221b16;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: stretch;
}

.landing-hero__content,
.landing-hero__map-panel,
.landing-strip,
.cities-section,
.contact-section {
  max-width: 1240px;
  margin: 0 auto;
}

.landing-hero__content,
.map-preview-card,
.landing-strip,
.cities-section,
.contact-section {
  border: 1px solid rgba(86, 58, 42, 0.1);
  box-shadow: 0 18px 60px rgba(79, 53, 36, 0.1);
}

.landing-hero__content {
  padding: 34px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(247, 239, 230, 0.94));
}

.hero-badge,
.landing-brand__eyebrow,
.map-preview-card__eyebrow,
.section-heading__eyebrow,
.contact-card__label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(192, 57, 43, 0.1);
  color: #9f2f24;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
}

.landing-brand__logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  flex-shrink: 0;
}

.landing-brand__eyebrow {
  margin: 0 0 8px;
  color: #b14a2d;
}

.landing-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.landing-hero__lead {
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.7;
  max-width: 60ch;
  color: #5a473a;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.landing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.landing-btn:hover,
.contact-card:hover,
.city-card:hover {
  transform: translateY(-2px);
}

.landing-btn--primary {
  background: linear-gradient(135deg, #c0392b, #a72c1f);
  color: #fff;
  box-shadow: 0 16px 34px rgba(192, 57, 43, 0.28);
}

.landing-btn--secondary {
  background: rgba(255, 255, 255, 0.82);
  color: #2f231d;
  border: 1px solid rgba(86, 58, 42, 0.14);
}

.landing-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.landing-stat {
  min-width: 180px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(86, 58, 42, 0.08);
}

.landing-stat strong {
  display: block;
  font-size: 32px;
  line-height: 1;
  color: #1e1713;
}

.landing-stat span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: #6a5546;
}

.map-preview-card {
  height: 100%;
  min-height: 520px;
  padding: 18px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 250, 245, 0.96), rgba(241, 230, 219, 0.92));
}

.map-preview-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.map-preview-card__eyebrow {
  margin: 0 0 6px;
  color: #9e5e34;
}

.map-preview-card__header h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
}

.map-preview-card__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(39, 128, 91, 0.12);
  color: #266149;
  font-size: 13px;
  font-weight: 700;
}

.landing-map {
  height: calc(100% - 66px);
  min-height: 420px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(86, 58, 42, 0.1);
}

.landing-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.7);
}

.landing-strip__item {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 239, 232, 0.85));
}

.landing-strip__item strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.landing-strip__item span {
  color: #635044;
  line-height: 1.6;
}

.cities-section,
.contact-section {
  margin-top: 22px;
  padding: 28px;
  border-radius: 32px;
  background: rgba(255, 252, 248, 0.84);
}

.section-heading {
  max-width: 720px;
}

.section-heading__eyebrow {
  margin: 0 0 10px;
  color: #b14a2d;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 14px 0 0;
  font-size: 17px;
  line-height: 1.7;
  color: #625044;
}

.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.city-ranking {
  margin-top: 22px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(86, 58, 42, 0.1);
}

.city-ranking__title {
  font-size: 16px;
  font-weight: 800;
  color: #2e231c;
}

.city-ranking__list {
  margin: 12px 0 0;
  padding-left: 22px;
}

.city-ranking__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0;
  color: #4d3d31;
  font-size: 14px;
}

.city-ranking__item strong {
  color: #1f1813;
}

.city-ranking__item--detected {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(192, 57, 43, 0.1);
  border: 1px solid rgba(192, 57, 43, 0.22);
}

.city-ranking__ellipsis {
  margin: 6px 0;
  color: #7f6b5e;
  font-size: 13px;
}

.city-card {
  display: block;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f5ede5);
  border: 1px solid rgba(86, 58, 42, 0.08);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 30px rgba(79, 53, 36, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.city-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.city-card h3 {
  margin: 0;
  font-size: 24px;
}

.city-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(192, 57, 43, 0.1);
  color: #9f2f24;
  font-weight: 700;
  font-size: 13px;
}

.city-card p {
  margin: 12px 0 0;
  color: #6b574a;
  line-height: 1.6;
}

.city-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  font-size: 13px;
  color: #856c5b;
}

.city-card__arrow {
  color: #c0392b;
  font-weight: 700;
}

.contact-section {
  background: linear-gradient(135deg, #211813, #3b2417 60%, #502d1a);
  color: #fff4ec;
}

.section-heading--light .section-heading__eyebrow,
.section-heading--light p {
  color: rgba(255, 244, 236, 0.78);
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.contact-card {
  display: block;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.contact-card strong {
  display: block;
  margin-top: 10px;
  font-size: 22px;
  line-height: 1.2;
}

.contact-card p {
  margin: 10px 0 0;
  color: rgba(255, 244, 236, 0.76);
  line-height: 1.6;
}

.landing-map-popup h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.landing-map-popup p {
  margin: 0;
  color: #6c5547;
}

.landing-empty {
  margin-top: 24px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(86, 58, 42, 0.2);
  color: #6c5547;
}

.landing-preview-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c0392b;
  border: 3px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 6px rgba(192, 57, 43, 0.18);
}
.city-notfound {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f3f4f6 0%, #e7eaf0 100%);
  z-index: 2000;
}

.city-notfound-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.13);
  padding: 32px;
  width: min(380px, 92vw);
  text-align: center;
  border: 1px solid #dee2e6;
}

.city-notfound-box h1 {
  margin: 0 0 12px;
  font-size: 26px;
  color: #1f2937;
}

.city-notfound-box p {
  margin: 8px 0;
  color: #4b5563;
}

.city-notfound-box .btn-primary {
  margin-top: 16px;
  display: inline-block;
  padding: 10px 16px;
  background: #c0392b;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.city-notfound-box .hint {
  margin-top: 10px;
  color: #6b7280;
  font-size: 13px;
}
#app {
  position: relative;
  width: 100%;
  height: 100%;
}

#map {
  width: 100%;
  height: 100%;
}

.topbar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar__logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex-shrink: 0;
}

.topbar__left h1 {
  margin: 0;
  font-size: 20px;
  color: #222;
}

.topbar__left p {
  margin: 4px 0 0;
  font-size: 14px;
  color: #666;
}

.count-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: #f8dfe3;
  color: #a90e27;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.stats-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #f8dfe3;
  color: #a90e27;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.stats-btn:hover {
  background: #f0c4cc;
}

.camera-wrap {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1000;
}

.camera-btn {
  width: 80px;
  height: 80px;

  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(1px);
  border: 2px solid rgba(0,0,0,0.2);

  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.30);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform 0.18s ease;
}

.camera-btn:hover {
  transform: scale(1.03);
}

.camera-btn__icon {
  width: 36px;
  height: 36px;
  opacity: 0.9;
}

.camera-btn:active {
  transform: scale(0.95);
}

.camera-btn__text {
  font-size: 12px;
  font-weight: 700;
}

.gps-status {
  position: absolute;
  left: 50%;
  bottom: 130px;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
}

.camera-btn.camera-btn--disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.camera-btn.camera-btn--disabled:hover,
.camera-btn.camera-btn--disabled:active {
  transform: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.46);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.alert-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-modal {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 340px;
  width: 90%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.alert-message {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.5;
  color: #2c3e50;
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 18px;
  box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.24);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal__header h2 {
  margin: 0;
  font-size: 22px;
  color: #222;
}

.modal__subtitle {
  margin: 10px 0 16px;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.icon-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: #f0f0f0;
  cursor: pointer;
  font-size: 16px;
}

.preview {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 16px;
  border: none;
  background: #f0f0f0;
  margin-bottom: 18px;
  display: block;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

.field textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid #d8d8d8;
  border-radius: 14px;
  padding: 12px;
  font-size: 14px;
  outline: none;
}

.coords-box {
  padding: 12px;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  background: #fafafa;
  font-size: 13px;
  color: #444;
  line-height: 1.5;
}

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

.btn {
  flex: 1;
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn--secondary {
  background: #ededed;
  color: #333;
}

.btn--primary {
  background: #b10021;
  color: #fff;
}

.popup-card {
  width: 240px;
}

.popup-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
  background: #eee;
}

.popup-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #222;
}

.popup-card p {
  margin: 0 0 6px;
  font-size: 12px;
  color: #555;
  line-height: 1.45;
  word-break: break-word;
}

.leaflet-popup-content-wrapper {
  border-radius: 16px;
}

.leaflet-popup-content {
  margin: 12px 14px;
}

/* zoom menor */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12) !important;
  overflow: hidden;
  border-radius: 12px !important;
}

.leaflet-control-zoom a {
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 18px !important;
}

@media (max-width: 640px) {
  .landing {
    padding: 14px;
  }

  .landing-hero__content,
  .map-preview-card,
  .cities-section,
  .contact-section {
    padding: 20px;
    border-radius: 24px;
  }

  .landing-brand {
    align-items: flex-start;
  }

  .landing-brand__logo {
    width: 64px;
    height: 64px;
  }

  .landing-hero h1 {
    font-size: 34px;
  }

  .landing-hero__lead,
  .section-heading p {
    font-size: 15px;
  }

  .landing-map {
    min-height: 320px;
  }

  .landing-strip {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .topbar {
    padding: 12px 14px;
    gap: 10px;
    align-items: flex-start;
  }

  .topbar__brand {
    gap: 10px;
  }

  .topbar__logo {
    width: 46px;
    height: 46px;
  }

  .topbar__left h1 {
    font-size: 17px;
  }

  .topbar__left p,
  .count-pill {
    font-size: 12px;
  }

  .count-pill {
    align-self: stretch;
    text-align: center;
  }

  .cities-grid,
  .contact-actions {
    grid-template-columns: 1fr;
  }

  .city-card__meta {
    flex-direction: column;
    align-items: flex-start;
  }


}

@media (max-width: 960px) {
  .landing-hero {
    grid-template-columns: 1fr;
  }

  .map-preview-card {
    min-height: 420px;
  }

  .landing-strip {
    grid-template-columns: 1fr;
  }
}
/* ── Cluster ──────────────────────────────────────────────────────────────── */
.cluster-icon {
  width: 40px;
  height: 40px;
  background: #b10021;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(177, 0, 33, 0.45);
}

/* ── Modal dois passos ────────────────────────────────────────────────────── */
.modal-step {
  /* nenhuma regra extra necessária — hidden é suficiente */
}

.actions--single {
  margin-top: 14px;
}

.modal-error-card {
  padding: 4px 0 10px;
}

.modal-error-message {
  margin: 6px 0 0;
  text-align: center;
  color: #7a2e1f;
  font-size: 16px;
  line-height: 1.5;
}

/* Preview do tipo selecionado */
.selected-type-preview {
  display: flex;
  justify-content: center;
  padding: 20px 0 16px;
}

.selected-type-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff0f3;
  border: 2px solid #f8c0cb;
  border-radius: 18px;
  padding: 12px 22px;
}

.selected-type-emoji {
  font-size: 32px;
  line-height: 1;
}

.selected-type-label {
  font-size: 22px;
  font-weight: 800;
  color: #b10021;
  letter-spacing: -0.5px;
}

/* ── Seletor de categoria ─────────────────────────────────────────────────── */
.label-optional {
  font-weight: 400;
  color: #aaa;
  font-size: 12px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  border: 2px solid #e8e8e8;
  border-radius: 14px;
  background: #fafafa;
  cursor: pointer;
  font-size: 22px;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.cat-btn span {
  font-size: 10px;
  font-weight: 600;
  color: #555;
  line-height: 1.2;
  text-align: center;
}

.cat-btn:hover {
  border-color: #ccc;
  background: #f0f0f0;
}

.cat-btn--active {
  border-color: #b10021;
  background: #fff0f3;
}

.cat-btn--active span {
  color: #b10021;
}

/* ── Popup estilizado ────────────────────────────────────────────────────── */
.avaria-popup .leaflet-popup-content-wrapper {
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  border: none;
}

.avaria-popup .leaflet-popup-content {
  margin: 0;
  width: 260px !important;
}

.avaria-popup .leaflet-popup-tip-container {
  margin-top: -1px;
}

.popup-card {
  width: 260px;
}

.popup-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  background: #eee;
  cursor: zoom-in;
  transition: opacity 0.15s;
}

.popup-photo:hover {
  opacity: 0.92;
}

.popup-body {
  padding: 10px 14px 8px;
}

.popup-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.popup-head-row--status {
  align-items: flex-start;
  margin-top: 2px;
}

.popup-tag {
  display: inline-block;
  background: #fff0f3;
  color: #b10021;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.popup-desc {
  margin: 0 0 6px;
  font-size: 13px;
  color: #333;
  line-height: 1.4;
  word-break: break-word;
}

.popup-meta {
  margin: 0 0 3px;
  font-size: 11px;
  color: #888;
  line-height: 1.4;
}

.popup-meta--age {
  color: #666;
}

.expiry-chip {
  --expiry-color: #22c55e;
  width: 42px;
  height: 42px;
  padding: 2px;
  border-radius: 50%;
  background: conic-gradient(var(--expiry-color) var(--expiry-progress), rgba(226, 232, 240, 0.95) 0deg);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.65);
  flex-shrink: 0;
}

.expiry-chip__inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.expiry-chip__inner strong {
  font-size: 13px;
  color: #1f2937;
}

.expiry-chip__inner span {
  margin-top: 1px;
  font-size: 9px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
}

.expiry-chip--fresh {
  --expiry-color: #22c55e;
}

.expiry-chip--warning {
  --expiry-color: #f59e0b;
}

.expiry-chip--danger {
  --expiry-color: #ef4444;
}

/* Navegação dentro do popup */
.popup-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 12px;
  border-top: 1px solid #f0f0f0;
  gap: 8px;
}

.popup-nav-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f0f0f0;
  color: #333;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.popup-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.popup-nav-btn:not(:disabled):hover {
  background: #e0e0e0;
}

.popup-nav-counter {
  font-size: 12px;
  color: #999;
  font-weight: 600;
  text-align: center;
  flex: 1;
}

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.25);
}

/* ── Confirmacao coletiva ─────────────────────────────────────────────────── */
.confirm-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  border: none;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.confirm-btn:hover {
  background: #f0f0f0;
}

.confirm-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.confirm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-top: 1px solid #f0f0f0;
  background: #f6fff6;
}

.confirm-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.confirm-label {
  font-size: 12px;
  font-weight: 600;
  color: #444;
  flex: 1;
}

.confirm-row .confirm-label {
  color: #2a7a2a;
}

.confirm-count {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}

/* ── Confirmação coletiva ─────────────────────────────────────────────────── */
.confirm-btn,
.confirm-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #f0f0f0;
  font-size: 13px;
  cursor: pointer;
}

.confirm-btn {
  border: none;
  background: #fafafa;
  text-align: left;
  transition: background 0.15s;
}

.confirm-btn:hover {
  background: #f0f0f0;
}

.confirm-row.confirmed {
  background: #f0faf3;
  cursor: default;
}

.confirm-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.confirm-label {
  flex: 1;
  font-weight: 600;
  color: #333;
}

.confirm-row.confirmed .confirm-label {
  color: #1a7a3a;
}

.confirm-count {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}

/* ── Botão Resolvido + layout de dois botões ─────────────────────────────── */
.action-row {
  display: flex;
  border-top: 1px solid #f0f0f0;
}

.action-half {
  flex: 1;
  width: auto !important;
  min-width: 0;
  border-top: none !important;
  border-radius: 0 !important;
}

.action-half + .action-half {
  border-left: 1px solid #f0f0f0;
}

.resolve-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px;
  border: none;
  background: #f0faf3;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  font-size: 13px;
}

.resolve-btn:hover {
  background: #d6f5e3;
}

.resolve-btn .confirm-label {
  color: #1a7a3a;
}

.renew-btn {
  width: 100%;
  border: none;
  border-top: 1px solid #f0f0f0;
  background: #fff8ea;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.renew-btn:hover {
  background: #ffefc6;
}

.renew-btn .confirm-label {
  color: #8a5800;
}

.share-icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #d9e6ff;
  background: #f4f8ff;
  color: #0f4aa2;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.share-icon-btn:hover {
  background: #deebff;
  transform: translateY(-1px);
}

.share-icon-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

.resolved-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #f0f0f0;
  background: #f0faf3;
}

/* ── Camera de resolução ─────────────────────────────────────────────────── */
.resolve-camera-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #000;
  display: flex;
  flex-direction: column;
}

.resolve-camera-video {
  flex: 1;
  width: 100%;
  object-fit: cover;
}

.resolve-camera-ghost {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  pointer-events: none;
}

.resolve-camera-ui {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 24px 44px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.resolve-camera-hint {
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  text-align: center;
  max-width: 280px;
  line-height: 1.4;
}

.resolve-camera-capture {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: rgba(255,255,255,0.22);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: transform 0.15s, background 0.15s;
}

.resolve-camera-capture::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
}

.resolve-camera-capture:active {
  transform: scale(0.92);
  background: rgba(255,255,255,0.38);
}

.resolve-camera-cancel {
  background: none;
  border: none;
  color: rgba(255,255,255,0.82);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 16px;
}

/* ── Resultado da resolução ─────────────────────────────────────────────── */
.resolve-result-icon {
  font-size: 48px;
  margin-bottom: 12px;
  text-align: center;
}

/* ── Estatísticas - bottom sheet ─────────────────────────────────────────── */
.stats-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.stats-backdrop--open {
  opacity: 1;
}

.stats-backdrop--open .stats-sheet {
  transform: translateY(0);
}

.stats-sheet {
  width: 100%;
  max-height: 80vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 12px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
}

.stats-sheet__handle {
  width: 36px;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  margin: 0 auto 4px;
  flex-shrink: 0;
}

.stats-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stats-sheet__header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
}

.stats-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f0f0f0;
  color: #555;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.stats-close:hover {
  background: #e0e0e0;
}

.stats-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stats-row {
  display: grid;
  grid-template-columns: 130px 1fr 56px;
  align-items: center;
  gap: 10px;
}

.stats-row__label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-row__track {
  height: 10px;
  background: #f0f0f0;
  border-radius: 999px;
  overflow: hidden;
}

.stats-row__bar {
  height: 100%;
  background: linear-gradient(90deg, #e3334a, #a90e27);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.stats-row__count {
  font-size: 13px;
  font-weight: 700;
  color: #a90e27;
  text-align: right;
  white-space: nowrap;
}

.stats-row__count span {
  font-weight: 400;
  color: #999;
  font-size: 11px;
  margin-left: 2px;
}

.stats-empty {
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 24px 0;
}