﻿:root {
  --page: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #d8e0ea;
  --ink: #111827;
  --muted: #64748b;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #2563eb;
  --danger: #dc2626;
  --danger-dark: #991b1b;
  --danger-soft: #fff1f2;
  --shadow: 0 18px 48px -34px rgba(15, 23, 42, .55);
}

.admin-permission-dropdown {
  width: 100%;
}

.admin-permission-dropdown > summary {
  cursor: pointer;
  list-style: none;
}

.admin-permission-dropdown > summary::-webkit-details-marker {
  display: none;
}

.admin-permission-grid {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.admin-permission-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.admin-permission-item p {
  margin: 0;
}

* {
  letter-spacing: 0;
}

body {
  background: var(--page);
  color: var(--ink);
}

.app-header.fixed-header {
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 34px -32px rgba(15, 23, 42, .75);
}

.brand-logo,
.menu-toggle,
.drawer-close,
.top-nav a,
.inline-form button,
.btn,
.plain-btn,
.vote-btn,
.reaction-grid button,
input,
textarea,
select,
.side-nav a,
.side-logout button,
.menu-user-card,
.file-tile,
.doc-link span,
.status-badge {
  border-radius: 8px;
}

.loading-card,
.empty-card,
.panel-card,
.auth-card,
.side-card,
.composer,
.post-card,
.profile-card,
.community-box,
.resolution-box,
.notif-item,
.admin-row {
  border-radius: 8px;
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.spa-root {
  max-width: 1160px;
}

.auth-card,
.panel-card,
.side-card,
.composer,
.post-card {
  background: var(--surface);
}

.auth-card p,
.panel-card p,
.side-card p,
.muted,
.post-meta span {
  color: var(--muted);
}

.btn {
  background: var(--primary);
  min-height: 42px;
}

.btn:hover {
  background: var(--primary-dark);
}

.btn.ghost {
  background: #eef2ff;
  color: #3730a3;
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.btn.danger:hover {
  background: var(--danger-dark);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
  outline: 0;
}

.side-drawer {
  background: rgba(255, 255, 255, .98);
}

.side-nav {
  gap: 8px;
}

.side-nav a {
  background: var(--surface-soft);
  color: #243244;
}

.side-nav a:hover,
.side-nav a.active {
  background: #ecfeff;
  border-color: #99f6e4;
  color: #115e59;
}

.side-nav a b[hidden] {
  display: none;
}

.side-nav a b {
  min-width: 22px;
  height: 22px;
  font-size: 11px;
  background: var(--danger);
}

.socket-pill {
  border-radius: 8px;
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.community-alert-button[hidden] {
  display: none !important;
}

.community-alert-button {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff7f7;
  color: var(--danger-dark);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px -22px rgba(153, 27, 27, .8);
}

.community-alert-button:hover {
  background: #fee2e2;
}

.community-alert-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(220, 38, 38, .12);
}

.community-alert-button b {
  position: absolute;
  right: -5px;
  top: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 950;
}

.community-alert-button b[hidden] {
  display: none;
}

.feed-layout {
  gap: 20px;
}

.side-card {
  top: 96px;
}

.composer {
  display: grid;
  gap: 12px;
}

.composer textarea {
  min-height: 116px;
}

.post-card {
  padding: 18px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.post-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 22px 52px -34px rgba(15, 23, 42, .7);
}

.post-meta strong {
  color: var(--ink);
}

.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  vertical-align: middle;
}

.category-chip.community {
  background: #fee2e2;
  border-color: #fecaca;
  color: var(--danger-dark);
}

.post-card-community {
  border-color: #fecaca;
  border-left: 5px solid var(--danger);
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 62%, #fff7f7 100%);
}

.post-card-community:hover {
  border-color: #fca5a5;
}

.post-card-community .post-content {
  color: #7f1d1d;
  font-weight: 620;
}

.post-card-community .community-box {
  background: var(--danger-soft);
  border-color: #fecdd3;
  box-shadow: none;
}

.post-highlight {
  animation: post-focus-pulse 2.4s ease;
}

@keyframes post-focus-pulse {
  0%, 100% {
    box-shadow: var(--shadow);
  }

  18%, 68% {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, .16), 0 24px 58px -32px rgba(15, 23, 42, .75);
  }
}

.recolectas-page {
  display: grid;
  gap: 16px;
}

.recolectas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.recolectas-head h1 {
  margin: 0;
  font-size: 28px;
}

.recolectas-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.recolecta-create,
.recolecta-locked {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px;
}

.recolecta-create input {
  margin: 0;
}

.recolecta-locked strong {
  color: #854d0e;
}

.recolectas-list {
  display: grid;
  gap: 12px;
}

.recolecta-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.recolecta-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
}

.recolecta-summary::-webkit-details-marker {
  display: none;
}

