:root {
  --bg: #eef1eb;
  --bg-strong: #e2e7dd;
  --surface: #ffffff;
  --surface-2: #f7f9f5;
  --ink: #142014;
  --muted: #62705f;
  --line: rgba(20, 32, 20, 0.1);
  --brand: #c8f000;
  --brand-deep: #94b300;
  --dark: #11170f;
  --danger: #c6483b;
  --warning: #e7a818;
  --ok: #2f8f4e;
  --shadow: 0 18px 48px rgba(17, 23, 15, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Sora", sans-serif;
  --font-body: "DM Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(200, 240, 0, 0.18), transparent 32%),
    linear-gradient(180deg, #f6f8f2 0%, var(--bg) 100%);
}

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

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

[hidden] {
  display: none !important;
}

.screen {
  min-height: 100vh;
}

.boot-splash {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1000;
  background: rgba(238, 241, 235, 0.96);
  backdrop-filter: blur(8px);
}

.boot-card,
.auth-card,
.surface-card,
.hero-card,
.stat-card {
  box-shadow: var(--shadow);
}

.boot-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  width: min(90vw, 420px);
}

.boot-card p {
  margin: 16px 0 0;
  color: var(--muted);
}

.auth-screen {
  display: grid;
  align-items: center;
  padding: 32px;
}

.auth-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.auth-copy {
  padding: 24px 20px;
}

.eyebrow {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(200, 240, 0, 0.22);
  color: #394918;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-copy h1,
.hero-card h1 {
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.auth-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 5vw, 70px);
}

.auth-copy p,
.section-copy,
.profile-caption {
  color: var(--muted);
  line-height: 1.55;
}

.auth-points,
.status-list {
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.auth-points li,
.status-list li {
  padding-left: 20px;
  position: relative;
}

.auth-points li::before,
.status-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-deep);
}

.secondary-link {
  display: inline-flex;
  margin-top: 24px;
  font-weight: 700;
  color: #33452a;
}

.auth-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 32, 20, 0.08);
  border-radius: 28px;
  padding: 24px;
}

.auth-header,
.surface-head,
.workspace-topbar,
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-lockup.compact {
  gap: 10px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.brand-title span {
  color: var(--brand-deep);
}

.brand-subtitle,
.workspace-kicker {
  color: var(--muted);
  font-size: 13px;
}

.security-pill,
.mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  background: var(--dark);
  color: #efffd5;
}

.mini-pill.neutral {
  background: rgba(20, 32, 20, 0.08);
  color: #41543b;
}

.mini-pill.warn {
  background: rgba(231, 168, 24, 0.14);
  color: #8a5f00;
}

.tab-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 24px 0 16px;
  padding: 6px;
  background: var(--surface-2);
  border-radius: 16px;
}

.tab {
  border: 0;
  border-radius: 12px;
  padding: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.tab.active {
  background: var(--dark);
  color: #efffd5;
}

.auth-form,
.profile-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 12px;
  font-weight: 700;
  color: #4a5a46;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(20, 32, 20, 0.14);
  border-radius: 14px;
  padding: 14px 15px;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(148, 179, 0, 0.24);
  border-color: rgba(148, 179, 0, 0.55);
}

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

.google-btn,
.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  min-height: 50px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.google-btn:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.google-btn {
  border: 1px solid rgba(20, 32, 20, 0.12);
  background: #fff;
  color: var(--ink);
}

.primary-btn {
  border: 0;
  background: linear-gradient(135deg, var(--brand) 0%, #d7ff39 100%);
  color: #172011;
}

.ghost-btn {
  border: 1px solid rgba(20, 32, 20, 0.12);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
}

.ghost-btn.danger {
  color: var(--danger);
}

.divider {
  position: relative;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0;
}

.divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid rgba(20, 32, 20, 0.12);
}

.divider span {
  position: relative;
  background: var(--surface);
  padding: 0 12px;
}

