/* ==========================================================================
   Studio Green — Sistema de gestión
   Estilos base compartidos (layout, sidebar, componentes, utilidades)
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Marca — verdes de hoja y pasto */
  --brand-green:      #3D6B1F;
  --brand-green-dark: #1F3A0A;
  --brand-leaf:       #8BC34A;
  --brand-leaf-dark:  #5E922C;
  --primary: var(--brand-green);

  /* Superficies claras (área de contenido) */
  --bg:            #F3F6EE;
  --surface:       #FFFFFF;
  --surface-alt:   #F8FAF4;
  --border:        #E0E6D6;
  --border-input:  #D0D8C8;

  /* Superficies oscuras (sidebar, hero, pantallas de acceso) */
  --ink-900: #12190C;
  --ink-800: #182210;
  --ink-700: #1F2C14;
  --ink-600: #2A3A1C;

  /* Texto */
  --text:          #1A2412;
  --text-muted:    #66705C;
  --text-on-dark:  #EEF4E4;
  --text-on-dark-muted: #A8B894;

  /* Estados */
  --success: #5A9A32;
  --warning: #E4A11B;
  --danger:  #DC4B4B;
  --info:    var(--brand-green);

  /* Formas */
  --radius:     14px;
  --radius-sm:  9px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(11, 20, 16, 0.06);
  --shadow:    0 4px 16px rgba(11, 20, 16, 0.08);
  --shadow-lg: 0 18px 48px rgba(11, 20, 16, 0.18);

  /* Layout */
  --sidebar-w:           264px;
  --sidebar-w-collapsed: 76px;
  --sidebar-motion:      280ms cubic-bezier(0.22, 1, 0.36, 1);
  --topbar-h:            60px;
  --transition:          0.18s ease;
}

/* ==========================================================================
   Agenda v2
   ========================================================================== */
.agenda-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}.agenda-actions,.agenda-tabs{display:flex;gap:9px;flex-wrap:wrap}.agenda-tabs{margin-bottom:20px;border-bottom:1px solid var(--border);padding-bottom:9px}.agenda-tabs a{padding:8px 12px;border-radius:9px;color:var(--text-muted);font-weight:650}.agenda-tabs a.active{background:var(--green-50,#eef8f0);color:var(--primary)}.agenda-alert-strip{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}.agenda-alert-strip span{background:#fff5dd;border:1px solid #ecd59b;border-radius:999px;padding:8px 12px;color:#76510c}.agenda-month-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.agenda-month-card{display:block;background:white;border:1px solid var(--border);border-radius:16px;padding:18px;color:inherit;transition:.15s ease}.agenda-month-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(24,58,43,.08)}.agenda-month-card.is-projected{opacity:.7;border-style:dashed}.agenda-month-title{display:flex;justify-content:space-between;gap:10px}.agenda-month-title span{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted)}.agenda-month-metrics{display:grid;grid-template-columns:auto 1fr auto 1fr;gap:8px 10px;margin-top:20px;align-items:baseline}.agenda-month-metrics b{font-size:1.35rem}.agenda-month-metrics small{color:var(--text-muted)}.agenda-list{display:flex;flex-direction:column;gap:9px}.agenda-row{display:grid;grid-template-columns:minmax(90px,.6fr) minmax(220px,2fr) auto;align-items:center;gap:16px;background:#fff;border:1px solid var(--border);border-radius:12px;padding:14px 16px;color:inherit}.agenda-row time{font-weight:750;color:var(--primary)}.agenda-row div{display:flex;flex-direction:column;gap:3px}.agenda-row small{color:var(--text-muted)}.agenda-row.is-pending{opacity:.55;border-style:dashed}.agenda-status{font-size:.82rem;font-weight:650}.agenda-form{max-width:760px}.agenda-form .form-group{margin-bottom:16px}.agenda-form .form-group>label{display:block;font-weight:650;margin-bottom:7px}.agenda-checks{display:flex;flex-wrap:wrap;gap:9px;list-style:none;padding:0}.agenda-checks label{display:flex;align-items:center;gap:5px;background:#f7faf8;border:1px solid var(--border);padding:8px 10px;border-radius:9px}.review-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.review-item,.holiday-row{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid var(--border);color:inherit}.review-item span{color:var(--text-muted);font-size:.86rem}.audit-row{padding:12px 0;border-bottom:1px solid var(--border)}.audit-row>span{float:right;color:var(--text-muted);font-size:.8rem}.audit-row p{margin:6px 0 0;color:var(--text-muted)}
@media(max-width:900px){.agenda-page-head{flex-direction:column}.agenda-month-grid,.review-grid{grid-template-columns:1fr}.agenda-row{grid-template-columns:90px 1fr}.agenda-row>span:last-child{grid-column:2}.agenda-actions{width:100%}}

html { -webkit-text-size-adjust: 100%; }


body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ==========================================================================
   Layout
   ========================================================================== */

.layout {
  display: flex;
  min-height: 100vh;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-w);
  transition: margin-left var(--sidebar-motion);
}

body.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }

.page-content {
  flex: 1;
  padding: 28px 32px 48px;
  max-width: none;
  width: 100%;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Contador del listado, junto al título */
.count-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  background: rgba(61, 107, 31, 0.09);
  color: var(--brand-green);
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.page-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.page-subtitle strong { color: var(--text); font-weight: 650; }

.compact-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 22px 24px;
  margin-bottom: 16px;
  border-radius: 16px;
  background-image:
    linear-gradient(105deg, rgba(16, 28, 10, 0.78) 0%, rgba(16, 28, 10, 0.52) 48%, rgba(16, 28, 10, 0.28) 100%),
    url('../img/clientes-hero-grass.jpg');
  background-size: cover;
  background-position: right center;
}

.compact-banner-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.compact-banner-actions .btn-ghost:hover { background: rgba(255, 255, 255, 0.2); }

.compact-banner-main {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.compact-banner-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcecc8;
  color: #3D6B1F;
}

.compact-banner-icon svg { width: 22px; height: 22px; }

.compact-banner-kicker {
  margin: 0 0 3px;
  color: #b8d48a;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.compact-banner-title {
  margin: 0;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.compact-banner-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  margin-left: 10px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 650;
  vertical-align: middle;
}

.compact-banner-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .compact-banner-actions { width: 100%; }
  .compact-banner-actions .btn { flex: 1; }
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background-color: #000;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.72)),
    url('../img/sidebar-leaf-2.jpg');
  background-size: cover;
  background-position: center;
  color: var(--text-on-dark);
  display: flex;
  flex-direction: column;
  z-index: 60;
  overflow: visible;
  transition: width var(--sidebar-motion), transform var(--sidebar-motion);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  height: 156px;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-brand-link {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 120px;
}

.sidebar-logo {
  position: absolute;
  width: 168px;
  max-width: none;
  height: 120px;
  display: block;
  object-fit: contain;
  margin: 0 auto;
  transition: opacity 140ms ease;
}

.sidebar-logo-mini {
  position: absolute;
  width: 36px;
  height: 36px;
  display: block;
  opacity: 0;
  transition: opacity 140ms ease;
  margin: 0 auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

body.sidebar-collapsed .sidebar-logo { opacity: 0; }
body.sidebar-collapsed .sidebar-logo-mini { opacity: 1; }

.sidebar-toggle {
  position: absolute;
  top: 78px;
  right: 0;
  z-index: 2;
  width: 20px;
  height: 48px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(220, 226, 222, 0.55);
  border-left: 0;
  border-radius: 0 48px 48px 0;
  background: var(--ink-900);
  color: var(--text-on-dark);
  cursor: pointer;
  box-shadow: none;
  transform: translate(100%, -50%);
  transition: color var(--transition), background var(--transition), transform var(--transition), border-radius var(--transition), box-shadow var(--transition);
}

.sidebar-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
  transition: transform var(--sidebar-motion);
}

.sidebar-toggle:hover { color: #fff; }

body.sidebar-collapsed .sidebar-toggle {
  display: inline-flex;
  right: 0;
  transform: translate(100%, -50%);
  border: 1.5px solid rgba(220, 226, 222, 0.55);
  border-left: 0;
  border-right: 1.5px solid rgba(220, 226, 222, 0.55);
  border-radius: 0 48px 48px 0;
  background: var(--ink-900);
  box-shadow: 2px 3px 10px rgba(11, 20, 16, 0.18);
}

body.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }

.sidebar-nav {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  display: block;
  flex-shrink: 0;
  height: 32px;
  line-height: 14px;
  white-space: nowrap;
  transition: opacity 140ms ease;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  padding: 12px 12px 6px;
}

.nav-admin {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 8px;
}

body.sidebar-collapsed .sidebar-nav { overflow-x: hidden; overflow-y: auto; }
body.sidebar-collapsed .nav-section-label { opacity: 0; pointer-events: none; }

