:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-soft: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --green-primary: #10b981;
  --green-hover: #059669;
  --green-glow: rgba(16, 185, 129, 0.25);
  --amber-primary: #f59e0b;
  --amber-hover: #d97706;
  --amber-glow: rgba(245, 158, 11, 0.25);
  --blue-accent: #3b82f6;
  --danger: #ef4444;
  --border-color: rgba(255, 255, 255, 0.1);
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  line-height: 1.45;
}

.app-shell {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  padding: 16px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* BARRA SUPERIOR */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-primary), #047857);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px var(--green-glow);
}

.brand-icon svg {
  width: 24px;
  height: 24px;
}

.brand h1 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

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

.cloud-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.clickable-badge {
  cursor: pointer;
}

.refresh-mini {
  font-size: 0.85rem;
  opacity: 0.8;
}

.cloud-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.cloud-badge.synced {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}
.cloud-badge.synced .dot {
  background: var(--green-primary);
  box-shadow: 0 0 8px var(--green-primary);
}

.cloud-badge.pending {
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.4);
}
.cloud-badge.pending .dot {
  background: var(--amber-primary);
}

/* TABS */
.tabs-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-card);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  gap: 5px;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 10px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.2s ease;
}

.tab-btn svg {
  width: 18px;
  height: 18px;
}