.notice {
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.notice.info {
  background: rgba(200, 240, 0, 0.16);
  color: #41541d;
  border-color: rgba(148, 179, 0, 0.25);
}

.notice.error {
  background: rgba(198, 72, 59, 0.1);
  color: #8f3227;
  border-color: rgba(198, 72, 59, 0.2);
}

.app-screen {
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  min-height: 100vh;
  padding: 22px 18px;
  background: linear-gradient(180deg, #12190f 0%, #182115 100%);
  color: #edf1e8;
  position: sticky;
  top: 0;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  margin: 30px 0;
}

.nav-link {
  padding: 13px 14px;
  border-radius: 14px;
  color: rgba(237, 241, 232, 0.74);
  font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(200, 240, 0, 0.13);
  color: #efffd5;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-user p {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(237, 241, 232, 0.68);
}

.workspace {
  padding: 28px;
}

.workspace-topbar {
  margin-bottom: 18px;
}

.workspace-topbar h2 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: -0.04em;
}

.workspace-actions {
  display: flex;
  gap: 10px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.hero-card {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(200, 240, 0, 0.28), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f7faf0 100%);
  border: 1px solid rgba(20, 32, 20, 0.08);
}

.hero-card h1 {
  margin: 12px 0 10px;
  font-size: clamp(34px, 4vw, 52px);
}

.hero-badge {
  min-width: 220px;
  padding: 18px;
  border-radius: 20px;
  background: var(--dark);
  color: #f4ffe1;
}

.hero-badge-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(244, 255, 225, 0.7);
}

.hero-badge strong {
  display: block;
  margin-top: 10px;
  font-size: 22px;
}

.stats-grid,
.grid-two {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

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

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

.report-toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.report-stat-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(20, 32, 20, 0.08);
}

.report-stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.report-stat-card strong {
  display: block;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.04em;
}

.payment-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.payment-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(20, 32, 20, 0.06);
  border: 1px solid rgba(20, 32, 20, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.payment-pill small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.stat-card,
.surface-card {
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid rgba(20, 32, 20, 0.08);
}

.stat-card {
  padding: 20px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: -0.05em;
}

.stat-card.highlight {
  background: linear-gradient(135deg, #182115 0%, #283020 100%);
  color: #f2ffd1;
}

.stat-card.highlight span {
  color: rgba(242, 255, 209, 0.74);
}

.surface-card {
  padding: 22px;
}

.surface-head {
  margin-bottom: 18px;
}

.surface-head h3 {
  margin: 0;
  font-size: 20px;
}

.surface-head.compact {
  margin-bottom: 12px;
}

.surface-head.compact h4 {
  margin: 0;
  font-size: 16px;
}

.detail-list {
  display: grid;
  gap: 16px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(20, 32, 20, 0.06);
  padding-bottom: 12px;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

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

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

.data-table th,
.data-table td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(20, 32, 20, 0.08);
  text-align: left;
  font-size: 14px;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.empty-row {
  text-align: center;
  color: var(--muted);
}

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

.service-editor,
.gallery-editor {
  display: grid;
  gap: 14px;
}

.service-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid rgba(20, 32, 20, 0.08);
}

.service-item strong {
  display: block;
}

.service-item span {
  color: var(--muted);
  font-size: 13px;
}

.service-row,
.gallery-row {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(20, 32, 20, 0.08);
  background: var(--surface-2);
}

.service-row-grid,
.gallery-row-grid,
.inline-actions,
.checkbox-grid {
  display: grid;
  gap: 12px;
}

.service-row-grid {
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 0.8fr)) auto;
}

.gallery-row-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
}

.inline-actions {
  grid-template-columns: repeat(auto-fit, minmax(220px, max-content));
  margin: 12px 0 18px;
}

.checkbox-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.check-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(20, 32, 20, 0.08);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.check-card input {
  width: 18px;
  height: 18px;
}

.surface-subsection {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(20, 32, 20, 0.08);
}

.coords-grid {
  margin-top: -2px;
}

.mini-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.remove-row-btn {
  border: 0;
  border-radius: 12px;
  width: 44px;
  min-width: 44px;
  height: 48px;
  background: rgba(198, 72, 59, 0.1);
  color: var(--danger);
  font-weight: 800;
  cursor: pointer;
}