.nav-item {
  position: relative;
  flex-shrink: 0;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15.5px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-on-dark-muted);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.active {
  background: rgba(139, 195, 74, 0.14);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--brand-leaf);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar .nav-icon { color: #fff; }

.nav-badge {
  margin-left: auto;
  min-width: 22px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--brand-leaf);
  color: var(--ink-900);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

/* Keep the icon rail and row heights identical in both states. */
.nav-label { transition: opacity 140ms ease; }
body:not(.sidebar-collapsed) .nav-item .nav-label { animation: sidebar-label-in 180ms ease both; }
@keyframes sidebar-label-in { from { opacity: 0; } to { opacity: 1; } }
body.sidebar-collapsed .nav-badge { display: none; }

body.sidebar-collapsed .nav-item .nav-label {
  position: fixed;
  left: calc(var(--sidebar-w-collapsed) + 10px);
  top: var(--sidebar-label-top, 0px);
  transform: translateY(-50%) translateX(-4px);
  display: block;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  background: var(--ink-800);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(11, 20, 16, 0.32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 80;
  white-space: nowrap;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
}

body.sidebar-collapsed .nav-item .nav-label::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: var(--ink-800);
}

body.sidebar-collapsed .nav-item:hover .nav-label,
body.sidebar-collapsed .nav-item:focus-visible .nav-label {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Bloque de usuario (abajo a la izquierda) */
.sidebar-footer {
  flex-shrink: 0;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}

.user-box:hover { background: rgba(255, 255, 255, 0.06); }

.user-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-avatar svg { width: 19px; height: 19px; }

.user-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.user-name {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  display: block;
  font-size: 0.74rem;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-caret { width: 16px; height: 16px; color: #fff; flex-shrink: 0; }

body.sidebar-collapsed .user-caret { display: none; }
body.sidebar-collapsed .user-box { position: relative; }
body.sidebar-collapsed .user-role { display: none; }

body.sidebar-collapsed .user-meta {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  min-width: 0;
  flex: none;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  background: var(--ink-800);
  box-shadow: 0 6px 18px rgba(11, 20, 16, 0.32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 80;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
}

body.sidebar-collapsed .user-meta::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: var(--ink-800);
}

body.sidebar-collapsed .user-box:hover .user-meta,
body.sidebar-collapsed .user-box:focus-visible .user-meta {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.user-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0 2px;
}

.user-menu.open { display: flex; }

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-on-dark-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.user-menu-item:hover { background: rgba(220, 75, 75, 0.14); color: #fff; }
.user-menu-form { width: 100%; }

/* Sidebar en móvil */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 20, 16, 0.55);
  opacity: 0;
  visibility: hidden;
  z-index: 55;
  transition: opacity var(--transition), visibility var(--transition);
}

.sidebar-overlay.show { opacity: 1; visibility: visible; }

/* ==========================================================================
   Topbar (móvil)
   ========================================================================== */

.topbar {
  display: none;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.hamburger {
  width: 40px;
  height: 40px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.hamburger span {
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

.topbar-title { font-size: 0.95rem; font-weight: 700; }

/* ==========================================================================
   Mensajes
   ========================================================================== */

.messages-container {
  padding: 16px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
  box-shadow: var(--shadow-sm);
}

.message-success { border-color: #b9e2cd; background: #edf9f3; color: #1d6b47; }
.message-error   { border-color: #f3c4c4; background: #fdefef; color: #98302f; }
.message-warning { border-color: #f3e0b5; background: #fdf7e8; color: #866312; }
.message-info    { border-color: #c8e3ce; background: #f0f8f2; color: #1c6438; }

.message-close {
  border: none;
  background: transparent;
  font-size: 1.15rem;
  line-height: 1;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
}

.message-close:hover { opacity: 1; }

/* ==========================================================================
   Componentes base
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.card-subtitle { font-size: 0.84rem; color: var(--text-muted); }

/* `.btn` (y cualquier regla de autor con display) le gana al [hidden] de la hoja
   del navegador, asi que los botones ocultados por JS seguian visibles. */
[hidden] { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 42px;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform 0.12s;
}

.btn:active { transform: scale(0.985); }

.btn-primary { background: var(--brand-green); color: #fff; }
.btn-primary:hover { background: var(--brand-green-dark); }

.btn-secondary { background: var(--brand-leaf); color: var(--ink-900); }
.btn-secondary:hover { background: var(--brand-leaf-dark); color: #fff; }

.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-input); }
.btn-ghost:hover { background: var(--surface-alt); }

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

.btn-restore { background: #2b6cb0; color: #fff; }
.btn-restore:hover { background: #245a93; }

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(61, 107, 31, 0.14);
}

/* Selector de fecha propio: conserva un input ISO para el servidor, pero evita
   que cada navegador muestre un calendario distinto. */
.gs-date { position:relative; display:block; width:100%; min-width:0; }
.toolbar > .gs-date { flex:1 1 180px; width:auto; min-width:160px; }
.gs-date-native {
  position:absolute !important;
  inset:50% auto auto 12px;
  width:1px !important;
  height:1px !important;
  min-width:0 !important;
  padding:0 !important;
  border:0 !important;
  opacity:0;
  pointer-events:none;
}
.gs-date-trigger {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
  min-height:42px;
  padding:10px 13px;
  border:1px solid var(--border-input);
  border-radius:var(--radius-sm);
  background:var(--surface);
  color:var(--text-muted);
  font:inherit;
  font-size:.86rem;
  text-align:left;
  cursor:pointer;
  outline:none;
  transition:border-color var(--transition),box-shadow var(--transition),background var(--transition);
}
.gs-date-trigger.has-value { color:var(--text); }
.gs-date-trigger:hover:not(:disabled) { border-color:#aabbb0; }
.gs-date-trigger:focus-visible,
.gs-date.is-open .gs-date-trigger,
.gs-date-native:focus + .gs-date-trigger {
  border-color:var(--brand-green);
  box-shadow:0 0 0 3px rgba(61,107,31,.14);
}
.gs-date-trigger:disabled { background:var(--surface-alt); color:var(--text-muted); cursor:not-allowed; opacity:.7; }
.gs-date-trigger svg { width:18px; height:18px; flex:none; color:var(--brand-green); }

.gs-datepicker {
  position:fixed;
  z-index:1300;
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface);
  box-shadow:0 18px 50px rgba(21,44,30,.2),0 3px 10px rgba(21,44,30,.08);
}
.gs-datepicker[hidden] { display:none; }
.gs-datepicker[popover] { inset:auto; margin:0; color:var(--text); overflow:auto; }
.gs-datepicker-head { display:grid; grid-template-columns:34px 1fr 34px; align-items:center; gap:8px; margin-bottom:9px; }
.gs-datepicker-head strong { font-size:.84rem; text-align:center; }
.gs-datepicker-nav { display:grid; place-items:center; width:34px; height:34px; border:0; border-radius:9px; background:transparent; color:var(--text); font-size:1.45rem; line-height:1; cursor:pointer; }
.gs-datepicker-nav:hover:not(:disabled) { background:#edf6ef; color:var(--brand-green); }
.gs-datepicker-nav:disabled { color:var(--border-input); cursor:not-allowed; }
.gs-datepicker-week,
.gs-datepicker-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
.gs-datepicker-week { margin-bottom:4px; }
.gs-datepicker-week span { padding:5px 0; color:var(--text-muted); font-size:.62rem; font-weight:750; letter-spacing:.03em; text-align:center; text-transform:uppercase; }
.gs-datepicker-day { display:grid; place-items:center; aspect-ratio:1; min-width:0; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--text); font:inherit; font-size:.75rem; font-weight:650; cursor:pointer; }
.gs-datepicker-day:hover:not(:disabled):not(.is-selected) { background:#edf6ef; color:var(--brand-green); }
.gs-datepicker-day.is-outside { color:#a5afa9; font-weight:500; }
.gs-datepicker-day.is-today { border-color:#a9ceb1; color:var(--brand-green); }
.gs-datepicker-day.is-selected { border-color:var(--brand-green); background:var(--brand-green); color:#fff; box-shadow:0 3px 8px rgba(61,107,31,.22); }
.gs-datepicker-day:disabled { color:#ccd2ce; cursor:not-allowed; text-decoration:line-through; }
.gs-datepicker-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:9px; padding-top:9px; border-top:1px solid var(--border); }
.gs-datepicker-foot button { padding:5px 7px; border:0; border-radius:7px; background:transparent; color:var(--brand-green); font:inherit; font-size:.72rem; font-weight:700; cursor:pointer; }
.gs-datepicker-foot button:hover:not(:disabled) { background:#edf6ef; }
.gs-datepicker-foot button:disabled { color:var(--text-muted); cursor:not-allowed; opacity:.55; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge-green { background: rgba(61, 107, 31, 0.10); border-color: rgba(61, 107, 31, 0.26); color: var(--brand-green-dark); }
.badge-leaf  { background: rgba(139, 195, 74, 0.14); border-color: rgba(139, 195, 74, 0.32); color: var(--brand-leaf-dark); }

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.89rem;
}

.table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-alt); }

.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Dashboard
   ========================================================================== */

.dash-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 26px 28px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background:
    radial-gradient(130% 150% at 100% 0%, rgba(139, 195, 74, 0.26) 0%, rgba(139, 195, 74, 0) 58%),
    linear-gradient(135deg, var(--ink-700) 0%, var(--ink-900) 100%);
  color: var(--text-on-dark);
  box-shadow: var(--shadow-lg);
}

.dash-hero-body { flex: 1 1 320px; min-width: 0; }

.dash-hero-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}

.dash-hero-title {
  margin-top: 8px;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.dash-hero-sub {
  margin-top: 7px;
  max-width: 54ch;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-on-dark-muted);
}

.dash-hero-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(139, 195, 74, 0.16);
  border: 1px solid rgba(139, 195, 74, 0.32);
  color: #bff0ae;
}

.dash-chip svg { width: 13px; height: 13px; }

.dash-chip--down {
  background: rgba(220, 75, 75, 0.15);
  border-color: rgba(220, 75, 75, 0.32);
  color: #ffc4c4;
}

.dash-hero-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.dash-hero-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-on-dark);
}

.dash-hero-actions .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }

/* Apertura editorial del tablero */
.dash-overview {
  align-items: center;
  gap: 20px;
  padding: 8px 0 18px;
  margin-bottom: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  color: var(--text);
  box-shadow: none;
}
.dash-overview .dash-hero-eyebrow { color: var(--brand-green); font-size: .68rem; font-weight: 800; letter-spacing: .16em; }
.dash-overview .dash-hero-title { margin-top: 6px; font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.045em; }
.dash-overview .dash-hero-sub { margin-top: 7px; color: var(--text-muted); font-size: .86rem; }
.dash-period { display: flex; align-items: center; gap: 11px; min-width: 172px; padding: 10px 15px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.dash-period-mark { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--brand-leaf-dark); box-shadow: 0 0 0 4px #edf5e6; }
.dash-period span:last-child { display: flex; flex-direction: column; gap: 2px; }
.dash-period strong { font-size: .82rem; line-height: 1.2; }
.dash-period small { color: var(--text-muted); font-size: .71rem; }
.dash-comparison { display: flex; gap: 8px; align-items: center; margin: 11px 0 18px; color: var(--text-muted); font-size: .73rem; }
.dash-comparison span { color: var(--border-input); }

.section-hero,
.clientes-hero {
  overflow: hidden;
  background-color: #0b1410;
  background-image:
    linear-gradient(105deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.58) 55%, rgba(0, 0, 0, 0.42) 100%),
    url('../img/clientes-hero-grass.jpg');
  background-size: cover;
  background-position: center;
}

/* Tarjetas de indicadores */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dash-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.dash-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.dash-stat-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-stat-icon svg { width: 18px; height: 18px; }
.dash-stat-icon--green   { background: rgba(61, 107, 31, 0.10);  color: var(--brand-green); }
.dash-stat-icon--leaf    { background: rgba(139, 195, 74, 0.16); color: var(--brand-leaf-dark); }
.dash-stat-icon--warning { background: rgba(228, 161, 27, 0.15); color: #a9761a; }

.dash-stat-label {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dash-stat-value {
  font-size: clamp(1.5rem, 3.4vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.dash-stat-note { font-size: 0.78rem; color: var(--text-muted); }

.dash-stat-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-green);
}

.dash-stat-link:hover { text-decoration: underline; }

.dash-stat--alert {
  border-color: rgba(228, 161, 27, 0.45);
  background: linear-gradient(180deg, rgba(228, 161, 27, 0.08) 0%, var(--surface) 60%);
}

.dash-stat--alert .dash-stat-value { color: #a9761a; }

/* Las cuatro cifras se leen como un solo resumen, con una cifra principal. */
.dash-kpis { gap: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-sm); }
.dash-kpis .dash-stat { position: relative; gap: 0; min-height: 174px; padding: 24px 22px 20px; border: 0; border-radius: 0; box-shadow: none; transition: background var(--transition); }
.dash-kpis .dash-stat + .dash-stat { border-left: 1px solid var(--border); }
.dash-kpis .dash-stat:hover { transform: none; background: var(--surface-alt); box-shadow: none; }
.dash-kpis .dash-stat--primary { background: var(--ink-800); color: var(--text-on-dark); }
.dash-kpis .dash-stat--primary:hover { background: var(--ink-700); }
.dash-kpis .dash-stat-label { font-size: .69rem; letter-spacing: .06em; line-height: 1.35; }
.dash-kpis .dash-stat--primary .dash-stat-label { color: var(--text-on-dark-muted); }
.dash-kpis .dash-stat-value { margin-top: 17px; font-size: clamp(1.75rem, 2.7vw, 2.25rem); font-variant-numeric: tabular-nums; line-height: 1; }
.dash-kpis .dash-stat-note { margin-top: 11px; line-height: 1.4; }
.dash-kpis .dash-stat--primary .dash-stat-note { color: #c7d6b9; }
.dash-kpis .dash-stat-footnote { margin-top: 4px; color: #aaba9c; font-size: .69rem; }
.dash-stat-dot { padding: 0 3px; color: var(--border-input); }
.dash-kpis .dash-stat-link { margin-top: auto; padding-top: 11px; font-size: .75rem; }

.dash-priorities { margin-bottom: 22px; padding: 21px 24px 4px; background: #fffefa; border: 1px solid #e8e5d8; border-radius: 15px; }
.dash-priorities-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-priorities-eyebrow { color: #8c6213; font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.dash-priorities-head h2 { margin: 4px 0 0; font-size: 1.25rem; letter-spacing: -.025em; }
.dash-priorities-count { padding: 6px 10px; border-radius: 7px; background: #f8f1de; color: #765616; font-size: .73rem; font-weight: 750; }
.dash-priorities-list { margin: 0; padding: 0; list-style: none; }
.dash-priorities-list li + li { border-top: 1px solid #ece9df; }
.dash-priorities-list a { display: flex; align-items: center; gap: 15px; min-height: 64px; padding: 10px 0; color: inherit; }
.dash-priorities-list a:hover .dash-priorities-go { text-decoration: underline; }
.dash-priorities-level { flex: 0 0 72px; padding: 5px 0; border-radius: 5px; background: #fcebea; color: #a13b36; font-size: .68rem; font-weight: 800; text-align: center; }
.dash-priorities-level--atencion { background: #fbf2dc; color: #88600b; }
.dash-priorities-text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.dash-priorities-text strong { font-size: .85rem; line-height: 1.35; }
.dash-priorities-text small { color: var(--text-muted); font-size: .72rem; }
.dash-priorities-go { flex: 0 0 auto; color: var(--brand-green); font-size: .75rem; font-weight: 750; }
.dash-priorities-foot { margin: 12px 0; font-size: .76rem; color: var(--text-muted); }
.dash-priorities-foot a { color: var(--brand-green); font-weight: 700; }
.dash-section-divider { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 29px 0 14px; }
.dash-section-divider span { color: var(--brand-green); font-size: .67rem; font-weight: 800; letter-spacing: .13em; }
.dash-section-divider h2 { margin-top: 4px; font-size: 1.35rem; letter-spacing: -.03em; }
.dash-section-divider p { margin-bottom: 2px; color: var(--text-muted); font-size: .77rem; }
.dash-grid .dash-panel { border-color: var(--border); box-shadow: none; }
.dash-grid .dash-panel-head { padding-bottom: 12px; border-bottom: 1px solid var(--border); }

.dash-finance { display: grid; grid-template-columns: 1.35fr 1fr 1fr; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.dash-finance > div { display: flex; flex-direction: column; min-height: 150px; padding: 22px; }
.dash-finance > div + div { border-left: 1px solid var(--border); }
.dash-finance-issued { background: #f8faf4; }
.dash-finance-label, .dash-finance-missing > span { color: var(--text-muted); font-size: .7rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.dash-finance-issued > strong { margin-top: 13px; font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1; font-variant-numeric: tabular-nums; }
.dash-finance-issued > small, .dash-finance-missing > small { margin-top: 7px; color: var(--text-muted); font-size: .74rem; line-height: 1.4; }
.dash-finance-issued > p { margin-top: auto; padding-top: 15px; color: var(--text-muted); font-size: .73rem; }
.dash-finance-issued > a { width: fit-content; margin-top: 9px; color: var(--brand-green); font-size: .74rem; font-weight: 750; }
.dash-finance-missing > strong { margin-top: 16px; color: #8b7a5e; font-size: 1.25rem; letter-spacing: -.025em; }

.dash-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dash-chart { min-width: 0; padding: 21px 22px 18px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.dash-chart-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.dash-chart-head h3 { font-size: .91rem; letter-spacing: -.015em; }
.dash-chart-head p { margin-top: 4px; color: var(--text-muted); font-size: .71rem; line-height: 1.4; }
.dash-chart-head a { flex: 0 0 auto; color: var(--brand-green); font-size: .72rem; font-weight: 750; }
.dash-growth-bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; gap: 6px; min-height: 157px; margin-top: 20px; border-bottom: 1px solid var(--border); }
.dash-growth-month { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.dash-growth-pair { display: flex; align-items: end; justify-content: center; gap: 3px; width: 100%; height: 100px; }
.dash-growth-pair span { display: block; width: min(13px, 27%); min-height: 2px; border-radius: 3px 3px 0 0; }
.dash-growth-up { background: var(--brand-leaf-dark); }
.dash-growth-down { background: #cf9a57; }
.dash-growth-month > strong { margin-top: 6px; font-size: .74rem; font-variant-numeric: tabular-nums; }
.dash-growth-counts { margin-top: 2px; color: var(--text-muted); font-size: .62rem; font-variant-numeric: tabular-nums; }
.dash-growth-month > small { margin: 3px 0 8px; color: var(--text-muted); font-size: .68rem; text-transform: capitalize; }
.dash-chart-key { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; color: var(--text-muted); font-size: .68rem; }
.dash-chart-key span::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 2px; vertical-align: 1px; }
.dash-chart-key .dash-key-up::before { background: var(--brand-leaf-dark); }
.dash-chart-key .dash-key-down::before { background: #cf9a57; }
.dash-service-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 27px; }
.dash-service-month { display: grid; grid-template-columns: 31px minmax(0, 1fr) 38px; align-items: center; gap: 8px; }
.dash-service-month > span { color: var(--text-muted); font-size: .72rem; text-transform: capitalize; }
.dash-service-track { height: 9px; overflow: hidden; border-radius: 6px; background: #edf1e8; }
.dash-service-track i { display: block; height: 100%; border-radius: inherit; background: var(--brand-leaf-dark); }
.dash-service-month > strong { font-size: .72rem; text-align: right; font-variant-numeric: tabular-nums; }
.dash-chart-foot { margin-top: 15px; color: var(--text-muted); font-size: .7rem; line-height: 1.45; }

.dash-operations { display: grid; grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr); gap: 16px; }
.dash-operations-main, .dash-team { min-width: 0; padding: 20px 22px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.dash-operations-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dash-operations-totals a { display: flex; flex-direction: column; min-width: 0; padding: 13px 15px; border-radius: 10px; background: var(--surface-alt); }
.dash-operations-totals a:hover { background: #eef5e6; }
.dash-operations-totals span { color: var(--text-muted); font-size: .69rem; font-weight: 750; }
.dash-operations-totals strong { margin-top: 9px; font-size: 1.75rem; line-height: 1; }
.dash-operations-totals small { margin-top: 8px; color: var(--brand-green); font-size: .68rem; line-height: 1.3; }
.dash-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-top: 19px; padding-top: 17px; border-top: 1px solid var(--border); }
.dash-week a { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px 4px; border-radius: 8px; text-align: center; }
.dash-week a:hover, .dash-week a.is-today { background: #eef5e6; }
.dash-week a > span { color: var(--text-muted); font-size: .67rem; text-transform: capitalize; }
.dash-week a > span b { display: block; margin-top: 2px; color: var(--text); font-size: .9rem; }
.dash-week a > strong { font-size: .84rem; }
.dash-week a > strong small { font-size: .62rem; font-weight: 500; }
.dash-week a > em { color: var(--text-muted); font-size: .67rem; font-style: normal; }
.dash-team ol { margin: 17px 0 0; padding: 0; list-style: none; }
.dash-team li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: .78rem; }
.dash-team li strong { font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .dash-operations { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .dash-finance { grid-template-columns: 1fr 1fr; }
  .dash-finance-issued { grid-column: span 2; }
  .dash-finance > div:nth-child(2) { border-left: 0; border-top: 1px solid var(--border); }
  .dash-finance > div:nth-child(3) { border-top: 1px solid var(--border); }
  .dash-charts { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .dash-finance { grid-template-columns: 1fr; }
  .dash-finance-issued { grid-column: auto; }
  .dash-finance > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .dash-finance > div { min-height: 0; padding: 18px; }
  .dash-chart, .dash-operations-main, .dash-team { padding: 18px; }
  .dash-operations-totals { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-operations-totals a:last-child { grid-column: span 2; }
  .dash-week { gap: 1px; }
  .dash-week a > strong small { display: none; }
}

@media (max-width: 900px) {
  .dash-kpis .dash-stat:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
  .dash-kpis .dash-stat:nth-child(4) { border-top: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .dash-overview { padding: 4px 0 18px; }
  .dash-overview .dash-hero-actions { width: auto; }
  .dash-comparison { flex-wrap: wrap; }
  .dash-priorities { padding: 17px 16px 4px; }
  .dash-priorities-list a { flex-wrap: wrap; gap: 8px 12px; }
  .dash-priorities-go { margin-left: 84px; }
}
@media (max-width: 400px) {
  .dash-kpis .dash-stat { min-height: 145px; }
  .dash-kpis .dash-stat + .dash-stat { border-left: 0; border-top: 1px solid var(--border); }
}

/* Paneles */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.dash-panel { padding: 20px; }
.dash-panel--4 { grid-column: span 4; }
.dash-panel--6 { grid-column: span 6; }

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.dash-panel-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dash-panel-link {
  flex: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-green);
}

.dash-panel-link:hover { text-decoration: underline; }

/* Medidor de cobertura */
.dash-gauge {
  display: flex;
  align-items: center;
  gap: 18px;
}

.dash-gauge-ring {
  --size: 100px;
  position: relative;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(
    var(--brand-green) 0%,
    var(--brand-leaf) calc(var(--pct) * 1%),
    var(--border) 0
  );
}

.dash-gauge-ring::after {
  content: '';
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--surface);
}

.dash-gauge-value {
  position: relative;
  z-index: 1;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dash-gauge-value small { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); }

.dash-gauge-caption {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.dash-breakdown {
  list-style: none;
  margin-top: 18px;
}

.dash-breakdown li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.dash-breakdown-label { font-size: 0.86rem; }

.dash-pill {
  flex: none;
  min-width: 36px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.dash-pill--warning {
  background: rgba(228, 161, 27, 0.14);
  border-color: rgba(228, 161, 27, 0.34);
  color: #a9761a;
}

/* Rankings con barra de proporción */
.dash-rank {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.dash-rank-item { display: flex; align-items: center; gap: 12px; }

.dash-rank-pos {
  flex: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.dash-rank-item:first-child .dash-rank-pos {
  background: rgba(139, 195, 74, 0.18);
  border-color: rgba(139, 195, 74, 0.42);
  color: var(--brand-green-dark);
}

.dash-rank-body { flex: 1; min-width: 0; }

.dash-rank-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.dash-rank-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-rank-count {
  flex: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.dash-bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--border);
  overflow: hidden;
}

.dash-bar-fill {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--brand-green) 0%, var(--brand-leaf) 100%);
}

.dash-bar-fill--alt { background: linear-gradient(90deg, var(--brand-leaf-dark) 0%, #a4e187 100%); }

/* Listados de actividad */
.dash-feed { list-style: none; display: flex; flex-direction: column; gap: 4px; }

.dash-feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  margin: 0 -10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.dash-feed-item:hover { background: var(--surface-alt); }

.dash-avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-leaf-dark) 100%);
}

.dash-avatar--muted { background: linear-gradient(135deg, #C4925A 0%, #A87B4F 100%); }

.dash-feed-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.dash-feed-name {
  font-size: 0.89rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-feed-item:hover .dash-feed-name { color: var(--brand-green); }

.dash-feed-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-feed-date {
  flex: none;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.dash-empty {
  padding: 28px 10px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-muted);
}

@media (max-width: 1180px) {
  .dash-panel--4, .dash-panel--6 { grid-column: span 6; }
}

@media (max-width: 900px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-hero { align-items: flex-start; }
}

@media (max-width: 720px) {
  .dash-panel--4, .dash-panel--6 { grid-column: span 12; }
}

@media (max-width: 560px) {
  .dash-hero { padding: 20px 18px; margin-bottom: 14px; }
  .dash-hero-actions { width: 100%; }
  .dash-hero-actions .btn { flex: 1 1 auto; }
  .dash-kpis { gap: 10px; margin-bottom: 14px; }
  .dash-stat { padding: 15px; }
  .dash-stat-icon { width: 32px; height: 32px; border-radius: 10px; margin-bottom: 4px; }
  .dash-grid { gap: 12px; }
  .dash-panel { padding: 16px; }
  .dash-gauge-ring { --size: 86px; }
  .dash-gauge-value { font-size: 1.2rem; }
}

@media (max-width: 400px) {
  .dash-kpis { grid-template-columns: 1fr; }
  .dash-feed-date { display: none; }
}

/* ==========================================================================
   Pantallas oscuras (inicio, login, errores)
   ========================================================================== */

.dark-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--ink-900);
  color: var(--text-on-dark);
}

.brand-mark {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.brand-tagline {
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  margin-top: 14px;
}

/* Login */
.auth-wrapper { width: 100%; max-width: 400px; }

.auth-card {
  margin-top: 20px;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--ink-800);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: var(--shadow-lg);
}

.auth-card h1 { font-size: 1.05rem; font-weight: 700; margin-bottom: 18px; }
.auth-card .form-label { color: var(--text-on-dark); }

.auth-card .form-input {
  background: var(--ink-700);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-on-dark);
}

.auth-card .form-input::placeholder { color: rgba(147, 163, 154, 0.8); }

.auth-card .form-input:focus {
  border-color: var(--brand-leaf);
  box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.18);
}

.auth-alert {
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  background: rgba(220, 75, 75, 0.14);
  border: 1px solid rgba(220, 75, 75, 0.35);
  color: #ffc9c9;
}

.auth-submit { width: 100%; margin-top: 6px; }

.password-field { position: relative; }
.password-field .form-input { padding-right: 42px; }

.toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-on-dark-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.toggle-password:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.pin-visibility { width: 24px; height: 24px; right: 6px; }
.pin-visibility svg { width: 15px; height: 15px; }

.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 0.76rem;
  color: var(--text-on-dark-muted);
}

/* Pantallas de acceso que usan el kit de formularios (activación de cuenta) */
.auth-card .auth-lead { margin: -10px 0 20px; color: var(--text-on-dark-muted); font-size: 0.84rem; line-height: 1.55; }
.auth-card .fx-field + .fx-field { margin-top: 16px; }
.auth-card .fx-field > label { color: var(--text-on-dark); }
.auth-card .fx-help,
.auth-card .fx-hint { color: var(--text-on-dark-muted); }
.auth-card .fx-errors { color: #ffc9c9; }

.auth-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-sm);
  background: var(--ink-700);
}

.auth-identity > span:first-child {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: var(--brand-leaf);
  color: var(--ink-900);
  font-weight: 750;
}

.auth-identity div { display: flex; flex-direction: column; min-width: 0; }
.auth-identity strong { font-size: 0.88rem; }
.auth-identity small { margin-top: 2px; color: var(--text-on-dark-muted); font-size: 0.75rem; }

.auth-rules { margin: 12px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.04); list-style: none; }
.auth-rules li { display: flex; gap: 8px; color: var(--text-on-dark-muted); font-size: 0.75rem; line-height: 1.5; }
.auth-rules li + li { margin-top: 6px; }
.auth-rules li::before { content: "·"; color: var(--brand-leaf); font-weight: 800; }

/* Errores */
.error-box { text-align: center; max-width: 460px; }

.error-code {
  font-size: 6.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--brand-leaf);
}

.error-title { font-size: 1.2rem; font-weight: 700; margin: 12px 0 8px; }

.error-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-on-dark-muted);
  margin-bottom: 28px;
}

/* ==========================================================================
   Barra de herramientas (búsqueda, filtros, cambio de vista)
   ========================================================================== */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.toolbar-search { position: relative; flex: 1 1 260px; min-width: 200px; }

.toolbar-search .form-input { padding-left: 38px; }

.toolbar-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
}

.toolbar .form-select { width: auto; min-width: 145px; }

/* Dropdown unificado de filtros. Usar {% filter_dropdown %}, no <select>. */
.filter-dropdown { position: relative; flex: 0 1 auto; min-width: 132px; }
.filter-dropdown--wide { min-width: 176px; }

.filter-dropdown summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 9px 14px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.filter-dropdown summary::-webkit-details-marker { display: none; }
.filter-dropdown summary:hover { background: var(--surface-alt); border-color: #becbc2; }
.filter-dropdown summary:focus-visible { outline: none; border-color: var(--brand-green); box-shadow: 0 0 0 3px rgba(61, 107, 31, 0.14); }
.filter-dropdown[open] { z-index: 32; }
.filter-dropdown[open] summary {
  border-color: var(--border);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: rgba(61, 107, 31, 0.10);
  color: var(--brand-green);
  box-shadow: none;
}

.filter-dropdown summary svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}

.filter-dropdown summary > span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.filter-dropdown[open] summary svg { transform: rotate(180deg); color: var(--brand-green); }

.filter-dropdown-menu {
  position: absolute;
  z-index: 30;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  max-height: 300px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 6px 6px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 12px 24px rgba(11, 20, 16, 0.10);
}

.filter-dropdown-menu a,
.filter-dropdown-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.filter-dropdown-menu a:hover,
.filter-dropdown-menu a:focus-visible,
.filter-dropdown-menu button:hover,
.filter-dropdown-menu button:focus-visible { background: var(--surface-alt); outline: none; }

.filter-dropdown-search-wrap { position:relative; margin:2px 2px 5px; }
.filter-dropdown-search-wrap svg {
  position:absolute;
  left:10px;
  top:50%;
  width:16px;
  height:16px;
  color:var(--text-muted);
  transform:translateY(-50%);
  pointer-events:none;
}
.filter-dropdown-search {
  width:100%;
  min-height:40px;
  padding:8px 10px 8px 34px;
  border:1px solid var(--border-input);
  border-radius:8px;
  background:var(--surface);
  color:var(--text);
  font:inherit;
  font-size:.86rem;
  outline:none;
  box-sizing:border-box;
}
.filter-dropdown-search:focus { border-color:var(--brand-green); box-shadow:0 0 0 2px rgba(61,107,31,.12); }
.filter-dropdown-empty { margin:0; padding:12px 10px; color:var(--text-muted); font-size:.84rem; }

.filter-dropdown-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.filter-dropdown-wrap > select.is-enhanced {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.filter-dropdown--field,
.filter-dropdown-wrap .filter-dropdown { width: 100%; min-width: 0; flex: none; }
.filter-dropdown.is-disabled { pointer-events: none; opacity: 0.55; }

/* ==========================================================================
   Clientes agrupados por zona
   ========================================================================== */

.client-split {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.client-zones {
  flex: 0 0 260px;
  max-width: 260px;
}

.client-zone-panel { flex: 1 1 auto; min-width: 0; }

.client-zones,
.client-zone-panel {
  border: 1px solid #c7d3ca;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(11, 20, 16, 0.06);
}

.client-zones-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #d8e1da;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.client-zone-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8e2;
  color: inherit;
  text-decoration: none;
}

.client-zone-item:last-child { border-bottom: 0; }
.client-zone-item:hover { background: rgba(61, 107, 31, 0.05); }
.client-zone-item.is-active {
  background: rgba(61, 107, 31, 0.1);
  box-shadow: inset 3px 0 0 var(--brand-green);
}

.client-zone-item-copy { min-width: 0; flex: 1; }
.client-zone-item-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.25;
}
.client-zone-item-meta {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.35;
}
.client-zone-item-go {
  flex: none;
  color: var(--brand-green);
  font-size: 1.15rem;
  line-height: 1;
}

.client-zone-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

.client-zone-header-meta strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.client-zone-index {
  overflow: hidden;
  border: 1px solid #c7d3ca;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(11, 20, 16, 0.06);
}

.client-zone-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid #e2e8e2;
  color: inherit;
}

.client-zone-summary:last-child { border-bottom: 0; }
.client-zone-summary:hover { background: rgba(61, 107, 31, 0.05); }

.client-zone-summary-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.client-zone-summary-name strong { font-size: 0.95rem; font-weight: 750; }

.client-zone-summary-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
}

.client-zone-summary-meta svg { width: 16px; height: 16px; color: var(--brand-green); }

.client-zone-back { margin: 0 0 12px; }
.client-zone-back a { color: var(--brand-green); font-size: 0.86rem; font-weight: 650; }

.client-groups { display: flex; flex-direction: column; gap: 22px; }

.client-zone {
  overflow: hidden;
  border: 1px solid #c7d3ca;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(11, 20, 16, 0.06);
}

.client-zone-header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid #b9cabc;
  background: linear-gradient(90deg, rgba(61, 107, 31, 0.14), rgba(139, 195, 74, 0.07));
}

.client-zone-header > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.client-zone-header h2 { font-size: 0.95rem; font-weight: 750; letter-spacing: -0.01em; }

.client-zone-marker {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-leaf);
  box-shadow: 0 0 0 4px rgba(139, 195, 74, 0.14);
}

.client-zone-count { color: var(--brand-green); font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.client-table { --client-cols: minmax(220px, 2.4fr) minmax(140px, 1.2fr) 140px; }
.client-table--con-estado { --client-cols: minmax(220px, 2.4fr) minmax(140px, 1.2fr) 120px 110px; }

.list-count {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.client-table-head,
.client-row {
  display: grid;
  grid-template-columns: var(--client-cols);
  align-items: center;
  gap: 16px;
}

.client-table-head {
  padding: 10px 18px 8px;
  border-bottom: 1px solid #d8e1da;
  background: #fbfcfb;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.client-row {
  min-height: 64px;
  padding: 11px 18px;
  border-top: 1px solid #dfe6e1;
  color: inherit;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}

.client-table-head + .client-table-body .client-row:first-child { border-top: 0; }
.client-row:hover { background: rgba(61, 107, 31, 0.055); }
.client-row:focus-visible {
  position: relative;
  z-index: 1;
  outline: none;
  box-shadow: inset 0 0 0 2px var(--brand-green);
}
.client-row.is-inactive { background: var(--surface-alt); }
.client-row.is-inactive:hover { background: #f3f6f3; }

.cell { min-width: 0; font-size: 0.87rem; }
.cell-main { min-width: 0; }

.cell-name {
  display: block;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-name:hover { color: var(--brand-green); }

.cell-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-jardinero-who {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}
.cell-jardinero-icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  overflow: hidden;
  color: var(--brand-green);
}
.cell-jardinero-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
}
.client-row .cell-jardinero { overflow: visible; }
.client-row .cell-jardinero.cell-alert,
.client-row .cell-jardinero.cell-muted {
  color: var(--brand-green);
  font-weight: 650;
}
.cell-jardinero-icon { color: var(--brand-green); }

.cell-muted { color: var(--text-muted); }
.cell-amount { font-variant-numeric: tabular-nums; font-weight: 600; }
.cell-actions { display: flex; gap: 4px; }

.client-row .cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-row .cell-actions { justify-content: flex-end; overflow: visible; }

.client-row-affordance {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.client-row-affordance svg { width: 18px; height: 18px; }
.client-row:hover .client-row-affordance,
.client-row:focus-visible .client-row-affordance {
  background: rgba(61, 107, 31, 0.10);
  color: var(--brand-green);
  transform: translateX(2px);
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .icon-pencil { transform: scaleX(-1); }
.icon-btn:hover { background: var(--surface-alt); border-color: var(--border); color: var(--text); }
.icon-btn.danger:hover { background: rgba(220, 75, 75, 0.1); border-color: rgba(220, 75, 75, 0.3); color: var(--danger); }

/* ==========================================================================
   Jardineros y usuarios
   ========================================================================== */

.people-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.people-kpi {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.people-kpi-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.people-kpi strong {
  display: block;
  margin: 7px 0 3px;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.people-kpi small { color: var(--text-muted); font-size: 0.76rem; }

.people-kpi.is-warning {
  border-color: rgba(218, 145, 35, 0.38);
  background: #fffaf0;
}

.people-kpi.is-warning strong { color: #9a5e08; }

.roster {
  overflow: hidden;
  border: 1px solid #c7d3ca;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(11, 20, 16, 0.06);
}

.roster-group + .roster-group { border-top: 1px solid #b9cabc; }

.roster-group-head {
  list-style: none;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: linear-gradient(90deg, rgba(61, 107, 31, 0.14), rgba(139, 195, 74, 0.07));
  cursor: pointer;
  user-select: none;
}

.roster-group-head::-webkit-details-marker { display: none; }
.roster-group-head:focus-visible { outline: 2px solid var(--brand-green); outline-offset: -2px; }

.roster-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.roster-group-count {
  margin-left: auto;
  color: var(--brand-green);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.roster-group-meta {
  margin-left: auto;
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
}

.roster-group-meta strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.roster-group-alert,
.cell-alert {
  color: #9a5e08;
  font-weight: 700;
}

.roster-group-head svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--brand-green);
  transition: transform var(--transition);
}

.roster-group[open] > .roster-group-head svg { transform: rotate(180deg); }
.roster-group:not([open]) > .roster-group-head { border-bottom: 0; }

.client-zone-marker.is-muted {
  background: #8d9a93;
  box-shadow: 0 0 0 4px rgba(141, 154, 147, 0.16);
}

.client-zone-marker.is-warning {
  background: #e4a11b;
  box-shadow: 0 0 0 4px rgba(228, 161, 27, 0.16);
}

.roster-table { --roster-cols: minmax(220px, 2fr) 1fr 1fr 1fr 84px; }

.roster-head,
.roster-row {
  display: grid;
  grid-template-columns: var(--roster-cols);
  align-items: center;
  gap: 16px;
}

.roster-head {
  padding: 10px 18px 8px;
  border-bottom: 1px solid #d8e1da;
  background: #fbfcfb;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.roster-row {
  min-height: 78px;
  padding: 11px 18px;
  border-top: 1px solid #dfe6e1;
  color: inherit;
  transition: background var(--transition), box-shadow var(--transition);
}

.roster-head + .roster-body .roster-row:first-child { border-top: 0; }
a.roster-row { cursor: pointer; }
a.roster-row:hover { background: rgba(61, 107, 31, 0.055); }
a.roster-row:focus-visible {
  position: relative;
  z-index: 1;
  outline: none;
  box-shadow: inset 0 0 0 2px var(--brand-green);
}
.roster-row.is-inactive { background: var(--surface-alt); }
a.roster-row.is-inactive:hover { background: #f3f6f3; }

.roster-row .cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-row .cell-actions { justify-content: flex-end; overflow: visible; }
.roster-row .cell-metric { font-weight: 650; font-variant-numeric: tabular-nums; }
article.roster-row .cell-name:hover { color: var(--text); }

.cell-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-person > div { min-width: 0; }
.user-detail-link { color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
.user-detail-link:hover .cell-name { color: var(--brand-green); }
.user-detail-link:focus-visible { outline: 2px solid var(--brand-green); outline-offset: 3px; }

.person-avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-leaf-dark) 100%);
}

.person-avatar--muted { background: linear-gradient(135deg, #8d9a93 0%, #6c7a72 100%); }
.person-avatar--pending { background: linear-gradient(135deg, #c9a227 0%, #e4a11b 100%); }

.you-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(61, 107, 31, 0.1);
  color: var(--brand-green);
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}

.user-detail { max-width: 1120px; }
.user-detail-head { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 150px; margin: 18px 0 22px; padding: 28px 30px; overflow: hidden; border: 1px solid rgba(45, 94, 24, .34); border-radius: calc(var(--radius) + 4px); color: #f6fbef; background: linear-gradient(115deg, #17320d 0%, #285d19 55%, #417a26 100%); box-shadow: 0 14px 30px rgba(26, 66, 14, .18); }
.user-detail-head::after { position: absolute; z-index: -1; inset: 0; content: ""; opacity: .3; background: repeating-linear-gradient(118deg, transparent 0 18px, rgba(232,255,215,.13) 19px 20px, transparent 21px 40px); }
.user-detail-orb { position: absolute; z-index: -1; border: 1px solid rgba(224,255,198,.33); border-radius: 50%; }
.user-detail-orb--one { width: 270px; height: 270px; right: -90px; top: -165px; }
.user-detail-orb--two { width: 160px; height: 160px; right: 110px; bottom: -112px; }
.user-detail-person { display: flex; align-items: center; gap: 16px; min-width: 0; }
.user-detail-avatar { width: 62px; height: 62px; border: 3px solid rgba(238,255,225,.72); box-shadow: 0 0 0 6px rgba(207,244,175,.14); font-size: 1rem; background: linear-gradient(135deg, #76b83f, #245f1c); }
.user-detail-head .eyebrow { color: rgba(239,255,226,.72); }
.user-detail-head .page-title { margin: 2px 0 7px; color: #fff; }
.user-detail-head .page-subtitle { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.user-detail-head .badge { border-color: rgba(236,255,217,.25); background: rgba(17,47,10,.35); color: #edffdc; }
.user-detail-actions { display: flex; position: relative; z-index: 1; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.user-detail-actions .btn { border-color: rgba(236,255,217,.34); color: #f7ffec; background: rgba(10,39,5,.2); }
.user-detail-actions .btn:hover { border-color: rgba(236,255,217,.72); background: rgba(10,39,5,.4); }
.user-detail-actions .btn-primary { border-color: #a7da72; color: #17320d; background: #b6e786; }
.user-detail-actions .btn-primary:hover { background: #caefa3; }
.user-detail-actions form { margin: 0; }
.user-security-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }
.user-security-card { position: relative; min-height: 142px; padding: 18px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); }
.user-security-card:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(23, 57, 18, .1); }
.user-security-card::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; content: ""; background: var(--brand-green); opacity: .55; }
.user-security-card--ip::after { background: #5588ae; }.user-security-card--pin::after { background: #b28a2d; }.user-security-card--device::after { background: #6b8371; }
.user-security-icon { display: grid; width: 29px; height: 29px; margin-bottom: 14px; place-items: center; border-radius: 9px; color: var(--brand-green); background: rgba(61,107,31,.1); font-size: 1rem; font-weight: 800; }
.user-security-card--ip .user-security-icon { color: #41739c; background: #edf5fb; }.user-security-card--pin .user-security-icon { color: #956d12; background: #fff7e4; }.user-security-card--device .user-security-icon { color: #56705d; background: #eff4ef; }
.user-security-label { display: block; margin-bottom: 7px; color: var(--text-muted); font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.user-security-card strong { display: block; overflow: hidden; color: var(--text); font-size: .93rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.user-security-card small { display: block; margin-top: 7px; color: var(--text-muted); font-size: .75rem; line-height: 1.35; }
.user-activity-card { padding: 0; overflow: hidden; border-color: #cbd8cc; box-shadow: 0 5px 14px rgba(23, 57, 18, .06); }
.user-activity-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; padding: 20px; border-bottom: 1px solid var(--border); background: linear-gradient(90deg, rgba(61,107,31,.08), rgba(139,195,74,.025)); }
.user-activity-head h2 { margin: 3px 0 0; font-size: 1.08rem; }
.user-activity-row { display: grid; grid-template-columns: 150px 170px 150px minmax(160px, 1fr); gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border); font-size: .84rem; transition: background var(--transition); }
.user-activity-row:not(.user-activity-row--head):hover { background: rgba(61,107,31,.035); }
.user-activity-row--head { border-top: 0; background: #fbfdf9; color: var(--text-muted); font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.user-activity-event { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; }
.user-activity-event::before { width: 7px; height: 7px; border-radius: 50%; content: ""; background: var(--brand-green); box-shadow: 0 0 0 3px rgba(61,107,31,.11); }
.user-activity-event--pin_incorrecto { color: #a33b3b; }.user-activity-event--pin_incorrecto::before { background: var(--danger); box-shadow: 0 0 0 3px rgba(220,75,75,.12); }.user-activity-event--bloqueado { color: #9a5e08; }.user-activity-event--bloqueado::before { background: #e4a11b; box-shadow: 0 0 0 3px rgba(228,161,27,.14); }
.user-activity-row em { display: inline-block; margin-left: 6px; color: #9a5e08; font-size: .7rem; font-style: normal; font-weight: 700; }

@media (max-width: 900px) {
  .user-detail-head { flex-direction: column; }
  .user-detail-actions { justify-content: flex-start; }
  .user-security-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-activity-row { grid-template-columns: 130px 1fr; gap: 8px 16px; }
  .user-activity-row--head { display: none; }
  .user-activity-row:not(.user-activity-row--head) > span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .user-activity-row:not(.user-activity-row--head) > span::before { content: attr(data-label); color: var(--text-muted); font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
}

@media (max-width: 540px) {
  .user-detail-person { align-items: flex-start; }
  .user-detail-actions { width: 100%; }
  .user-detail-actions .btn, .user-detail-actions form { flex: 1; }
  .user-detail-actions form .btn { width: 100%; }
  .user-security-grid { grid-template-columns: 1fr; }
  .user-activity-row { grid-template-columns: 1fr; padding: 14px; }
}

.invite-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 20px;
  align-items: start;
  max-width: 920px;
}

.invite-layout .form-shell { max-width: none; }

.invite-steps { padding: 22px; }
.invite-steps h2 { font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; }
.invite-steps ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.invite-steps li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.invite-steps li::before {
  content: counter(invite-step);
  counter-increment: invite-step;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(61, 107, 31, 0.1);
  color: var(--brand-green);
  font-size: 0.75rem;
  font-weight: 700;
}
.invite-steps ol { counter-reset: invite-step; }
.invite-steps strong { display: block; font-size: 0.88rem; }
.invite-steps span { display: block; margin-top: 3px; color: var(--text-muted); font-size: 0.8rem; line-height: 1.45; }

.invite-share {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  max-width: 760px;
  padding: 24px;
}

.invite-share-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.invite-share-qr img {
  width: 220px;
  height: 220px;
  image-rendering: pixelated;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
}

.invite-copy { display: flex; gap: 8px; align-items: center; }
.invite-copy .form-input { flex: 1; min-width: 0; font-size: 0.82rem; }
.invite-hint { margin-top: 10px; color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; }
.invite-share .form-actions { border-top: 0; padding-top: 0; }

.invite-warning {
  max-width: 760px;
  margin-top: 16px;
  background: var(--surface-alt);
  border-color: var(--border);
}

.invite-warning p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.invite-warning code {
  font-size: 0.82em;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(61, 107, 31, 0.08);
  color: var(--brand-green);
}

.badge-muted { background: rgba(103, 116, 108, 0.1); border-color: rgba(103, 116, 108, 0.22); color: var(--text-muted); }
.badge-danger { background: rgba(220, 75, 75, 0.1); border-color: rgba(220, 75, 75, 0.28); color: #a83535; }

.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Paginación */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 22px;
  font-size: 0.85rem;
}

.pagination a,
.pagination span {
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
}

.pagination a:hover { background: var(--surface-alt); color: var(--text); }
.pagination .is-current { background: var(--brand-green); border-color: var(--brand-green); color: #fff; font-weight: 600; }
.pagination .is-disabled { opacity: 0.45; }

/* ==========================================================================
   Detalle
   ========================================================================== */

.detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  padding: 24px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: var(--ink-900);
  color: var(--text-on-dark);
  box-shadow: var(--shadow-lg);
}

.detail-hero-body { flex: 1 1 260px; min-width: 0; }

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.detail-hero .badge {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-on-dark);
}

.detail-hero .badge-leaf { background: rgba(139, 195, 74, 0.18); border-color: rgba(139, 195, 74, 0.4); color: #bff0ae; }
.detail-hero .badge-danger { background: rgba(220, 75, 75, 0.18); border-color: rgba(220, 75, 75, 0.4); color: #ffc4c4; }

.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.detail-hero .btn-ghost {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text-on-dark);
}

.detail-hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.13); }

.client-detail-hero { display: block; padding: 0; }

.detail-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px 12px;
}

.detail-client-id {
  color: var(--text-on-dark);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
}

.detail-client-id > span { color: var(--text-on-dark-muted); font-weight: 500; }

.detail-client-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.client-detail-name { font-size: 1.28rem; margin: 0; }

.detail-hero-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  flex: none;
}

.detail-hero-tools .status-dropdown-menu {
  left: auto;
  right: 0;
}

.status-dropdown { position: relative; }
.status-dropdown summary { list-style: none; cursor: pointer; user-select: none; }
.status-dropdown summary::-webkit-details-marker { display: none; }
.status-dropdown summary svg { width: 13px; height: 13px; transition: transform var(--transition); }
.status-dropdown[open] summary svg { transform: rotate(180deg); }
.status-dropdown summary:focus-visible { outline: 2px solid #bff0ae; outline-offset: 2px; }

.status-dropdown-menu {
  position: absolute;
  z-index: 35;
  top: calc(100% + 7px);
  left: 0;
  min-width: 155px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.status-dropdown-menu button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.status-dropdown-menu button:hover,
.status-dropdown-menu button:focus-visible { outline: none; background: var(--surface-alt); }

.detail-overview-grid {
  display: grid;
  grid-template-columns: 1.35fr 1.05fr 0.95fr 1.15fr;
}

.detail-overview-item {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px;
}

.detail-overview-item:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-50%);
}

.detail-overview-label {
  display: block;
  margin-bottom: 13px;
  color: var(--text-on-dark-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.detail-overview-content { display: flex; align-items: center; gap: 10px; min-width: 0; }
.detail-overview-content > svg { width: 19px; height: 19px; flex: none; color: #8ed17b; }
.detail-overview-content > div { min-width: 0; }
.detail-overview-content strong { display: block; font-size: 0.85rem; line-height: 1.45; overflow-wrap: anywhere; }
.detail-overview-content div > span { display: block; margin-top: 4px; color: var(--text-on-dark-muted); font-size: 0.73rem; }
.detail-overview-content a:hover,
.detail-overview-contact a:hover { color: #bff0ae; }

.detail-overview-contact { display: flex; flex-direction: column; gap: 4px; }
.detail-overview-contact > span { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 0.82rem; font-weight: 600; overflow-wrap: anywhere; }
.detail-overview-contact svg { width: 17px; height: 17px; flex: none; color: #8ed17b; }

.detail-overview-item--gardener { padding: 0; }

.detail-gardener-link {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 16px;
  color: inherit;
  transition: color var(--transition);
}

.detail-gardener-link:hover { color: #bff0ae; }
.detail-gardener-link:focus-visible { outline: 2px solid #bff0ae; outline-offset: -3px; }
.detail-gardener-link.is-empty { color: var(--text-on-dark-muted); }
.detail-gardener-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 4px;
  border-radius: 999px;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.gardener-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  color: #8ed17b;
  transition: color var(--transition);
}
.gardener-icon svg { width: 22px; height: 24px; }
.detail-gardener-link:hover .detail-gardener-chip {
  background: rgba(139, 195, 74, 0.16);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}
.detail-gardener-link:hover .gardener-icon {
  color: #bff0ae;
}

.detail-income-value {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.detail-overview-item--income {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  text-align: left;
}

.detail-income-value > strong {
  color: #8ed17b;
  font-size: 1.25rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.detail-income-currency {
  color: #8ed17b;
  font-size: 1.25rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.045em;
}

.detail-income-caption {
  margin-top: 0;
  color: var(--text-on-dark-muted);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.financial-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
  overflow: hidden;
}

.financial-grid > div { min-width: 0; padding: 18px 20px; border-left: 1px solid var(--border); }
.financial-grid > div:first-child { border-left: 0; }
.financial-grid span { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 0.72rem; }
.financial-grid strong { display: block; font-size: 0.86rem; overflow-wrap: anywhere; }

.service-notes { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.service-notes span { display: block; margin-bottom: 5px; color: var(--text-muted); font-size: 0.72rem; }
.service-notes p { font-size: 0.82rem; line-height: 1.55; }

@media (max-width: 1050px) {
  .detail-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-overview-item:nth-child(3)::before { display: none; }
  .detail-overview-item:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, 0.10); }
  .financial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .financial-grid > div:nth-child(3) { border-left: 0; }
  .financial-grid > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
}

@media (max-width: 600px) {
  .detail-hero-top { padding: 14px 16px 12px; flex-direction: column; align-items: flex-start; }
  .detail-hero-tools { width: 100%; justify-content: flex-start; }
  .detail-hero-top > .btn,
  .detail-hero-top .detail-actions { width: 100%; }
  .detail-hero-top .detail-actions .btn { flex: 1; }
  .detail-overview-grid,
  .financial-grid { grid-template-columns: 1fr; }
  .detail-overview-item,
  .detail-overview-item:nth-child(3),
  .financial-grid > div,
  .financial-grid > div:nth-child(3) { min-height: 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.10); }
  .detail-overview-item::before { display: none; }
  .detail-overview-item:first-child { border-top: 0; }
  .detail-gardener-link { min-height: 0; }
  .financial-grid > div,
  .financial-grid > div:nth-child(3) { border-top-color: var(--border); }
  .financial-grid > div:first-child { border-top: 0; }
}

.detail-panel {
  padding: 20px;
  border: 1px solid #cfd9d1;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.detail-section { margin-top: 26px; }
.detail-section--compact { max-width: 720px; }

.detail-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 2px 11px;
}

.detail-section-head h2 { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.015em; }
.detail-section-head h2 span { color: var(--text-muted); font-weight: 550; }
.detail-section-head p { margin-top: 3px; color: var(--text-muted); font-size: 0.78rem; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  align-items: start;
}

.info-card { display: flex; flex-direction: column; gap: 2px; }

.info-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.info-card-head svg { width: 17px; height: 17px; color: var(--brand-green); }

.info-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.88rem;
}

.field:last-child { border-bottom: none; }
.field-label { color: var(--text-muted); flex-shrink: 0; font-size: 0.83rem; }

.field-value {
  text-align: right;
  font-weight: 550;
  word-break: break-word;
  min-width: 0;
}

.field-value.is-empty { color: var(--text-muted); font-weight: 400; font-style: italic; }
.field-block { display: block; }
.field-block .field-value { text-align: left; margin-top: 6px; line-height: 1.6; font-weight: 400; }

.amount-big {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.amount-caption { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

.timeline { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }

.timeline-item {
  position: relative;
  padding: 0 0 16px 20px;
  border-left: 2px solid var(--border);
}

.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--danger);
}

.timeline-date { font-size: 0.84rem; font-weight: 650; }
.timeline-text { font-size: 0.83rem; color: var(--text-muted); line-height: 1.55; margin-top: 3px; }

/* ==========================================================================
   Formularios
   ========================================================================== */

.form-shell { max-width: 940px; }

.form-section { margin-bottom: 16px; }

.form-section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}

.form-section-head svg { width: 17px; height: 17px; color: var(--brand-green); }

.form-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0 16px;
}

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

.form-help { font-size: 0.76rem; color: var(--text-muted); margin-top: 5px; line-height: 1.45; }

/* Campo con botón de alta rápida al lado (p. ej. zona) */
.field-with-action { display: flex; gap: 8px; align-items: stretch; }
.field-with-action > .form-select,
.field-with-action > .filter-dropdown-wrap { flex: 1 1 auto; min-width: 0; }

.field-with-action .btn-add {
  flex: none;
  padding: 0 12px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.field-errors {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--danger);
}

.has-error .form-input,
.has-error .form-select,
.has-error .form-textarea,
.has-error .filter-dropdown summary { border-color: var(--danger); }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  cursor: pointer;
}

.form-check { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--brand-green); cursor: pointer; }
.check-text { font-size: 0.87rem; font-weight: 600; }
.check-help { font-size: 0.77rem; color: var(--text-muted); margin-top: 2px; font-weight: 400; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 20px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

.form-actions .spacer { flex: 1; }

/* ==========================================================================
   Modales de confirmación
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 20, 16, 0.55);
  backdrop-filter: blur(2px);
}

.modal.open { display: flex; }

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  animation: modal-in 0.16s ease-out;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.modal-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: rgba(220, 75, 75, 0.11);
  color: var(--danger);
  margin-bottom: 14px;
}

.modal-icon svg { width: 21px; height: 21px; }
.modal-icon.neutral { background: rgba(61, 107, 31, 0.1); color: var(--brand-green); }
.modal-icon.restore { background: rgba(43, 108, 176, 0.12); color: #2b6cb0; }

.modal-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 7px; }
.modal-text { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }
.modal-text strong { color: var(--text); }
.modal-body { margin-top: 16px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.modal-card--cierre {
  max-width: 360px;
  padding: 22px 22px 18px;
  text-align: center;
}
.modal-cierre-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}
.modal-card--cierre .modal-icon {
  width: 32px;
  height: 32px;
  margin: 0;
  flex: none;
}
.modal-card--cierre .modal-icon svg { width: 15px; height: 15px; }
.modal-card--cierre .modal-title { margin: 0; }
.modal-card--cierre .modal-text { max-width: 30ch; margin: 0 auto; }
.modal-card--cierre .modal-actions {
  justify-content: center;
  margin-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .modal-card { animation: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .client-split { flex-direction: column; }
  .client-zones { flex: none; max-width: none; width: 100%; max-height: 240px; overflow: auto; }

  .roster-group-head { gap: 8px; }
  .roster-group-meta { gap: 10px; font-size: 0.74rem; }

  .client-table-head { display: none; }

  .client-row {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 16px;
    border-top: 1px solid var(--border);
  }

  .client-row .cell { width: 100%; overflow: visible; white-space: normal; }

  .client-row .cell-main {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }

  .client-row .cell[data-label] {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

  .client-row .cell[data-label]::before {
    content: attr(data-label);
    flex: none;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .client-row .cell-actions { justify-content: flex-end; padding-top: 4px; }

  .roster-head { display: none; }

  .roster-row {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 16px;
    border-top: 1px solid var(--border);
  }

  .roster-row .cell { width: 100%; overflow: visible; white-space: normal; }

  .roster-row .cell-main {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }

  .roster-row .cell[data-label] {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

  .roster-row .cell[data-label]::before {
    content: attr(data-label);
    flex: none;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .roster-row .cell-actions { justify-content: flex-end; padding-top: 4px; }

  .toolbar .form-select,
  .toolbar .filter-dropdown { flex: 1 1 160px; }
  .field { flex-direction: column; align-items: flex-start; gap: 3px; }
  .field-value { text-align: left; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w); }
  .sidebar.open { transform: translateX(0); }
  .main, body.sidebar-collapsed .main { margin-left: 0; }
  body.sidebar-collapsed .sidebar { width: var(--sidebar-w); }
  body.sidebar-collapsed .sidebar-logo { display: block; opacity: 1; }
  body.sidebar-collapsed .sidebar-logo-mini { display: none; }
  body.sidebar-collapsed .sidebar-nav { overflow-y: auto; }
  body.sidebar-collapsed .nav-item { justify-content: flex-start; padding: 10px 12px; }
  body.sidebar-collapsed .nav-item .nav-label,
  body.sidebar-collapsed .user-meta {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    padding: 0;
    background: none;
    box-shadow: none;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
  }
  body.sidebar-collapsed .user-meta { flex: 1; min-width: 0; }
  body.sidebar-collapsed .nav-item .nav-label::before,
  body.sidebar-collapsed .user-meta::before { content: none; }
  body.sidebar-collapsed .user-role { display: block; }
  body.sidebar-collapsed .nav-section-label { opacity: 1; }
  body.sidebar-collapsed .nav-badge { display: block; }
  body.sidebar-collapsed .user-caret { display: block; }
  .topbar { display: flex; }
  .sidebar-toggle, body.sidebar-collapsed .sidebar-toggle { display: none; }
  .page-content { padding: 20px 16px 40px; }
  .messages-container { padding: 14px 16px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .sidebar *, .main { transition: none !important; animation: none !important; }
}

@media (max-width: 1100px) {
  .people-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invite-layout,
  .invite-share { grid-template-columns: 1fr; }
  .invite-share-qr { align-items: flex-start; }
}

@media (max-width: 480px) {
  .page-header { align-items: stretch; }
  .page-header .btn { width: 100%; }
  .people-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .people-kpi { padding: 14px; }
  .people-kpi strong { font-size: 1.25rem; }
  .toolbar { padding: 12px; gap: 8px; }
  .toolbar-search { flex: 1 1 100%; }
  .toolbar .form-select,
  .toolbar .filter-dropdown { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .toolbar > .btn { flex: 1 1 calc(50% - 4px); }
  .filter-dropdown-menu { max-width: min(280px, calc(100vw - 32px)); }
  .detail-hero { padding: 18px; }
  .detail-actions { width: 100%; }
  .detail-actions .btn { flex: 1 1 auto; }
  .modal-card { padding: 20px; }
  .modal-actions .btn { flex: 1 1 auto; }
  .form-actions .btn { flex: 1 1 auto; }
}

/* ==========================================================================
   Áreas seguras de iPhone (notch / home indicator) al abrir como app instalada
   ========================================================================== */

.sidebar {
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
}

.topbar {
  padding-top: env(safe-area-inset-top);
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
}

.main {
  padding-right: env(safe-area-inset-right);
}

.page-content {
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
}

.dark-screen {
  padding-top: calc(32px + env(safe-area-inset-top));
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
  padding-left: calc(16px + env(safe-area-inset-left));
  padding-right: calc(16px + env(safe-area-inset-right));
}

/* Botones táctiles más generosos en pantallas de mouse ausente (celular/tablet) */
@media (hover: none) and (pointer: coarse) {
  .icon-btn { width: 40px; height: 40px; }
  .filter-dropdown summary { min-height: 46px; }
  .sidebar-toggle { width: 20px; height: 48px; }
  .hamburger { width: 44px; height: 44px; }
}

.eyebrow { color:var(--brand-green); font-size:.69rem; font-weight:800; text-transform:uppercase; letter-spacing:.09em; }

/* ==========================================================================
   Patrones y detalles relacionados
   ========================================================================== */

.btn-sm { padding: 6px 10px; min-height: 30px; font-size: .76rem; }
.service-plans-head { justify-content: flex-start; }
.service-plans-head .btn { margin-left: auto; }
.service-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--border);
  color: inherit;
}
.service-plan:last-child { border-bottom: 0; }
.service-plan.is-inactive { opacity: .55; }
.service-plan-main { min-width: 0; }
.service-plan-title { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; flex-wrap: wrap; }
.service-plan-rule { margin-top: 4px; font-size: .84rem; color: var(--text); }
.service-plan-actions { display: flex; gap: 6px; }
.service-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--service-color); flex: 0 0 auto; }
.empty-inline { padding: 18px 0; color: var(--text-muted); font-size: .86rem; }

.upcoming-visit { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: .84rem; }
.upcoming-visit:last-child { border-bottom: 0; }
.upcoming-date { color: var(--text-muted); text-transform: capitalize; }

@media (max-width: 700px) {
}

.client-schedule-actions { display:flex; align-items:center; gap:7px; }
.maintenance-schedule { height:220px; overflow-y:auto; padding:4px 18px; scrollbar-gutter:stable; }
.maintenance-schedule::-webkit-scrollbar { width:8px; }
.maintenance-schedule::-webkit-scrollbar-thumb { border:2px solid var(--surface); border-radius:99px; background:#bdc9c0; }
.maintenance-pattern { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; min-height:46px; padding:7px 0; border-bottom:1px dashed var(--border); }
.maintenance-pattern.is-inactive { opacity:.55; }
.maintenance-pattern-tag { padding:3px 7px; border-radius:99px; background:#eaf6ed; color:var(--brand-green); font-size:.65rem; font-weight:750; }
.maintenance-pattern-main { display:flex; min-width:0; align-items:center; gap:6px; overflow:hidden; white-space:nowrap; }
.maintenance-pattern-main strong { overflow:hidden; font-size:.77rem; font-weight:650; text-overflow:ellipsis; }
.maintenance-pattern-main small { color:var(--text-muted); font-size:.69rem; }
.upcoming-visit { grid-template-columns:52px 1fr auto; padding:13px 0; color:inherit; }
.upcoming-visit time { display:flex; flex-direction:column; align-items:center; padding:7px 5px; border-radius:9px; background:var(--surface-alt); color:var(--brand-green); line-height:1; }
.upcoming-visit time strong { font-size:1.05rem; }
.upcoming-visit time span { margin-top:3px; font-size:.63rem; font-weight:750; text-transform:uppercase; }
.upcoming-visit-main { display:flex; flex-direction:column; gap:4px; }
.upcoming-visit-main small { color:var(--text-muted); }
.upcoming-visit-arrow { color:var(--text-muted); font-size:1.45rem; }
.service-notes.detail-panel { margin-top:10px; }

.pattern-builder { max-width:920px; margin:0 auto; }
/* Los pasos se numeran solos: una seccion oculta (display:none) no incrementa el contador,
   asi cada modo ve 1, 2, 3 sin numeros codificados en la plantilla. */
.pattern-form { counter-reset: paso; }
.pattern-form .pattern-section { counter-increment: paso; }
.pattern-form .pattern-section-number::after { content: counter(paso); }

/* Bloque de instrucciones + propuesta de la IA */
.ai-composer-actions { display:flex; justify-content:flex-end; margin-top:12px; }
.ai-proposal { margin-top:16px; border:1px solid #cdbde8; border-radius:13px; background:#faf8fe; overflow:hidden; }
.ai-proposal-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; border-bottom:1px solid #e4dbf3; }
.ai-proposal-head .eyebrow { color:#7351a5; }
.ai-proposal-head h3 { margin-top:3px; font-size:.95rem; }
.ai-loading { display:flex; align-items:center; gap:13px; margin-top:16px; padding:15px 17px; border:1px solid #cdbde8; border-radius:13px; background:#faf8fe; }
.ai-loading div { display:flex; flex-direction:column; min-width:0; }
.ai-loading strong { font-size:.85rem; }
.ai-loading small { margin-top:3px; color:var(--text-muted); font-size:.73rem; line-height:1.45; }
.ai-loading > b { margin-left:auto; padding:5px 10px; border-radius:99px; background:#efe8fa; color:#7351a5; font-size:.72rem; font-variant-numeric:tabular-nums; }
.ai-error { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:16px; padding:14px 16px; border:1px solid #e5b8b8; border-radius:13px; background:#fff6f6; }
.ai-error > div { min-width:0; }
.ai-error strong { color:#8e2828; font-size:.84rem; }
.ai-error p { margin:3px 0; color:#5d2525; font-size:.77rem; line-height:1.45; }
.ai-error small { display:block; color:#795757; font-size:.71rem; line-height:1.45; }
.ai-error .btn { flex:0 0 auto; }
.ai-spinner { width:22px; height:22px; flex:0 0 22px; border:2.5px solid #e0d5f2; border-top-color:#7351a5; border-radius:50%; animation:ai-spin .7s linear infinite; }
@keyframes ai-spin { to { transform:rotate(360deg); } }
.btn.is-loading { position:relative; color:transparent !important; pointer-events:none; }
.btn.is-loading::after { content:''; position:absolute; top:50%; left:50%; width:15px; height:15px; margin:-7.5px 0 0 -7.5px; border:2px solid rgba(255,255,255,.45); border-top-color:#fff; border-radius:50%; animation:ai-spin .7s linear infinite; }
.btn-ghost.is-loading::after { border-color:rgba(20,32,26,.25); border-top-color:var(--text); }
@media (prefers-reduced-motion:reduce) { .ai-spinner,.btn.is-loading::after { animation-duration:2s; } }

.ai-proposal-summary { margin-top:4px; color:var(--text-muted); font-size:.75rem; }
.ai-proposal-stats { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.ai-proposal-stats span { padding:4px 8px; border-radius:99px; font-size:.67rem; font-weight:700; white-space:nowrap; }
.ai-proposal-stats .is-ok { background:#e5f4e8; color:#276235; }
.ai-proposal-stats .is-warn { background:#fff0cf; color:#76510c; }
.ai-proposal-criteria { padding:10px 16px; border-bottom:1px solid #e4dbf3; background:#f7f3fc; color:#4e4161; font-size:.72rem; line-height:1.5; }
.ai-proposal-criteria > strong,.ai-proposal-warn > strong { display:block; margin-bottom:3px; font-size:.72rem; }
.ai-proposal-criteria ul,.ai-proposal-warn ul { display:flex; flex-wrap:wrap; gap:3px 18px; margin:0; padding-left:17px; }
.ai-proposal-warn { padding:10px 16px; border-bottom:1px solid #e4dbf3; background:#fff8e9; color:#76510c; font-size:.73rem; line-height:1.5; }
.ai-proposal-warn small { display:block; margin-top:3px; color:#76510c; }
.ai-proposal-list { max-height:320px; overflow:auto; padding:4px 16px; }
.ai-proposal-row { display:grid; grid-template-columns:26px 1fr; gap:10px; align-items:center; padding:9px 0; border-top:1px dashed #e4dbf3; }
.ai-proposal-row:first-child { border-top:0; }
.ai-proposal-row > span { display:grid; place-items:center; width:22px; height:22px; border-radius:50%; background:#efe8fa; color:#7351a5; font-size:.66rem; font-weight:750; }
.ai-proposal-row div { display:flex; flex-direction:column; min-width:0; }
.ai-proposal-row strong { font-size:.79rem; text-transform:capitalize; }
.ai-proposal-row small { margin-top:2px; color:var(--text-muted); font-size:.71rem; }
.ai-proposal-actions { display:flex; justify-content:flex-end; gap:8px; padding:13px 16px; border-top:1px solid #e4dbf3; background:#f5f1fb; }
.ai-period .pattern-inline-grid { margin-top:0; }
.ai-period .appointment-limit-toggle { justify-content:flex-start; margin-bottom:7px; font-size:.79rem; font-weight:700; color:var(--text); }

@media (max-width:700px) {
  .ai-error,.ai-proposal-head { align-items:stretch; flex-direction:column; }
  .ai-error .btn { width:100%; }
  .ai-proposal-stats { justify-content:flex-start; }
  .ai-proposal-actions { flex-direction:column; }
  .ai-proposal-actions .btn { width:100%; }
}
.pattern-back { display:inline-flex; margin-bottom:17px; color:var(--text-muted); font-size:.82rem; font-weight:600; }
.pattern-builder-head { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:22px; }
.pattern-builder-head .page-title { margin-top:4px; }
.pattern-client-pill { display:flex; align-items:center; gap:10px; min-width:220px; padding:10px 13px; border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:var(--shadow-sm); }
.pattern-client-pill > span { display:grid; place-items:center; width:36px; height:36px; flex:0 0 36px; border-radius:50%; background:var(--ink-900); color:white; font-weight:750; }
.pattern-client-pill div { display:flex; flex-direction:column; min-width:0; }
.pattern-client-pill small { color:var(--text-muted); font-size:.67rem; }
.pattern-client-pill strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.82rem; }
.pattern-form { display:flex; flex-direction:column; gap:13px; }
.pattern-section { display:grid; grid-template-columns:34px 1fr; gap:14px; padding:21px 22px 22px 18px; border:1px solid var(--border); border-radius:16px; background:var(--surface); box-shadow:var(--shadow-sm); }
.pattern-section-number { display:grid; place-items:center; align-self:start; width:30px; height:30px; border-radius:50%; background:#e8f4e9; color:var(--brand-green); font-size:.78rem; font-weight:800; }
.pattern-section-body { min-width:0; }
.pattern-section-heading { margin:2px 0 17px; }
.pattern-section-heading h2 { font-size:1rem; }
.pattern-section-heading p { margin-top:3px; color:var(--text-muted); font-size:.78rem; }
.pattern-mode-tabs { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.pattern-mode-tabs label { position:relative; display:flex; align-items:center; gap:11px; padding:14px; border:1px solid var(--border-input); border-radius:12px; cursor:pointer; transition:.15s; }
.pattern-mode-tabs label:hover { border-color:#aabbb0; }
.pattern-mode-tabs label.is-active { border-color:var(--brand-green); background:#f3faf4; box-shadow:0 0 0 2px rgba(61,107,31,.08); }
.pattern-mode-tabs input { position:absolute; opacity:0; }
.pattern-mode-tabs label > span:nth-child(3) { display:flex; flex-direction:column; }
.pattern-mode-tabs strong { font-size:.86rem; }
.pattern-mode-tabs small { margin-top:2px; color:var(--text-muted); font-size:.72rem; }
.pattern-mode-tabs b { visibility:hidden; margin-left:auto; color:var(--brand-green); }
.pattern-mode-tabs .is-active b { visibility:visible; }
.pattern-mode-icon { display:grid; place-items:center; width:34px; height:34px; flex:0 0 34px; border-radius:9px; background:#e8f4e9; color:var(--brand-green); font-size:1.1rem; }
.pattern-mode-icon.is-ai { background:#f2edfb; color:#7351a5; }
.pattern-field { margin-top:14px; }
.pattern-field:first-child { margin-top:0; }
.pattern-field--compact { max-width:430px; }
.pattern-field > label,.pattern-date-card label { display:block; margin-bottom:7px; font-size:.79rem; font-weight:700; }
.pattern-field-help,.pattern-field > small { display:block; margin:-2px 0 9px; color:var(--text-muted); font-size:.73rem; }
.pattern-inline-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:14px; }
.pattern-inline-grid--three { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end; }
.pattern-inline-grid .pattern-field { margin-top:0; }
.pattern-input-suffix { display:flex; align-items:stretch; }
.pattern-input-suffix input { border-radius:9px 0 0 9px; }
.pattern-input-suffix span { display:flex; align-items:center; padding:0 12px; border:1px solid var(--border-input); border-left:0; border-radius:0 9px 9px 0; background:var(--surface-alt); color:var(--text-muted); font-size:.75rem; }
.pattern-input-suffix.short { max-width:230px; }
.pattern-field--duration { margin-top:18px; padding-top:16px; border-top:1px dashed var(--border); }
.pattern-weekdays .agenda-checks { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.pattern-weekdays .agenda-checks > div { min-width:0; }
.pattern-weekdays .agenda-checks label { justify-content:center; padding:10px 3px; font-size:.75rem; cursor:pointer; }
.pattern-weekdays .agenda-checks input { accent-color:var(--brand-green); }
.pattern-team-choices .agenda-checks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.pattern-team-choices .agenda-checks label { cursor:pointer; }
.pattern-team-choices input:disabled + label,.pattern-team-choices label:has(input:disabled) { opacity:.45; }
.pattern-ai-hint { margin-top:8px; padding:9px 11px; border-radius:8px; background:#f5f1fb; color:#65517f; font-size:.73rem; }
.pattern-date-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.pattern-date-card { padding:15px; border:1px solid var(--border); border-radius:12px; background:var(--surface-alt); }
.pattern-date-card > div:first-child { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.pattern-date-card > div:first-child span { color:var(--text-muted); font-size:.68rem; font-weight:650; }
.pattern-date-card input[type=range] { width:100%; margin:13px 0 5px; accent-color:var(--brand-green); }
.pattern-date-card > small { display:block; color:var(--text-muted); font-size:.68rem; }
.appointment-range { padding:18px 16px 14px; border:1px solid var(--border); border-radius:12px; background:var(--surface-alt); }
.appointment-range.is-disabled { opacity:.48; cursor:not-allowed; }
.appointment-range.is-disabled * { pointer-events:none; }
.appointment-limit-toggle { display:inline-flex; align-items:center; justify-content:flex-end; gap:6px; color:var(--text-muted); font-size:.66rem; cursor:pointer; }
.appointment-limit-toggle input { width:14px; height:14px; margin:0; flex:0 0 auto; accent-color:var(--brand-green); cursor:pointer; }
.appointment-limit-toggle:hover { color:var(--text); }
.appointment-range-labels { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:end; gap:14px; }
.appointment-range-labels > span { display:flex; flex-direction:column; gap:3px; min-width:0; }
.appointment-range-labels > span:last-child { text-align:right; }
.appointment-range-labels small { color:var(--text-muted); font-size:.66rem; }
.appointment-range-labels strong { overflow:hidden; color:var(--brand-green); font-size:.76rem; text-overflow:ellipsis; text-transform:capitalize; white-space:nowrap; }
.appointment-range-labels > b { color:var(--text-muted); font-size:.7rem; text-align:center; }
.appointment-range-control { position:relative; height:34px; margin:8px 0 1px; }
.appointment-range-track { position:absolute; top:16px; left:8px; right:8px; height:4px; border-radius:99px; background:#d7dfd9; }
.appointment-range-track i { position:absolute; inset:0; border-radius:inherit; background:var(--brand-green); }
.appointment-range-control input[type=range] { position:absolute; inset:0; width:100%; height:34px; margin:0; padding:0; appearance:none; background:transparent; pointer-events:none; }
.appointment-range-control input[type=range]::-webkit-slider-thumb { width:20px; height:20px; appearance:none; border:3px solid white; border-radius:50%; background:var(--brand-green); box-shadow:0 1px 5px rgba(17,53,33,.3); pointer-events:auto; cursor:grab; }
.appointment-range-control input[type=range]::-moz-range-thumb { width:15px; height:15px; border:3px solid white; border-radius:50%; background:var(--brand-green); box-shadow:0 1px 5px rgba(17,53,33,.3); pointer-events:auto; cursor:grab; }
.appointment-range-control input[data-occurrence-end]:disabled::-webkit-slider-thumb { opacity:0; pointer-events:none; }
.appointment-range-control input[data-occurrence-end]:disabled::-moz-range-thumb { opacity:0; pointer-events:none; }
.appointment-range-control input[type=range]::-moz-range-track { background:transparent; border:0; }
.appointment-range-help { display:block; color:var(--text-muted); font-size:.69rem; text-align:center; }
.pattern-real-dates { display:grid; grid-template-columns:1fr minmax(30px,1fr) 1fr; align-items:center; gap:0; margin-top:15px; padding:14px 16px; border:1px solid #cae1ce; border-radius:12px; background:#f4faf5; }
.pattern-real-dates > div { display:grid; grid-template-columns:10px 1fr; column-gap:7px; }
.pattern-real-dates i { grid-row:1/3; width:9px; height:9px; margin-top:4px; border-radius:50%; background:var(--brand-green); }
.pattern-real-dates small { color:var(--text-muted); font-size:.66rem; }
.pattern-real-dates strong { margin-top:3px; font-size:.75rem; text-transform:capitalize; }
.pattern-real-dates > span { height:1px; margin:0 12px; background:#b9d7bf; }
.pattern-advanced { border:1px solid var(--border); border-radius:13px; background:var(--surface); }
.pattern-advanced > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; list-style:none; cursor:pointer; }
.pattern-advanced > summary span { font-size:.8rem; font-weight:700; }
.pattern-advanced > summary small { color:var(--text-muted); font-size:.7rem; }
.pattern-advanced-body { padding:17px; border-top:1px solid var(--border); }
.pattern-holiday .pattern-advanced-body { border-top:0; }
.pattern-holiday .pattern-field { margin:0; }
.pattern-active-toggle { display:flex; align-items:flex-start; gap:10px; padding:13px 16px; border:1px solid var(--border); border-radius:12px; background:var(--surface); cursor:pointer; }
.pattern-active-toggle span { display:flex; flex-direction:column; }
.pattern-active-toggle strong { font-size:.8rem; }.pattern-active-toggle small { margin-top:2px; color:var(--text-muted); font-size:.7rem; }
.pattern-preview { padding:21px; border:1px solid #bcd8c1; border-radius:16px; background:#f7fbf7; }
.pattern-preview-head { display:flex; justify-content:space-between; gap:15px; }.pattern-preview-head h2 { margin-top:3px; font-size:1rem; }.pattern-preview > p { margin:5px 0 14px; color:var(--text-muted); font-size:.77rem; }
.pattern-preview-list { max-height:330px; overflow:auto; }.pattern-preview-row { display:grid; grid-template-columns:70px 1fr; gap:10px; padding:10px 0; border-top:1px dashed #c9ddcc; }.pattern-preview-row > span { color:var(--brand-green); font-size:.7rem; font-weight:750; }.pattern-preview-row div { display:flex; flex-direction:column; }.pattern-preview-row strong { font-size:.77rem; }.pattern-preview-row small { color:var(--text-muted); font-size:.7rem; }
.pattern-actions { position:sticky; bottom:0; z-index:5; display:flex; justify-content:flex-end; gap:9px; padding:14px 0; background:linear-gradient(transparent,var(--bg) 25%); }
.pattern-error-summary,.pattern-form .errorlist { margin:6px 0 0; padding:0; list-style:none; color:var(--danger); font-size:.75rem; }
.pattern-error-summary { padding:12px 14px; border:1px solid #eccaca; border-radius:10px; background:#fff4f4; }
.pattern-field.has-error .form-input,.pattern-field.has-error .form-select,.pattern-date-card.has-error .form-input { border-color:var(--danger); }

@media (max-width:700px) {
  .maintenance-schedule { height:210px; padding-inline:14px; }
  .pattern-builder-head { align-items:flex-start; flex-direction:column; }.pattern-client-pill { width:100%; }
  .pattern-section { grid-template-columns:1fr; padding:17px; }.pattern-section-number { width:27px; height:27px; }
  .pattern-mode-tabs,.pattern-inline-grid,.pattern-inline-grid--three,.pattern-date-grid { grid-template-columns:1fr; }
  .pattern-weekdays .agenda-checks { grid-template-columns:repeat(4,1fr); }
  .pattern-team-choices .agenda-checks { grid-template-columns:1fr; }
  .pattern-real-dates { grid-template-columns:1fr; gap:12px; }.pattern-real-dates > span { display:none; }
  .pattern-actions .btn { flex:1; }
}

/* ==========================================================================
   Kit de formularios (fx-)
   Lenguaje visual compartido por todos los formularios del sistema.
   Toma el vocabulario del constructor de patrones (secciones numeradas,
   tarjetas de opción, lecturas en vivo) para que ninguna pantalla se sienta
   como una lista infinita de campos.
   ========================================================================== */

.fx { max-width: 920px; margin: 0 auto; }
.fx--narrow { max-width: 620px; }

.fx-back { display:inline-flex; align-items:center; gap:6px; margin-bottom:17px; color:var(--text-muted); font-size:.82rem; font-weight:600; }
.fx-back svg { width:15px; height:15px; }
.fx-back:hover { color:var(--brand-green); }

/* Encabezado: título a la izquierda, contexto (cliente, estado…) a la derecha */
.fx-head { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:22px; }
.fx-head-main { display:flex; align-items:center; gap:10px; min-width:0; }
.fx-head .fx-head-main .page-title { margin:0; }
.fx-head-back { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; border-radius:9px; color:var(--text-muted); }
.fx-head-back:hover,.fx-head-back:focus-visible { background:var(--surface); color:var(--brand-green); }
.fx-head-back svg { width:20px; height:20px; }
.fx-head .page-title { margin-top:4px; }
.fx-head .page-subtitle { margin-top:5px; }
.fx-head-pill { display:flex; align-items:center; gap:10px; min-width:210px; padding:10px 13px; border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:var(--shadow-sm); }
.fx-head-pill > span:first-child { display:grid; place-items:center; width:36px; height:36px; flex:0 0 36px; border-radius:50%; background:var(--ink-900); color:#fff; font-weight:750; }
.fx-head-pill div { display:flex; flex-direction:column; min-width:0; }
.fx-head-pill small { color:var(--text-muted); font-size:.67rem; }
.fx-head-pill strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.82rem; }

/* Secciones numeradas */
.fx-form { display:flex; flex-direction:column; gap:13px; }
.fx-section { display:grid; grid-template-columns:34px 1fr; gap:14px; padding:21px 22px 22px 18px; border:1px solid var(--border); border-radius:16px; background:var(--surface); box-shadow:var(--shadow-sm); }
.fx-section--plain { grid-template-columns:1fr; padding:21px 22px 22px; }
.fx-section-num { display:grid; place-items:center; align-self:start; width:30px; height:30px; border-radius:50%; background:#e8f4e9; color:var(--brand-green); font-size:.78rem; font-weight:800; }
.fx-section-body { min-width:0; }
.fx-section-heading { margin:2px 0 17px; }
.fx-section-heading h2 { font-size:1rem; }
.fx-section-heading p { margin-top:3px; color:var(--text-muted); font-size:.78rem; line-height:1.5; }

/* Rejilla de campos: dos columnas por defecto, con escapes explícitos */
.fx-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px 14px; }
.fx-grid--1 { grid-template-columns:minmax(0,1fr); }
.fx-grid--3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.fx-grid + .fx-grid { margin-top:15px; }
.fx-grid > .fx-full { grid-column:1 / -1; }
.fx-grid > .fx-half { grid-column:span 1; }

/* Campo */
.fx-field { min-width:0; }
.fx-field > label,.fx-label { display:block; margin-bottom:7px; font-size:.79rem; font-weight:700; }
.fx-readonly-label { display:block; margin-bottom:7px; font-size:.79rem; font-weight:700; }
.fx-readonly-value { display:block; min-height:42px; padding:10px 12px; border:1px solid var(--border-input); border-radius:var(--radius-sm); background:var(--surface-alt); font-size:.84rem; font-weight:600; overflow-wrap:anywhere; }
.fx-field > label .fx-optional { margin-left:6px; color:var(--text-muted); font-size:.7rem; font-weight:600; }
.fx-field > label .fx-required { margin-left:4px; color:var(--danger); }
.fx-field .form-input,.fx-field .form-select,.fx-field .form-textarea { width:100%; }
.fx-help { display:block; margin:-3px 0 8px; color:var(--text-muted); font-size:.73rem; line-height:1.45; }
.fx-hint { display:block; margin-top:6px; color:var(--text-muted); font-size:.72rem; line-height:1.45; }
.fx-errors,.fx-form .errorlist { display:flex; flex-direction:column; gap:2px; margin:6px 0 0; padding:0; list-style:none; color:var(--danger); font-size:.75rem; }
.fx-field.has-error .form-input,.fx-field.has-error .form-select,.fx-field.has-error .form-textarea { border-color:var(--danger); }
.fx-error-summary { padding:12px 14px; border:1px solid #eccaca; border-radius:12px; background:#fff4f4; color:var(--danger); font-size:.78rem; line-height:1.5; }
.fx-error-summary ul,.fx-error-summary .errorlist { margin:0; padding:0; list-style:none; }

/* Campo con unidad o símbolo pegado */
.fx-affix { display:flex; align-items:stretch; }
.fx-affix .form-input,.fx-affix .form-select { min-width:0; border-radius:0; }
.fx-affix > :first-child { border-top-left-radius:var(--radius-sm); border-bottom-left-radius:var(--radius-sm); }
.fx-affix > :last-child { border-top-right-radius:var(--radius-sm); border-bottom-right-radius:var(--radius-sm); }
.fx-affix span { display:flex; align-items:center; padding:0 12px; border:1px solid var(--border-input); background:var(--surface-alt); color:var(--text-muted); font-size:.75rem; white-space:nowrap; }
.fx-affix span:first-child { border-right:0; }
.fx-affix span:last-child { border-left:0; }
.fx-affix--short { max-width:230px; }

/* Selector de frecuencia de tratamientos: mismo control, mejor proporcionado. */
.fx-affix--frequency { gap:0; }
.fx-affix--frequency > .form-input { flex:0 0 90px; width:90px; text-align:center; font-weight:700; }
.fx-affix--frequency > .filter-dropdown-wrap { flex:1 1 auto; width:auto; min-width:0; }
.fx-affix--frequency .filter-dropdown { min-width:0; }
.fx-affix--frequency .filter-dropdown summary { min-height:42px; padding:10px 13px; border-left:0; border-radius:0 var(--radius-sm) var(--radius-sm) 0; font-size:.92rem; font-weight:650; background:#f7faf6; }
.fx-affix--frequency .filter-dropdown summary > span { padding:0; border:0; background:transparent; color:inherit; font:inherit; }
.fx-affix--frequency .filter-dropdown[open] summary { border-left:0; border-radius:0 var(--radius-sm) 0 0; }
.fx-affix--frequency:focus-within { border-radius:var(--radius-sm); box-shadow:0 0 0 3px rgba(61,107,31,.1); }


/* Campo con botón de alta rápida al lado */
.fx-with-action { display:flex; gap:8px; align-items:stretch; }
.fx-with-action > .form-select,.fx-with-action > .form-input { flex:1 1 auto; min-width:0; }
.fx-with-action .btn { flex:none; padding:0 12px; font-size:.8rem; white-space:nowrap; }

/* Tarjetas de opción (radio o checkbox con cuerpo) */
.fx-choices { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:10px; }
.fx-choices--2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.fx-choice { position:relative; display:flex; align-items:center; gap:11px; padding:14px; border:1px solid var(--border-input); border-radius:12px; background:var(--surface); cursor:pointer; transition:border-color var(--transition), background var(--transition), box-shadow var(--transition); }
.fx-choice:hover { border-color:#aabbb0; }
.fx-choice.is-active { border-color:var(--brand-green); background:#f3faf4; box-shadow:0 0 0 2px rgba(61,107,31,.08); }
.fx-choice input { position:absolute; opacity:0; pointer-events:none; }
.fx-choice-icon { display:grid; place-items:center; width:34px; height:34px; flex:0 0 34px; border-radius:9px; background:#e8f4e9; color:var(--brand-green); font-size:1.05rem; }
.fx-choice-icon svg { width:18px; height:18px; }
.fx-choice-icon.is-alt { background:#eef1fb; color:#4c5fa9; }
.fx-choice-text { display:flex; flex-direction:column; min-width:0; }
.fx-choice-text strong { font-size:.86rem; }
.fx-choice-text small { margin-top:2px; color:var(--text-muted); font-size:.72rem; line-height:1.4; }
.fx-choice-mark { visibility:hidden; margin-left:auto; color:var(--brand-green); font-weight:800; }
.fx-choice.is-active .fx-choice-mark { visibility:visible; }

/* Interruptor con explicación */
.fx-toggle { display:flex; align-items:flex-start; gap:11px; padding:13px 15px; border:1px solid var(--border-input); border-radius:var(--radius-sm); background:var(--surface-alt); cursor:pointer; }
.fx-toggle + .fx-toggle,.fx-toggle + .fx-field,.fx-field + .fx-toggle { margin-top:11px; }
.fx-toggle input { width:17px; height:17px; margin-top:2px; flex:0 0 auto; accent-color:var(--brand-green); cursor:pointer; }
.fx-toggle > span { display:flex; flex-direction:column; min-width:0; }
.fx-toggle strong { font-size:.85rem; }
.fx-toggle small { margin-top:3px; color:var(--text-muted); font-size:.75rem; line-height:1.5; font-weight:400; }

/* Invitaciones: una sola columna, con permisos fáciles de recorrer. */
.invite-form .fx-section-body { display:grid; gap:20px; }
.invite-groups { min-width:0; margin:0; padding:0; border:0; }
.invite-groups legend { margin-bottom:8px; font-size:.79rem; font-weight:700; }
.invite-groups legend small { margin-left:6px; color:var(--text-muted); font-size:.7rem; font-weight:600; }
.invite-group-options > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.invite-group-options > div > div { min-width:0; }
.invite-group-options label { display:flex; align-items:center; gap:9px; min-height:42px; padding:10px 12px; border:1px solid var(--border-input); border-radius:var(--radius-sm); background:var(--surface); font-size:.84rem; font-weight:600; cursor:pointer; }
.invite-group-options label:hover { border-color:#aabbb0; background:var(--surface-alt); }
.invite-group-options input,.invite-staff input { width:17px; height:17px; flex:0 0 auto; margin:0; accent-color:var(--brand-green); cursor:pointer; }
.invite-staff { margin:0; }

/* Lectura en vivo de lo que se está construyendo */
.fx-readout { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-top:16px; padding:14px 16px; border:1px solid #cae1ce; border-radius:12px; background:#f4faf5; }
.fx-readout > div { display:flex; flex-direction:column; gap:3px; min-width:0; }
.fx-readout small { color:var(--text-muted); font-size:.66rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.fx-readout strong { font-size:.82rem; }

/* Nota informativa */
.fx-note { display:flex; gap:11px; padding:13px 15px; border:1px solid var(--border); border-radius:12px; background:var(--surface-alt); color:var(--text-muted); font-size:.78rem; line-height:1.55; }
.fx-note strong { color:var(--text); font-weight:650; }
.fx-note > svg { width:17px; height:17px; flex:0 0 17px; margin-top:2px; color:var(--brand-green); }
.fx-note ol,.fx-note ul { margin:6px 0 0; padding-left:18px; display:flex; flex-direction:column; gap:4px; }
.fx-note--warn { border-color:#ecd59b; background:#fff8e9; color:#76510c; }
.fx-note--warn > svg { color:#b58212; }

/* Bloque opcional plegable */
.fx-advanced { border:1px solid var(--border); border-radius:13px; background:var(--surface); }
.fx-advanced > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; list-style:none; cursor:pointer; }
.fx-advanced > summary::-webkit-details-marker { display:none; }
.fx-advanced > summary span { font-size:.8rem; font-weight:700; }
.fx-advanced > summary small { color:var(--text-muted); font-size:.7rem; }
.fx-advanced-body { padding:17px; border-top:1px solid var(--border); }

/* Acciones fijas al pie */
.fx-actions { position:sticky; bottom:0; z-index:5; display:flex; align-items:center; justify-content:flex-end; gap:9px; padding:14px 0; background:linear-gradient(transparent,var(--bg) 25%); }
.fx[data-cliente-form] .fx-actions { bottom:12px; align-self:flex-end; width:max-content; max-width:100%; padding:8px; border:1px solid var(--border); border-radius:12px; background:var(--bg); box-shadow:var(--shadow-sm); }
.fx[data-cliente-form] .fx-actions .btn { flex:0 0 auto; }
.fx-actions .fx-spacer { flex:1; }
.fx-actions .btn-delete { color:var(--danger); border-color:rgba(220,75,75,.32); }
.fx-actions .btn-delete:hover { background:rgba(220,75,75,.08); border-color:rgba(220,75,75,.5); }

/* Bloque de código QR (invitación de usuario) */
.fx-qr { display:flex; flex-direction:column; align-items:center; gap:14px; padding:18px; border:1px solid var(--border); border-radius:12px; background:var(--surface-alt); }
.fx-qr img { width:240px; max-width:100%; height:auto; border:1px solid var(--border-light,var(--border)); border-radius:10px; background:#fff; image-rendering:pixelated; }

/* Formulario acompañado de una lista (p. ej. festivos) */
.fx-split { display:grid; grid-template-columns:minmax(0,340px) minmax(0,1fr); gap:16px; align-items:start; }
.fx-split .fx-section { margin:0; }
.fx-panel { padding:21px 22px; border:1px solid var(--border); border-radius:16px; background:var(--surface); box-shadow:var(--shadow-sm); }
.fx-panel-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:14px; }
.fx-panel-head h2 { font-size:1rem; }
.fx-panel-head small { color:var(--text-muted); font-size:.75rem; }
.fx-year { margin-top:18px; }
.fx-year:first-child { margin-top:0; }
.fx-year > h3 { margin-bottom:4px; color:var(--text-muted); font-size:.68rem; font-weight:800; letter-spacing:.09em; text-transform:uppercase; }
.fx-panel .holiday-row { align-items:center; font-size:.86rem; }
.fx-panel .holiday-row:last-child { border-bottom:0; }
.fx-panel .holiday-row strong { display:inline-block; min-width:64px; color:var(--brand-green); font-variant-numeric:tabular-nums; }
.fx-panel .holiday-row > span:last-child { display:flex; gap:5px; flex:0 0 auto; }
.fx-panel .holiday-row.is-editing { background:#f3faf4; box-shadow:inset 3px 0 0 var(--brand-green); padding-left:10px; margin-left:-10px; }

@media (max-width:900px) {
  .fx-split { grid-template-columns:1fr; }
}

@media (max-width:720px) {
  .fx-head { flex-direction:column; align-items:flex-start; }
  .fx-head-pill { width:100%; }
  .fx-section { grid-template-columns:1fr; padding:17px; }
  .fx-section--plain { padding:17px; }
  .fx-section-num { width:27px; height:27px; }
  .fx-grid,.fx-grid--3 { grid-template-columns:minmax(0,1fr); }
  .fx-choices,.fx-choices--2 { grid-template-columns:minmax(0,1fr); }
  .fx-affix--short { max-width:none; }
  .fx-actions .btn { flex:1; }
  .invite-group-options > div { grid-template-columns:minmax(0,1fr); }
}

/* ==========================================================================
   Fumigaciones
   Jardín → Tratamientos → Dosis → Productos aplicados.
   ========================================================================== */

/* Filtros compartidos por catálogo y tratamientos */
.catalogo-filtros { display:flex; align-items:flex-start; gap:9px; flex-wrap:nowrap; margin-bottom:14px; }
.catalogo-filtros > .form-input,
.catalogo-filtros > .filter-dropdown-wrap { flex:1 1 0; width:auto; min-width:180px; }
.catalogo-filtros > .form-input { min-height:42px; }
.catalogo-filtros > .btn { flex:0 0 auto; }
.catalogo-conteo { margin-bottom:16px; color:var(--text-muted); font-size:.8rem; }

/* Lista/calendario: selector compacto al final de la misma barra. */
.trat-vistas { display:inline-flex; flex:0 0 auto; min-height:42px; padding:3px; border:1px solid var(--border-input); border-radius:var(--radius-sm); background:var(--surface); }
.trat-vistas a { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-width:82px; padding:6px 10px; border-radius:6px; color:var(--text-muted); font-size:.76rem; font-weight:700; transition:background var(--transition),color var(--transition); }
.trat-vistas a:hover { color:var(--text); background:var(--surface-alt); }
.trat-vistas a.active { color:var(--brand-green); background:rgba(61,107,31,.1); }
.trat-vistas svg { width:15px; height:15px; flex:none; }

/* --- Catálogo --- */
.catalogo-grupo { margin-bottom:22px; }
.catalogo-grupo-head { display:flex; align-items:baseline; gap:10px; margin-bottom:9px; }
.catalogo-grupo-head h2 { font-size:1rem; }
.catalogo-grupo-head h2 span { color:var(--text-muted); font-weight:600; }
.catalogo-grupo-head small { padding:2px 9px; border-radius:99px; background:var(--surface-alt); border:1px solid var(--border); color:var(--text-muted); font-size:.7rem; font-weight:700; }
.catalogo-tabla-wrap { border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); overflow:hidden; box-shadow:var(--shadow-sm); }
.catalogo-tabla-head,.catalogo-row { display:grid; grid-template-columns:minmax(160px,1.5fr) minmax(120px,1.2fr) .8fr .9fr .7fr minmax(180px,1.8fr); gap:14px; align-items:center; padding:11px 16px; }
.catalogo-tabla-head { background:var(--surface-alt); border-bottom:1px solid var(--border); color:var(--text-muted); font-size:.68rem; font-weight:750; letter-spacing:.05em; text-transform:uppercase; }
.catalogo-row { border-bottom:1px solid var(--border); font-size:.82rem; }
.catalogo-row:last-child { border-bottom:0; }
.catalogo-row > div { min-width:0; }
.catalogo-row strong { display:block; }
.catalogo-alerta { display:inline-block; margin-top:3px; color:#8a570a; font-size:.7rem; font-weight:650; }
.catalogo-instruccion { color:var(--text-muted); font-size:.78rem; line-height:1.45; }

/* --- Lista de tratamientos --- */
.trat-tabla-wrap { border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); overflow:hidden; box-shadow:var(--shadow-sm); }
.trat-tabla-head,.trat-row { display:grid; grid-template-columns:minmax(160px,1.4fr) minmax(160px,1.6fr) .9fr .9fr .9fr; gap:14px; align-items:center; padding:13px 16px; }
.trat-tabla-head { background:var(--surface-alt); border-bottom:1px solid var(--border); color:var(--text-muted); font-size:.68rem; font-weight:750; letter-spacing:.05em; text-transform:uppercase; }
.trat-row { border-bottom:1px solid var(--border); color:inherit; font-size:.84rem; transition:background var(--transition); }
.trat-row:last-child { border-bottom:0; }
.trat-row:hover { background:var(--surface-alt); }
.trat-row > div { min-width:0; }
.trat-row small { display:block; margin-top:2px; color:var(--text-muted); font-size:.73rem; }
.trat-estado { display:inline-flex; padding:4px 10px; border-radius:99px; font-size:.71rem; font-weight:700; background:#eef2ef; color:var(--text-muted); white-space:nowrap; }
.trat-estado.is-activo { background:rgba(218,145,35,.15); color:#8a570a; }
.trat-estado.is-finalizado { background:rgba(47,143,70,.12); color:#26733a; }
.trat-estado.is-detenido { background:rgba(120,90,40,.12); color:#6d5420; }
.trat-estado.is-cancelado { background:rgba(220,75,75,.12); color:#a83535; }
.trat-progreso { display:inline-flex; gap:4px; }
.trat-progreso i { width:8px; height:8px; border-radius:50%; background:#d7dfd9; }
.trat-progreso i.is-done { background:var(--brand-green); }
.is-vencida { color:var(--danger) !important; }
.trat-detail-head { align-items:center; }
.trat-detail-title { display:flex; align-items:center; gap:12px; min-width:0; }
.trat-detail-back {
  display:grid; place-items:center;
  width:36px; height:36px; flex:none;
  margin-left:-6px; border-radius:10px;
  color:var(--text-muted);
}
.trat-detail-back svg { width:18px; height:18px; }
.trat-detail-back:hover { color:var(--brand-green); background:#eef4f0; }
.trat-detail-title .page-title-row { margin-top:3px; align-items:center; }
.trat-detail-title .page-title { margin:0; line-height:1.15; }
.trat-detail-tools { display:flex; align-items:center; gap:8px; flex:none; }
.trat-pdf {
  display:grid; place-items:center;
  width:40px; height:40px; padding:0; flex:none;
  border:1px solid #cfe0d4; border-radius:11px;
  background:#f3faf5; color:var(--brand-green);
  box-shadow:var(--shadow-sm);
  cursor:pointer;
  transition:background var(--transition), border-color var(--transition);
}
.trat-pdf svg { width:18px; height:18px; }
.trat-pdf:hover { background:#e6f3ea; border-color:#b4d0bc; }
.trat-pdf--label {
  display:inline-flex; align-items:center; gap:8px;
  width:auto; height:40px; padding:0 13px 0 11px;
  font-size:.78rem; font-weight:750; white-space:nowrap;
}
.trat-pdf--danger { border-color:#eccaca; background:#fff4f4; color:var(--danger); }
.trat-pdf--danger:hover { background:rgba(220,75,75,.12); border-color:rgba(220,75,75,.4); }
.trat-pdf--restore { border-color:#c5d6ea; background:#f3f7fc; color:#2b6cb0; }
.trat-pdf--restore:hover { background:#e6eef8; border-color:#9db6d4; }

/* --- Programación de dosis en el formulario --- */
.dosis-manual { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 24px; }
.dosis-manual-row { display:grid; grid-template-columns:64px minmax(0,1fr) 42px; align-items:center; gap:10px; width:100%; }
.dosis-manual-label { color:var(--text-muted); font-size:.74rem; font-weight:650; white-space:nowrap; }
.dosis-manual-row > .form-input,
.dosis-manual-row > .gs-date { width:100%; min-width:0; max-width:none; }
.dosis-manual-row .gs-date-trigger { height:42px; white-space:nowrap; }
.dosis-manual-row > .icon-btn { width:42px; height:42px; }
.dosis-manual-row > .icon-btn.danger { color:#b86f6f; }
.dosis-manual-row > .icon-btn.danger:hover { color:#9f5555; border-color:#e8caca; background:#fff6f6; }
.dosis-manual-row > .icon-btn.danger:focus-visible { outline:2px solid #cf9696; outline-offset:2px; }
.dosis-manual-row.has-error .gs-date-trigger { border-color:#c98282; box-shadow:0 0 0 3px rgba(184,111,111,.12); }
.dosis-manual-error { grid-column:2 / -1; margin-top:-4px; color:#a85e5e; font-size:.7rem; font-weight:650; }
.dosis-pair-separator {
  grid-column:1 / -1; display:flex; align-items:center; justify-content:center; gap:10px;
  width:50%; margin:1px auto; color:#a9cbb1;
}
.dosis-pair-separator::before,
.dosis-pair-separator::after { content:""; flex:1; border-top:1px solid #d4e4d7; }
.dosis-pair-separator span { width:5px; height:5px; flex:none; border-radius:50%; background:currentColor; }
.dosis-agregar-fecha {
  display:flex; align-items:center; justify-content:center; gap:6px;
  width:100%; min-height:42px; margin:14px 0 0; padding:10px 14px;
  border:1px dashed #b8d5c0; border-radius:var(--radius-sm); background:#f4faf5;
  color:var(--brand-green); font:inherit; font-size:.8rem; font-weight:700; cursor:pointer;
}
.dosis-agregar-fecha:hover { color:var(--brand-green-dark); border-color:var(--brand-green); background:#e8f4eb; }
.dosis-agregar-fecha:focus-visible { outline:2px solid var(--brand-green); outline-offset:3px; }
.dosis-aplicadas-lock { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 24px; margin-bottom:12px; }
.dosis-manual-row.is-lock { grid-template-columns:64px minmax(0,1fr) auto; min-height:42px; }
.dosis-manual-row.is-lock strong { font-size:.84rem; }
.dosis-manual-row.is-lock em { color:#26733a; font-size:.71rem; font-style:normal; font-weight:700; }
.dosis-preview { margin-top:17px; padding:15px 17px; border:1px solid #cae1ce; border-radius:12px; background:#f4faf5; }
.dosis-preview[hidden] { display:none; }
.dosis-preview-head { display:flex; align-items:baseline; gap:12px; margin-bottom:10px; }
.dosis-preview-list { display:flex; flex-wrap:wrap; gap:8px; }
.dosis-preview-row { display:inline-flex; align-items:center; gap:7px; padding:7px 11px; border:1px solid #cae1ce; border-radius:99px; background:var(--surface); font-size:.76rem; }
.dosis-preview-row span { display:grid; place-items:center; width:19px; height:19px; border-radius:50%; background:#e8f4e9; color:var(--brand-green); font-size:.65rem; font-weight:800; }

@media (max-width:1100px) {
  .dosis-manual,
  .dosis-aplicadas-lock { grid-template-columns:1fr; }
  .dosis-pair-separator { width:64%; }
}

/* --- Tarjetas de dosis en el detalle --- */
.dosis-lista { display:flex; flex-direction:column; gap:16px; }
.dosis-card { padding:16px 18px; border:1px solid #cedbd3; border-radius:14px; background:var(--surface); box-shadow:0 3px 12px rgba(11,20,16,.05); scroll-margin-top:calc(var(--topbar-h) + 16px); }
.dosis-card:target { border-color:var(--brand-green); box-shadow:0 0 0 3px rgba(61,107,31,.16); }
.dosis-card.is-aplicada { background:linear-gradient(180deg,#f3faf4 0%,#eaf5ed 100%); border-color:#b7d8be; box-shadow:none; }
.dosis-card.is-aplicada:target { border-color:#2f8f46; box-shadow:0 0 0 3px rgba(47,143,70,.18); }
.dosis-card.is-cancelada { opacity:.55; }
.dosis-card.is-vencida { border-color:#eccaca; }
.dosis-card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; padding-bottom:0; }
.dosis-card.is-aplicada .dosis-card-head { border-bottom-color:#c5ddc9; }
.dosis-card-head h2 { margin:0; font-size:1.18rem; font-weight:750; letter-spacing:-.03em; color:var(--text); line-height:1.25; }
.dosis-card.is-aplicada .dosis-card-head h2 { color:#236b35; }
.dosis-card-head .status-dropdown { flex:0 0 auto; }
.dosis-card-head .status-dropdown-menu { left:auto; right:0; }
.dosis-estado { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:99px; background:#eef2ef; color:var(--text-muted); font-size:.68rem; font-weight:700; white-space:nowrap; }
.dosis-estado svg { width:12px; height:12px; flex:none; }
.dosis-card.is-aplicada .dosis-estado { background:#2f8f46; color:#fff; }
.dosis-card.is-vencida .dosis-estado { background:rgba(220,75,75,.12); color:#a83535; }
.dosis-card.is-cancelada .dosis-estado { background:#e8ebe9; }
.dosis-productos { display:flex; flex-direction:column; padding:2px 14px; border-radius:10px; background:#f0f5f2; }
.dosis-productos.is-empty { background:transparent; padding:0; }
.dosis-producto { display:grid; grid-template-columns:minmax(0,1fr) auto 32px; gap:10px; align-items:center; padding:10px 6px; margin:0 -6px; border-radius:8px; border-top:1px solid #d9e4dd; scroll-margin-top:calc(var(--topbar-h) + 24px); }
.dosis-producto:first-child { border-top:0; }
.dosis-producto.is-nuevo { animation:dosis-producto-nuevo 1.6s ease-in-out 1; }
@keyframes dosis-producto-nuevo {
  0%, 100% { background:transparent; }
  18%, 32% { background:#d7eedc; }
  46%, 54% { background:transparent; }
  68%, 82% { background:#d7eedc; }
}
@media (prefers-reduced-motion: reduce) {
  .dosis-producto.is-nuevo { animation:none; background:#d7eedc; }
}
.dosis-card:not(.is-programada) .dosis-producto { grid-template-columns:1fr auto; }
.dosis-producto div { display:flex; flex-direction:column; min-width:0; }
.dosis-producto strong { font-size:.84rem; }
.dosis-producto small { margin-top:1px; color:var(--text-muted); font-size:.7rem; }
.dosis-cantidad { font-size:.9rem; font-weight:700; color:var(--brand-green); white-space:nowrap; }
.dosis-card.is-aplicada .dosis-cantidad { color:#236b35; }
.dosis-observaciones { margin-top:10px; padding:8px 12px; border-radius:8px; background:var(--surface-alt); color:var(--text-muted); font-size:.76rem; line-height:1.45; }
.dosis-card.is-aplicada .dosis-observaciones { background:rgba(255,255,255,.65); }
.dosis-agregar { display:flex; justify-content:center; grid-column:2; }
.dosis-agregar-open { display:inline-flex; padding:0; border:0; background:transparent; cursor:pointer; }
.dosis-agregar-btn { display:inline-flex; align-items:center; gap:7px; padding:8px 16px; border-radius:99px; background:var(--brand-green); color:#fff; font-size:.8rem; font-weight:700; }
.dosis-agregar-btn svg { width:12px; height:12px; flex:none; }
.dosis-agregar-open:hover .dosis-agregar-btn { background:var(--brand-green-dark); }
.dosis-agregar-open:focus-visible { outline:2px solid var(--brand-green); outline-offset:4px; border-radius:99px; }
.dosis-card .empty-inline { padding:10px 0 2px; font-size:.8rem; }

.modal-card--picker {
  max-width: 560px;
  height: min(640px, calc(100dvh - 40px));
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}
.modal-card--picker .modal-title { margin-bottom: 0; }
.modal-card--picker .modal-title [data-producto-dosis] { font-weight: 600; color: var(--text-muted); }
.dosis-empty { padding:16px 0 10px; text-align:center; }
.dosis-empty strong { font-size:.86rem; font-weight:600; color:var(--text-muted); }
.dosis-producto strong { overflow-wrap:anywhere; }
.prod-picker-stage { display:grid; flex:1; min-height:0; margin-top:8px; overflow:hidden; }
.prod-picker-stage > * { grid-area:1 / 1; min-width:0; }
.prod-picker-stage [hidden] { display:none !important; }
.prod-picker-catalog { display:flex; flex-direction:column; min-height:0; animation:picker-back .2s ease-out; }
.prod-picker-catalog > .modal-actions, .prod-picker-search { flex-shrink:0; }
.prod-picker-form:not([hidden]) { animation:picker-next .2s ease-out; }
.prod-picker-back { border:0; background:transparent; padding:8px 0; color:var(--brand-green); cursor:pointer; font:inherit; font-size:.82rem; font-weight:650; }
.prod-picker-step { margin-top:22px; color:var(--text-muted); font-size:.78rem; }
@keyframes picker-next { from { opacity:0; transform:translateX(24px); } to { opacity:1; transform:translateX(0); } }
@keyframes picker-back { from { opacity:0; transform:translateX(-24px); } to { opacity:1; transform:translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .prod-picker-catalog, .prod-picker-form:not([hidden]), .modal-card--picker { animation:none; }
}
.prod-picker-search { position: relative; margin-top: 14px; }
.prod-picker-search .form-input { padding-left: 38px; }
.prod-picker-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
}
.prod-picker-cats {
  display: flex;
  gap: 5px;
  padding: 5px;
  margin-top: 12px;
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-radius: 12px;
  background: var(--surface-alt);
}
.prod-picker-cat {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.prod-picker-cat:hover { color: var(--text); }
.prod-picker-cat.is-on { color: #fff; background: var(--ink-900); }
.prod-picker-list {
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  overflow: auto;
  margin: 12px -6px 0;
  padding: 0 6px 4px;
}
.prod-picker-grupo { margin-bottom: 14px; }
.prod-picker-grupo:last-of-type { margin-bottom: 0; }
.prod-picker-grupo h3 { margin: 0 4px 8px; font-size: .72rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.prod-picker-grupo h3 span { font-weight: 650; }
.prod-picker-list.is-cat .prod-picker-grupo-cat,
.prod-picker-list.is-cat .prod-picker-grupo-dot { display: none; }
.prod-picker-list.is-cat .prod-picker-grupo:not(:has(.prod-picker-grupo-sub)) h3 { display: none; }
.prod-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.prod-picker-item span { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.prod-picker-item strong { font-size: .84rem; }
.prod-picker-item small { color: var(--text-muted); font-size: .72rem; }
.prod-picker-item em { display: none; color: var(--text-muted); font-size: .68rem; font-style: normal; font-weight: 700; white-space: nowrap; }
.prod-picker-item:hover { border-color: #c8ddd0; background: #f7fbf8; }
.prod-picker-item.is-on { border-color: #c8ddd0; background: #f4faf5; box-shadow: 0 0 0 3px rgba(61, 107, 31, .12); }
.prod-picker-item.is-usado { opacity: .55; cursor: not-allowed; }
.prod-picker-item.is-usado em { display: block; }
.prod-picker-vacio { margin: 18px 4px; color: var(--text-muted); font-size: .82rem; text-align: center; }
.prod-picker-form { margin-top: 0; min-height:0; overflow-y:auto; padding:4px; }
.prod-picker-foot { margin-top: 16px; }
.prod-picker-elegido { margin-bottom: 12px; }
.prod-picker-elegido strong { display:block; font-size:1.2rem; line-height:1.3; overflow-wrap:anywhere; }
.prod-picker-elegido small { display: block; margin-top: 2px; color: var(--text-muted); font-size: .74rem; }
.prod-picker-elegido small:empty { display: none; }
.prod-picker-cantidades { display: grid; grid-template-columns: 1fr .7fr; gap: 10px; }
.prod-picker-foot .modal-actions { margin-top: 14px; }
.dosis-card-actions { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:8px; margin-top:12px; }
@media (max-width:540px) {
  .dosis-card { padding:14px 12px; }
  .dosis-card-head { flex-wrap:wrap; gap:8px; }
  .dosis-card-head h2 { font-size:1.08rem; }
  .dosis-productos { padding:2px 10px; }
  .dosis-producto { gap:8px; }
}
.dosis-card-tools { display:flex; align-items:center; gap:2px; justify-self:start; }
.dosis-card-tools .icon-btn { color:var(--brand-green); }
.dosis-card-tools .icon-btn:hover { background:#eef6f0; border-color:#cfe0d4; color:var(--brand-green-dark); }
.dosis-card.is-aplicada .dosis-card-tools .icon-btn:hover { background:rgba(255,255,255,.7); }
.dosis-card-num { justify-self:end; grid-column:3; display:inline-flex; padding:5px 10px; border-radius:8px; background:#e6f1eb; color:var(--brand-green); font-size:.8rem; font-weight:750; letter-spacing:.03em; }
.dosis-card.is-aplicada .dosis-card-num { background:rgba(47,143,70,.16); color:#236b35; }

/* --- Señal de tratamiento en el jardín --- */
.trat-badge { display:inline-flex; align-items:center; gap:7px; padding:5px 11px; border-radius:99px; background:rgba(218,145,35,.15); border:1px solid rgba(218,145,35,.35); color:#8a570a; font-size:.73rem; font-weight:700; white-space:nowrap; }
.trat-badge::before { content:""; width:7px; height:7px; border-radius:50%; background:#da9123; flex:0 0 auto; }
.trat-badge-lista { margin-left:8px; padding:3px 9px; font-size:.68rem; }
.trat-jardin-item { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 0; border-bottom:1px dashed var(--border); color:inherit; }
.trat-jardin-item:last-child { border-bottom:0; }
.trat-jardin-item > div { display:flex; flex-direction:column; gap:4px; min-width:0; }
.trat-jardin-item strong { font-size:.87rem; }
.trat-jardin-item small { color:var(--text-muted); font-size:.75rem; }
.trat-jardin-item .trat-progreso { margin-top:2px; }

/* --- Calendario mensual de dosis --- */
.trat-calendario { border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow-sm); overflow:hidden; }
.trat-calendario-head { display:flex; align-items:center; justify-content:center; gap:16px; padding:14px 18px; border-bottom:1px solid var(--border); }
.trat-calendario-head > div { min-width:210px; text-align:center; }
.trat-calendario-head h2 { font-size:1rem; }
.trat-calendario-head small { display:block; margin-top:3px; color:var(--text-muted); font-size:.72rem; }
.trat-calendario-nav { display:grid; place-items:center; width:34px; height:34px; border:1px solid var(--border); border-radius:9px; color:var(--text-muted); font-size:1rem; font-weight:700; transition:background var(--transition),color var(--transition),border-color var(--transition); }
.trat-calendario-nav:hover { border-color:var(--border-input); background:var(--surface-alt); color:var(--brand-green); }
.trat-calendario-scroll { min-width:760px; }
.trat-calendario-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.trat-calendario-dias { border-bottom:1px solid var(--border); background:var(--surface-alt); }
.trat-calendario-dias span { padding:8px 10px; color:var(--text-muted); font-size:.66rem; font-weight:750; letter-spacing:.05em; text-align:center; text-transform:uppercase; }
.trat-calendario-dia { min-width:0; min-height:126px; padding:9px; border-right:1px solid var(--border); border-bottom:1px solid var(--border); background:var(--surface); }
.trat-calendario-dia:nth-child(7n) { border-right:0; }
.trat-calendario-dia:nth-last-child(-n+7) { border-bottom:0; }
.trat-calendario-dia > time { display:grid; place-items:center; width:25px; height:25px; margin-bottom:6px; border-radius:50%; color:var(--text-muted); font-size:.72rem; font-weight:700; }
.trat-calendario-dia.is-hoy > time { background:var(--brand-green); color:#fff; }
.trat-calendario-dia.is-fuera { background:#fbfcfb; }
.trat-calendario-dia.is-fuera > time { opacity:.35; }
.trat-calendario-eventos { display:flex; flex-direction:column; gap:5px; }
.trat-calendario-evento { display:block; min-width:0; padding:6px 7px; border-left:3px solid #da9123; border-radius:5px; background:#fff6e5; color:#714a0c; font-size:.65rem; line-height:1.25; }
.trat-calendario-evento:hover { filter:brightness(.97); }
.trat-calendario-evento strong,
.trat-calendario-evento span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.trat-calendario-evento span { margin-top:2px; opacity:.8; }
.trat-calendario-evento.is-aplicada { border-left-color:#2f8f46; background:#eef8f0; color:#236b35; }
.trat-calendario-evento.is-cancelada { border-left-color:#8b9690; background:#f0f2f1; color:#66716b; text-decoration:line-through; }
.trat-calendario-evento.is-vencida { border-left-color:var(--danger); background:#fff0f0; color:#a83535 !important; }

@media (max-width:1000px) {
  .catalogo-filtros { flex-wrap:wrap; }
  .catalogo-filtros > .form-input,
  .catalogo-filtros > .filter-dropdown-wrap { flex-basis:calc(50% - 5px); }
  .catalogo-filtros--con-vista .trat-vistas { margin-left:auto; }
  .trat-calendario { overflow-x:auto; }
  .catalogo-tabla-head { display:none; }
  .catalogo-tabla-wrap { border:0; background:transparent; box-shadow:none; display:grid; gap:10px; }
  .catalogo-row { display:flex; flex-wrap:wrap; gap:10px 16px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); }
  .catalogo-row > div:first-child { flex:1 1 100%; }
  .catalogo-row > div[data-label] { flex:1 1 130px; }
  .catalogo-row > div[data-label]::before { content:attr(data-label); display:block; margin-bottom:3px; color:var(--text-muted); font-size:.64rem; font-weight:700; text-transform:uppercase; }
  .trat-tabla-head { display:none; }
  .trat-tabla-wrap { border:0; background:transparent; box-shadow:none; display:grid; gap:10px; }
  .trat-row { display:flex; flex-wrap:wrap; gap:10px 16px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); }
  .trat-row > div:first-child { flex:1 1 100%; }
  .trat-row > div[data-label] { flex:1 1 110px; }
  .trat-row > div[data-label]::before { content:attr(data-label); display:block; margin-bottom:3px; color:var(--text-muted); font-size:.64rem; font-weight:700; text-transform:uppercase; }
}

@media (max-width:700px) {
  .catalogo-filtros > .form-input,
  .catalogo-filtros > .filter-dropdown-wrap { flex-basis:100%; }
  .catalogo-filtros > .btn { flex:1 1 auto; }
  .catalogo-filtros--con-vista .trat-vistas { margin-left:0; }
  .trat-vistas a { min-width:44px; }
  .trat-vistas span { display:none; }
  .trat-calendario-head { position:sticky; left:0; }
  .prod-picker-cantidades { grid-template-columns:1fr; }
  .dosis-manual-row,
  .dosis-manual-row.is-lock { grid-template-columns:52px minmax(0,1fr) auto; gap:8px; }
}

/* ==========================================================================
   Agenda de mantenimiento · calendario mensual y calendario del día
   ========================================================================== */

/* Sólo el resumen debajo del hero de Mantenimiento. */
.maintenance-summary { width:100%; max-width:none; }
.maintenance-tools { display:flex; flex-wrap:wrap; gap:9px; padding-bottom:13px; border-bottom:1px solid var(--border); }
.maintenance-tool { display:inline-flex; align-items:center; gap:7px; min-height:34px; padding:7px 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text-muted); font-size:.82rem; font-weight:650; }.maintenance-tool:hover { border-color:#b7d0ae; color:var(--brand-green); }.maintenance-tool svg { width:15px; height:15px; }.maintenance-tool b { display:grid; place-items:center; min-width:17px; height:17px; padding:0 4px; border-radius:50%; background:var(--brand-green); color:#fff; font-size:.65rem; }
.maintenance-alerts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:14px 0; }.maintenance-alert { display:grid; grid-template-columns:18px 1fr auto; align-items:center; gap:8px; min-height:42px; padding:10px 13px; border-radius:9px; font-size:.82rem; font-weight:650; }.maintenance-alert i { display:grid; place-items:center; width:17px; height:17px; border-radius:50%; font-size:.68rem; font-style:normal; font-weight:800; }.maintenance-alert b { font-size:.8rem; }.maintenance-alert.is-warning { background:#fff8e9; color:#805711; }.maintenance-alert.is-warning i { background:#ffe3a4; color:#b87500; }.maintenance-alert.is-purple { background:#f5f0fc; color:#6941a3; }.maintenance-alert.is-purple i { background:#dccbf3; color:#7a48b6; font-size:.52rem; }.maintenance-alert.is-danger { background:#fff0f0; color:#bf3d3d; }.maintenance-alert.is-danger i { background:#ffd0d0; color:#d43838; }
.maintenance-months { overflow:hidden; border:1px solid var(--border); border-radius:10px; background:var(--surface); box-shadow:0 8px 24px rgba(31,58,10,.035); }.maintenance-month-head,.maintenance-month { display:grid; grid-template-columns:20px minmax(180px,1.45fr) minmax(110px,1.45fr) repeat(4,minmax(62px,.55fr)) 18px; align-items:center; column-gap:10px; }.maintenance-month-head { min-height:34px; padding:0 15px; color:var(--text-muted); font-size:.68rem; font-weight:700; text-align:center; }.maintenance-month { min-height:60px; padding:9px 15px; border-top:1px solid #edf0e9; transition:background var(--transition); }.maintenance-month:hover { background:#fafcf8; }.maintenance-calendar { color:#3c5f4f; }.maintenance-calendar svg { display:block; width:15px; height:15px; }.maintenance-period { display:flex; align-items:center; gap:8px; min-width:0; }.maintenance-period strong { overflow:hidden; font-size:.84rem; text-overflow:ellipsis; white-space:nowrap; }.maintenance-period em { flex:0 0 auto; padding:3px 6px; border:1px solid #c8deca; border-radius:999px; background:#e8f5e9; color:#3d8048; font-size:.57rem; font-style:normal; font-weight:800; letter-spacing:.03em; text-transform:uppercase; }.maintenance-month.is-projected .maintenance-period em { border-color:#d4dce1; background:#f0f3f5; color:#81909b; }.maintenance-progress { display:block; height:8px; overflow:hidden; border-radius:99px; background:#edf1ee; }.maintenance-progress i { display:block; height:100%; border-radius:inherit; background:#48a35a; }.maintenance-month b { text-align:center; font-size:.84rem; font-variant-numeric:tabular-nums; }.maintenance-arrow { color:#9da7a0; font-size:1.45rem; font-weight:300; line-height:1; text-align:right; }
@media (max-width:760px) { .maintenance-alerts { grid-template-columns:1fr; gap:7px; }.maintenance-months { overflow-x:auto; }.maintenance-month-head,.maintenance-month { min-width:650px; } }

.ag-utilidades { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px; }
.ag-utilidad { display:inline-flex; align-items:center; gap:8px; padding:9px 14px; border:1px solid var(--border); border-radius:var(--radius-pill); background:var(--surface); color:var(--text-muted); font-size:.82rem; font-weight:650; transition:border-color var(--transition),color var(--transition),background var(--transition); }
.ag-utilidad svg { width:16px; height:16px; }
.ag-utilidad:hover { border-color:var(--brand-green); color:var(--brand-green); background:var(--surface-alt); }
.ag-utilidad b { display:grid; place-items:center; min-width:19px; height:19px; padding:0 5px; border-radius:var(--radius-pill); background:var(--danger); color:#fff; font-size:.68rem; }
.ag-utilidad.is-alerta { border-color:#ecd59b; color:#76510c; background:#fff9ec; }

.ag-nav-mes { display:grid; place-items:center; width:36px; height:36px; border:1px solid var(--border); border-radius:var(--radius-sm); color:var(--text-muted); font-weight:700; transition:border-color var(--transition),color var(--transition),background var(--transition); }
.ag-nav-mes:hover { border-color:var(--border-input); background:var(--surface-alt); color:var(--brand-green); }

.ag-totales { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.ag-totales span { padding:8px 13px; border:1px solid var(--border); border-radius:var(--radius-pill); background:var(--surface); color:var(--text-muted); font-size:.8rem; }
.ag-totales b { margin-right:4px; color:var(--text); font-size:.95rem; font-weight:750; }
.ag-totales .is-danger b { color:var(--danger); }

/* --- Calendario del mes: la celda sólo lleva el total del día ------------- */
.ag-cal { border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow-sm); overflow:hidden; }
.ag-cal-dias, .ag-cal-semana { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.ag-cal-dias { border-bottom:1px solid var(--border); background:var(--surface-alt); }
.ag-cal-dias span { padding:9px 10px; color:var(--text-muted); font-size:.66rem; font-weight:750; letter-spacing:.05em; text-align:center; text-transform:uppercase; }
.ag-cal-semana { border-bottom:1px solid var(--border); }
.ag-cal-semana:last-of-type { border-bottom:0; }

.ag-cal-dia { position:relative; display:flex; flex-direction:column; align-items:center; gap:6px; min-width:0; min-height:104px; padding:10px 8px; border:0; border-right:1px solid var(--border); background:var(--surface); font:inherit; text-align:center; cursor:pointer; transition:background var(--transition); }
.ag-cal-dia:nth-child(7n) { border-right:0; }
.ag-cal-dia:hover { background:var(--surface-alt); }
.ag-cal-dia > time { display:flex; align-items:center; gap:5px; color:var(--text-muted); font-size:.75rem; font-weight:700; }
.ag-cal-dia > time i { padding:1px 6px; border-radius:var(--radius-pill); background:var(--brand-green); color:#fff; font-size:.58rem; font-style:normal; letter-spacing:.04em; text-transform:uppercase; }
.ag-cal-dia.is-hoy { background:#eef8f0; box-shadow:inset 0 0 0 2px var(--brand-green); }
.ag-cal-dia.is-hoy > time { color:var(--brand-green-dark); }
.ag-cal-dia.is-hoy .ag-cal-total { color:var(--brand-green-dark); }
.ag-cal-dia.is-fuera { background:#fbfcfb; }
.ag-cal-dia.is-fuera > time, .ag-cal-dia.is-fuera .ag-cal-total { opacity:.4; }
.ag-cal-dia.is-festivo { background:#fff9ec; }
.ag-cal-dia.is-hoy:hover { background:#e4f3e8; }
.ag-cal-dia.is-abierta { background:#eef8f0; box-shadow:inset 0 -3px 0 var(--brand-leaf); }
/* Si el día abierto además es hoy, el aro no se pierde. */
.ag-cal-dia.is-hoy.is-abierta { box-shadow:inset 0 0 0 2px var(--brand-green),inset 0 -3px 0 var(--brand-leaf); }

.ag-cal-total { color:var(--text); font-size:1.6rem; font-weight:750; line-height:1; }
.ag-cal-total.is-cero { color:var(--border-input); font-size:1rem; font-weight:500; }

/* Un punto por sesión; el color es el mismo lenguaje en todo el módulo. */
.ag-cal-puntos { display:flex; align-items:center; gap:3px; min-height:8px; }
.ag-cal-puntos i { width:7px; height:7px; border-radius:50%; background:var(--punto,var(--border-input)); }
.ag-cal-puntos em { color:var(--text-muted); font-size:.6rem; font-style:normal; font-weight:700; }

.is-sin-responsable { --punto:#dc4b4b; }
.is-por-validar { --punto:#e4a11b; }
.is-validada { --punto:#2f8f46; }
.is-cerrada { --punto:#b3bdb7; }

.ag-cal-panel { padding:16px; border-bottom:1px solid var(--border); background:var(--surface-alt); }
.ag-cal-panel:last-child { border-bottom:0; }
.ag-cal-cargando { padding:22px; color:var(--text-muted); font-size:.85rem; text-align:center; }

/* --- Calendario del día: una columna por responsable ---------------------- */
.ag-dia-resumen { display:flex; gap:14px; flex-wrap:wrap; align-items:center; margin-bottom:14px; }
.ag-dia-total { color:var(--text-muted); font-size:.8rem; }
.ag-dia-total b { margin-right:4px; color:var(--text); font-size:1.05rem; font-weight:750; }
.ag-cuenta { display:inline-flex; align-items:center; gap:6px; color:var(--text-muted); font-size:.76rem; }
.ag-cuenta::before { content:''; width:8px; height:8px; border-radius:50%; background:var(--punto,var(--border-input)); }
.ag-cuenta.is-festivo { --punto:#7a5cd6; color:#5b45a8; }
.ag-chip-link { margin-left:auto; color:var(--brand-green); font-size:.78rem; font-weight:650; }

.ag-dia-scroll { overflow-x:auto; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); }
.ag-dia-tabla { display:grid; grid-template-columns:62px repeat(var(--columnas),minmax(170px,1fr)); grid-template-rows:auto calc(var(--franja) * 58px); min-width:100%; }

.ag-dia-esquina { border-right:1px solid var(--border); border-bottom:1px solid var(--border); background:var(--surface-alt); }
.ag-dia-head { padding:10px 12px; border-right:1px solid var(--border); border-bottom:1px solid var(--border); background:var(--surface-alt); }
.ag-dia-head:last-of-type { border-right:0; }
.ag-dia-head a, .ag-dia-head > span { display:block; overflow:hidden; color:var(--text); font-size:.82rem; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.ag-dia-head a:hover { color:var(--brand-green); }
.ag-dia-head small { display:block; margin-top:2px; color:var(--text-muted); font-size:.68rem; }
.ag-dia-head.is-huerfana { background:#fdeaea; }
.ag-dia-head.is-huerfana > span { color:#a83535; }

.ag-dia-horas { position:relative; border-right:1px solid var(--border); background:var(--surface-alt); }
.ag-dia-horas span { position:absolute; right:8px; transform:translateY(-50%); color:var(--text-muted); font-size:.66rem; font-variant-numeric:tabular-nums; }

.ag-dia-col { position:relative; border-right:1px solid var(--border); background-image:repeating-linear-gradient(to bottom,var(--border) 0 1px,transparent 1px calc(100% / var(--franja))); transition:background-color var(--transition); }
.ag-dia-col:last-child { border-right:0; }
.ag-dia-col.is-huerfana { background-color:#fffafa; }
.ag-dia-col.is-drop { background-color:#eef8f0; outline:2px dashed var(--brand-leaf); outline-offset:-3px; }

.ag-dia-evento { position:absolute; overflow:hidden; padding:5px 7px; border-left:3px solid var(--brand-green); border-radius:5px; background:#eaf6ed; color:#1d5730; font-size:.68rem; line-height:1.25; cursor:grab; }
.ag-dia-evento:hover { filter:brightness(.97); z-index:2; }
.ag-dia-evento time { display:block; font-variant-numeric:tabular-nums; opacity:.85; }
.ag-dia-evento strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ag-dia-evento.is-por-validar { border-left-style:dashed; border-left-color:#da9123; background:#fff6e5; color:#714a0c; }
.ag-dia-evento.is-sin-responsable { border-left-style:dashed; border-left-color:var(--danger); background:#fdeaea; color:#a83535; }
.ag-dia-evento.is-cerrada { border-left-color:#8b9690; background:#f0f2f1; color:#66716b; text-decoration:line-through; }
.ag-dia-evento.is-activa { outline:2px solid var(--brand-green); outline-offset:1px; z-index:3; }
.ag-dia-pista { margin:9px 0 0; color:var(--text-muted); font-size:.72rem; }

@media (max-width:760px) {
  .ag-cal-dia { min-height:82px; padding:8px 4px; }
  .ag-cal-total b { font-size:1.15rem; }
  .ag-cal-total { font-size:0; }
  .ag-cal-panel { padding:10px; }
}

/* Globo de acciones rápidas: validar, reprogramar, cancelar o ver detalle. */
.ag-pop { position:fixed; z-index:60; width:250px; padding:13px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); box-shadow:0 12px 32px rgba(11,20,16,.16); }
.ag-pop header { display:flex; flex-direction:column; gap:3px; padding-bottom:10px; margin-bottom:10px; border-bottom:1px solid var(--border); }
.ag-pop header strong { font-size:.86rem; }
.ag-pop header span { color:var(--text-muted); font-size:.72rem; }
.ag-pop-acciones { display:flex; flex-direction:column; gap:6px; }
.ag-pop-acciones .btn { width:100%; justify-content:center; }
.modal-card-form { max-width:480px; }
.modal-card-form .alert { margin-top:14px; }
.modal-card-form .check-inline { margin-top:8px; margin-bottom:0; }

.cita-badges { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; }
.cita-acciones { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 20px; }
.cita-acciones .btn { min-height:40px; padding-left:16px; padding-right:16px; }
.cita-ficha { padding:22px 24px; }
.cita-ficha-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:0 28px;
}
.cita-ficha-grid .field:nth-last-child(-n+2) { border-bottom:none; }
.cita-notas { margin-top:18px; padding-top:16px; border-top:1px solid var(--border); }
.cita-notas .form-label { margin-bottom:8px; }
.cita-notas-acciones { display:flex; justify-content:flex-end; margin-top:10px; }
@media (max-width:640px) {
  .cita-ficha-grid { grid-template-columns:1fr; }
  .cita-ficha-grid .field:nth-last-child(-n+2) { border-bottom:1px dashed var(--border); }
  .cita-ficha-grid .field:last-child { border-bottom:none; }
  .cita-acciones .btn { flex:1 1 calc(50% - 8px); justify-content:center; }
}

/* Formularios largos que sólo aparecen cuando se piden. */
.ag-plegable > summary { display:flex; align-items:baseline; gap:9px; flex-wrap:wrap; cursor:pointer; list-style:none; }
.ag-plegable > summary::-webkit-details-marker { display:none; }
.ag-plegable > summary::after { content:'▾'; margin-left:auto; color:var(--text-muted); font-size:.8rem; }
.ag-plegable[open] > summary::after { content:'▴'; }
.ag-plegable > summary h2 { display:inline; }
.ag-plegable > summary span { color:var(--text-muted); font-size:.78rem; }
.ag-plegable > form { margin-top:16px; }

.check-inline { display:flex; align-items:center; gap:7px; margin-bottom:10px; color:var(--text-muted); font-size:.78rem; }
.check-inline input { accent-color:var(--brand-green); }

.alert { padding:11px 14px; margin-bottom:16px; border:1px solid var(--border); border-radius:var(--radius-sm); font-size:.82rem; }
.alert-warning { border-color:#ecd59b; background:#fff9ec; color:#76510c; }

/* ==========================================================================
   Alertas de agenda · bandeja con jerarquía
   ========================================================================== */

.al-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(280px, 360px);
  gap: 22px 28px;
  align-items: center;
  padding: 22px 24px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.al-hero.is-ok {
  border-color: #badbc3;
  background: linear-gradient(180deg, #eef8f0 0%, var(--surface) 62%);
}
.al-hero.is-atencion {
  border-color: #ecd59b;
  background: linear-gradient(180deg, #fff8e9 0%, var(--surface) 62%);
}
.al-hero.is-urgente {
  border-color: #f0c4c4;
  background: linear-gradient(180deg, #fff4f4 0%, var(--surface) 62%);
}

.al-gauge {
  --pct: 100;
  --tone: var(--brand-green);
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--tone) calc(var(--pct) * 1%), #e4ebe6 0);
}
.al-hero.is-atencion .al-gauge { --tone: #d49214; }
.al-hero.is-urgente .al-gauge { --tone: var(--danger); }
.al-gauge::after {
  content: '';
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--surface);
}
.al-gauge-value { position: relative; z-index: 1; text-align: center; }
.al-gauge-value strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.al-gauge-value small { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }
.al-gauge-value span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.al-hero-kicker {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.al-hero-copy h2 {
  margin-top: 4px;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.al-hero.is-urgente .al-hero-copy h2 { color: #a83535; }
.al-hero.is-atencion .al-hero-copy h2 { color: #8a5f0b; }
.al-hero.is-ok .al-hero-copy h2 { color: #236b35; }
.al-hero-copy p:last-child {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.al-hero-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.al-hero-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-muted);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.al-hero-cat:hover { border-color: var(--border-input); color: var(--text); }
.al-hero-cat-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-alt);
}
.al-hero-cat-icon svg { width: 14px; height: 14px; }
.al-hero-cat-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.al-hero-cat-copy span {
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.al-hero-cat-copy b {
  font-size: 0.92rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.al-hero-cat.is-on.is-urgente { border-color: #f0c4c4; background: #fdeaea; color: #a83535; }
.al-hero-cat.is-on.is-urgente .al-hero-cat-icon { background: #f8d4d4; color: #a83535; }
.al-hero-cat.is-on.is-atencion { border-color: #ecd59b; background: #fff9ec; color: #8a5f0b; }
.al-hero-cat.is-on.is-atencion .al-hero-cat-icon { background: #f6e7c2; color: #8a5f0b; }
.al-hero-cat.is-on.is-seguimiento { border-color: #d6cdf5; background: #f4f1fd; color: #5b45a8; }
.al-hero-cat.is-on.is-seguimiento .al-hero-cat-icon { background: #e6e0f8; color: #5b45a8; }

.al-bloque { margin-bottom: 28px; }
.al-bloque-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.al-bloque-mark {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--border-input);
}
.al-bloque-mark.is-urgente { background: var(--danger); box-shadow: 0 0 0 4px rgba(220, 75, 75, 0.14); }
.al-bloque-mark.is-atencion { background: var(--warning); box-shadow: 0 0 0 4px rgba(228, 161, 27, 0.16); }
.al-bloque-mark.is-ok { background: var(--success); box-shadow: 0 0 0 4px rgba(47, 158, 104, 0.16); }
.al-bloque-head h2 { font-size: 1.02rem; font-weight: 750; letter-spacing: -0.02em; }
.al-bloque-head p { margin-top: 3px; color: var(--text-muted); font-size: 0.8rem; }
.al-bloque-total {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.al-queues { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 960px) {
  .al-queues:has(.al-queue:nth-child(2)) { grid-template-columns: 1fr 1fr; }
  .al-queues .al-queue:only-child { grid-column: 1 / -1; }
}

.al-queue {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 80px;
}
.al-queue.is-urgente { border-color: #f0c4c4; }
.al-queue.is-atencion { border-color: #ecd59b; }
.al-queue.is-seguimiento { border-color: #d6cdf5; }

.al-queue-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
}
.al-queue.is-urgente .al-queue-head { background: #fff7f7; }
.al-queue.is-atencion .al-queue-head { background: #fffbf3; }
.al-queue.is-seguimiento .al-queue-head { background: #f8f6fd; }
.al-queue-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
}
.al-queue-icon svg { width: 18px; height: 18px; }
.al-queue.is-urgente .al-queue-icon { background: #fdeaea; color: #a83535; }
.al-queue.is-atencion .al-queue-icon { background: #fff2d6; color: #8a5f0b; }
.al-queue.is-seguimiento .al-queue-icon { background: #efeafd; color: #5b45a8; }
.al-queue-head h3 { font-size: 0.95rem; font-weight: 750; }
.al-queue-head p { margin-top: 3px; color: var(--text-muted); font-size: 0.78rem; line-height: 1.4; }
.al-queue-count {
  margin-left: auto;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.al-queue.is-urgente .al-queue-count { color: #a83535; }
.al-queue.is-atencion .al-queue-count { color: #8a5f0b; }
.al-queue.is-seguimiento .al-queue-count { color: #5b45a8; }

.al-queue-list { list-style: none; }
.al-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  color: inherit;
}
.al-item:first-child, .al-queue-list li:first-child .al-item { border-top: 0; }
.al-item:hover { background: var(--surface-alt); }
.al-item-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--brand-green);
  font-size: 0.78rem;
  font-weight: 800;
}
.al-item-body { flex: 1; min-width: 0; }
.al-item-body strong {
  display: block;
  overflow: hidden;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.al-item-body small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.74rem;
}
.al-item-bar {
  --pct: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 92px;
}
.al-item-bar i {
  display: block;
  height: 6px;
  border-radius: var(--radius-pill);
  background: #e4ebe6;
  overflow: hidden;
}
.al-item-bar i::after {
  content: '';
  display: block;
  width: calc(var(--pct) * 1%);
  height: 100%;
  background: var(--warning);
}
.al-item-bar em {
  color: var(--text-muted);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 650;
  white-space: nowrap;
}
.al-item-cta {
  color: var(--brand-green);
  font-size: 0.76rem;
  font-weight: 700;
}
.al-item:hover .al-item-cta { text-decoration: underline; }

.al-ok-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid #d7e8db;
  border-radius: var(--radius);
  background: #f6fbf7;
}
.al-ok {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #d7e8db;
  scroll-margin-top: 80px;
}
.al-ok:nth-child(odd) { border-right: 1px solid #d7e8db; }
.al-ok:nth-last-child(-n+2) { border-bottom: 0; }
.al-ok:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.al-ok-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(47, 158, 104, 0.16);
  color: #236b35;
}
.al-ok-check svg { width: 13px; height: 13px; }
.al-ok-icon { display: none; }
.al-ok h3 { font-size: 0.82rem; font-weight: 750; color: #236b35; }
.al-ok p { margin-top: 3px; color: var(--text-muted); font-size: 0.74rem; line-height: 1.4; }

@media (max-width: 980px) {
  .al-hero { grid-template-columns: auto 1fr; }
  .al-hero-cats { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .al-hero { grid-template-columns: 1fr; justify-items: start; }
  .al-hero-cats { width: 100%; }
  .al-item-bar { display: none; }
  .al-ok-list { grid-template-columns: 1fr; }
  .al-ok { border-right: 0; }
  .al-ok:nth-last-child(-n+2) { border-bottom: 1px solid #d7e8db; }
  .al-ok:last-child { border-bottom: 0; }
}

/* ==========================================================================
   Dashboard · banda de hoy y paneles de mantenimiento y fumigación
   ========================================================================== */

.dash-panel--8 { grid-column: span 8; }
.dash-panel--12 { grid-column: span 12; }

/* --- Lo que hay que atender hoy ------------------------------------------ */
.dash-today { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.dash-today-card { display:flex; align-items:center; gap:14px; padding:16px 18px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow-sm); color:inherit; transition:border-color var(--transition),box-shadow var(--transition),transform var(--transition); }
.dash-today-card:hover { border-color:var(--border-input); box-shadow:0 8px 24px rgba(24,58,43,.08); transform:translateY(-1px); }
.dash-today-card.is-alerta { border-color:#f0c4c4; background:#fffafa; }

.dash-today-icon { display:grid; place-items:center; flex:0 0 auto; width:42px; height:42px; border-radius:12px; }
.dash-today-icon svg { width:21px; height:21px; }
.dash-today-icon.is-verde { background:#eaf6ed; color:#236b35; }
.dash-today-icon.is-ambar { background:#fff6e5; color:#8a5f0b; }
.dash-today-icon.is-rojo { background:#fdeaea; color:#a83535; }

.dash-today-body { display:flex; flex-direction:column; gap:1px; min-width:0; }
.dash-today-label { color:var(--text-muted); font-size:.72rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.dash-today-value { font-size:1.7rem; font-weight:750; line-height:1.1; }
.dash-today-note { overflow:hidden; color:var(--text-muted); font-size:.74rem; text-overflow:ellipsis; white-space:nowrap; }

/* --- Cifras sueltas dentro de un panel ----------------------------------- */
.dash-figures { display:flex; flex-wrap:wrap; gap:24px; margin-bottom:16px; }
.dash-figures > div { display:flex; flex-direction:column; gap:2px; }
.dash-figures strong { font-size:1.5rem; font-weight:750; line-height:1.1; }
.dash-figures span { color:var(--text-muted); font-size:.74rem; }
.dash-figures > div.is-alerta strong { color:var(--danger); }
.dash-figures--compact { gap:16px; }
.dash-figures--compact strong { font-size:1.2rem; }

/* --- Barra de estados y su leyenda --------------------------------------- */
.dash-split { display:flex; overflow:hidden; height:10px; border-radius:var(--radius-pill); background:var(--surface-alt); }
.dash-split span { min-width:0; background:var(--punto,var(--border-input)); }
.dash-leyenda { display:flex; gap:16px; flex-wrap:wrap; margin:10px 0 0; padding:0; list-style:none; }
.dash-leyenda li { display:inline-flex; align-items:center; gap:6px; color:var(--text-muted); font-size:.74rem; }
.dash-leyenda li::before { content:''; width:8px; height:8px; border-radius:50%; background:var(--punto,var(--border-input)); }

/* --- Carga de los próximos siete días ------------------------------------ */
.dash-semana { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; margin-top:18px; padding-top:16px; border-top:1px solid var(--border); }
.dash-semana-dia { display:flex; flex-direction:column; align-items:center; gap:5px; padding:8px 4px; border-radius:var(--radius-sm); color:inherit; transition:background var(--transition); }
.dash-semana-dia:hover { background:var(--surface-alt); }
.dash-semana-dia.is-hoy { background:#eef8f0; box-shadow:inset 0 0 0 1px var(--brand-green); }
.dash-semana-barra { display:flex; align-items:flex-end; justify-content:center; width:100%; height:52px; }
.dash-semana-barra i { width:60%; min-height:3px; border-radius:4px 4px 0 0; background:var(--brand-leaf); }
.dash-semana-dia b { font-size:.9rem; font-weight:750; }
.dash-semana-dia small { color:var(--text-muted); font-size:.66rem; text-transform:capitalize; }

.dash-rank-meta { display:block; margin-top:4px; color:var(--text-muted); font-size:.7rem; }
.dash-rank-meta.is-alerta { color:var(--danger); font-weight:650; }

/* A 1180px los paneles de 4 y 6 pasan a 6: los nuevos siguen el mismo salto. */
@media (max-width:1180px) {
  .dash-panel--8 { grid-column:span 12; }
}

@media (max-width:900px) {
  .dash-today { grid-template-columns:1fr; }
  .dash-panel--8, .dash-panel--12 { grid-column:span 12; }
}

/* Composición de la pantalla de acceso. */
.login-screen {
  min-height: 100svh;
  --login-field-bg:rgba(12,25,15,.62);
  background-color:#08110a;
  background-image:
    radial-gradient(ellipse at 50% 48%, rgba(5,13,8,.42) 0%, rgba(5,13,8,.3) 54%, rgba(5,13,8,.36) 100%),
    url('../img/login-garden-bg.png');
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
  background-attachment:fixed;
}
.login-screen .auth-wrapper { max-width:432px; transform:translateY(-36px); transition:opacity .4s ease,transform .45s cubic-bezier(.2,.75,.2,1),filter .4s ease; }
.login-screen .brand-mark { max-height:320px; transition:opacity .3s ease,max-height .45s cubic-bezier(.2,.75,.2,1); }
.login-screen.is-growing .brand-mark { max-height:0; opacity:0; }
.login-screen::after { content:''; position:fixed; z-index:100; inset:0; pointer-events:none; background:radial-gradient(circle at 50% 52%, rgba(139,195,74,.16), rgba(18,25,12,.96) 58%); opacity:0; transition:opacity .45s ease; }
.login-screen.is-entering .auth-wrapper { opacity:0; transform:translateY(-52px) scale(.98); filter:blur(3px); }
.login-screen.is-entering::after { opacity:1; }
.login-screen .auth-card {
  margin-top:18px;
  padding:32px;
  border-radius:22px;
  border-color:rgba(215,232,208,.15);
  background:linear-gradient(150deg, rgba(255,255,255,.035), transparent 58%), rgba(11,25,14,.76);
  box-shadow:0 24px 70px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.04);
  -webkit-backdrop-filter:blur(18px) saturate(112%);
  backdrop-filter:blur(18px) saturate(112%);
  transition:margin-top .45s cubic-bezier(.2,.75,.2,1);
}
.login-screen.is-growing .auth-card { margin-top:0; }
.login-screen .auth-card h1 { margin-bottom:8px; font-size:1.6rem; font-weight:700; line-height:1.2; letter-spacing:-.035em; }
.auth-pin-intro { margin:0 0 24px; color:var(--text-on-dark-muted); font-size:.85rem; line-height:1.6; }
.login-screen .form-group { margin-bottom:20px; }
.login-screen .form-label { margin-bottom:9px; font-size:.8rem; font-weight:600; }
.login-screen .form-input { height:52px; padding:12px 15px; border-radius:10px; font-size:1rem; }
.login-screen .form-input, .login-screen .otp-box {
  border-color:rgba(205,224,198,.2);
  background:var(--login-field-bg);
}
.login-screen .form-input:focus, .login-screen .otp-box:focus { border-color:var(--brand-leaf); }
.login-screen .form-input:is(:autofill, :-webkit-autofill) {
  box-shadow:0 0 0 100px #142619 inset;
  -webkit-text-fill-color:var(--text-on-dark);
  caret-color:var(--text-on-dark);
}
.login-screen .form-input:is(:autofill, :-webkit-autofill):focus {
  box-shadow:0 0 0 100px #142619 inset, 0 0 0 3px rgba(139,195,74,.18);
}
.login-screen .login-pin-heading .form-label { margin-bottom:0; }
.login-screen .auth-submit {
  min-height:52px;
  margin-top:4px;
  border-radius:10px;
  background:var(--brand-leaf);
  color:var(--ink-900);
  font-size:.92rem;
  font-weight:700;
  box-shadow:0 4px 16px rgba(0,0,0,.12);
}
.login-screen .auth-submit:hover:not(:disabled) { background:#9bd15b; }
.login-screen .auth-submit:focus-visible { outline:2px solid var(--text-on-dark); outline-offset:4px; }
.login-screen .auth-footer { margin-top:20px; font-size:.73rem; line-height:1.5; }
@media (max-width:480px) {
  .login-screen { background-attachment:scroll; }
  .login-screen .auth-wrapper { transform:translateY(-18px); }
  .login-screen .auth-card { padding:26px 22px; border-radius:18px; }
}
.login-screen .otp-stage.is-error .otp-box { border-color:var(--danger); }
.login-pin-heading { display:flex; align-items:center; gap:4px; max-height:32px; margin-bottom:6px; overflow:hidden; transition:opacity .25s ease,max-height .3s ease,margin .3s ease; }
.login-screen.is-growing .login-pin-heading { max-height:0; margin-bottom:0; opacity:0; }
.login-pin-heading .form-label { margin-bottom:0; line-height:1; }
.login-pin-toggle { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; width:32px; height:32px; padding:0; border:0; border-radius:8px; background:transparent; color:var(--text-on-dark-muted); cursor:pointer; transition:color .2s; }
.login-pin-toggle svg { width:23px; height:23px; flex:none; }
.login-pin-toggle-slash { display:none; }
.login-pin-toggle[aria-pressed="true"] .login-pin-toggle-slash { display:block; }
.login-pin-toggle:hover { color:var(--brand-leaf); }
.login-pin-toggle:focus-visible { outline:2px solid var(--brand-leaf); outline-offset:3px; }
.login-pin-toggle:disabled { opacity:.45; cursor:default; }
.otp-stage { position:relative; height:52px; transition:height .45s cubic-bezier(.2,.75,.2,1); }
.otp-boxes { position:absolute; z-index:2; inset:0 0 auto; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; height:52px; transform-origin:center 95px; }
.otp-slot { position:relative; display:flex; align-items:center; justify-content:center; min-width:0; height:52px; transition:transform .6s cubic-bezier(.2,.78,.2,1),opacity .3s; }
.otp-box { min-width:0; width:100%; height:52px; border:1px solid rgba(255,255,255,.2); border-radius:10px; background:var(--ink-700); color:var(--text-on-dark); text-align:center; font:inherit; font-size:1.25rem; font-weight:700; outline:0; transition:width .45s cubic-bezier(.2,.8,.2,1),height .45s cubic-bezier(.2,.8,.2,1),border-color .35s,border-radius .45s,background .45s,color .2s,box-shadow .35s,transform .45s; }
.otp-box:focus { border-color: var(--brand-leaf); background: var(--login-field-bg, var(--ink-700)); box-shadow: 0 0 0 3px rgba(139,195,74,.18); }
.otp-box:-webkit-autofill,
.otp-box:-webkit-autofill:hover,
.otp-box:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 100px var(--ink-700) inset; -webkit-text-fill-color: var(--text-on-dark); caret-color: var(--text-on-dark); }
.otp-trace { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: 0; }
.otp-trace rect { fill: none; stroke: var(--brand-leaf); stroke-width: 3; stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 4px rgba(139,195,74,.65)); }
.otp-stage.is-tracing .otp-trace { opacity: 1; }
.otp-stage.is-tracing .otp-trace rect { animation: otp-trace 2.4s linear calc(var(--i) * .2s) infinite both; }
.otp-stage.is-tracing .otp-box { animation: otp-cell-confirm 2.4s linear calc(var(--i) * .2s) infinite both; }
.otp-status { min-height: 1.3em; margin: 13px 0 0; color: var(--text-on-dark-muted); font-size: .78rem; line-height: 1.4; text-align: center; }
.otp-status:empty { display:none; }
.otp-stage.is-error .otp-box { border-color: var(--danger); animation: otp-shake .3s linear 2; }
.auth-submit:disabled { opacity: .65; cursor: wait; }
.login-screen.is-growing .auth-submit:disabled { opacity:1; }
@keyframes otp-trace { 0% { stroke-dashoffset: 100; opacity: 0; } 3%,18% { opacity: 1; } 18% { stroke-dashoffset: 0; } 70% { stroke-dashoffset: 0; opacity: 1; } 90%,100% { stroke-dashoffset: 100; opacity: 0; } }
@keyframes otp-cell-confirm { 0%,18%,100% { background: var(--login-field-bg, var(--ink-700)); box-shadow: none; } 9% { background: #344c1c; box-shadow: 0 0 0 3px rgba(139,195,74,.18); } }
@keyframes otp-shake { 25%,75% { translate: -4px 0; } 50% { translate: 4px 0; } }
@media (prefers-reduced-motion: reduce) {
  .otp-stage,.otp-slot,.otp-box,.login-screen .auth-wrapper,.login-screen::after { transition-duration:.01ms; }
  .otp-stage.is-tracing .otp-trace rect { animation-duration:1.4s; animation-delay:calc(var(--i) * .1s); }
  .otp-stage.is-tracing .otp-box { animation-duration:1.4s; animation-delay:calc(var(--i) * .1s); }
  .otp-stage.is-error .otp-box { animation:none; }
}

/* Acceso con PIN: etiquetas discretas y seis casillas. */
.login-screen--pin .form-input::placeholder { color:#9ca79b; opacity:1; }
.login-screen--pin .otp-boxes { gap:12px; }
.login-screen--pin .auth-submit { font-weight:600; }

.login-screen--pin .login-code-label { display:block; margin-bottom:6px; color:#9ca79b; font-size:.8rem; font-weight:400; }
.login-screen--pin .otp-box { font-weight:500; }

.login-screen--pin .auth-card { padding:20px 24px 28px; border-radius:18px; border-color:rgba(215,232,208,.1); }
.login-screen--pin .form-group { margin-bottom:18px; }
@media (max-width:480px) {
  .login-screen--pin .auth-card { padding:18px 20px 24px; border-radius:16px; }
}
