﻿/* =========================================
   CLEAMGYM — SISTEMA VISUAL v3.0
   Fase 3: Vista de Reporte
   ========================================= */

/* =========================================
   TOKENS Y VARIABLES
   ========================================= */
:root {
  --bg:    #f2f1ef;
  --surf:  #ffffff;
  --surf2: #f7f6f4;
  --surf3: #eeede9;

  --border:      rgba(0, 0, 0, 0.08);
  --border-md:   rgba(0, 0, 0, 0.13);
  --border-gold: rgba(201, 154, 0, 0.30);

  --gold:       #c99a00;
  --gold-hover: #e6b000;
  --gold-dim:   rgba(201, 154, 0, 0.10);
  --gold-dim2:  rgba(201, 154, 0, 0.16);

  --text:       #1c1b18;
  --text-soft:  #7a7874;
  --text-faint: #b5b3af;

  --danger:      #e05252;
  --danger-dim:  rgba(224, 82, 82, 0.12);
  --success:     #4ec87a;
  --success-dim: rgba(78, 200, 122, 0.12);
  --info:        #5b8af5;
  --info-dim:    rgba(91, 138, 245, 0.12);

  --font: 'Satoshi', 'Segoe UI', sans-serif;
  --display-font: 'Satoshi', 'Segoe UI', sans-serif;
  --icon-weight: 400;
  --icon-fill: 0;

  --ts-xs:   0.75rem;
  --ts-sm:   0.875rem;
  --ts-base: 1rem;
  --ts-lg:   1.125rem;
  --ts-xl:   1.375rem;

  --r-sm:   8px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   18px;
  --r-full: 999px;

  --card-pad-y: 18px;
  --card-pad-x: 20px;
  --surface-blur: 0px;
  --nav-bg: var(--surf);
  --control-scale: 1;
  --app-gap: 14px;
  --task-gap: 12px;
  --task-pad-y: 13px;
  --task-pad-x: 12px;
  --progress-h: 5px;
  --nav-radius: 0px;

  --sh-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --sh-md: 0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.07);
  --sh-lg: 0 12px 40px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.08);

  --t-fast:   140ms cubic-bezier(0.16, 1, 0.3, 1);
  --t-smooth: 220ms cubic-bezier(0.16, 1, 0.3, 1);
  --t-spring: 380ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="principal"] {
  --bg:    #f2f1ef;
  --surf:  #ffffff;
  --surf2: #f7f6f4;
  --surf3: #eeede9;

  --border:    rgba(0, 0, 0, 0.08);
  --border-md: rgba(0, 0, 0, 0.13);
  --border-gold: rgba(201, 154, 0, 0.30);

  --text:       #1c1b18;
  --text-soft:  #7a7874;
  --text-faint: #b5b3af;

  --gold:       #c99a00;
  --gold-hover: #e6b000;
  --gold-dim:   rgba(201, 154, 0, 0.10);
  --gold-dim2:  rgba(201, 154, 0, 0.16);

  --font: 'Satoshi', 'Segoe UI', sans-serif;
  --display-font: 'Satoshi', 'Segoe UI', sans-serif;
  --r-lg: 14px;
  --r-xl: 18px;

  --sh-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --sh-md: 0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.07);
  --sh-lg: 0 12px 40px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.08);
}

/* =========================================
   RESET Y BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  transition: background var(--t-smooth), color var(--t-smooth);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior-y: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: var(--theme-backdrop, transparent);
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' var(--icon-fill), 'wght' var(--icon-weight), 'GRAD' 0, 'opsz' 24;
}

input, textarea { -webkit-user-select: auto; user-select: auto; }
button, a, .day-chip, .task-item, .acc-header { -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font-family: inherit; color: inherit; }

/* =========================================
   CONTENEDOR Y TOPBAR
   ========================================= */
.app {
  width: 100%;
  max-width: 480px;
  padding: 16px;
  padding-top: env(safe-area-inset-top, 16px);
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: var(--app-gap, 14px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--surf);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  box-shadow: var(--sh-sm);
  gap: 12px;
}

.topbar h1 {
  font-family: var(--display-font);
  font-size: var(--ts-base);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.topbar h1 span { color: var(--gold); }

.brand-mark {
  width: 30px;
  height: 30px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gold);
  color: #000;
  font-size: 10px;
  font-weight: 900;
}

.brand-logo {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.brand-logo.fallback-icon {
  padding: 2px;
  background: #000;
}

.brand-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: var(--r-full);
  background: var(--surf2);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1;
}

.sync-badge.syncing .material-symbols-outlined {
  animation: spin 0.9s linear infinite;
}

.sync-badge.local,
.sync-badge.offline {
  color: var(--info);
  border-color: rgba(91, 138, 245, 0.22);
  background: var(--info-dim);
}

.sync-badge.synced {
  color: var(--success);
  border-color: rgba(78, 200, 122, 0.22);
  background: var(--success-dim);
}

/* =========================================
   CARDS
   ========================================= */
.card {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--card-pad-y) var(--card-pad-x);
  box-shadow: var(--sh-sm);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--ts-xs);
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.card-title .material-symbols-outlined {
  font-size: 16px;
  color: var(--gold);
  opacity: 0.85;
}

/* =========================================
   BOTONES
   ========================================= */
.btn-primary {
  background: var(--gold);
  color: #000;
  font-weight: 700;
  font-size: var(--ts-sm);
  border: none;
  padding: 13px 18px;
  border-radius: var(--r-lg);
  cursor: pointer;
  width: 100%;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  box-shadow: 0 2px 8px rgba(245, 197, 24, 0.22);
  letter-spacing: 0.01em;
  min-height: calc(44px * var(--control-scale));
}

.btn-primary:hover  { background: var(--gold-hover); }
.btn-primary:active { transform: scale(0.96); box-shadow: none; }

.btn-secondary {
  background: var(--surf2);
  border: 1px solid var(--border-md);
  color: var(--text);
  font-size: var(--ts-sm);
  padding: 11px 16px;
  border-radius: var(--r-md);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
  min-height: calc(42px * var(--control-scale));
}

.btn-secondary:hover  { background: var(--surf3); }
.btn-secondary:active { transform: scale(0.97); }

.btn-icon {
  width: 38px; height: 38px; min-width: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surf2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--text-soft);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.btn-icon:hover  { background: var(--surf3); color: var(--text); }