.empty-helper {
  padding: 16px;
  border-radius: 16px;
  background: rgba(20, 32, 20, 0.04);
  color: var(--muted);
}

.gallery-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.gallery-preview img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(20, 32, 20, 0.08);
  background: #fff;
  cursor: zoom-in;
}

.gallery-preview-empty {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px dashed rgba(20, 32, 20, 0.2);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}

.gallery-file-wrap {
  display: grid;
  gap: 8px;
}

.gallery-file-wrap input[type="file"] {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(20, 32, 20, 0.08);
  background: #fff;
  padding: 10px 12px;
}

.summary-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.summary-gallery-item {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(20, 32, 20, 0.08);
  background: #fff;
  cursor: pointer;
}

.summary-gallery-item img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: rgba(20, 32, 20, 0.04);
}

.summary-gallery-item:hover img,
.gallery-preview img:hover {
  filter: brightness(0.98);
}

.summary-gallery-copy {
  padding: 12px 14px 14px;
}

.summary-gallery-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.summary-gallery-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 16, 9, 0.48);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: min(920px, 100%);
  padding: 22px;
  border-radius: 28px;
  background: #fefefe;
  box-shadow: 0 30px 80px rgba(16, 24, 12, 0.22);
  border: 1px solid rgba(20, 32, 20, 0.08);
}

.map-canvas {
  width: 100%;
  height: 420px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(20, 32, 20, 0.08);
  background: rgba(20, 32, 20, 0.06);
}

.photo-modal-card {
  width: min(980px, 100%);
}

.photo-modal-frame {
  display: grid;
  place-items: center;
  min-height: 320px;
  max-height: 72vh;
  overflow: auto;
  border-radius: 22px;
  background: rgba(20, 32, 20, 0.05);
  border: 1px solid rgba(20, 32, 20, 0.08);
  padding: 12px;
}