.tab-btn.active {
  background: var(--bg-card-soft);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.tab-content.active {
  display: flex;
}

/* TARJETA DE RELOJ Y ESTADO */
.clock-card {
  background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.worker-greeting {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.employer-legal-seal {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #cbd5e1;
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.employer-legal-seal strong {
  color: #93c5fd;
}

.worker-selector-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.worker-select-dropdown {
  background: var(--bg-dark);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 6px 11px;
  border-radius: 10px;
  cursor: pointer;
}

.dni-pill {
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 99px;
}

.worker-slot-box {
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slot-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #6ee7b7;
}

.edit-name-inline-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  cursor: pointer;
}

.admin-worker-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.worker-greeting strong {
  color: #fff;
}

.live-clock {
  font-size: 2.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
}

.live-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: capitalize;
  margin-top: 2px;
  margin-bottom: 12px;
}

.shift-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.shift-banner .status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.status-idle {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}
.status-idle .status-dot {
  background: #94a3b8;
}

.status-working {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.status-working .status-dot {
  background: var(--green-primary);
  box-shadow: 0 0 8px var(--green-primary);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.65; }
}

.active-timer-box {
  margin-top: 14px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.timer-col {
  display: flex;
  flex-direction: column;
}

.timer-label {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.timer-col strong {
  font-size: 1.15rem;
  color: #6ee7b7;
  font-variant-numeric: tabular-nums;
}

.timer-divider {
  width: 1px;
  height: 28px;
  background: var(--border-color);
}

/* BOTONES GRANDES DE ENTRADA Y SALIDA */
.action-buttons-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.big-action-btn {
  width: 100%;
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  color: #fff;
  text-align: left;
  transition: transform 0.12s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.big-action-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.big-action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.btn-entry {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 8px 20px var(--green-glow);
}

.btn-exit {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 8px 20px var(--amber-glow);
}

.btn-icon-circle {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-icon-circle svg {
  width: 30px;
  height: 30px;
}

.btn-text-block {
  display: flex;
  flex-direction: column;
}

.btn-main-label {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.btn-sub-label {
  font-size: 0.85rem;
  opacity: 0.92;
}

/* TARJETA DE GANANCIA SEMANAL PARA LA EMPLEADA */
.worker-earnings-card {
  background: linear-gradient(155deg, #1e293b 0%, #111827 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.earnings-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  gap: 8px;
}

.rate-pill {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.74rem;
  white-space: nowrap;
}

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

.earning-item {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.earning-item.highlight-money {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
}

.earning-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.earning-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin: 2px 0;
}

.earning-val.money-text {
  color: #6ee7b7;
}

.earning-item small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.worker-days-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-color);
}

.mini-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.79rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.5);
  padding: 6px 10px;
  border-radius: 8px;
}

.mini-day-row strong {
  color: #6ee7b7;
}

/* PANEL DEL EMPLEADOR */
.admin-top-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-top-banner h2 {
  font-size: 1.05rem;
}

.admin-top-banner p {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.payout-card {
  background: linear-gradient(150deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
}

.payout-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.payout-tag {
  font-size: 0.7rem;
  font-weight: 800;
  color: #6ee7b7;
  letter-spacing: 0.04em;
}

.payout-header h3 {
  font-size: 1.05rem;
  margin-top: 2px;
}

.payout-totals-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.payout-col {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.payout-col.selected-col {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.12);
}

.payout-col.selected-col strong {
  color: #6ee7b7;
}

.selection-shortcuts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-action-btn {
  background: var(--bg-card-soft);
  border: 1px solid var(--border-color);
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.rate-inline-label {
  font-size: 0.76rem;
  color: #6ee7b7;
  font-weight: 700;
}

.payout-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.whatsapp-preview-btn {
  width: 100%;
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.14);
  color: #a7f3d0;
  padding: 11px 14px;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.whatsapp-preview-btn svg {
  width: 18px;
  height: 18px;
}

.admin-top-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* CHECKBOX DE DÍA EN EL HISTORIAL DEL EMPLEADOR */
.day-select-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.day-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--green-primary);
  cursor: pointer;
}

.history-item.selected-for-pay {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.btn-up-to-here {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
}

.settlement-textarea {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: #cbd5e1;
  padding: 10px;
  font-size: 0.78rem;
  font-family: inherit;
  resize: none;
}

.settlement-footer-stack {
  flex-direction: column;
  gap: 8px;
}

.modal-footer-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

/* BANNER DE AVISO DE VENCIMIENTO DE ABONO MENSUAL */
.sub-warning-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.55);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: #fde68a;
  font-weight: 700;
}

.creator-key-btn {
  width: 36px;
  height: 36px;
  font-size: 1rem;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
}

.register-pill-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.self-reg-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* PORTAL CREADOR (MODO OSO) */
.creator-hero-banner {
  background: linear-gradient(145deg, #312e81 0%, #1e1b4b 100%);
  border: 1px solid rgba(129, 140, 248, 0.45);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.creator-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 99px;
  margin-bottom: 4px;
}

.creator-hero-banner h2 {
  font-size: 1.1rem;
}

.creator-hero-banner p {
  font-size: 0.78rem;
  color: #c7d2fe;
  margin-top: 2px;
}

.creator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.creator-card h3 {
  font-size: 0.98rem;
  color: #e2e8f0;
}

.generated-link-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.generated-link-box label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6ee7b7;
}

/* MODAL DE SUSCRIPCIÓN MENSUAL (USD 1.50 / MES) */
.sub-price-badge-box {
  background: linear-gradient(150deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sub-plan-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: #6ee7b7;
  letter-spacing: 0.05em;
}

.sub-price-big {
  font-size: 1.7rem;
  font-weight: 900;
  color: #ffffff;
}

.pay-method-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.pay-method-info strong {
  font-size: 0.88rem;
}

.pay-method-info small {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.pay-method-btn {
  border: none;
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.mp-btn {
  background: #009ee3;
  color: #ffffff;
}

.card-btn {
  background: #6366f1;
  color: #ffffff;
}

.bank-details-box {
  font-size: 0.76rem;
  color: #cbd5e1;
  margin-top: 3px;
}

.sub-confirm-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--border-color);
}

.unlock-code-row {
  display: flex;
  gap: 8px;
}

.unlock-code-row input,
.payment-method-select {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 0.8rem;
}

.unlock-code-row input {
  flex: 1;
}

.auto-renew-card {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auto-renew-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: #6ee7b7;
}

.privacy-consent-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 11px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.privacy-check-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.77rem;
  color: #cbd5e1;
  cursor: pointer;
}

.privacy-check-label input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green-primary);
  flex-shrink: 0;
}

.link-btn-inline {
  background: none;
  border: none;
  color: #93c5fd;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
}

.privacy-policy-details {
  background: #020617;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  font-size: 0.73rem;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
}

.payout-col small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pay-now-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  padding: 15px 16px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 18px var(--green-glow);
  transition: transform 0.12s ease, opacity 0.2s;
}

.pay-now-btn:active {
  transform: scale(0.98);
}

.pay-now-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* SUB-FILTROS EN HISTORIAL */
.sub-filter-bar {
  display: flex;
  gap: 6px;
}

.filter-chip {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip.active {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.45);
}

/* NOTA OPCIONAL */
.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.note-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.note-input {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 0.92rem;
}

/* TARJETA GPS OPCIONAL */
.gps-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.gps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gps-title-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.gps-icon {
  width: 22px;
  height: 22px;
  color: var(--green-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.gps-title-group h3 {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-optional {
  font-size: 0.68rem;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 600;
}

.gps-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.gps-body {
  margin-top: 12px;
}

.mini-map {
  width: 100%;
  height: 135px;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid var(--border-color);
}

.gps-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}

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

/* SWITCH TOGGLE */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #475569;
  transition: 0.25s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--green-primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* HISTORIAL Y RESUMEN */
.summary-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-header h3 {
  font-size: 1rem;
}

.export-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* LISTA DE HISTORIAL CON SUMA AL LADO Y BOTÓN PAGADO */
.history-list-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list-header h3 {
  font-size: 0.98rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.history-item.is-paid {
  border-color: rgba(148, 163, 184, 0.2);
  opacity: 0.82;
}

.history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.history-date {
  font-weight: 700;
  font-size: 0.92rem;
}

.badges-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-hours-badge {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 99px;
}

.history-hours-badge.in-progress {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.paid-status-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 99px;
}

.paid-status-badge.paid {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}

.paid-status-badge.unpaid {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.history-times {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.85rem;
  color: #cbd5e1;
}

/* FILA DE DINERO DEL DÍA + ACUMULADO AL LADO */
.money-running-row {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
}

.money-day-col span,
.money-acc-col span {
  color: var(--text-muted);
}

.money-day-col strong {
  color: #f8fafc;
  font-size: 0.92rem;
}

.money-acc-col strong {
  color: #6ee7b7;
  font-size: 0.96rem;
}

.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border-color);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-paid-toggle {
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-paid-toggle.mark-paid {
  background: var(--green-primary);
  color: #fff;
}

.btn-paid-toggle.mark-unpaid {
  background: var(--bg-card-soft);
  color: #cbd5e1;
}

.link-pill {
  color: #93c5fd;
  text-decoration: none;
  background: rgba(59, 130, 246, 0.15);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

/* BOTONES AUXILIARES */
.primary-btn,
.secondary-btn,
.small-btn {
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.primary-btn {
  background: var(--green-primary);
  color: #fff;
  padding: 12px 16px;
  font-size: 0.92rem;
  width: 100%;
}

.secondary-btn {
  background: var(--bg-card-soft);
  color: var(--text-main);
  padding: 10px 14px;
  font-size: 0.84rem;
  flex: 1;
}

.secondary-btn svg,
.primary-btn svg {
  width: 17px;
  height: 17px;
}

.small-btn {
  background: var(--bg-card-soft);
  color: var(--text-main);
  padding: 6px 10px;
  font-size: 0.76rem;
}

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

/* MODALES */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 1000;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.pin-modal-card {
  max-width: 360px;
}

.pin-input {
  width: 180px;
  text-align: center;
  font-size: 1.8rem;
  letter-spacing: 0.35em;
  padding: 10px;
  border-radius: 12px;
  border: 2px solid var(--green-primary);
  background: var(--bg-dark);
  color: #fff;
  margin: 6px 0;
}

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

.modal-header h3 {
  font-size: 1rem;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.center-body {
  align-items: center;
  text-align: center;
}

.modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
}

.receipt-helper {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.receipt-canvas {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

/* FORMULARIOS */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 0.8rem;
  color: #cbd5e1;
  font-weight: 600;
}

.form-group input {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 0.9rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 4px 0;
}

.cloud-setup-box {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.cloud-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.guide-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.code-copy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.code-preview {
  background: #020617;
  color: #a7f3d0;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  max-height: 150px;
  overflow: auto;
  white-space: pre-wrap;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #065f46;
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  z-index: 2000;
}

/* CANDADO DE VALIDACIÓN PERSONAL POR DNI Y LINKS PERSONALES */
.worker-dni-gate {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  text-align: left;
}

.worker-dni-gate-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fcd34d;
}

.worker-dni-gate-row {
  display: flex;
  gap: 8px;
}

.worker-dni-gate-row input {
  flex: 1;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.worker-locked-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.personal-links-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0;
}

.personal-link-item {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 11px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.personal-link-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #f8fafc;
}

.hidden {
  display: none !important;
}