.recolecta-summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 950;
  grid-column: 3;
  grid-row: 1;
}

.recolecta-card[open] .recolecta-summary::after {
  content: "-";
}

.recolecta-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.recolecta-main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recolecta-main small,
.recolecta-total small,
.recolecta-entry small {
  color: var(--muted);
  font-size: 11px;
}

.recolecta-total {
  display: grid;
  gap: 2px;
  min-width: 116px;
  padding-right: 34px;
  text-align: right;
}

.recolecta-total b,
.recolecta-topline strong {
  color: #047857;
  font-size: 18px;
}

.recolecta-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px 16px 16px;
}

.recolecta-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #ecfdf5;
  padding: 10px 12px;
}

.recolecta-topline span {
  color: #166534;
  font-size: 12px;
  font-weight: 900;
}

.recolecta-actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.recolecta-entry-edit {
  min-width: min(100%, 430px);
}

.recolecta-entry-edit summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  list-style: none;
}

.recolecta-entry-edit summary::-webkit-details-marker {
  display: none;
}

.recolecta-entry-edit form {
  display: grid;
  grid-template-columns: 120px minmax(160px, 1fr) 130px auto;
  gap: 8px;
  margin-top: 10px;
}

.recolecta-entry-edit input,
.recolecta-entry-edit select {
  margin: 0;
}

.recolecta-pdf {
  min-height: 32px;
  padding: 7px 12px;
  font-size: 12px;
}

.recolecta-pdf-locked {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 999px;
  padding: 7px 11px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.recolecta-finish {
  min-height: 32px;
  padding: 7px 12px;
  font-size: 12px;
}

.recolecta-entry-form {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 140px auto;
  gap: 8px;
}

.recolecta-entry-form input,
.recolecta-entry-form select {
  margin: 0;
}

.recolecta-entry-list {
  display: grid;
  gap: 7px;
}

.recolecta-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
}

.recolecta-entry:first-child {
  border-top: 0;
  padding-top: 0;
}

.recolecta-entry span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.recolecta-entry strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recolecta-entry b {
  color: #0f766e;
}

