/* ============================================
   MARICHU DASHBOARD · Vector89
   Feminine Rose Theme
   v: 20260407v
   ============================================ */

/* --- Variables --- */
:root {
  --bg:          #fdf5f8;
  --sidebar:     #e8507a;
  --card:        #ffffff;
  --accent:      #e8507a;
  --accent-dim:  rgba(232,80,122,0.08);
  --accent-hover:rgba(232,80,122,0.16);
  --text:        #2d1824;
  --muted:       #9b7a88;
  --border:      rgba(232,80,122,0.13);
  --border-card: rgba(232,80,122,0.10);
  --success:     #4caf82;
  --amber:       #d4845a;
  --blue:        #5a9fd4;
  --red:         #c45060;
  --shadow:      0 2px 20px rgba(232,80,122,0.06);
  --shadow-md:   0 6px 32px rgba(232,80,122,0.10);
  --sb-text:     #ffffff;
  --sb-muted:    rgba(255,255,255,0.70);
  --sb-border:   rgba(255,255,255,0.22);
  --font:        'DM Sans', sans-serif;
  --font-title:  'Cormorant Garamond', serif;
  --radius:      12px;
  --radius-sm:   8px;
  --transition:  200ms ease;
}

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

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;     /* nunca scroll horizontal */
  max-width: 100%;
}

/* ============================================
   LOGIN
   ============================================ */

#login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #fdf0f5 0%, #f8e8f2 40%, #f0dce8 100%);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(232,80,122,0.18);
  border-radius: 20px;
  padding: 48px 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-md);
}

.login-brand {
  text-align: center;
}

.login-logo {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 34px;
  color: var(--accent);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 6px;
}

.login-agency {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
}

.login-name {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 36px;
  color: var(--text);
  line-height: 1.1;
  text-align: center;
}

.login-role {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  opacity: 0.85;
  text-align: center;
}