.btn-icon:active { transform: scale(0.92); }

.btn-danger { color: var(--danger) !important; border-color: rgba(224,82,82,0.25) !important; }
.btn-danger:hover { background: var(--danger-dim) !important; }

.btn-with-icon { display: flex; align-items: center; justify-content: center; gap: 7px; }

/* Botón con estado de carga */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.75;
}

.btn-loading .btn-label { opacity: 0; }

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.25);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* =========================================
   INPUTS
   ========================================= */
.input-base {
  width: 100%;
  padding: 12px 15px;
  background: var(--surf2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  outline: none;
  font-size: var(--ts-base);
  color: var(--text);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  min-height: calc(44px * var(--control-scale));
}

.input-base::placeholder { color: var(--text-faint); }

.input-base:focus {
  border-color: var(--gold);
  background: var(--surf);
  box-shadow: 0 0 0 3px var(--gold-dim2);
}

label {
  display: block;
  font-size: var(--ts-xs);
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* =========================================
   NAVEGACIÓN INFERIOR
   ========================================= */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: var(--nav-bg);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 4px;
  padding-bottom: env(safe-area-inset-bottom, 12px);
  border-top: 1px solid var(--border);
  z-index: 1000;
}

.nav-item {
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none;
  color: var(--text-faint);
  gap: 3px; flex: 1; cursor: pointer; padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--t-fast);
}

.nav-icon-container {
  width: 52px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  transition: background var(--t-smooth), color var(--t-smooth);
}

.nav-item .material-symbols-outlined {
  font-size: 22px;
  font-variation-settings: 'FILL' 0;
  transition: font-variation-settings var(--t-smooth);
}