.photo-modal-frame img {
  max-width: 100%;
  max-height: calc(72vh - 24px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
}

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

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.profile-name {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, #d6ff3b 100%);
  color: #1b2514;
  font-family: var(--font-display);
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar.large {
  width: 68px;
  height: 68px;
  font-size: 24px;
}

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

.status-tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-tag.pending {
  background: rgba(231, 168, 24, 0.14);
  color: #8a5f00;
}

.status-tag.done {
  background: rgba(47, 143, 78, 0.14);
  color: #266f3c;
}

.status-tag.cancel {
  background: rgba(198, 72, 59, 0.12);
  color: #983b31;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

.request-filter-bar {
  align-items: end;
}

.booking-list,
.address-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.booking-card,
.address-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: var(--surface-2);
}

.booking-card h4,
.address-card h4 {
  margin: 0;
  font-size: 18px;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.request-meta {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

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

.two-column,
.address-form-grid {
  display: grid;
  gap: 16px;
}

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

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

.address-span-2 {
  grid-column: 1 / -1;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.inline-primary {
  width: auto;
}

.danger-text {
  color: var(--danger);
}

.feedback-modal-card {
  max-width: 440px;
  text-align: left;
}

.feedback-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(180deg, #d9ff57 0%, #c8f000 100%);
  color: #20310f;
  font-size: 28px;
  font-weight: 800;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.feedback-icon.error {
  background: linear-gradient(180deg, #f7d1cb 0%, #f1b3a8 100%);
  color: #8d2b1f;
}

.feedback-icon.warn {
  background: linear-gradient(180deg, #ffe9b5 0%, #ffd36d 100%);
  color: #805300;
}

.feedback-copy h3 {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.04em;
}

.feedback-actions {
  margin-top: 22px;
  justify-content: flex-start;
}

@media (max-width: 1080px) {
  .auth-shell,
  .app-screen,
  .stats-grid,
  .grid-two,
  .report-summary-grid,
  .report-toolbar {
    grid-template-columns: 1fr;
  }

  /* ── MENÚ TIPO LISTA GRANDE en móvil ─────────────────────────────── */
  .sidebar { display: none !important; }
  .app-screen:not([hidden]) { grid-template-columns: 1fr !important; display: grid !important; }
  .auth-screen { display: flex; }
  /* mobile-header: visible cuando JS agrega .mh-visible */
  .mobile-header.mh-visible { display: flex !important; }
  .workspace { padding: 16px 14px 32px; }

  .hero-card {
    flex-direction: column;
    align-items: start;
  }

  .service-row-grid,
  .gallery-row-grid,
  .two-column,
  .address-form-grid {
    grid-template-columns: 1fr;
  }

  .address-span-2 {
    grid-column: auto;
  }

  .modal-card {
    padding: 18px;
  }

  .map-canvas {
    height: 360px;
  }
}

@media (max-width: 720px) {
  .auth-screen,
  .workspace {
    padding: 18px;
  }

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

  .split-fields {
    grid-template-columns: 1fr;
    display: grid;
  }

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

  .workspace-actions .ghost-btn {
    width: auto !important;
    font-size: 12px;
    padding: 0 12px;
    min-height: 34px;
    white-space: nowrap;
  }

  .workspace-topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .modal-shell {
    padding: 14px;
  }

  .map-canvas {
    height: 300px;
  }
}

/* ============================================================
   CLIENTE — MOBILE RESPONSIVE (≤600px, ≤480px, ≤360px)
   ============================================================ */
html, body { overflow-x: hidden; max-width: 100vw; }
*, *::before, *::after { box-sizing: border-box; }

@media (max-width: 600px) {
  .app-screen {
    grid-template-columns: 1fr;
  }

  /* Sidebar → horizontal sticky nav */
  .sidebar {
    min-height: auto;
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar-head {
    flex-shrink: 0;
    margin: 0;
    justify-content: flex-start;
    gap: 6px;
  }
  .sidebar-head .brand-subtitle,
  .sidebar-head .security-pill { display: none; }
  .sidebar-head .brand-logo { width: 26px; height: 26px; }
  .sidebar-head .brand-title { font-size: 14px; }

  .sidebar-nav {
    display: flex;
    flex-direction: row;
    gap: 4px;
    margin: 0;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 7px 12px; font-size: 12px; white-space: nowrap; border-radius: 20px; }

  /* Avatar only for user slot */
  .sidebar-user {
    flex-shrink: 0;
    padding: 6px;
    border-radius: 50%;
    gap: 0;
    background: rgba(255,255,255,.1);
  }
  .sidebar-user p,
  .sidebar-user strong { display: none; }

  /* Main area */
  .workspace { padding: 14px; }

  /* Hero card */
  .hero-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
  }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }

  /* Surface cards */
  .surface-card { padding: 14px; border-radius: 16px; }
  .surface-head { flex-wrap: wrap; gap: 8px; }

  /* Booking cards */
  .booking-card { padding: 14px; border-radius: 14px; }
  .chat-book-wrap { flex-direction: column; gap: 6px; }
  .chat-book-btn,
  .rate-book-btn,
  .ghost-btn { width: 100%; justify-content: center; text-align: center; }
  /* Exception: topbar action buttons must NOT stretch full width */
  .workspace-actions .ghost-btn {
    width: auto !important;
    flex-shrink: 0;
  }

  /* CRUD toolbar */
  .crud-toolbar { flex-direction: column; align-items: stretch; }
  .crud-search-wrap { width: 100%; }
  .crud-filter-select { width: 100%; }

  /* Modal: slide up from bottom */
  .modal-shell { padding: 0; align-items: flex-end; }
  .modal-card  {
    width: 100%;
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Address form */
  .two-column,
  .address-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .workspace { padding: 10px; }
  .hero-card  { padding: 12px; }
  .surface-card { padding: 12px; border-radius: 14px; }
  .workspace-topbar h2 { font-size: 20px; }
  .request-meta { font-size: 12px; gap: 5px 10px; }
}

@media (max-width: 360px) {
  .workspace    { padding: 8px; }
  .surface-card { padding: 10px; border-radius: 12px; }
  .nav-link     { padding: 6px 10px; font-size: 11px; }
  .booking-card { padding: 10px; }
  .modal-card   { padding: 12px 10px; }
}

/* ══════════════════════════════════════════════════════════════════
   MENÚ MÓVIL — Lista grande (Opción C)
   ══════════════════════════════════════════════════════════════════ */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #12190f;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
}
.mh-logo { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 800; color: white; letter-spacing: -.02em; white-space: nowrap; }
.mh-logo span { color: #c8f000; }
.mh-right { display: flex; align-items: center; gap: 10px; }
.mh-av { width: 34px; height: 34px; border-radius: 50%; background: #c8f000; color: #12190f; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; overflow: hidden; cursor: pointer; flex-shrink: 0; }
.mh-av img { width: 100%; height: 100%; object-fit: cover; }
.mh-menu-btn { width: 38px; height: 38px; background: rgba(200,240,0,.12); border: 1px solid rgba(200,240,0,.25); border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 20px; color: #c8f000; }
.mh-notif { position: relative; }
.mh-notif-dot { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; border: 1.5px solid #12190f; display: none; }
.mnav-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 200; }
.mnav-backdrop.open { display: block; }
.mnav-panel { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface, #fff); border-radius: 24px 24px 0 0; z-index: 201; transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1); max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; }
.mnav-panel.open { transform: translateY(0); }
.mnav-handle { width: 40px; height: 4px; background: var(--line, rgba(0,0,0,.12)); border-radius: 99px; margin: 12px auto 4px; }
.mnav-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px 14px; border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
.mnav-head .mh-av { width: 42px; height: 42px; font-size: 17px; }
.mnav-head-info { flex: 1; min-width: 0; }
.mnav-head-name { font-size: 16px; font-weight: 700; color: var(--ink, #12190f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mnav-head-email { font-size: 12px; color: var(--muted, #6b7a68); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mnav-close { width: 32px; height: 32px; background: var(--surface-2, #f7f9f5); border: 1px solid var(--line, rgba(0,0,0,.08)); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; color: var(--muted, #6b7a68); flex-shrink: 0; }
.mnav-section-title { font-size: 11px; font-weight: 700; color: var(--muted, #6b7a68); text-transform: uppercase; letter-spacing: .06em; padding: 14px 18px 6px; }
.mnav-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--surface, #fff); border-bottom: 1px solid var(--line, rgba(0,0,0,.06)); cursor: pointer; transition: background .1s; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.mnav-item:last-of-type { border-bottom: none; }
.mnav-item:active { background: var(--surface-2, #f7f9f5); }
.mnav-item.active { background: #f0f9e8; }
.mnav-icon { width: 48px; height: 48px; border-radius: 14px; background: #e8f5e0; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; transition: background .1s, transform .1s; }
.mnav-item.active .mnav-icon { background: #c8f000; transform: scale(1.05); }
.mnav-item-text { flex: 1; min-width: 0; }
.mnav-item-name { font-size: 16px; font-weight: 600; color: var(--ink, #12190f); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mnav-item.active .mnav-item-name { color: #1a5a1a; }
.mnav-item-desc { font-size: 12px; color: var(--muted, #6b7a68); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mnav-badge { background: #ef4444; color: white; font-size: 11px; font-weight: 700; min-width: 22px; height: 22px; border-radius: 99px; display: flex; align-items: center; justify-content: center; padding: 0 6px; flex-shrink: 0; }
.mnav-arrow { font-size: 20px; color: var(--muted, #6b7a68); flex-shrink: 0; }
.mnav-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line, rgba(0,0,0,.08)); padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.mnav-action-btn { padding: 13px 10px; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 7px; border: none; transition: opacity .12s; }
.mnav-action-btn:active { opacity: .8; }
.mnav-btn-public { background: #e8f5e0; color: #1a5a1a; }
.mnav-btn-logout { background: #fff5f5; color: #dc2626; border: 1px solid #fecaca !important; }