.recolecta-entry-side {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.recolecta-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.community-box {
  box-shadow: none;
}

.vote-row {
  align-items: center;
}

.community-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.community-finish,
.community-pdf {
  min-height: 32px;
  padding: 7px 12px;
  font-size: 12px;
}

.vote-btn.active {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.vote-btn.danger.active {
  background: #fee2e2;
  border-color: #fca5a5;
  color: var(--danger-dark);
}

.reaction-pill {
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 900;
}

.comments {
  border-top-color: var(--line);
}

.post-card .comments .comments-scroll {
  display: block;
  max-height: clamp(160px, 28vh, 220px);
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
}

.post-card .comments .comments-scroll:empty {
  display: none;
}

.comment {
  align-items: flex-start;
}

.comment.nested {
  margin-left: 22px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}

.comment-body {
  min-width: 0;
  width: 100%;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.comment-actions .plain-btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.comment-actions .plain-btn.danger.active {
  background: #fee2e2;
  border-color: #fca5a5;
  color: var(--danger-dark);
}

.comment-reply {
  margin-top: 6px;
}

.comment-reply summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.comment-thread {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.comment-files {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  margin: 8px 0 0;
}

.comment-files .file-tile img,
.comment-files .file-tile video {
  height: 92px;
}

.comment-form {
  align-items: center;
}

.comment-form input[type="file"] {
  max-width: 180px;
  padding: 8px;
  font-size: 12px;
}

.comment-form button {
  border: 0;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  padding: 0 14px;
}

.notification-tray[hidden] {
  display: none !important;
}

.notification-tray {
  position: fixed;
  top: 86px;
  right: 12px;
  z-index: 1300;
  width: min(280px, calc(100vw - 24px));
  pointer-events: none;
}

.notification-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 58px -32px rgba(15, 23, 42, .65);
  pointer-events: auto;
}

.notification-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.notification-title strong {
  color: #334155;
  font-size: 11px;
  font-weight: 950;
}

.notification-title button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.notification-list {
  display: grid;
  gap: 7px;
  max-height: min(238px, calc(100vh - 126px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 7px;
  scrollbar-width: thin;
}

.notification-group[hidden] {
  display: none !important;
}

.notification-group {
  display: grid;
  gap: 5px;
}

.notification-group h3 {
  margin: 0;
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.notification-group-community h3 {
  color: var(--danger-dark);
}

.notification-group-list {
  display: grid;
  gap: 6px;
}

.notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  align-items: flex-start;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #64748b;
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 6px 6px 6px 7px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease;
}

.notification-item.show {
  opacity: 1;
  transform: translateY(0);
}

.notification-item p {
  margin: 0;
  color: #172033;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.28;
}

.notification-item span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 9.5px;
}

.notification-item button {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.notification-item.success {
  border-left-color: #16a34a;
}

.notification-item.error {
  border-left-color: var(--danger);
  background: #fff7f7;
}

.notification-item.info {
  border-left-color: var(--accent);
}

.notification-item.clickable {
  cursor: pointer;
}

.notification-item.clickable:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.notification-item.community,
.notification-item.priority {
  border-color: #fecaca;
  border-left-color: var(--danger);
  background: #fff7f7;
}

.notification-item.priority p {
  color: var(--danger-dark);
  font-weight: 900;
}

@media (max-width: 820px) {
  .header-actions {
    gap: 6px;
  }

  .community-alert-button {
    width: 34px;
    height: 34px;
  }

  .recolectas-head,
  .recolecta-locked {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .recolectas-head {
    display: grid;
  }

  .recolecta-create,
  .recolecta-entry-edit form,
  .recolecta-entry-form {
    grid-template-columns: 1fr;
  }

  .recolecta-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .recolecta-summary::after {
    grid-column: 1;
    justify-self: end;
  }

  .recolecta-total {
    min-width: 0;
    padding-right: 34px;
    text-align: left;
  }

  .notification-tray {
    top: 74px;
    right: 8px;
    left: auto;
    width: min(260px, calc(100vw - 16px));
  }

  .notification-list {
    max-height: 216px;
  }

  .comment-form {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .comment-form button {
    min-height: 40px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Minimal stability fixes */
#spa-nav.drawer-nav-wrap {
  display: block !important;
  align-items: initial !important;
  justify-content: initial !important;
  gap: 0 !important;
  width: 100% !important;
}

#spa-nav.drawer-nav-wrap .side-nav {
  width: 100% !important;
}

.global-loading-overlay[hidden] {
  display: none !important;
}

.global-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  background: rgba(12, 18, 33, .42);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .18s ease;
}

.global-loading-overlay.show {
  opacity: 1;
}

.global-loading-box {
  min-width: 210px;
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px solid #c5d2ea;
  border-radius: 12px;
  background: #f9fbff;
  box-shadow: 0 24px 46px -30px rgba(8, 15, 33, .7);
  padding: 16px 18px;
}

.global-loading-spinner {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 3px solid #d4def0;
  border-top-color: #1d4ed8;
  animation: global-spin .8s linear infinite;
}

.global-loading-text {
  color: #122746;
  font-size: 14px;
  font-weight: 900;
}

@keyframes global-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Ajuste global de tamaños de títulos */
.auth-card h1,
.panel-card h1,
.profile-main h1,
.recolectas-head h1,
.spa-root h1 {
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.spa-root h2 {
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.18;
}

.spa-root h3 {
  font-size: clamp(15px, 2.4vw, 19px);
  line-height: 1.22;
}

.post-content {
  font-size: clamp(14px, 2.6vw, 16px);
  line-height: 1.55;
}

@media (max-width: 520px) {
  .auth-card h1,
  .panel-card h1,
  .profile-main h1,
  .recolectas-head h1,
  .spa-root h1 {
    font-size: 21px;
  }

  .spa-root h2 {
    font-size: 18px;
  }

  .spa-root h3 {
    font-size: 15px;
  }
}


/* Mototaxis: badges compactos en una sola fila */
.mototaxi-status-row,
.mototaxi-badges,
.mototaxi-permissions,
.mototaxis-status,
.mototaxis-badges,
.mototaxis-permissions,
.mototaxi-page .status-row,
.mototaxi-page .badge-row,
.mototaxi-page .permission-row,
.panel-card:has(.mototaxi-map-shell) .status-row,
.panel-card:has(.mototaxi-map-shell) .badge-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  overflow-x: auto !important;
  margin: 8px 0 10px !important;
}

.mototaxi-status-row > *,
.mototaxi-badges > *,
.mototaxi-permissions > *,
.mototaxis-status > *,
.mototaxis-badges > *,
.mototaxis-permissions > *,
.mototaxi-page .status-badge,
.panel-card:has(.mototaxi-map-shell) .status-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  font-size: 10.5px !important;
  line-height: 1 !important;
  padding: 5px 7px !important;
  min-height: 24px !important;
  border-radius: 999px !important;
}

/* Ocultar texto informativo de mototaxis si sigue renderizado por otra clase */
.mototaxi-help,
.mototaxis-help,
.moto-help,
.moto-info,
.mototaxi-info,
.mototaxis-info {
  display: none !important;
}

/* Mototaxis: hacer MUY pequeños los estados CURP / solicitud / admin motos */
#spa-root .panel-card:has(.mototaxi-map-shell) .status-badge,
.spa-root .panel-card:has(.mototaxi-map-shell) .status-badge,
.panel-card:has(.mototaxi-map-shell) .status-badge,
.mototaxi-map-shell ~ .status-badge,
.mototaxi-map-shell .status-badge {
  font-size: 8.5px !important;
  line-height: 1 !important;
  padding: 2px 5px !important;
  min-height: 16px !important;
  height: 16px !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

/* Forzar fila compacta en el panel de mototaxis */
#spa-root .panel-card:has(.mototaxi-map-shell),
.spa-root .panel-card:has(.mototaxi-map-shell),
.panel-card:has(.mototaxi-map-shell) {
  overflow-x: hidden !important;
}

#spa-root .panel-card:has(.mototaxi-map-shell) .section-head,
.spa-root .panel-card:has(.mototaxi-map-shell) .section-head,
.panel-card:has(.mototaxi-map-shell) .section-head {
  gap: 6px !important;
}

/* Cualquier fila de badges dentro de mototaxis */
#spa-root .panel-card:has(.mototaxi-map-shell) .status-row,
#spa-root .panel-card:has(.mototaxi-map-shell) .badge-row,
#spa-root .panel-card:has(.mototaxi-map-shell) .mototaxi-badges,
#spa-root .panel-card:has(.mototaxi-map-shell) .mototaxis-badges,
.panel-card:has(.mototaxi-map-shell) .status-row,
.panel-card:has(.mototaxi-map-shell) .badge-row,
.panel-card:has(.mototaxi-map-shell) .mototaxi-badges,
.panel-card:has(.mototaxi-map-shell) .mototaxis-badges {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 4px !important;
  overflow-x: auto !important;
}

/* Móvil: todavía más pequeño */
@media (max-width: 520px) {
  #spa-root .panel-card:has(.mototaxi-map-shell) .status-badge,
  .spa-root .panel-card:has(.mototaxi-map-shell) .status-badge,
  .panel-card:has(.mototaxi-map-shell) .status-badge {
    font-size: 7.5px !important;
    padding: 2px 4px !important;
    min-height: 14px !important;
    height: 14px !important;
  }
}

/* Mototaxis: chips CURP / solicitud / admin motos realmente pequeños */
.moto-mini-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  overflow-x: auto !important;
  margin: 4px 0 6px !important;
  padding: 0 !important;
}

.moto-mini-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  max-width: max-content !important;
  min-width: 0 !important;
  height: 15px !important;
  min-height: 15px !important;
  padding: 1px 5px !important;
  border-radius: 999px !important;
  font-size: 7.5px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  background: #eef2ff !important;
  color: #3730a3 !important;
  border: 1px solid #c7d2fe !important;
  box-shadow: none !important;
}

@media (max-width: 520px) {
  .moto-mini-row {
    gap: 3px !important;
  }

  .moto-mini-chip {
    font-size: 6.8px !important;
    height: 13px !important;
    min-height: 13px !important;
    padding: 1px 4px !important;
  }
}

/* Mototaxis: layout compacto y mapa cuadrado */
.panel-card:has(.mototaxi-map-shell) {
  padding: 14px !important;
}

.panel-card:has(.mototaxi-map-shell) h1 {
  margin: 0 0 6px !important;
  font-size: clamp(18px, 4vw, 24px) !important;
  line-height: 1.05 !important;
}

.panel-card:has(.mototaxi-map-shell) p {
  margin: 4px 0 !important;
}

.panel-card:has(.mototaxi-map-shell) .moto-mini-row {
  margin: 2px 0 4px !important;
  padding: 0 !important;
  gap: 3px !important;
}

.panel-card:has(.mototaxi-map-shell) .moto-mini-chip {
  height: 13px !important;
  min-height: 13px !important;
  padding: 1px 4px !important;
  font-size: 6.8px !important;
  line-height: 1 !important;
}

.moto-admin-action {
  margin: 2px 0 8px !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: flex-start !important;
}

.moto-admin-action .btn {
  padding: 6px 10px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  min-height: 26px !important;
  border-radius: 999px !important;
}

/* Eliminar separación visual antes del mapa */
.panel-card:has(.mototaxi-map-shell) > * + .mototaxi-map-shell {
  margin-top: 6px !important;
}

/* Mapa cuadrado, no rectangular */
.mototaxi-map-shell {
  width: min(100%, 720px) !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  margin: 6px auto 0 !important;
  padding: 0 !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  background: #e5e7eb !important;
  border: 1px solid #dbe3ee !important;
}

.mototaxi-map-shell iframe {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1 !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (max-width: 520px) {
  .panel-card:has(.mototaxi-map-shell) {
    padding: 10px !important;
  }

  .moto-admin-action {
    margin: 1px 0 5px !important;
  }

  .moto-admin-action .btn {
    padding: 5px 8px !important;
    font-size: 10px !important;
    min-height: 23px !important;
  }

  .mototaxi-map-shell {
    width: 100% !important;
    margin-top: 4px !important;
    border-radius: 16px !important;
  }
}