.nav-label { font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.nav-item.active { color: var(--text); }
.nav-item.active .nav-icon-container { background: var(--gold-dim2); color: var(--gold); }
.nav-item.active .material-symbols-outlined { font-variation-settings: 'FILL' 1; color: var(--gold); }
.nav-item.active .nav-label { color: var(--gold); }

.settings-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.settings-action-grid .btn-secondary,
.settings-action-grid .btn-primary {
  width: 100%;
  padding: 12px;
}

.settings-action-grid .danger-action {
  color: var(--danger);
  border-color: rgba(224,82,82,0.3);
}

.settings-action-grid .install-action {
  grid-column: 1 / -1;
}

/* =========================================
   PIN Y TECLADO
   ========================================= */
.pin-grid {
  font-size: 28px; letter-spacing: 14px; text-align: center;
  color: var(--gold); height: 44px; margin-bottom: 28px;
  display: flex; align-items: center; justify-content: center;
}

.keypad {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; width: 100%; max-width: 290px; margin: 0 auto;
}

.keypad button {
  padding: 16px; font-size: 20px; font-weight: 700;
  border-radius: var(--r-lg);
  background: var(--surf2); border: 1px solid var(--border-md);
  cursor: pointer; color: var(--text);
  transition: background var(--t-fast), transform var(--t-fast), color var(--t-fast);
}

.keypad button:hover  { background: var(--surf3); }
.keypad button:active { background: var(--gold); color: #000; transform: scale(0.93); }

/* =========================================
   MODALES — BOTTOM SHEET
   ========================================= */
.modal-clone, #reportModal, #backupModal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000; display: none;
  align-items: flex-end; justify-content: center;
}

.modal-content {
  background: var(--surf);
  border: 1px solid var(--border-md);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 8px 22px 24px;
  width: 100%; max-width: 480px;
  position: absolute; bottom: 0;
  animation: slideUp var(--t-smooth) forwards;
}

.modal-content::before {
  content: '';
  display: block;
  width: 36px; height: 4px;
  background: var(--border-md);
  border-radius: var(--r-full);
  margin: 12px auto 20px;
}

.confirm-content {
  padding-top: 18px;
}

.confirm-content h3 {
  font-size: var(--ts-lg);
  margin: 0 0 8px;
}

.confirm-content p {
  color: var(--muted);
  font-size: var(--ts-sm);
  line-height: 1.45;
  margin: 0 0 18px;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.confirm-danger {
  background: var(--danger) !important;
  color: #fff !important;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0.5; }
  to   { transform: translateY(0);    opacity: 1;   }
}

.zone-picker-content {
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}

.zone-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.zone-picker-header h3 {
  font-size: var(--ts-md);
  margin-bottom: 3px;
}

.zone-picker-header p {
  color: var(--text-soft);
  font-size: var(--ts-xs);
  line-height: 1.35;
}

.zone-picker-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.zone-picker-option {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surf2);
  color: var(--text);
  font-size: var(--ts-xs);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.zone-picker-option span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zone-picker-option > .material-symbols-outlined:first-child {
  color: var(--text-faint);
}

.zone-picker-option.active {
  border-color: var(--gold);
  background: var(--gold-dim);
  color: var(--gold);
}

.zone-picker-option.active > .material-symbols-outlined {
  color: var(--gold);
}

/* =========================================
   TOASTS
   ========================================= */
#toast-container {
  position: fixed;
  top: env(safe-area-inset-top, 16px);
  left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 420px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999; pointer-events: none;
}

.in-app-toast {
  background: var(--surf2); color: var(--text);
  border: 1px solid var(--border-md);
  padding: 12px 16px; border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  font-size: var(--ts-sm); font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(-10px) scale(0.97);
  transition: opacity var(--t-spring), transform var(--t-spring);
  pointer-events: all;
}

.in-app-toast .material-symbols-outlined { font-size: 18px; flex-shrink: 0; }
.in-app-toast.show { opacity: 1; transform: translateY(0) scale(1); }
.in-app-toast.success .material-symbols-outlined { color: var(--success); }
.in-app-toast.error   .material-symbols-outlined { color: var(--danger);  }
.in-app-toast.info    .material-symbols-outlined { color: var(--info);    }

/* =========================================
   SPA
   ========================================= */
.view { display: none; }
.view.active {
  display: block;
  animation: fadeView 200ms cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes fadeView {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* =========================================
   TAREAS — day chips, progress, items, turnos
   (de fase 2, sin cambios)
   ========================================= */
.day-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.day-scroll::-webkit-scrollbar { display: none; }

.day-chip {
  padding: 7px 14px;
  background: var(--surf2); border: 1px solid var(--border-md);
  border-radius: var(--r-full);
  font-size: var(--ts-xs); font-weight: 700; color: var(--text-soft);
  white-space: nowrap; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  letter-spacing: 0.03em; text-transform: uppercase;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.day-chip:active { transform: scale(0.95); }
.day-chip.active { background: var(--gold-dim2); border-color: var(--gold); color: var(--gold); }
.day-chip.done   { background: var(--success-dim); border-color: rgba(78,200,122,0.35); color: var(--success); }
.day-chip .material-symbols-outlined { font-size: 13px; font-variation-settings: 'FILL' 1; }

.progress-header { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; margin-bottom: 6px; }
.progress-label  { font-size: var(--ts-xs); font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.progress-count  { font-size: var(--ts-xs); font-weight: 700; color: var(--text-soft); }
.progress-count span { color: var(--gold); }
.progress-bar  { height: var(--progress-h); background: var(--surf3); border-radius: var(--r-full); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-hover)); border-radius: var(--r-full); width: 0%; transition: width 0.5s cubic-bezier(0.175,0.885,0.32,1.275); }
.progress-fill.complete { background: linear-gradient(90deg, var(--success), #6ee89a); }

.task-quick-entry {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.task-quick-entry input {
  flex: 1;
}

.task-quick-entry button {
  width: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-filter-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surf);
}

.task-filter {
  min-height: 34px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-soft);
  font-size: var(--ts-xs);
  font-weight: 800;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.task-filter:active {
  transform: scale(0.97);
}

.task-filter.active {
  background: var(--gold-dim2);
  color: var(--gold);
}

.task-assist-content {
  gap: 12px;
}

.task-assist-panel {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surf2);
}

.task-assist-panel.suggested {
  border-color: rgba(179,160,255,0.48);
  background: rgba(179,160,255,0.14);
}

.task-assist-label {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.task-assist-panel p {
  margin: 0;
  font-size: var(--ts-sm);
  line-height: 1.4;
  color: var(--text);
}

.task-assist-zone,
.task-assist-duplicate {
  display: none;
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: var(--ts-xs);
  line-height: 1.35;
}

.task-assist-zone.visible {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  background: rgba(159,196,255,0.18);
  border: 1px solid rgba(159,196,255,0.34);
}

.task-assist-duplicate.visible {
  display: block;
  color: var(--text);
  background: rgba(255,198,111,0.20);
  border: 1px solid rgba(255,198,111,0.38);
}

.task-assist-duplicate strong {
  display: block;
  margin-bottom: 3px;
}

.task-assist-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.task-item {
  display: flex; align-items: center; gap: var(--task-gap);
  padding: var(--task-pad-y) var(--task-pad-x);
  background: var(--surf2); border: 1px solid var(--border);
  border-radius: var(--r-lg); margin-bottom: 6px; cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast), opacity var(--t-fast);
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.task-item:active { transform: scale(0.985); }
.task-item:hover  { background: var(--surf3); border-color: var(--border-md); }
.task-item.done   { background: var(--surf); border-color: var(--border); opacity: 0.72; }
.task-item.done .task-text { text-decoration: line-through; color: var(--text-soft); }

.task-cb { width: 22px; height: 22px; border: 2px solid var(--border-md); border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background var(--t-fast), border-color var(--t-fast); }
.task-item.done .task-cb { background: var(--gold); border-color: var(--gold); color: #000; }
.task-icon { display: flex; align-items: center; justify-content: center; color: var(--text-faint); flex-shrink: 0; }
.task-text { flex: 1; min-width: 0; font-size: var(--ts-sm); color: var(--text); line-height: 1.4; }
.task-del  { color: var(--text-faint); background: none; border: none; padding: 4px; cursor: pointer; display: flex; align-items: center; border-radius: var(--r-sm); transition: color var(--t-fast), background var(--t-fast); flex-shrink: 0; }
.task-del:hover, .task-del:active { color: var(--danger); background: var(--danger-dim); }

.task-zone-chip {
  max-width: 104px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 5px 8px;
  border: 1px solid var(--border-md);
  border-radius: var(--r-full);
  background: var(--surf);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}

.task-zone-chip span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-zone-chip .material-symbols-outlined {
  font-size: 13px;
  flex-shrink: 0;
}

.task-zone-chip:focus {
  border-color: var(--gold);
  color: var(--text);
  box-shadow: 0 0 0 3px var(--gold-dim2);
}

.task-zone-chip.has-zone {
  border-color: var(--border-gold);
  background: var(--gold-dim);
  color: var(--text);
}

.task-zone-chip.inherited-zone {
  cursor: default;
  pointer-events: none;
  opacity: 0.86;
}

.version-grid {
  display: grid;
  gap: 8px;
}

.version-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.version-grid div:last-child {
  border-bottom: none;
}

.version-grid span {
  color: var(--text-soft);
  font-size: var(--ts-xs);
  font-weight: 700;
  text-transform: uppercase;
}

.version-grid strong {
  color: var(--text);
  font-size: var(--ts-sm);
}

.task-with-subtasks {
  display: block;
}

.task-main-row {
  display: flex;
  align-items: center;
  gap: var(--task-gap);
}

.task-text small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.task-sub-toggle {
  color: var(--text-faint);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
  flex-shrink: 0;
}

.task-sub-toggle:hover,
.task-sub-toggle:active {
  color: var(--gold);
  background: var(--gold-dim);
}

.subtask-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.subtask-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.subtask-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 28px;
  align-items: start;
  gap: 8px;
  padding: 8px 9px;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.subtask-check {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--border-md);
  border-radius: 6px;
  background: transparent;
  color: #000;
  cursor: pointer;
}

.subtask-item.done .subtask-check {
  background: var(--gold);
  border-color: var(--gold);
}

.subtask-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.subtask-text {
  min-width: 0;
  color: var(--text);
  font-size: var(--ts-sm);
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: normal;
}

.subtask-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.subtask-meta .task-zone-chip {
  max-width: 116px;
}

@media (max-width: 420px) {
  .task-main-row {
    flex-wrap: wrap;
  }

  .task-text {
    flex-basis: calc(100% - 96px);
  }

  .task-zone-chip {
    max-width: 96px;
  }
}

.subtask-item.done .subtask-text {
  color: var(--text-soft);
  text-decoration: line-through;
}

.reported-pill {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: var(--r-full);
  background: var(--success-dim);
  color: var(--success);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.shift-done-pill {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: var(--r-full);
  background: var(--gold-dim);
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.subtask-del {
  display: flex;
  align-items: center;
  border: none;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  padding: 3px;
  border-radius: var(--r-sm);
}

.subtask-del:hover,
.subtask-del:active {
  color: var(--danger);
  background: var(--danger-dim);
}

.subtask-add {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
}

.subtask-add .input-base {
  padding: 10px 12px;
}

.subtask-add .btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.subtask-empty {
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: var(--ts-xs);
}

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 16px; gap: 8px; }
.empty-state .material-symbols-outlined { font-size: 36px; color: var(--text-faint); font-variation-settings: 'FILL' 0; }
.empty-state p { font-size: var(--ts-sm); color: var(--text-soft); max-width: 28ch; line-height: 1.5; }

.shift-item { display: flex; justify-content: space-between; align-items: center; background: var(--surf2); padding: 11px 14px; border-radius: var(--r-md); border: 1px solid var(--border); font-size: var(--ts-sm); margin-bottom: 6px; transition: background var(--t-fast); }
.shift-item:last-child { margin-bottom: 0; }
.shift-times { display: flex; align-items: center; gap: 10px; }
.shift-badge { display: flex; align-items: center; gap: 4px; font-size: var(--ts-xs); font-weight: 700; letter-spacing: 0.04em; }
.shift-badge.entry { color: var(--success); }
.shift-badge.exit  { color: var(--danger);  }
.shift-badge .material-symbols-outlined { font-size: 14px; }
.shift-sep { color: var(--text-faint); font-size: var(--ts-xs); }
.shift-del { color: var(--text-faint); background: none; border: none; padding: 4px; cursor: pointer; display: flex; align-items: center; border-radius: var(--r-sm); transition: color var(--t-fast), background var(--t-fast); }
.shift-del:hover, .shift-del:active { color: var(--danger); background: var(--danger-dim); }

.sunday-msg { text-align: center; padding: 32px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sunday-msg .material-symbols-outlined { font-size: 48px; color: var(--gold); font-variation-settings: 'FILL' 1; }
.sunday-msg h2 { font-size: var(--ts-lg); color: var(--gold); font-weight: 700; }
.sunday-msg p  { color: var(--text-soft); font-size: var(--ts-sm); max-width: 30ch; line-height: 1.5; }

.day-selector-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.day-opt { padding: 11px; border: 1px solid var(--border-md); border-radius: var(--r-md); text-align: center; font-size: var(--ts-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; color: var(--text-soft); background: var(--surf2); transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.day-opt:active { transform: scale(0.96); }
.day-opt.selected { background: var(--gold-dim2); border-color: var(--gold); color: var(--gold); }
.day-opt.disabled { opacity: 0.28; cursor: not-allowed; pointer-events: none; }

.active-shift-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border-gold);
  border-radius: var(--r-lg);
  background: var(--gold-dim);
  box-shadow: var(--sh-sm);
}

.active-shift-banner > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.active-shift-banner .material-symbols-outlined {
  color: var(--gold);
  font-size: 20px;
  flex-shrink: 0;
}

.active-shift-banner strong,
.active-shift-banner small {
  display: block;
  overflow-wrap: anywhere;
}

.active-shift-banner strong {
  font-size: var(--ts-sm);
  color: var(--text);
  line-height: 1.1;
}

.active-shift-banner small {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-soft);
  line-height: 1.25;
}

.active-shift-banner button {
  flex-shrink: 0;
  padding: 8px 10px;
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  background: var(--surf);
  color: var(--gold);
  font-size: var(--ts-xs);
  font-weight: 800;
  cursor: pointer;
}

.active-shift-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.shift-entry-row {
  display: grid;
  grid-template-columns: 1fr 1fr 48px;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.shift-entry-row input {
  padding: 10px;
}

.shift-entry-row button {
  width: 48px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================
   FASE 3 — REPORTE: SELECTOR DE HORAS
   ========================================= */
.report-shift-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.report-shift-row label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--ts-xs);
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0;
}

.report-shift-row label .material-symbols-outlined {
  font-size: 14px;
}

.report-shift-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.report-shift-chip {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  background: var(--surf2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}

.report-shift-chip:active {
  transform: scale(0.97);
}

.report-shift-chip.active {
  border-color: var(--gold);
  background: var(--gold-dim2);
  box-shadow: inset 0 0 0 1px var(--border-gold);
}

.report-shift-chip > .material-symbols-outlined {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--surf);
  color: var(--text-soft);
  font-size: 16px;
}

.report-shift-chip.active > .material-symbols-outlined {
  color: var(--gold);
  background: var(--surf);
  font-variation-settings: 'FILL' 1;
}

.report-shift-chip span:last-child {
  min-width: 0;
}

.report-shift-chip strong,
.report-shift-chip small {
  display: block;
  overflow-wrap: anywhere;
}

.report-shift-chip strong {
  font-size: var(--ts-xs);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.report-shift-chip small {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-soft);
  line-height: 1.25;
}

.report-shift-empty {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--border-md);
  border-radius: var(--r-md);
  color: var(--text-soft);
  font-size: var(--ts-sm);
  font-weight: 700;
  background: var(--surf2);
}

.report-shift-empty .material-symbols-outlined {
  font-size: 18px;
  color: var(--text-faint);
}

.report-import-btn {
  width: 100%;
  min-height: 42px;
  margin: 10px 0 12px;
}

.time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.time-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.time-field label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--ts-xs);
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0;
}

.time-field label .material-symbols-outlined {
  font-size: 14px;
}

.time-field label.entry-label { color: var(--success); }
.time-field label.exit-label  { color: var(--danger);  }

.time-field input[type="time"] {
  width: 100%;
  padding: 11px 13px;
  background: var(--surf2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  outline: none;
  font-size: var(--ts-base);
  font-weight: 700;
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.time-field input[type="time"]:focus {
  border-color: var(--gold);
  background: var(--surf);
  box-shadow: 0 0 0 3px var(--gold-dim2);
}

.time-field.entry input[type="time"]:focus { border-color: var(--success); box-shadow: 0 0 0 3px rgba(78,200,122,0.14); }
.time-field.exit  input[type="time"]:focus { border-color: var(--danger);  box-shadow: 0 0 0 3px rgba(224,82,82,0.12);  }

/* =========================================
   FASE 3 — REPORTE: ACORDEONES DE ZONAS
   ========================================= */
.acc-item {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 8px;
  background: var(--surf2);
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.acc-item:last-child { margin-bottom: 0; }

.acc-item.open {
  border-color: var(--border-md);
  box-shadow: var(--sh-sm);
}

.acc-header {
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  font-size: var(--ts-sm);
  color: var(--text);
  gap: 10px;
  transition: background var(--t-fast);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.acc-header:active { background: var(--surf3); }

.acc-header-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
}

.acc-zone-icon {
  width: 28px; height: 28px;
  background: var(--surf3);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--t-fast);
}

.acc-zone-icon .material-symbols-outlined {
  font-size: 15px;
  color: var(--text-soft);
}

.acc-item.open .acc-zone-icon {
  background: var(--gold-dim);
}

.acc-item.open .acc-zone-icon .material-symbols-outlined {
  color: var(--gold);
}

.acc-zone-name {
  font-size: var(--ts-sm);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.acc-badge {
  background: var(--surf3);
  color: var(--text-soft);
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: var(--ts-xs);
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  transition: background var(--t-fast), color var(--t-fast);
}

/* Badge dorado cuando hay acciones completadas */
.acc-badge.has-done {
  background: var(--gold-dim2);
  color: var(--gold);
}

.acc-chevron {
  font-size: 18px;
  color: var(--text-faint);
  transition: transform var(--t-smooth), color var(--t-smooth);
  font-variation-settings: 'FILL' 0;
}

.acc-item.open .acc-chevron {
  transform: rotate(180deg);
  color: var(--text-soft);
}

/* Separador cuando está abierto */
.acc-item.open .acc-header {
  border-bottom: 1px solid var(--border);
}

.acc-body {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.acc-item.open .acc-body {
  max-height: 2000px;
  padding: 12px 14px 14px;
}

/* =========================================
   FASE 3 — REPORTE: ACCIONES DENTRO DE ZONA
   ========================================= */
.rep-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-md);
  margin-bottom: 4px;
  transition: background var(--t-fast);
  cursor: pointer;
}

.rep-action:last-child { margin-bottom: 0; }
.rep-action:hover { background: var(--surf3); }

.rep-action input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 4px;
}

.rep-action-text {
  flex: 1;
  font-size: var(--ts-sm);
  color: var(--text);
  line-height: 1.35;
  transition: color var(--t-fast), text-decoration var(--t-fast);
}

.rep-action.checked .rep-action-text {
  color: var(--text-soft);
  text-decoration: line-through;
}

.del-btn {
  color: var(--text-faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
  flex-shrink: 0;
}

.del-btn:hover { color: var(--danger); background: var(--danger-dim); }

.del-btn .material-symbols-outlined { font-size: 16px; }

/* Formulario para agregar acción */
.acc-add-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.acc-add-row input {
  flex: 1;
  padding: 9px 12px;
  background: var(--surf);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  outline: none;
  font-size: var(--ts-sm);
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.acc-add-row input::placeholder { color: var(--text-faint); }
.acc-add-row input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim2); }

.acc-add-btn {
  width: 36px; height: 36px;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--gold);
  flex-shrink: 0;
  transition: background var(--t-fast), transform var(--t-fast);
}

.acc-add-btn:hover  { background: var(--gold-dim2); }
.acc-add-btn:active { transform: scale(0.92); }
.acc-add-btn .material-symbols-outlined { font-size: 18px; }

/* =========================================
   FASE 3 — REPORTE: MODAL DE VISTA PREVIA
   ========================================= */
.modal-preview {
  background: var(--surf);
  border: 1px solid var(--border-md);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 8px 20px 24px;
  width: 100%; max-width: 480px;
  max-height: 88vh;
  display: flex; flex-direction: column;
  position: absolute; bottom: 0;
  animation: slideUp var(--t-smooth) forwards;
}

.modal-preview::before {
  content: '';
  display: block;
  width: 36px; height: 4px;
  background: var(--border-md);
  border-radius: var(--r-full);
  margin: 12px auto 16px;
}

.modal-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.modal-preview-header h3 {
  font-size: var(--ts-base);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-preview-header h3 .material-symbols-outlined {
  font-size: 18px;
  color: var(--gold);
}

.preview-meta {
  font-size: var(--ts-xs);
  color: var(--text-soft);
}

.modal-preview textarea {
  flex: 1;
  min-height: 220px;
  padding: 14px;
  background: var(--surf2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  outline: none;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text);
  resize: none;
  margin-bottom: 14px;
  transition: border-color var(--t-fast);
  -webkit-user-select: text;
  user-select: text;
}

.modal-preview textarea:focus {
  border-color: var(--border-md);
}

.modal-preview-actions {
  display: flex;
  gap: 8px;
}

.btn-whatsapp {
  flex: 2;
  background: #25D366;
  color: #fff;
  border: none;
  padding: 13px 16px;
  border-radius: var(--r-lg);
  font-size: var(--ts-sm);
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: background var(--t-fast), transform var(--t-fast);
}

.btn-whatsapp:hover  { background: #1ebe57; }
.btn-whatsapp:active { transform: scale(0.96); }

.backup-download-link {
  text-decoration: none;
}

.btn-copy {
  flex: 1;
  background: var(--surf2);
  color: var(--text);
  border: 1px solid var(--border-md);
  padding: 13px 16px;
  border-radius: var(--r-lg);
  font-size: var(--ts-sm);
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: background var(--t-fast), transform var(--t-fast);
}

.btn-copy:hover  { background: var(--surf3); }
.btn-copy:active { transform: scale(0.96); }

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-soft);
  cursor: pointer;
  padding: 4px;
  display: flex; align-items: center;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}

.btn-close-modal:hover { color: var(--text); background: var(--surf2); }

/* =========================================
   ADMIN
   ========================================= */
.user-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surf2); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #000; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.role-badge { font-size: 10px; background: var(--surf); border: 1px solid var(--border); padding: 4px 8px; border-radius: 8px; margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; }

/* =========================================
   MODO OSCURO
   ========================================= */
[data-mode="dark"][data-theme="principal"] {
  --bg: #141414;
  --surf: #1f1f1f;
  --surf2: #282828;
  --surf3: #333333;

  --border: rgba(255, 255, 255, 0.08);
  --border-md: rgba(255, 255, 255, 0.14);
  --border-gold: rgba(245, 197, 24, 0.32);

  --text: #f7f7f7;
  --text-soft: #b8b8b8;
  --text-faint: #737373;

  --gold: #f5c518;
  --gold-hover: #ffd84d;
  --gold-dim: rgba(245, 197, 24, 0.10);
  --gold-dim2: rgba(245, 197, 24, 0.18);

  --sh-sm: 0 2px 8px rgba(0,0,0,0.22);
  --sh-md: 0 8px 24px rgba(0,0,0,0.30);
  --sh-lg: 0 18px 44px rgba(0,0,0,0.38);
}
/* =========================================
   UTILIDADES
   ========================================= */
.hidden { display: none !important; }
.text-muted  { color: var(--text-soft);  }
.text-faint  { color: var(--text-faint); }
.text-gold   { color: var(--gold);       }
.text-danger { color: var(--danger);     }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.icon-sm { font-size: 16px; vertical-align: middle; }
.icon-md { font-size: 20px; vertical-align: middle; }
.icon-lg { font-size: 24px; vertical-align: middle; }

/* =========================================
   ESTILO MOBILE PASTEL — INSPIRADO EN REFERENCIA
   ========================================= */
[data-mode="light"][data-theme="principal"] {
  --bg: #e9e2ff;
  --surf: #f8f8f8;
  --surf2: #ffffff;
  --surf3: #eef4ff;
  --border: rgba(13, 16, 27, 0.07);
  --border-md: rgba(13, 16, 27, 0.12);
  --border-gold: rgba(179, 160, 255, 0.45);
  --gold: #b3a0ff;
  --gold-hover: #a48cff;
  --gold-dim: rgba(179, 160, 255, 0.16);
  --gold-dim2: rgba(179, 160, 255, 0.26);
  --success: #6edc94;
  --success-dim: rgba(110, 220, 148, 0.22);
  --info: #8ab8f5;
  --info-dim: rgba(138, 184, 245, 0.20);
  --text: #0d101b;
  --text-soft: #62606d;
  --text-faint: #aaa7b5;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --card-pad-y: 18px;
  --card-pad-x: 18px;
  --nav-bg: #0d101b;
  --sh-sm: 0 12px 34px rgba(88, 74, 130, 0.10);
  --sh-md: 0 18px 46px rgba(88, 74, 130, 0.16);
  --sh-lg: 0 26px 70px rgba(88, 74, 130, 0.22);
}

[data-mode="light"][data-theme="principal"] body {
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,0.8), transparent 34%),
    linear-gradient(180deg, #e7e0ff 0%, #f4f1ff 46%, #e9e2ff 100%);
}

[data-mode="light"][data-theme="principal"] .app {
  max-width: 430px;
  padding: 18px 16px 110px;
}

[data-mode="light"][data-theme="principal"] .topbar {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 4px 2px 8px;
}

[data-mode="light"][data-theme="principal"] .brand-mark,
[data-mode="light"][data-theme="principal"] .btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(13,16,27,0.07);
  box-shadow: 0 12px 24px rgba(88, 74, 130, 0.12);
}