.login-clock {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.lc-time {
  font-size: 30px;
  font-weight: 300;
  color: var(--text);
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.lc-date {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.lc-tz {
  font-size: 10px;
  color: var(--muted);
  opacity: 0.6;
  letter-spacing: 0.3px;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Password wrapper with eye toggle */
.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pw-wrap input[type="password"],
.pw-wrap input[type="text"] {
  width: 100%;
  padding: 12px 48px 12px 16px;
  background: rgba(232,80,122,0.04);
  border: 1px solid rgba(232,80,122,0.2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.pw-wrap input:focus {
  border-color: var(--accent);
  background: rgba(232,80,122,0.06);
}

.pw-wrap input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.pw-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 19px;
  padding: 4px;
  line-height: 1;
  opacity: 0.45;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.pw-toggle:hover { opacity: 0.85; }

.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #e8507a 0%, #d43f68 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 4px 14px rgba(232,80,122,0.35);
}

.btn-login:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(0);
  opacity: 1;
}

.login-err {
  font-size: 12px;
  color: var(--red);
  text-align: center;
  min-height: 16px;
}

/* ============================================
   APP LAYOUT
   ============================================ */

#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
  width: 224px;
  min-width: 224px;
  background: var(--sidebar);
  border-right: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.sb-logo {
  padding: 22px 20px 16px;
  border-bottom: 1px solid var(--sb-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-logo-text {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 22px;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.sb-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--sb-muted);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background var(--transition), color var(--transition);
}

.nav-item:hover {
  background: rgba(0,0,0,0.12);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(0,0,0,0.20);
  color: #ffffff;
  font-weight: 600;
}

.nav-icon {
  font-size: 16px;
  line-height: 1;
}

.nav-label {
  line-height: 1;
}

.sb-footer {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--sb-border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sb-clock {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sb-time-main {
  font-size: 22px;
  font-weight: 300;
  color: var(--sb-text);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.sb-date-line {
  font-size: 10px;
  color: var(--sb-muted);
  opacity: 0.75;
  letter-spacing: 0.2px;
  line-height: 1.4;
}

.sb-user {
  font-size: 11px;
  color: var(--sb-muted);
  font-weight: 400;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.sb-team-clocks {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--sb-border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sb-team-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  line-height: 1.3;
}

.sb-team-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--sb-text);
  min-width: 46px;
}

.sb-team-city {
  font-size: 10px;
  color: var(--sb-muted);
  flex: 1;
  opacity: 0.65;
}

.sb-team-time {
  font-size: 11px;
  color: var(--sb-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;   /* evita rebote al fondo */
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* --- Pages --- */
.page {
  display: none;
  flex-direction: column;
  padding: 28px 32px;
  min-height: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  max-width: 100%;
}

.page.active {
  display: flex;
}

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

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.card-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

/* ============================================
   TABLE
   ============================================ */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: 13.5px;
}

thead th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: rgba(232,80,122,0.03);
}

tbody tr {
  border-bottom: 1px solid rgba(232,80,122,0.06);
  transition: background var(--transition);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(232,80,122,0.03);
}

tbody td {
  padding: 12px 14px;
  color: var(--text);
  vertical-align: middle;
}

td:first-child {
  color: var(--muted);
  font-size: 12px;
  width: 36px;
}

/* --- Status Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-grabado {
  background: rgba(90,159,212,0.12);
  color: var(--blue);
  border: 1px solid rgba(90,159,212,0.25);
}

.badge-edicion {
  background: rgba(212,132,90,0.12);
  color: var(--amber);
  border: 1px solid rgba(212,132,90,0.25);
}

.badge-publicado {
  background: rgba(76,175,130,0.12);
  color: var(--success);
  border: 1px solid rgba(76,175,130,0.25);
}

.badge-propuesto {
  background: rgba(155,122,136,0.10);
  color: var(--muted);
  border: 1px solid rgba(155,122,136,0.18);
}

/* --- Action Buttons --- */
.actions-cell {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}

.btn-sm {
  padding: 10px 16px; /* T-000b: target táctil ≥44px */
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px; /* T-000b: subió de 12px */
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn-sm:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn-sm:active {
  transform: translateY(0);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232,80,122,0.3);
}

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

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

.btn-ghost {
  background: rgba(232,80,122,0.06);
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-open {
  background: rgba(232,80,122,0.08);
  color: var(--accent);
  border: 1px solid rgba(232,80,122,0.2);
}

.btn-danger {
  background: rgba(196,80,96,0.08);
  color: var(--red);
  border: 1px solid rgba(196,80,96,0.18);
}

/* ============================================
   SYNC STATUS
   ============================================ */

.sync-status {
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;
  transition: color var(--transition);
}

.sync-status.saving { color: var(--amber); }
.sync-status.saved  { color: var(--success); }
.sync-status.error  { color: var(--red); }

/* ============================================
   SUBCAPTIONS
   ============================================ */

.subcap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.subcap-card {
  background: var(--card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}

.subcap-client-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.3px;
}

.subcap-text {
  width: 100%;
  overflow: visible;
  background: rgba(232,80,122,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.65;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
}

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

.subcap-save-status {
  font-size: 11.5px;
  color: var(--muted);
  min-width: 70px;
}

.subcap-save-status.saving { color: var(--amber); }
.subcap-save-status.saved  { color: var(--success); }

.btn-copy {
  padding: 6px 13px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(232,80,122,0.22);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn-copy:hover {
  background: var(--accent-hover);
}

.btn-copy.copied {
  background: rgba(76,175,130,0.12);
  color: var(--success);
  border-color: rgba(76,175,130,0.25);
}

/* ============================================
   CALENDARIO
   ============================================ */

.calendario-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 48px 32px;
  text-align: center;
  max-width: 480px;
}

.cal-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.btn-calendar {
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--accent) 0%, #d43f68 100%);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 4px 16px rgba(232,80,122,0.35);
}

.btn-calendar:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

/* ============================================
   REGISTRO / PLACEHOLDER
   ============================================ */

.registro-card {
  opacity: 0.45;
  cursor: not-allowed;
  max-width: 500px;
}

.registro-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* ============================================
   FILTER BAR / TOOLBAR
   ============================================ */

.filter-select {
  padding: 6px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  box-shadow: var(--shadow);
}

.filter-select:focus {
  border-color: var(--accent);
}

.btn-add {
  padding: 6px 14px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(232,80,122,0.25);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-add:hover {
  background: var(--accent-hover);
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45,24,36,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(3px);
}

.modal-box {
  background: var(--card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  box-shadow: 0 24px 64px rgba(232,80,122,0.2);
}

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

.modal-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color var(--transition);
  flex-shrink: 0;
}

.modal-close:hover { color: var(--accent); }

.modal-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.modal-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.modal-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.modal-checkbox-row input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.edit-titulo-input {
  width: 100%;
  padding: 9px 12px;
  background: rgba(232,80,122,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  outline: none;
  transition: border-color var(--transition);
}

.edit-titulo-input:focus {
  border-color: var(--accent);
  background: rgba(232,80,122,0.05);
}

.edit-titulo-input::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

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

/* ============================================
   PROGRAMACIÓN
   ============================================ */

.prog-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.prog-mes-select {
  min-width: 180px;
}

.prog-badge-noapl {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  background: rgba(155,122,136,0.10);
  color: var(--muted);
  border: 1px solid rgba(155,122,136,0.18);
}

.prog-badge-programado {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  background: rgba(76,175,130,0.12);
  color: var(--success);
  border: 1px solid rgba(76,175,130,0.25);
}

.prog-badge-pendiente {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  background: rgba(155,122,136,0.08);
  color: var(--muted);
  border: 1px solid rgba(155,122,136,0.15);
}

.prog-actions-cell {
  display: flex;
  gap: 5px;
  align-items: center;
}

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

.btn-undo-prog {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color var(--transition);
  opacity: 0.55;
  line-height: 1;
}

.btn-undo-prog:hover {
  color: var(--amber);
  opacity: 1;
}

/* ============================================
   HISTORIAS — CANVA DEL DÍA (view-only)
   ============================================ */

.hd-section {
  margin-bottom: 8px;
}

.hd-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.2px;
  margin-bottom: 12px;
}

.hd-view-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.hd-date-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
  flex-shrink: 0;
}

.hd-date-input:focus {
  border-color: var(--accent);
}

.hist-daily-result {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 38px;
}

.hd-open-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.hd-empty {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  padding: 0;
  margin: 0;
}

.hd-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* Mobile */
@media (max-width: 768px) {
  .hd-view-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .hd-date-input {
    width: 100%;
    font-size: 17px;
    padding: 11px 14px;
  }
  .hist-daily-result {
    min-height: 0;
  }
  .hd-open-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 16px;
    padding: 12px;
  }
  .hd-empty {
    font-size: 15px;
  }
}

/* ============================================
   HISTORIAS — LISTA DE CLIENTES
   ============================================ */

.historias-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.hist-client-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  width: 100%;
  box-sizing: border-box;
}

.hist-client-row:last-child {
  border-bottom: none;
}

.hist-client-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.hist-client-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
  flex: 1;
}

.hist-client-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.btn-hist-open {
  background: rgba(232,80,122,0.08);
  color: var(--accent);
  border: 1px solid rgba(232,80,122,0.22);
  border-radius: var(--radius-sm);
  padding: 12px 20px; /* T-000b: target táctil ≥44px */
  font-size: 16px; /* T-000b: subió de 14px */
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background var(--transition);
  cursor: pointer;
}

.btn-hist-open:hover {
  background: rgba(232,80,122,0.16);
}

.btn-promos-open {
  background: rgba(99,91,255,0.07);
  color: #635bff;
  border: 1px solid rgba(99,91,255,0.22);
  border-radius: var(--radius-sm);
  padding: 12px 20px; /* T-000b: target táctil ≥44px */
  font-size: 16px; /* T-000b: subió de 14px */
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background var(--transition);
  cursor: pointer;
}

.btn-promos-open:hover {
  background: rgba(99,91,255,0.14);
}

.btn-hist-disabled {
  opacity: 0.30;
  cursor: not-allowed;
  pointer-events: none;
}

/* Mobile */
@media (max-width: 768px) {
  .hist-client-name {
    font-size: 18px;
  }
  .hist-client-btns {
    gap: 8px;
  }
  .btn-hist-open,
  .btn-promos-open {
    font-size: 15px;
    padding: 10px 14px;
    flex: 1;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }
}

/* ============================================
   PROGRAMACIÓN — MOBILE CARDS
   ============================================ */

/* Desktop: show table, hide cards */
.prog-table-desktop { display: block; }
.prog-cards-mobile  { display: none; }

/* Mobile: hide table, show cards */
@media (max-width: 768px) {
  .prog-table-desktop { display: none; }
  .prog-cards-mobile  { display: flex; flex-direction: column; gap: 14px; }
}

.prog-card {
  background: var(--card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Row 1: client name (left) + period (right) */
.prog-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.prog-card-client {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.prog-card-period {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  line-height: 1.3;
}

/* Row 2: Presentación label + value */
.prog-card-pres {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.prog-pres-label {
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}

/* Row 3: all action buttons in one line */
.prog-card-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-listo-prog {
  padding: 8px 13px;
  background: rgba(76,175,130,0.10);
  color: var(--success);
  border: 1.5px solid rgba(76,175,130,0.30);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}

.btn-listo-prog:hover {
  background: rgba(76,175,130,0.20);
}

.prog-card-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: rgba(76,175,130,0.10);
  color: var(--success);
  border: 1px solid rgba(76,175,130,0.25);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================
   ARCHIVO SECTION (Programación)
   ============================================ */

.prog-archivo-section {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.archivo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.archivo-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.archivo-count {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-alt);
  border-radius: 20px;
  padding: 2px 10px;
  border: 1px solid var(--border);
}

.archivo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archivo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  opacity: 0.75;
}

.archivo-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.archivo-item-client {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.archivo-item-meta {
  font-size: 12px;
  color: var(--muted);
}

.archivo-item-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .archivo-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .archivo-item-btns {
    width: 100%;
    justify-content: flex-end;
  }
  .archivo-title {
    font-size: 15px;
  }
  .archivo-count {
    font-size: 13px;
  }
  .archivo-item-client {
    font-size: 16px;
  }
  .archivo-item-meta {
    font-size: 14px;
  }
}

/* ============================================
   PAGO ALERT BANNER
   ============================================ */

.payment-alert {
  background: linear-gradient(135deg, rgba(232,80,122,0.08) 0%, rgba(212,63,104,0.12) 100%);
  border: 1px solid rgba(232,80,122,0.25);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-alert-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.payment-alert-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.payment-alert-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(232,80,122,0.15);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
}

.payment-item-today {
  border-color: rgba(232,80,122,0.4);
  background: rgba(232,80,122,0.08);
}

.payment-cliente-name {
  font-weight: 600;
  color: var(--text);
}

.payment-dia-info {
  color: var(--muted);
}

.payment-dia-hoy {
  color: var(--accent);
  font-weight: 600;
}

.payment-factura-tag {
  font-size: 10px;
  font-weight: 600;
  background: rgba(212,132,90,0.15);
  color: var(--amber);
  border-radius: 4px;
  padding: 1px 5px;
  border: 1px solid rgba(212,132,90,0.25);
}

/* ============================================
   INICIO
   ============================================ */

.inicio-hero {
  margin-bottom: 24px;
}

.inicio-greeting {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 42px;
  color: var(--accent);
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.inicio-date {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.inicio-summary {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

.inicio-prog-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inicio-prog-month-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.inicio-prog-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.istat-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 12px 18px;
  box-shadow: var(--shadow);
}

.istat-pending { border-left: 3px solid var(--muted); }
.istat-done    { border-left: 3px solid var(--success); }

.istat-num {
  font-size: 24px;
  font-weight: 300;
  color: var(--text);
  line-height: 1;
}

.istat-lbl {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.inicio-prog-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.inicio-prog-card {
  background: var(--card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.inicio-prog-card.card-programado {
  border-color: rgba(76,175,130,0.3);
  background: rgba(76,175,130,0.04);
}

.inicio-prog-card-client {
  font-size: 16px; /* T-000b: subió de 14px */
  font-weight: 600;
  color: var(--text);
}

.inicio-prog-card-period {
  font-size: 14px; /* T-000b: subió de 12px */
  color: var(--muted);
}

.inicio-prog-card-status {
  font-size: 14px; /* T-000b: subió de 11px */
  color: var(--success);
  margin-top: 2px;
  font-weight: 500;
}

.inicio-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 12px 0;
}

/* ============================================
   HISTORIAS
   ============================================ */

.hist-link-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hist-link-input {
  width: 180px;
  padding: 5px 9px;
  background: rgba(232,80,122,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 12.5px;
  outline: none;
  transition: border-color var(--transition);
}

.hist-link-input:focus {
  border-color: var(--accent);
  background: rgba(232,80,122,0.05);
}

.hist-link-input::placeholder {
  color: var(--muted);
  opacity: 0.45;
}

.hist-open-btn {
  flex-shrink: 0;
  font-size: 11.5px;
  padding: 4px 9px;
}

.hist-cantidad {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.hist-cantidad-one {
  color: var(--accent);
}

.td-mes-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* ============================================
   CONTRASEÑAS
   ============================================ */

.plat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.plat-ig {
  background: rgba(232,80,122,0.10);
  color: var(--accent);
  border: 1px solid rgba(232,80,122,0.22);
}

.plat-tt {
  background: rgba(90,159,212,0.10);
  color: var(--blue);
  border: 1px solid rgba(90,159,212,0.22);
}

.plat-fb {
  background: rgba(80,100,212,0.10);
  color: #6080d4;
  border: 1px solid rgba(80,100,212,0.22);
}

.cred-pw-dots {
  font-family: monospace;
  letter-spacing: 3px;
  color: var(--muted);
  font-size: 13px;
}

.cred-empty {
  color: var(--muted);
  opacity: 0.35;
}

.cred-user-cell {
  font-size: 13px;
  color: var(--text);
}

.cred-pw-cell {
  min-width: 90px;
}

.cred-notas-cell {
  font-size: 12px;
  color: var(--muted);
  max-width: 200px;
}

/* ============================================
   ADMINISTRACIÓN
   ============================================ */

.admon-monto {
  color: var(--text);
  font-size: 13.5px;
}

.admon-dias {
  font-size: 13px;
  color: var(--text);
}

.admon-badge-colab {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: rgba(155,122,136,0.08);
  color: var(--muted);
  border: 1px solid rgba(155,122,136,0.15);
}

.admon-badge-factura {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: rgba(212,132,90,0.12);
  color: var(--amber);
  border: 1px solid rgba(212,132,90,0.25);
}

.admon-row-colab td {
  opacity: 0.45;
}

.admon-muted {
  color: var(--muted);
  font-size: 12px;
}

/* ============================================
   MOBILE TOPBAR + HAMBURGER DRAWER
   ============================================ */

/* Mobile topbar — hidden on desktop */
.mobile-topbar {
  display: none;
}

/* Overlay — hidden by default */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.42);
  z-index: 599;
  opacity: 0;
  transition: opacity 250ms ease;
}

.mobile-overlay.visible {
  opacity: 1;
}

/* ============================================
   MOBILE / RESPONSIVE
   ============================================ */

@media (max-width: 768px) {

  /* Show topbar — FIXED so it never disappears on iOS PWA scroll */
  .mobile-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(54px + env(safe-area-inset-top));
    min-height: calc(54px + env(safe-area-inset-top));
    flex-shrink: 0;
    background: var(--sidebar);
    border-bottom: 1px solid rgba(255,255,255,0.18);
    padding: env(safe-area-inset-top) 16px 0;
    z-index: 500;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    width: 100%;
  }

  .mobile-logo {
    font-family: var(--font-title);
    font-style: italic;
    font-size: 22px;
    color: #ffffff;
    letter-spacing: -0.3px;
  }

  .mobile-hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-radius: 6px;
    transition: background var(--transition);
  }

  .mobile-hamburger:hover {
    background: rgba(0,0,0,0.12);
  }

  .mobile-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.90);
    border-radius: 2px;
  }

  /* Overlay active on mobile */
  .mobile-overlay {
    display: block;
    pointer-events: none;
  }

  .mobile-overlay.visible {
    pointer-events: auto;
  }

  /* App layout — column: topbar on top, main-content fills rest */
  #app {
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    padding-top: 0;
  }

  /* Sidebar slides in from left — fixed over everything */
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    min-width: unset;
    height: 100vh;
    z-index: 601;
    border-right: 1px solid rgba(255,255,255,0.15);
    box-shadow: 4px 0 24px rgba(0,0,0,0.28);
    transition: left 260ms cubic-bezier(0.4,0,0.2,1);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .sidebar.mobile-open {
    left: 0;
  }

  .sb-nav {
    flex: none;
    flex-direction: column;
    padding: 12px 10px;
    gap: 2px;
    overflow-y: visible;
    overflow-x: hidden;
  }

  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    font-size: 17px;
    padding: 12px 14px;
  }

  .nav-icon {
    font-size: 18px;
  }

  /* Main content fills remaining height below FIXED topbar */
  .main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    min-height: 0;
    min-width: 0;
    width: 100%;
    padding-top: calc(54px + env(safe-area-inset-top));
    /* Buffer mínimo para que último item no quede tapado por toolbar iOS */
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
    scroll-padding-bottom: 60px;
  }
  /* Pantalla de Agentes es iframe full-height: no necesita padding extra */
  .main-content.no-bottom-padding {
    padding-bottom: 0;
  }

  .page {
    padding: 20px 16px;
  }

  .subcap-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 17px;
  }

  .hist-link-input {
    width: 130px;
  }

  /* Tamaños grandes en mobile para Marichú (señora 60 años) */
  html, body { font-size: 18px; }
  .page-title { font-size: 26px; font-weight: 700; }
  .page-sub { font-size: 16px; }
  .inicio-greeting { font-size: 36px; }
  .inicio-date { font-size: 17px; }
  .inicio-summary { font-size: 18px; }
  .inicio-prog-card-client { font-size: 17px !important; }
  .inicio-prog-card-period { font-size: 14px !important; }
  .inicio-prog-card-status { font-size: 14px !important; }
  .istat-num { font-size: 32px; }
  .istat-lbl { font-size: 13px; }
  .inicio-prog-month-label { font-size: 16px; font-weight: 700; }

  .card-table td { font-size: 17px; }
  .card-table td::before { font-size: 13px; }
  .btn-sm, .btn-copy, .btn-programar, .btn-undo-prog { font-size: 15px; padding: 9px 16px; font-weight: 600; }
  thead th { font-size: 14px; }
  .filter-select, .filter-btn { font-size: 16px; padding: 9px 14px; }

  /* Inputs y textareas más grandes (escribir copy con dedo gordo) */
  input, textarea, select { font-size: 16px !important; }

  /* Plataforma badges en contraseñas */
  .plat-badge { font-size: 13px; padding: 4px 10px; }

  /* Tabla de admon */
  .admon-monto { font-size: 17px; }
  .admon-dias { font-size: 15px; }
  .admon-badge-factura, .admon-badge-colab { font-size: 13px; }

  /* Sidebar */
  .sb-time-main { font-size: 28px; }
  .sb-date-line { font-size: 13px; }
  .sb-user { font-size: 14px; }
  .sb-team-name, .sb-team-city, .sb-team-time { font-size: 14px; }
  .nav-item { font-size: 18px; }
  .mobile-logo { font-size: 28px; }

  /* Subcaptions */
  .subcap-client-name { font-size: 16px; font-weight: 700; }
  .subcap-text { font-size: 14px; line-height: 1.55; }

  /* Historias (Canva del día) */
  .hist-section-title, .hd-section-title { font-size: 17px; font-weight: 700; }
  .hist-client-name { font-size: 16px; font-weight: 600; }

  /* Cobros próximos */
  .payment-cliente-name { font-size: 15px; font-weight: 700; }
  .payment-dia-info, .payment-dia-hoy { font-size: 14px; }
  .payment-factura-tag { font-size: 12px; }
  .payment-alert-title { font-size: 16px; font-weight: 700; }
}

@media (max-width: 480px) {
  .page {
    padding: 16px 12px;
  }

  thead th {
    padding: 10px 10px;
    font-size: 10px;
  }

  tbody td {
    padding: 10px 10px;
  }

  .hist-link-input {
    width: 110px;
  }
}

/* ============================================
   MOBILE CARD TABLES (no horizontal scroll)
   ============================================ */

@media (max-width: 768px) {

  /* Remove inner scroll — use page scroll only */
  .table-wrap, .prog-table-wrap {
    overflow: visible;
  }

  /* --- Shared card-table pattern --- */
  .card-table table {
    display: block;
    width: 100%;
  }
  .card-table thead {
    display: none;
  }
  .card-table tbody {
    display: block;
    width: 100%;
  }
  .card-table tr {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    gap: 8px;
  }
  .card-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    border: none;
    padding: 0;
    font-size: 14px;
    min-width: 0;
  }
  .card-table td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    min-width: 90px;
    flex-shrink: 0;
    padding-top: 2px;
  }
  .card-table td[data-label=""] {
    display: none;
  }
  /* Full-width cells (no label column) */
  .card-table td.td-full {
    flex-direction: column;
    gap: 4px;
  }
  .card-table td.td-full::before {
    min-width: unset;
  }

  /* Historias inputs fill width on mobile */
  .card-table .hist-link-input {
    width: 100%;
    min-width: 0;
  }

  /* Subcaptions: single column on mobile */
  .subcap-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Calendario — sin padding lateral para que use todo el ancho */
#pg-calendario.page { padding-left: 0 !important; padding-right: 0 !important; }
#pg-calendario .page-header { padding: 0 28px; }
#pg-calendario #cal-marichu { padding-left: 8px; padding-right: 8px; }

/* ============================================
   T-016 — Programados V2 (View Module nuevo, ?newprog=1)
   ============================================
   Aplica solo cuando renderProgramacion delega a programadosView.
   Las clases aquí son las que h() emite desde marichu/views/*.js.
*/

.programados-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}

.programados-section .programados-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  flex-wrap: wrap;
}
.programados-section .programados-stats .stat-total {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.programados-section .programados-stats button[data-action="reload"] {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.programados-section .empty {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

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

/* Job card (cada [data-job-id] dentro de .programados-list) */
.programados-section .programados-list > [data-job-id] {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Status badge — color por kind. */
.programados-section .status-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  align-self: flex-start;
}
.programados-section .status-pending    { background:#dbeafe; color:#1d4ed8; }
.programados-section .status-publishing  { background:#fef3c7; color:#92400e; }
.programados-section .status-published   { background:#d1fae5; color:#065f46; }
.programados-section .status-error       { background:#fee2e2; color:#991b1b; }
.programados-section .status-cancelled   { background:#f3f4f6; color:#6b7280; }
.programados-section .programados-list > [data-job-id] > span:nth-child(2) {
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
}
.programados-section .programados-list > [data-job-id] > span:nth-child(3) {
  color: var(--muted);
  font-size: 13px;
}

/* Thumbnails — T-040 (96px) → T-016 fase 4 (2026-05-06): 240px + scroll
 * horizontal estilo Instagram (no wrap vertical), por feedback de Marichú.
 * `scroll-snap` da el efecto de slides individuales al hacer swipe en iPhone. */
.programados-section .job-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
.programados-section .job-thumbs .job-thumb {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  scroll-snap-align: start;
}
.programados-section .job-thumbs .job-thumb-more {
  width: 240px;
  height: 240px;
  border-radius: 6px;
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
  scroll-snap-align: start;
}

.programados-section .job-copy {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  background: var(--bg);
  border-radius: 6px;
  padding: 8px 10px;
}
.programados-section .job-copy:empty { display: none; }

.programados-section .job-error-block {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  color: #991b1b;
  line-height: 1.5;
}
.programados-section .job-error-block .partial-ok {
  margin-top: 6px;
  color: #065f46;
  font-weight: 600;
}

.programados-section .job-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.programados-section .job-actions button {
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}
.programados-section .job-actions button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.programados-section .job-actions .btn-cancel {
  border-color: #fca5a5;
  color: #991b1b;
}
.programados-section .job-actions .btn-retry {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Reprogramar slot (Bug #4: inline, NO modal flotante) */
.programados-section .reprogramar-slot {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: 4px;
}
.programados-section .reprogramar-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.programados-section .reprogramar-form input[type="datetime-local"] {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  flex: 1;
  min-width: 180px;
  max-width: 280px;
}
.programados-section .reprogramar-form button {
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.programados-section .reprogramar-form button[data-action="reschedule-save"] {
  background: var(--accent);
  border: none;
  color: #fff;
}
.programados-section .reprogramar-form button[data-action="reschedule-cancel"] {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}
.programados-section .reprogramar-form button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.programados-section .reprogramar-error {
  width: 100%;
  color: #991b1b;
  font-size: 13px;
  margin-top: 6px;
}