[data-mode="light"][data-theme="principal"] .topbar h1 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

[data-mode="light"][data-theme="principal"] .topbar h1 span {
  color: var(--text);
}

[data-mode="light"][data-theme="principal"] #userGreet {
  color: var(--text-soft) !important;
  font-weight: 600;
}

[data-mode="light"][data-theme="principal"] .card {
  border: 0;
  border-radius: 28px;
  background: rgba(248, 248, 248, 0.94);
  box-shadow: var(--sh-sm);
}

[data-mode="light"][data-theme="principal"] .card-title {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

[data-mode="light"][data-theme="principal"] .card-title .material-symbols-outlined {
  color: var(--text);
}

.daily-hero {
  position: relative;
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  overflow: hidden;
  padding: 20px 18px;
  margin-bottom: 16px;
  border-radius: 28px;
  background: linear-gradient(135deg, #b3a0ff 0%, #cabdff 54%, #9fc4ff 100%);
  color: #0d101b;
  box-shadow: 0 22px 46px rgba(98, 80, 170, 0.22);
}

.daily-hero::after {
  content: '';
  position: absolute;
  inset: auto -30px -44px auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
}

.daily-hero > div:first-child {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.daily-kicker {
  display: inline-flex;
  margin-bottom: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.30);
  font-size: 11px;
  font-weight: 800;
}

.daily-hero strong,
.daily-hero small {
  display: block;
}

.daily-hero strong {
  max-width: 190px;
  font-size: 30px;
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: 0;
}

.daily-hero small {
  margin-top: 8px;
  max-width: 230px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(13,16,27,0.74);
}

.daily-hero-orbit {
  position: relative;
  z-index: 1;
  width: 104px;
  height: 104px;
  flex-shrink: 0;
}

.daily-hero-orbit span {
  position: absolute;
  display: block;
  border-radius: 24px;
  box-shadow: 0 18px 28px rgba(70, 56, 100, 0.22);
}

.daily-hero-orbit span:nth-child(1) {
  width: 58px;
  height: 58px;
  right: 8px;
  top: 3px;
  background: linear-gradient(135deg, #ff9d00, #ffd36f);
  border-radius: 50%;
}

.daily-hero-orbit span:nth-child(2) {
  width: 58px;
  height: 58px;
  left: 2px;
  bottom: 13px;
  background: linear-gradient(135deg, #0d101b, #5d6579);
}

.daily-hero-orbit span:nth-child(3) {
  width: 50px;
  height: 50px;
  right: 2px;
  bottom: 2px;
  background: linear-gradient(135deg, #f0d9d0, #83776f);
}

[data-mode="light"][data-theme="principal"] .day-scroll {
  gap: 10px;
  padding: 4px 24px 18px;
  margin: 0 -24px;
  scroll-padding: 24px;
}

[data-mode="light"][data-theme="principal"] .day-chip {
  min-width: 76px;
  min-height: 48px;
  justify-content: center;
  flex-direction: row;
  gap: 6px;
  padding: 0 16px;
  border-radius: 999px;
  background: #f8f8f8;
  border-color: rgba(13,16,27,0.10);
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.01em;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(88, 74, 130, 0.08);
}

[data-mode="light"][data-theme="principal"] .day-chip.active {
  background: #0d101b;
  border-color: #0d101b;
  color: #ffffff;
}

[data-mode="light"][data-theme="principal"] .day-chip.done {
  background: #b7efc5;
  border-color: transparent;
  color: #0d101b;
}

[data-mode="light"][data-theme="principal"] .task-filter-bar {
  border: 0;
  background: #eeeeef;
  border-radius: 999px;
}

[data-mode="light"][data-theme="principal"] .task-filter {
  border-radius: 999px;
  color: var(--text-soft);
}

[data-mode="light"][data-theme="principal"] .task-filter.active {
  background: #0d101b;
  color: #ffffff;
}

[data-mode="light"][data-theme="principal"] .btn-primary {
  background: #0d101b;
  color: #ffffff;
  border-radius: 18px;
  box-shadow: 0 14px 24px rgba(13,16,27,0.18);
}

[data-mode="light"][data-theme="principal"] .btn-primary:hover {
  background: #171b29;
}

[data-mode="light"][data-theme="principal"] .btn-secondary,
[data-mode="light"][data-theme="principal"] .input-base {
  background: #ffffff;
  border-color: rgba(13,16,27,0.08);
  border-radius: 18px;
}

[data-mode="light"][data-theme="principal"] .task-item,
[data-mode="light"][data-theme="principal"] .shift-item,
[data-mode="light"][data-theme="principal"] .report-shift-chip,
[data-mode="light"][data-theme="principal"] .acc-item,
[data-mode="light"][data-theme="principal"] .user-row {
  background: #ffffff;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 12px 26px rgba(88, 74, 130, 0.08);
}

[data-mode="light"][data-theme="principal"] .task-item.done {
  background: #f4f4f4;
  opacity: 0.78;
}

[data-mode="light"][data-theme="principal"] .task-item.done .task-cb,
[data-mode="light"][data-theme="principal"] .subtask-item.done .subtask-check {
  background: #b7efc5;
  border-color: #b7efc5;
  color: #0d101b;
}

[data-mode="light"][data-theme="principal"] .task-zone-chip.has-zone,
[data-mode="light"][data-theme="principal"] .active-shift-banner,
[data-mode="light"][data-theme="principal"] .report-shift-chip.active,
[data-mode="light"][data-theme="principal"] .acc-badge.has-done {
  background: rgba(179,160,255,0.24);
  border-color: rgba(179,160,255,0.42);
  color: #0d101b;
}

[data-mode="light"][data-theme="principal"] .progress-fill {
  background: linear-gradient(90deg, #b3a0ff, #9fc4ff);
}

[data-mode="light"][data-theme="principal"] .progress-fill.complete {
  background: linear-gradient(90deg, #75df9b, #9be7b2);
}

[data-mode="light"][data-theme="principal"] .acc-zone-icon {
  background: #eef4ff;
  color: #0d101b;
}

[data-mode="light"][data-theme="principal"] .acc-add-btn {
  background: #ffc66f;
  border: 0;
  color: #0d101b;
}

[data-mode="light"][data-theme="principal"] .bottom-nav {
  left: 50%;
  bottom: 10px;
  width: calc(100% - 48px);
  max-width: 330px;
  min-height: 74px;
  padding: 8px 10px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  border: 0;
  border-radius: 999px;
  background: #0d101b;
  box-shadow: 0 22px 44px rgba(13,16,27,0.25);
}

[data-mode="light"][data-theme="principal"] .nav-item {
  color: rgba(255,255,255,0.64);
  align-self: stretch;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

[data-mode="light"][data-theme="principal"] .nav-icon-container {
  width: 42px;
  height: 38px;
}

[data-mode="light"][data-theme="principal"] .nav-label {
  color: inherit;
  font-size: 10px;
  line-height: 1;
}

[data-mode="light"][data-theme="principal"] .nav-item.active .nav-icon-container {
  background: #ffffff;
  color: #0d101b;
}

[data-mode="light"][data-theme="principal"] .nav-item.active .material-symbols-outlined,
[data-mode="light"][data-theme="principal"] .nav-item.active .nav-label {
  color: #ffffff;
}

[data-mode="light"][data-theme="principal"] .nav-item.active .nav-icon-container .material-symbols-outlined {
  color: #0d101b;
}

[data-mode="light"][data-theme="principal"] .modal-content,
[data-mode="light"][data-theme="principal"] .modal-preview {
  border: 0;
  border-radius: 30px 30px 0 0;
  background: #f8f8f8;
}

[data-mode="light"][data-theme="principal"] .btn-whatsapp {
  border-radius: 18px;
}

[data-mode="dark"][data-theme="principal"] {
  --bg: #101118;
  --surf: #1b1c24;
  --surf2: #242630;
  --surf3: #303342;
  --border: rgba(255,255,255,0.08);
  --border-md: rgba(255,255,255,0.14);
  --border-gold: rgba(179,160,255,0.42);
  --gold: #b3a0ff;
  --gold-hover: #c8bcff;
  --gold-dim: rgba(179,160,255,0.14);
  --gold-dim2: rgba(179,160,255,0.24);
  --success: #7be6a2;
  --success-dim: rgba(123,230,162,0.18);
  --info: #9fc4ff;
  --info-dim: rgba(159,196,255,0.18);
  --text: #f8f8f8;
  --text-soft: #c7c4d4;
  --text-faint: #858190;
  --nav-bg: #0d101b;
  --sh-sm: 0 12px 34px rgba(0,0,0,0.24);
  --sh-md: 0 18px 46px rgba(0,0,0,0.32);
  --sh-lg: 0 26px 70px rgba(0,0,0,0.40);
}

[data-mode="dark"][data-theme="principal"] body {
  background:
    radial-gradient(circle at 18% 0%, rgba(179,160,255,0.16), transparent 34%),
    linear-gradient(180deg, #151421 0%, #101118 52%, #0d0e14 100%);
}

[data-mode="dark"][data-theme="principal"] .app {
  max-width: 430px;
  padding: 18px 16px 110px;
}

[data-mode="dark"][data-theme="principal"] .topbar {
  background: rgba(27,28,36,0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  box-shadow: var(--sh-sm);
}

[data-mode="dark"][data-theme="principal"] .topbar h1 span {
  color: #ffc66f;
}

[data-mode="dark"][data-theme="principal"] .brand-mark,
[data-mode="dark"][data-theme="principal"] .btn-icon {
  border-radius: 50%;
  background: #242630;
  border-color: rgba(255,255,255,0.09);
}

[data-mode="dark"][data-theme="principal"] .card {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 28px;
  background: rgba(27,28,36,0.96);
  box-shadow: var(--sh-sm);
}

[data-mode="dark"][data-theme="principal"] .card-title {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

[data-mode="dark"][data-theme="principal"] .card-title .material-symbols-outlined {
  color: #b3a0ff;
}

[data-mode="dark"][data-theme="principal"] .daily-hero {
  background: linear-gradient(135deg, #b3a0ff 0%, #9180ee 48%, #78a7f2 100%);
  color: #0d101b;
  box-shadow: 0 24px 54px rgba(0,0,0,0.36);
}

[data-mode="dark"][data-theme="principal"] .daily-hero small {
  color: rgba(13,16,27,0.74);
}

[data-mode="dark"][data-theme="principal"] .day-scroll {
  gap: 10px;
  padding: 4px 24px 18px;
  margin: 0 -24px;
  scroll-padding: 24px;
}

[data-mode="dark"][data-theme="principal"] .day-chip {
  min-width: 76px;
  min-height: 48px;
  justify-content: center;
  flex-direction: row;
  gap: 6px;
  padding: 0 16px;
  border-radius: 999px;
  background: #242630;
  border-color: rgba(255,255,255,0.10);
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.01em;
  line-height: 1;
  box-shadow: none;
}

[data-mode="dark"][data-theme="principal"] .day-chip.active {
  background: #b3a0ff;
  border-color: #b3a0ff;
  color: #0d101b;
}

[data-mode="dark"][data-theme="principal"] .day-chip.done {
  background: rgba(123,230,162,0.22);
  border-color: rgba(123,230,162,0.42);
  color: #7be6a2;
}

[data-mode="dark"][data-theme="principal"] .active-shift-banner,
[data-mode="dark"][data-theme="principal"] .task-zone-chip.has-zone,
[data-mode="dark"][data-theme="principal"] .report-shift-chip.active,
[data-mode="dark"][data-theme="principal"] .acc-badge.has-done {
  background: rgba(179,160,255,0.16);
  border-color: rgba(179,160,255,0.38);
  color: var(--text);
}

[data-mode="dark"][data-theme="principal"] .active-shift-banner button {
  background: rgba(255,255,255,0.08);
  color: #c8bcff;
}

[data-mode="dark"][data-theme="principal"] .task-filter-bar {
  border-color: rgba(255,255,255,0.08);
  background: #171820;
  border-radius: 999px;
}

[data-mode="dark"][data-theme="principal"] .task-filter {
  border-radius: 999px;
}

[data-mode="dark"][data-theme="principal"] .task-filter.active {
  background: #b3a0ff;
  color: #0d101b;
}

[data-mode="dark"][data-theme="principal"] .btn-primary {
  background: #b3a0ff;
  color: #0d101b;
  border-radius: 18px;
}

[data-mode="dark"][data-theme="principal"] .btn-primary:hover {
  background: #c8bcff;
}

[data-mode="dark"][data-theme="principal"] .btn-secondary,
[data-mode="dark"][data-theme="principal"] .input-base {
  background: #242630;
  border-color: rgba(255,255,255,0.10);
  border-radius: 18px;
}

[data-mode="dark"][data-theme="principal"] .task-item,
[data-mode="dark"][data-theme="principal"] .shift-item,
[data-mode="dark"][data-theme="principal"] .report-shift-chip,
[data-mode="dark"][data-theme="principal"] .acc-item,
[data-mode="dark"][data-theme="principal"] .user-row {
  background: #242630;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 24px;
  box-shadow: none;
}

[data-mode="dark"][data-theme="principal"] .task-item.done {
  background: #1f212a;
  opacity: 0.82;
}

[data-mode="dark"][data-theme="principal"] .task-item.done .task-cb,
[data-mode="dark"][data-theme="principal"] .subtask-item.done .subtask-check {
  background: #7be6a2;
  border-color: #7be6a2;
  color: #0d101b;
}

[data-mode="dark"][data-theme="principal"] .progress-fill {
  background: linear-gradient(90deg, #b3a0ff, #9fc4ff);
}

[data-mode="dark"][data-theme="principal"] .progress-fill.complete {
  background: linear-gradient(90deg, #7be6a2, #a3efbd);
}

[data-mode="dark"][data-theme="principal"] .acc-zone-icon {
  background: rgba(159,196,255,0.16);
  color: #9fc4ff;
}

[data-mode="dark"][data-theme="principal"] .acc-add-btn {
  background: #ffc66f;
  border: 0;
  color: #0d101b;
}

[data-mode="dark"][data-theme="principal"] .bottom-nav {
  left: 50%;
  bottom: 10px;
  width: calc(100% - 48px);
  max-width: 330px;
  min-height: 74px;
  padding: 8px 10px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: #0d101b;
  box-shadow: 0 22px 44px rgba(0,0,0,0.35);
}

[data-mode="dark"][data-theme="principal"] .nav-item {
  color: rgba(255,255,255,0.60);
  align-self: stretch;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

[data-mode="dark"][data-theme="principal"] .nav-icon-container {
  width: 42px;
  height: 38px;
}

[data-mode="dark"][data-theme="principal"] .nav-label {
  color: inherit;
  font-size: 10px;
  line-height: 1;
}

[data-mode="dark"][data-theme="principal"] .nav-item.active .nav-icon-container {
  background: #b3a0ff;
  color: #0d101b;
}

[data-mode="dark"][data-theme="principal"] .nav-item.active .material-symbols-outlined,
[data-mode="dark"][data-theme="principal"] .nav-item.active .nav-label {
  color: #ffffff;
}

[data-mode="dark"][data-theme="principal"] .nav-item.active .nav-icon-container .material-symbols-outlined {
  color: #0d101b;
}

[data-mode="dark"][data-theme="principal"] .modal-content,
[data-mode="dark"][data-theme="principal"] .modal-preview {
  border-color: rgba(255,255,255,0.08);
  border-radius: 30px 30px 0 0;
  background: #1b1c24;
}
