/* Workforce / OPERA — Page-specific styles */

/* ---- Login page ---- */
.wf-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wf-bg-gradient);
  padding: 20px;
}

.wf-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--wf-surface);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-lg);
  box-shadow: var(--wf-shadow-lg);
  padding: 40px;
}

.wf-login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--wf-primary);
  margin-bottom: 6px;
}

.wf-login-subtitle {
  text-align: center;
  color: var(--wf-text-muted);
  margin-bottom: 28px;
  font-size: var(--wf-font-sm);
}

.wf-login-demo {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--wf-surface-soft);
  border-radius: var(--wf-radius-sm);
  font-size: var(--wf-font-xs);
}

.wf-login-demo p { color: var(--wf-text-muted); margin-bottom: 6px; }
.wf-login-demo code { color: var(--wf-primary); font-weight: 500; }

/* ---- My Day / Dashboard ---- */
.wf-dashboard-greeting {
  margin-bottom: 24px;
}

.wf-dashboard-greeting h1 {
  font-size: var(--wf-font-2xl);
  font-weight: 700;
  color: var(--wf-text);
}

.wf-dashboard-greeting p {
  font-size: var(--wf-font-sm);
  color: var(--wf-text-muted);
  margin-top: 4px;
}

.wf-dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.wf-dashboard-left { display: flex; flex-direction: column; gap: 16px; }
.wf-dashboard-right { display: flex; flex-direction: column; gap: 16px; }

.wf-quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

@media (max-width: 1024px) {
  .wf-dashboard-grid { grid-template-columns: 1fr; }
}

/* ---- Task list page ---- */
.wf-task-list-section { margin-bottom: 16px; }

/* ---- Team / Colegas ---- */
.wf-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.wf-team-card {
  background: var(--wf-surface);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-md);
  box-shadow: var(--wf-shadow-sm);
  padding: 16px;
  transition: box-shadow var(--wf-transition);
}

.wf-team-card:hover { box-shadow: var(--wf-shadow-md); }

.wf-team-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.wf-team-card-name { font-weight: 600; font-size: var(--wf-font-md); color: var(--wf-text); }
.wf-team-card-role { font-size: var(--wf-font-xs); color: var(--wf-text-soft); }
.wf-team-card-task { font-size: var(--wf-font-sm); color: var(--wf-text); margin-bottom: 8px; }
.wf-team-card-time { font-size: var(--wf-font-xs); color: var(--wf-text-muted); }

/* ---- Tasks view switcher ---- */
.wf-tasks-view-switcher {
  display: inline-flex;
  gap: 2px;
  background: var(--wf-surface-soft);
  border-radius: var(--wf-radius-sm);
  padding: 2px;
}

.wf-tasks-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--wf-text-muted);
  font-size: var(--wf-font-sm);
  font-family: inherit;
  border-radius: var(--wf-radius-xs);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--wf-transition);
}

.wf-tasks-view-tab:hover {
  color: var(--wf-text);
  background: var(--wf-surface);
  text-decoration: none;
}

.wf-tasks-view-tab.is-active {
  background: var(--wf-primary);
  color: #fff;
  font-weight: 600;
}

/* ---- Calendar — Multi-view (Day / Week / Month / Year) ---- */
.wf-calendar-card { overflow-x: auto; }

.wf-cal-label {
  font-size: var(--wf-font-sm);
  font-weight: 600;
  color: var(--wf-text);
  padding: 0 8px;
  white-space: nowrap;
}

.wf-calendar-toolbar {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.wf-cal-view-tabs {
  display: inline-flex;
  gap: 2px;
  background: var(--wf-surface-soft);
  border-radius: var(--wf-radius-sm);
  padding: 2px;
}

.wf-cal-view-tab {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--wf-text-muted);
  font-size: var(--wf-font-sm);
  font-weight: 500;
  border-radius: var(--wf-radius-xs);
  cursor: pointer;
  transition: all var(--wf-transition);
}

.wf-cal-view-tab:hover {
  color: var(--wf-text);
  background: var(--wf-surface);
}

.wf-cal-view-tab.is-active {
  background: var(--wf-primary);
  color: #fff;
  font-weight: 600;
}

.wf-calendar-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.wf-cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--wf-font-xs);
  color: var(--wf-text-muted);
}

.wf-cal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wf-cal-dot--planned { background: var(--wf-text-soft); }
.wf-cal-dot--active { background: var(--wf-primary); }
.wf-cal-dot--completed { background: var(--wf-success); }
.wf-cal-dot--blocked { background: var(--wf-danger); }
.wf-cal-dot--paused { background: var(--wf-warning); }
.wf-cal-dot--overdue { background: var(--wf-danger); }
.wf-cal-dot--extended { background: var(--wf-purple); }
.wf-cal-dot--due { background: var(--wf-warning); }

.wf-week-grid {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  min-width: 860px;
  border-top: 1px solid var(--wf-border);
  border-left: 1px solid var(--wf-border);
  position: relative;
}

.wf-week-grid-corner {
  background: var(--wf-surface-soft);
  border-right: 1px solid var(--wf-border);
  border-bottom: 1px solid var(--wf-border);
}

.wf-week-grid-day-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  border-right: 1px solid var(--wf-border);
  border-bottom: 1px solid var(--wf-border);
  background: var(--wf-surface-soft);
}

.wf-week-grid-day-header.is-today {
  background: var(--wf-primary-soft);
}

.wf-week-grid-day-header.is-today .wf-week-day-num {
  color: var(--wf-primary);
  font-weight: 700;
}

.wf-week-day-name {
  font-size: var(--wf-font-xs);
  font-weight: 600;
  color: var(--wf-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wf-week-day-num {
  font-size: var(--wf-font-lg);
  font-weight: 600;
  color: var(--wf-text);
  margin-top: 2px;
}

.wf-week-grid-hour-label {
  padding: 0 8px 0 0;
  font-size: 10px;
  color: var(--wf-text-soft);
  text-align: right;
  border-right: 1px solid var(--wf-border);
  border-bottom: 1px solid var(--wf-border-soft);
  background: var(--wf-surface-soft);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  position: relative;
}

.wf-week-hour-main {
  font-size: 11px;
  font-weight: 600;
  color: var(--wf-text-muted);
  padding-top: 2px;
}

.wf-week-hour-sub {
  font-size: 9px;
  color: var(--wf-text-soft);
  opacity: 0.6;
  position: absolute;
  right: 8px;
}
.wf-week-hour-sub--15 { top: 25%; }
.wf-week-hour-sub--30 { top: 50%; }
.wf-week-hour-sub--45 { top: 75%; }

.wf-week-grid-cell {
  border-right: 1px solid var(--wf-border-soft);
  border-bottom: 1px solid var(--wf-border-soft);
  position: relative;
  min-height: 80px;
}

.wf-week-quarter-line {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--wf-border-soft);
  opacity: 0.5;
  pointer-events: none;
}
.wf-week-quarter-line--15 { top: 25%; border-top: 1px dashed var(--wf-border-soft); background: none; }
.wf-week-quarter-line--30 { top: 50%; border-top: 1px dashed var(--wf-border-soft); background: none; }
.wf-week-quarter-line--45 { top: 75%; border-top: 1px dashed var(--wf-border-soft); background: none; }

.wf-week-grid-overlay {
  position: absolute;
  top: 41px;
  left: 56px;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  pointer-events: none;
  z-index: 3;
}

.wf-week-day-overlay {
  position: relative;
  pointer-events: none;
}

.wf-week-grid-cell.is-today-col {
  background: rgba(47, 128, 237, 0.03);
}

/* Calendar event blocks (pastel) */
.wf-cal-event {
  position: absolute;
  border-radius: var(--wf-radius-xs);
  padding: 4px 6px;
  font-size: 11px;
  cursor: pointer;
  overflow: hidden;
  z-index: 2;
  pointer-events: auto;
  transition: transform var(--wf-transition), box-shadow var(--wf-transition);
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
  min-height: 18px;
}

.wf-cal-event:hover {
  transform: translateY(-1px);
  box-shadow: var(--wf-shadow-sm);
  z-index: 5;
}

.wf-cal-event-icon { flex-shrink: 0; font-weight: 700; font-size: 10px; }
.wf-cal-event-title { overflow: hidden; text-overflow: ellipsis; font-weight: 500; word-break: break-word; }
.wf-cal-event-time { font-size: 9px; opacity: 0.7; font-variant-numeric: tabular-nums; }

.wf-cal-event--planned {
  background: rgba(100, 116, 139, 0.12);
  border-left: 3px solid var(--wf-text-soft);
  color: var(--wf-text-muted);
}

.wf-cal-event--active {
  background: rgba(47, 128, 237, 0.12);
  border-left: 3px solid var(--wf-primary);
  color: var(--wf-primary);
  font-weight: 600;
}

.wf-cal-event--completed {
  background: rgba(22, 163, 74, 0.12);
  border-left: 3px solid var(--wf-success);
  color: #15803d;
}

.wf-cal-event--blocked {
  background: rgba(220, 38, 38, 0.12);
  border-left: 3px solid var(--wf-danger);
  color: #b91c1c;
}

.wf-cal-event--paused {
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid var(--wf-warning);
  color: #b45309;
}

.wf-cal-event--overdue {
  background: rgba(220, 38, 38, 0.10);
  border-left: 3px solid var(--wf-danger);
  color: #b91c1c;
  opacity: 0.85;
}

.wf-cal-event--extended {
  background: rgba(139, 92, 246, 0.12);
  border-left: 3px solid var(--wf-purple);
  color: #6d28d9;
}

.wf-cal-event--due {
  position: static;
  display: inline-flex;
  margin: 2px 0;
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed var(--wf-warning);
  color: #b45309;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--wf-radius-xs);
  white-space: nowrap;
}

/* Current time line */
.wf-cal-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--wf-primary);
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 0 6px rgba(47, 128, 237, 0.4);
}

.wf-cal-now-line::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wf-primary);
}

/* Employee list under calendar */
.wf-calendar-employee-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wf-calendar-employee-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--wf-surface-soft);
  border-radius: var(--wf-radius-sm);
}

/* ---- Day view ---- */
.wf-cal-day-view {
  display: flex;
  flex-direction: column;
}

.wf-cal-day-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--wf-border);
  background: var(--wf-surface-soft);
}

.wf-cal-day-header.is-today {
  background: var(--wf-primary-soft);
}

.wf-cal-day-header-name {
  font-size: var(--wf-font-sm);
  font-weight: 600;
  color: var(--wf-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wf-cal-day-header-num {
  font-size: var(--wf-font-xl);
  font-weight: 700;
  color: var(--wf-text);
}

.wf-cal-day-header.is-today .wf-cal-day-header-num {
  color: var(--wf-primary);
}

.wf-cal-day-header-month {
  font-size: var(--wf-font-sm);
  color: var(--wf-text-muted);
}

.wf-cal-day-body {
  display: flex;
  position: relative;
  min-height: 600px;
}

.wf-cal-day-hours {
  width: 56px;
  flex-shrink: 0;
  border-right: 1px solid var(--wf-border);
  background: var(--wf-surface-soft);
}

.wf-cal-day-hour-row {
  height: 60px;
  border-bottom: 1px solid var(--wf-border-soft);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 2px 8px 0 0;
}

.wf-cal-day-hour-label {
  font-size: 10px;
  color: var(--wf-text-soft);
  font-weight: 600;
}

.wf-cal-day-events {
  flex: 1;
  position: relative;
  padding: 0 4px;
}

/* ---- Month view ---- */
.wf-cal-month-view {
  padding: 4px;
}

.wf-cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  overflow: hidden;
}

.wf-cal-month-dow {
  padding: 8px 4px;
  text-align: center;
  font-size: var(--wf-font-xs);
  font-weight: 600;
  color: var(--wf-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--wf-surface-soft);
  border-bottom: 1px solid var(--wf-border);
  border-right: 1px solid var(--wf-border-soft);
}

.wf-cal-month-dow:last-child { border-right: none; }

.wf-cal-month-cell {
  min-height: 100px;
  border-right: 1px solid var(--wf-border-soft);
  border-bottom: 1px solid var(--wf-border-soft);
  padding: 4px;
  cursor: pointer;
  transition: background var(--wf-transition);
}

.wf-cal-month-cell:hover {
  background: var(--wf-surface-soft);
}

.wf-cal-month-cell.is-outside {
  background: var(--wf-surface-soft);
  opacity: 0.5;
}

.wf-cal-month-cell.is-today {
  background: var(--wf-primary-soft);
}

.wf-cal-month-cell.is-today .wf-cal-month-day-num {
  color: var(--wf-primary);
  font-weight: 700;
}

.wf-cal-month-day-num {
  font-size: var(--wf-font-sm);
  font-weight: 600;
  color: var(--wf-text);
  display: block;
  margin-bottom: 4px;
}

.wf-cal-month-dots {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wf-cal-month-event {
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--wf-transition);
}

.wf-cal-month-event:hover {
  transform: translateY(-1px);
  box-shadow: var(--wf-shadow-sm);
}

.wf-cal-month-more {
  font-size: 10px;
  color: var(--wf-text-muted);
  padding: 1px 4px;
  font-weight: 600;
}

/* ---- Year view ---- */
.wf-cal-year-view {
  padding: 4px;
}

.wf-cal-year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.wf-cal-year-month {
  background: var(--wf-surface-soft);
  border-radius: var(--wf-radius-sm);
  padding: 10px;
  cursor: pointer;
  transition: box-shadow var(--wf-transition), transform var(--wf-transition);
}

.wf-cal-year-month:hover {
  box-shadow: var(--wf-shadow-sm);
  transform: translateY(-1px);
}

.wf-cal-year-month.is-current {
  background: var(--wf-primary-soft);
  border: 1px solid var(--wf-primary);
}

.wf-cal-year-month-name {
  font-size: var(--wf-font-sm);
  font-weight: 700;
  color: var(--wf-text);
  text-align: center;
  margin-bottom: 8px;
}

.wf-cal-year-month.is-current .wf-cal-year-month-name {
  color: var(--wf-primary);
}

.wf-cal-year-month-dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 2px;
}

.wf-cal-year-dow {
  text-align: center;
  font-size: 9px;
  color: var(--wf-text-soft);
  font-weight: 600;
}

.wf-cal-year-month-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.wf-cal-year-day {
  text-align: center;
  font-size: 10px;
  padding: 2px 0;
  border-radius: 3px;
  color: var(--wf-text);
}

.wf-cal-year-day.is-outside {
  color: var(--wf-text-soft);
  opacity: 0.4;
}

.wf-cal-year-day.is-today {
  background: var(--wf-primary);
  color: #fff;
  font-weight: 700;
}

.wf-cal-year-day.has-events {
  font-weight: 600;
  position: relative;
}

.wf-cal-year-day.has-events::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--wf-primary);
}

@media (max-width: 768px) {
  .wf-week-grid { min-width: 700px; }
  .wf-calendar-legend { gap: 10px; }
  .wf-week-grid-cell { min-height: 60px; }
  .wf-week-hour-sub { display: none; }
  .wf-cal-year-grid { grid-template-columns: repeat(2, 1fr); }
  .wf-cal-month-cell { min-height: 70px; }
  .wf-calendar-toolbar { flex-direction: column; }
}

@media (max-width: 480px) {
  .wf-calendar-card { overflow-x: scroll; }
  .wf-cal-legend-item { font-size: 10px; }
  .wf-cal-year-grid { grid-template-columns: 1fr; }
  .wf-cal-month-cell { min-height: 50px; }
  .wf-cal-view-tab { padding: 4px 10px; font-size: var(--wf-font-xs); }
}

/* ---- Reports ---- */
.wf-reports-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 768px) {
  .wf-reports-grid { grid-template-columns: 1fr; }
}

/* ---- Task detail ---- */
.wf-task-detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.wf-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: var(--wf-font-sm); }

@media (max-width: 768px) {
  .wf-task-detail-grid { grid-template-columns: 1fr; }
  .wf-detail-grid { grid-template-columns: 1fr; }
}

/* ---- Daily Progress Strip 3.0 (Concepto A) ---- */
#daily-progress-strip {
  position: fixed;
  bottom: 0;
  left: var(--wf-sidebar-width, 250px);
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--wf-border);
  padding: 10px 20px;
  min-height: 56px;
  max-height: 72px;
  z-index: 90;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: max-height 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

#daily-progress-strip.is-expanded {
  max-height: 480px;
  overflow-y: auto;
}

#daily-progress-strip.is-empty {
  min-height: 56px;
}

/* --- Collapsed strip layout --- */
.daily-progress-strip.is-collapsed {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: center;
  height: 100%;
}

/* --- Task column --- */
.daily-progress-task {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.daily-progress-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wf-text-muted);
}
.daily-progress-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--wf-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Meter column --- */
.daily-progress-meter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.daily-progress-remaining {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--wf-text);
  white-space: nowrap;
  flex-shrink: 0;
}
.daily-progress-remaining.is-overdue {
  color: var(--wf-danger);
}
.daily-progress-meter {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--wf-surface-soft);
  overflow: hidden;
  min-width: 60px;
}
.daily-progress-meter-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--wf-primary);
  transition: width 0.4s ease;
}
.daily-progress-percent {
  font-size: 13px;
  font-weight: 700;
  color: var(--wf-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Actions column --- */
.daily-progress-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.daily-progress-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-surface);
  color: var(--wf-text-muted);
  cursor: pointer;
  transition: border-color var(--wf-transition), background var(--wf-transition), color var(--wf-transition);
}
.daily-progress-action:hover {
  border-color: var(--wf-primary);
  background: var(--wf-primary-soft);
  color: var(--wf-primary);
}
.daily-progress-action.is-wide {
  width: auto;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
}
.daily-progress-action--label {
  width: auto;
  min-width: 36px;
  gap: 6px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}

/* --- Empty state --- */
.daily-progress-empty-message {
  font-size: 12px;
  color: var(--wf-text-soft);
  font-style: italic;
  white-space: nowrap;
}

/* --- Expanded panel --- */
.daily-progress-strip.is-expanded {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.daily-progress-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--wf-border-soft);
  cursor: pointer;
}
.daily-progress-panel-header:focus-visible {
  outline: 2px solid var(--wf-primary);
  outline-offset: 3px;
  border-radius: var(--wf-radius-xs);
}
.daily-progress-panel-date {
  font-size: 13px;
  color: var(--wf-text-soft);
}
.daily-progress-panel-date strong {
  color: var(--wf-text);
  font-weight: 700;
}

.daily-progress-active-detail {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(360px, 2fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--wf-primary);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-primary-soft);
}
.daily-progress-active-heading {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.daily-progress-active-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--wf-text);
  font-size: 14px;
}
.daily-progress-active-context {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--wf-text-muted);
  font-size: 11px;
}
.daily-progress-active-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 10px;
}
.daily-progress-active-metrics div { min-width: 0; }
.daily-progress-active-metrics span,
.daily-progress-active-metrics strong { display: block; }
.daily-progress-active-metrics span { color: var(--wf-text-muted); font-size: 10px; }
.daily-progress-active-metrics strong { margin-top: 2px; color: var(--wf-text); font-size: 13px; }
.daily-progress-active-link {
  color: var(--wf-primary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.daily-progress-active-link:hover { text-decoration: none; }

.daily-progress-panel-tasks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 360px;
  overflow-y: auto;
}

.daily-progress-panel-task {
  display: grid;
  grid-template-columns: auto 1fr auto 140px auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--wf-radius-xs);
  background: var(--wf-surface-soft);
  border: 1px solid var(--wf-border-soft);
  font-size: 12px;
  color: var(--wf-text);
  cursor: pointer;
  transition: border-color var(--wf-transition);
}
.daily-progress-panel-task:hover {
  border-color: var(--wf-primary);
}
.daily-progress-panel-task.is-active {
  border-color: var(--wf-primary);
  background: var(--wf-primary-soft);
}
.daily-progress-panel-task-icon {
  font-size: 14px;
  flex-shrink: 0;
  text-align: center;
  width: 20px;
}
.daily-progress-panel-task-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.daily-progress-panel-task-status {
  font-size: 11px;
  color: var(--wf-text-soft);
  white-space: nowrap;
}
.daily-progress-panel-task-meter {
  display: flex;
  align-items: center;
  gap: 6px;
}
.daily-progress-panel-task-meter .daily-progress-meter {
  height: 6px;
  min-width: 50px;
}
.daily-progress-panel-task-time {
  font-size: 11px;
  color: var(--wf-text-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.daily-progress-panel-task-priority {
  font-size: 10px;
  font-weight: 600;
  color: var(--wf-text-muted);
  white-space: nowrap;
}
.daily-progress-panel-empty {
  padding: 24px;
  text-align: center;
  color: var(--wf-text-soft);
  font-size: 13px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .daily-progress-strip.is-collapsed {
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
  }
  .daily-progress-panel-task {
    grid-template-columns: auto 1fr auto auto auto;
    gap: 6px;
  }
  .daily-progress-panel-task-meter,
  .daily-progress-panel-task-priority {
    display: none;
  }
  .daily-progress-active-detail { grid-template-columns: 1fr auto; }
  .daily-progress-active-metrics { grid-column: 1 / -1; grid-row: 2; }
  .daily-progress-active-link { justify-self: end; }
}

@media (max-width: 768px) {
  #daily-progress-strip {
    left: 0;
    padding: 8px 12px;
    min-height: 48px;
    max-height: 64px;
  }
  .daily-progress-strip.is-collapsed {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .daily-progress-meter-wrap {
    display: none;
  }
  .daily-progress-action[data-action="stop"] {
    display: none;
  }
  .daily-progress-panel-task {
    grid-template-columns: auto 1fr auto;
    gap: 6px;
  }
  .daily-progress-panel-task-meter,
  .daily-progress-panel-task-priority,
  .daily-progress-panel-task-time,
  .daily-progress-panel-task-status {
    display: none;
  }
  .daily-progress-action--label span { display: none; }
  .daily-progress-active-detail { display: block; padding: 12px; }
  .daily-progress-active-metrics { grid-template-columns: repeat(2, 1fr); margin-top: 12px; }
  .daily-progress-active-link { display: inline-block; margin-top: 12px; }
}

/* --- Accessibility: reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .daily-progress-meter-fill {
    transition: none !important;
  }
}

/* ---- Colegas ---- */
.wf-colegas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.wf-colega-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--wf-surface);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.wf-colega-card:hover {
  border-color: var(--wf-primary);
  box-shadow: var(--wf-shadow);
}
.wf-colega-card > a { display: flex; gap: 12px; flex: 1; }
.wf-colega-info { flex: 1; min-width: 0; }
.wf-colega-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.wf-colega-role { font-size: 12px; color: var(--wf-text-soft); margin-bottom: 4px; }
.wf-colega-details { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.wf-colega-status { margin-top: 4px; }
.wf-colega-actions {
  display: flex;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--wf-border);
}

/* ---- Mensajes ---- */
.wf-message-list { display: flex; flex-direction: column; }
.wf-message-row {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--wf-border);
  text-decoration: none;
  color: inherit;
  align-items: center;
  transition: background .1s;
}
.wf-message-row:hover { background: var(--wf-bg-hover); }
.wf-message-row.is-unread { background: var(--wf-bg-accent); }
.wf-message-row:last-child { border-bottom: none; }
.wf-message-body { flex: 1; min-width: 0; }
.wf-message-header { display: flex; justify-content: space-between; margin-bottom: 2px; }
.wf-message-from { font-weight: 600; font-size: 13px; }
.wf-message-subject { font-size: 13px; margin-bottom: 2px; }
.wf-message-preview { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wf-primary); flex-shrink: 0; }

.wf-message-thread { display: flex; flex-direction: column; gap: 12px; max-height: 500px; overflow-y: auto; padding: 4px; }
.wf-message-bubble {
  padding: 12px 16px;
  border-radius: var(--wf-radius);
  background: var(--wf-bg-hover);
  max-width: 70%;
}
.wf-message-bubble.is-mine {
  background: var(--wf-primary);
  color: white;
  margin-left: auto;
}
.wf-message-bubble.is-mine .wf-text-muted { color: rgba(255,255,255,.7); }
.wf-message-bubble-header { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; }
.wf-message-bubble.is-mine .person-link { color: white; }
.wf-message-bubble-body { font-size: 14px; line-height: 1.5; }

/* ---- Eventos ---- */
.wf-event-list { display: flex; flex-direction: column; }
.wf-event-row {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--wf-border);
  text-decoration: none;
  color: inherit;
  align-items: center;
  transition: background .1s;
}
.wf-event-row:hover { background: var(--wf-bg-hover); }
.wf-event-row:last-child { border-bottom: none; }
.wf-event-row.is-past { opacity: .6; }
.wf-event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--wf-radius);
  background: var(--wf-primary);
  color: white;
  flex-shrink: 0;
}
.wf-event-day { font-size: 20px; font-weight: 700; line-height: 1; }
.wf-event-month { font-size: 11px; text-transform: uppercase; }
.wf-event-info { flex: 1; min-width: 0; }
.wf-event-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.wf-event-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 2px; }
.wf-event-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Novedades ---- */
.wf-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.wf-news-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--wf-surface);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.wf-news-card:hover {
  border-color: var(--wf-primary);
  box-shadow: var(--wf-shadow);
}
.wf-news-category { align-self: flex-start; }
.wf-news-title { font-size: 16px; font-weight: 600; }
.wf-news-desc { font-size: 13px; line-height: 1.5; }
.wf-news-date { margin-top: auto; }

/* ---- Pedidos: Cantina ---- */
.wf-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.wf-product-card {
  padding: 12px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wf-product-name { font-weight: 600; font-size: 14px; }
.wf-product-price { font-weight: 600; color: var(--wf-primary); font-size: 16px; }
.wf-cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--wf-border);
  font-size: 13px;
}
.wf-cart-qty { display: flex; align-items: center; gap: 6px; }
.wf-cart-qty button {
  width: 24px; height: 24px;
  border: 1px solid var(--wf-border);
  border-radius: 4px;
  background: var(--wf-surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.wf-cart-item-price { font-weight: 600; margin-left: 4px; }
.wf-cart-remove { color: var(--wf-danger); border: none !important; background: none !important; }
.wf-cart-total { font-size: 20px; font-weight: 700; color: var(--wf-primary); }
.wf-btn-full { width: 100%; }

/* ---- University ---- */
.wf-university-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.wf-uni-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--wf-surface);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.wf-uni-card:hover {
  border-color: var(--wf-primary);
  box-shadow: var(--wf-shadow);
}
.wf-uni-card.is-completed { border-color: var(--wf-success); }
.wf-uni-card.is-in-progress { border-color: var(--wf-primary); }
.wf-uni-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--wf-radius);
  background: var(--wf-bg-accent);
  color: var(--wf-primary);
  flex-shrink: 0;
}
.wf-uni-icon svg { width: 24px; height: 24px; }
.wf-uni-info { flex: 1; min-width: 0; }
.wf-uni-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.wf-uni-desc { margin-bottom: 8px; line-height: 1.4; }
.wf-uni-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.wf-quiz-question {
  padding: 16px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  margin-bottom: 16px;
}
.wf-quiz-question-num { font-size: 12px; color: var(--wf-text-soft); margin-bottom: 4px; }
.wf-quiz-question-text { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.wf-quiz-options { display: flex; flex-direction: column; gap: 8px; }
.wf-quiz-option {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  cursor: pointer;
  transition: background .1s, border-color .1s;
}
.wf-quiz-option:hover { background: var(--wf-bg-hover); }
.wf-quiz-option:has(input:checked) { border-color: var(--wf-primary); background: var(--wf-bg-accent); }
.wf-quiz-option input { margin-top: 2px; }

/* ---- Filter bar ---- */
.wf-filter-bar { padding: 12px; }
.wf-select-sm { padding: 4px 8px; font-size: 12px; }

/* ---- List row ---- */
.wf-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--wf-border);
}
.wf-list-row:last-child { border-bottom: none; }

@media (max-width: 768px) {
  .wf-colegas-grid { grid-template-columns: 1fr; }
  .wf-news-grid { grid-template-columns: 1fr; }
  .wf-university-grid { grid-template-columns: 1fr; }
  .wf-product-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- News slider (Mi día) ---- */
.wf-news-slider {
  position: relative;
  overflow: hidden;
  padding: 0 40px;
}
.wf-slider-track {
  display: flex;
  gap: 16px;
  transition: transform 300ms ease;
}
.wf-slider-card {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  text-decoration: none;
  color: inherit;
  background: var(--wf-surface);
  transition: border-color .15s;
}
.wf-slider-card:hover { border-color: var(--wf-primary); }
.wf-slider-title { font-weight: 600; font-size: 15px; }
.wf-slider-desc { font-size: 13px; color: var(--wf-text-soft); line-height: 1.4; }
.wf-slider-date { margin-top: auto; font-size: 12px; color: var(--wf-text-soft); }
.wf-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.wf-slider-prev { left: 4px; }
.wf-slider-next { right: 4px; }
.wf-slider-nav:hover { background: var(--wf-bg-hover); }

/* ---- Intelligence module ---- */
.wf-intel-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.wf-intel-stat {
  text-align: center;
  padding: 20px 12px;
}
.wf-intel-stat-value {
  font-size: 2em;
  font-weight: 700;
  color: var(--wf-primary);
  line-height: 1.2;
}
.wf-intel-stat-label {
  font-size: 0.85em;
  color: var(--wf-text-muted);
  margin-top: 4px;
}
.wf-intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.wf-intel-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.wf-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.wf-filters .wf-input {
  min-width: 180px;
}
.wf-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.9em;
}
.wf-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.wf-form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.wf-form-row .wf-input {
  flex: 1;
  min-width: 180px;
}
.wf-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wf-form .wf-input {
  width: 100%;
}
.wf-form textarea.wf-input {
  resize: vertical;
}

/* Loop timeline */
.wf-loop-timeline {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 12px 0;
}
.wf-loop-step {
  flex: 1;
  min-width: 100px;
  padding: 8px 10px;
  border-radius: var(--wf-radius);
  background: var(--wf-bg-hover);
  color: var(--wf-text-muted);
  font-size: 0.8em;
  text-align: center;
  position: relative;
  transition: all 0.2s;
}
.wf-loop-step.is-done {
  background: var(--wf-primary);
  color: #fff;
}
.wf-loop-step.is-done::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid var(--wf-primary);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  z-index: 1;
}
.wf-loop-step:last-child::after { display: none; }

.wf-loop-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wf-loop-review {
  border-bottom: 1px solid var(--wf-border);
  padding: 12px 0;
}
.wf-loop-review:last-child { border-bottom: none; }
.wf-loop-review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.wf-loop-review-decision {
  margin-top: 8px;
}
.wf-pill-warning { background: #fef3c7; color: #92400e; }
.wf-pill-danger { background: #fee2e2; color: #991b1b; }
.wf-pill-success { background: #d1fae5; color: #065f46; }
.wf-pill-info { background: #dbeafe; color: #1e40af; }

.wf-intel-miday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

/* Client detail */
.wf-client-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr);
  gap: 16px;
  align-items: start;
}
.wf-detail-form-actions {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 20px;
}
.wf-client-summary-card,
.wf-client-projects-card { margin-bottom: 16px; }
.wf-client-summary-status { margin-bottom: 18px; }
.wf-client-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.wf-client-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 8px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  color: var(--wf-text);
  text-decoration: none;
  text-align: center;
}
.wf-client-metric:hover { border-color: var(--wf-primary); text-decoration: none; }
.wf-client-metric strong { font-size: 20px; }
.wf-client-metric span { color: var(--wf-text-muted); font-size: var(--wf-font-xs); }
.wf-client-summary-link,
.wf-client-summary-address {
  display: block;
  color: var(--wf-text-muted);
  font-size: var(--wf-font-sm);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.wf-client-summary-link + .wf-client-summary-link { margin-top: 5px; }
.wf-client-summary-link:hover { color: var(--wf-primary); text-decoration: none; }
.wf-client-summary-address { margin: 12px 0 0; }
.wf-responsible-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wf-responsible-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  cursor: pointer;
}
.wf-responsible-option:has(input:checked) { border-color: var(--wf-primary); background: var(--wf-primary-soft); }
.wf-responsible-option input { margin-top: 3px; }
.wf-responsible-option span { min-width: 0; }
.wf-responsible-option strong,
.wf-responsible-option small { display: block; overflow-wrap: anywhere; }
.wf-responsible-option small { color: var(--wf-text-muted); font-size: var(--wf-font-xs); margin-top: 3px; }
.wf-client-project-list { display: flex; flex-direction: column; gap: 10px; }
.wf-client-project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--wf-border-soft);
}
.wf-client-project-item:last-child { padding-bottom: 0; border-bottom: 0; }
.wf-client-project-item strong,
.wf-client-project-item small { display: block; }
.wf-client-project-item small { color: var(--wf-text-muted); font-size: var(--wf-font-xs); margin-top: 3px; }
.wf-client-portal-card p { line-height: 1.5; }
.wf-client-portal-status { display:flex; align-items:center; gap:8px; margin:14px 0 10px; }
.wf-client-portal-actions { display:inline-block; margin:12px 6px 0 0; }
.wf-client-portal-link-label { margin-top:14px; }
.wf-client-portal-link-row { display:flex; gap:6px; margin-top:6px; }
.wf-client-portal-link-row input { min-width:0; flex:1; font-size:var(--wf-font-xs); }
.wf-client-monthly-panel { margin-top:16px; }
.wf-client-monthly-header { align-items:flex-start; }
.wf-client-monthly-header h3 { margin-bottom:3px; }
.wf-client-month-filter { display:flex; align-items:center; gap:7px; }
.wf-client-month-filter label { color:var(--wf-text-muted); font-size:var(--wf-font-sm); }
.wf-client-month-filter input { padding:7px 9px; border:1px solid var(--wf-border); border-radius:var(--wf-radius-sm); color:var(--wf-text); background:var(--wf-surface); }
.wf-client-month-metrics { display:grid; grid-template-columns:repeat(5, 1fr); gap:10px; margin-bottom:16px; }
.wf-client-month-metrics > div { padding:12px; background:var(--wf-surface-soft); border-radius:var(--wf-radius-sm); }
.wf-client-month-metrics strong, .wf-client-month-metrics span { display:block; }.wf-client-month-metrics strong { font-size:20px; }.wf-client-month-metrics span { color:var(--wf-text-muted); font-size:var(--wf-font-xs); margin-top:4px; }
.wf-client-month-progress { padding:12px 0 18px; }.wf-client-month-progress > div:first-child { display:flex; justify-content:space-between; gap:10px; color:var(--wf-text-muted); font-size:var(--wf-font-sm); }
.wf-client-month-progress .wf-portal-progress { height:8px; background:var(--wf-border-soft); border-radius:999px; overflow:hidden; margin-top:10px; }.wf-client-month-progress .wf-portal-progress > span { display:block; height:100%; background:var(--wf-primary); border-radius:inherit; }
.wf-client-month-grid { display:grid; grid-template-columns:minmax(0, 1.5fr) minmax(240px, 1fr); gap:24px; }.wf-client-month-grid h4 { margin:0 0 10px; font-size:var(--wf-font-md); }
.wf-client-month-task { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:10px 0; border-top:1px solid var(--wf-border-soft); }.wf-client-month-task strong, .wf-client-month-task small { display:block; }.wf-client-month-task small { color:var(--wf-text-muted); margin-top:3px; font-size:var(--wf-font-xs); }.wf-client-month-task-right { display:flex; align-items:center; gap:10px; white-space:nowrap; }
.wf-client-daily-row { display:grid; grid-template-columns:74px 1fr 52px; align-items:center; gap:8px; margin-bottom:10px; font-size:var(--wf-font-xs); }.wf-client-daily-row > div { height:8px; background:var(--wf-border-soft); border-radius:999px; overflow:hidden; }.wf-client-daily-row i { display:block; height:100%; background:var(--wf-primary); border-radius:inherit; }
.wf-support-log-card { max-width:900px; }.wf-support-log-note { padding:12px 14px; margin:4px 0 18px; border-left:3px solid var(--wf-primary); background:var(--wf-primary-soft); color:var(--wf-text-muted); font-size:var(--wf-font-sm); line-height:1.5; }
@media (max-width: 800px) { .wf-client-month-metrics { grid-template-columns:repeat(2, 1fr); }.wf-client-month-grid { grid-template-columns:1fr; } }
@media (max-width: 600px) { .wf-client-monthly-header { flex-direction:column; }.wf-client-month-filter { width:100%; }.wf-client-month-filter input { flex:1; }.wf-client-month-task { align-items:flex-start; flex-direction:column; } }
.wf-client-contacts-list { display: grid; gap: 12px; margin-bottom: 16px; }
.wf-client-contacts-disclosure { padding: 0; overflow: hidden; }
.wf-client-contacts-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  cursor: pointer;
  list-style: none;
}
.wf-client-contacts-summary::-webkit-details-marker { display: none; }
.wf-client-contacts-summary::before {
  content: '›';
  order: 2;
  color: var(--wf-primary);
  font-size: 24px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform .15s ease;
}
.wf-deploy-panel, .wf-deploy-files { max-width: 1100px; }
.wf-deploy-status-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:12px; margin-bottom:20px; }
.wf-deploy-status-card { padding:14px; background:var(--wf-surface-soft); border-radius:var(--wf-radius-sm); }
.wf-deploy-status-card span, .wf-deploy-status-card strong { display:block; }
.wf-deploy-status-card span { color:var(--wf-text-muted); font-size:var(--wf-font-xs); }
.wf-deploy-status-card strong { margin-top:5px; font-size:20px; }
.wf-deploy-status-card .is-ok, .wf-deploy-file-status.is-ok { color:var(--wf-success, #15803d); }
.wf-deploy-status-card .is-warning, .wf-deploy-file-status.is-warning { color:var(--wf-warning, #b45309); }
.wf-deploy-actions { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; padding-top:4px; }
.wf-deploy-actions h2, .wf-deploy-files h2 { margin:0 0 5px; }
.wf-deploy-actions p, .wf-deploy-files p { color:var(--wf-text-muted); font-size:var(--wf-font-sm); line-height:1.5; margin:0 0 8px; }
.wf-deploy-safety-note { color:var(--wf-primary) !important; }
.wf-deploy-output { margin-top:20px; padding-top:18px; border-top:1px solid var(--wf-border-soft); }
.wf-deploy-output h3 { margin:0 0 8px; font-size:var(--wf-font-md); }
.wf-deploy-output pre { margin:0; padding:12px; overflow:auto; background:var(--wf-surface-soft); border-radius:var(--wf-radius-sm); font-size:var(--wf-font-xs); }
.wf-deploy-files { margin-top:16px; }
.wf-deploy-files .wf-table-wrap { overflow:auto; }
.wf-deploy-files code { font-size:var(--wf-font-xs); }
.wf-deploy-file-status { font-weight:600; }
.wf-deploy-meta { margin-top:14px !important; }
.wf-deploy-operations { max-width:1100px; margin-top:16px; }
.wf-deploy-operation-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; }
.wf-deploy-operation-card { display:flex; flex-direction:column; justify-content:space-between; gap:18px; padding:16px; border:1px solid var(--wf-border); border-radius:var(--wf-radius-sm); background:var(--wf-surface); text-decoration:none; }
.wf-deploy-operation-card h3 { margin:0 0 5px; font-size:var(--wf-font-md); }
.wf-deploy-operation-card p { margin:0; color:var(--wf-text-muted); font-size:var(--wf-font-sm); line-height:1.5; }
.wf-deploy-operation-card .wf-btn { align-self:flex-start; }
.wf-deploy-operation-link { color:inherit; transition:border-color .15s ease, background .15s ease; }
.wf-deploy-operation-link:hover { border-color:var(--wf-primary); background:var(--wf-primary-soft); }
@media (max-width: 800px) { .wf-deploy-status-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }.wf-deploy-actions { align-items:stretch; flex-direction:column; }.wf-deploy-actions form { width:100%; }.wf-deploy-actions button { width:100%; } }
@media (max-width: 600px) { .wf-deploy-operation-grid { grid-template-columns:1fr; } }
.wf-client-contacts-disclosure[open] .wf-client-contacts-summary::before { transform: rotate(90deg); }
.wf-client-contacts-summary > span:first-child { min-width: 0; }
.wf-client-contacts-summary strong,
.wf-client-contacts-summary small { display: block; }
.wf-client-contacts-summary strong { font-size: var(--wf-font-lg); font-weight: 600; }
.wf-client-contacts-summary small { margin-top: 4px; color: var(--wf-text-muted); font-size: var(--wf-font-sm); }
.wf-client-contacts-summary-action { color: var(--wf-text-muted); font-size: var(--wf-font-sm); white-space: nowrap; }
.wf-client-contacts-content { padding: 0 18px 2px; }
.wf-client-contacts-content > .wf-form-section-header { margin-top: 0; }
.wf-client-contact-card {
  padding: 16px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-md);
  background: var(--wf-surface);
}
.wf-client-contact-card--new { background: var(--wf-surface-soft); }
.wf-client-contact-card--new h3 { margin-bottom: 14px; font-size: var(--wf-font-md); }
.wf-client-contact-card-header,
.wf-client-contact-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wf-client-contact-card-header { margin-bottom: 12px; }
.wf-client-contact-card-footer { margin-top: 2px; }
.wf-client-contact-card-footer > div { display: flex; gap: 6px; }
.wf-checkbox-label { display: inline-flex; align-items: center; gap: 7px; color: var(--wf-text-muted); font-size: var(--wf-font-sm); cursor: pointer; }

@media (max-width: 900px) {
  .wf-client-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wf-responsible-list { grid-template-columns: 1fr; }
  .wf-client-contact-card-footer { align-items: flex-start; flex-direction: column; }
  .wf-client-contact-card-footer > div { width: 100%; justify-content: space-between; }
  .wf-client-contact-card-footer .wf-btn { flex: 1; justify-content: center; }
}

/* ---- Daily progress strip: evento compacto + detalle expandible ---- */
#daily-progress-strip {
  box-sizing: border-box;
  overflow: hidden;
  padding: 8px 20px;
  min-height: 88px;
  max-height: 96px;
  background: rgba(255, 255, 255, .98);
  border-top-color: rgba(47, 128, 237, .18);
  box-shadow: 0 -10px 28px rgba(31, 71, 125, .10);
}

#daily-progress-strip > .daily-progress-strip {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: auto;
}

#daily-progress-strip.is-expanded {
  max-height: min(560px, 72vh);
  overflow-y: auto;
  padding: 12px 20px;
}

.daily-progress-strip.is-collapsed {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
}

/* The empty state is a single compact row. Without this rule its message and
   action stack below the fixed tray and the action appears cut off. */
.daily-progress-strip.is-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
}

.daily-progress-strip.is-empty .daily-progress-task {
  flex: 1 1 220px;
}

.daily-progress-strip.is-empty .daily-progress-empty-message {
  flex: 1 1 320px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-progress-strip.is-empty .daily-progress-actions {
  margin-left: auto;
}

.daily-progress-action--link {
  text-decoration: none;
}

.daily-progress-action--link:hover {
  text-decoration: none;
}

.daily-progress-event-track {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  height: 68px;
  flex: 1 1 auto;
}

.daily-progress-event-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background: linear-gradient(90deg, var(--wf-border) 0%, rgba(47, 128, 237, .42) 52%, var(--wf-border) 100%);
  pointer-events: none;
}

.daily-progress-event-line::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--wf-surface);
  border-radius: 50%;
  background: var(--wf-primary);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, .14);
  transform: translateX(-50%);
}

.daily-progress-event-time {
  position: absolute;
  z-index: 3;
  left: 16px;
  top: 0;
  color: var(--wf-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

.daily-progress-event {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 420px);
  min-width: 0;
  margin: 0 0 4px 8px;
  padding: 9px 16px 9px 12px;
  border: 1px solid rgba(47, 128, 237, .30);
  border-radius: 999px;
  background: linear-gradient(135deg, #edf6ff 0%, #f5f0ff 100%);
  color: var(--wf-text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(47, 128, 237, .12);
  transition: transform var(--wf-transition), box-shadow var(--wf-transition), border-color var(--wf-transition);
}

.daily-progress-event:hover,
.daily-progress-event:focus-visible {
  border-color: var(--wf-primary);
  box-shadow: 0 8px 18px rgba(47, 128, 237, .18);
  transform: translateY(-2px);
}

.daily-progress-event-dot {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 6px solid rgba(47, 128, 237, .16);
  border-radius: 50%;
  background: var(--wf-primary);
  box-shadow: 0 0 0 1px rgba(47, 128, 237, .26);
}

.daily-progress-event-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0;
}

.daily-progress-event-status {
  color: var(--wf-primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.daily-progress-event-title {
  overflow: hidden;
  color: var(--wf-text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-progress-event--paused { border-color: rgba(245, 158, 11, .42); background: var(--wf-warning-soft); }
.daily-progress-event--paused .daily-progress-event-dot { background: var(--wf-warning); border-color: rgba(245, 158, 11, .18); }
.daily-progress-event--overdue { border-color: rgba(239, 68, 68, .38); background: var(--wf-danger-soft); }
.daily-progress-event--overdue .daily-progress-event-dot { background: var(--wf-danger); border-color: rgba(239, 68, 68, .18); }

.daily-progress-actions { gap: 6px; }
.daily-progress-action { width: 34px; height: 34px; }
.daily-progress-action--label { width: auto; min-width: 34px; }

/* Expanded timeline */
.daily-progress-timeline {
  position: relative;
  min-height: 142px;
  margin: 2px 0 4px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 26px 12px 0;
  scrollbar-width: thin;
}

.daily-progress-timeline-axis {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 35px;
  height: 2px;
  background: var(--wf-border);
}

.daily-progress-timeline-axis::before,
.daily-progress-timeline-axis::after {
  position: absolute;
  bottom: 7px;
  color: var(--wf-text-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.daily-progress-timeline-axis::before { content: '08:00'; left: 0; }
.daily-progress-timeline-axis::after { content: '18:00'; right: 0; }

.daily-progress-timeline-now {
  position: absolute;
  left: var(--now-position);
  bottom: 25px;
  z-index: 3;
  width: 2px;
  height: 90px;
  background: var(--wf-warning);
  transform: translateX(-50%);
}
.daily-progress-timeline-now::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--wf-surface);
  border-radius: 50%;
  background: var(--wf-warning);
  transform: translateX(-50%);
}
.daily-progress-timeline-now span {
  position: absolute;
  left: 50%;
  top: -24px;
  padding: 3px 7px;
  border: 1px solid rgba(245, 158, 11, .48);
  border-radius: 8px;
  background: var(--wf-warning-soft);
  color: #9a6700;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  transform: translateX(-50%);
}

.daily-progress-timeline-event {
  position: absolute;
  left: var(--event-left);
  bottom: 48px;
  z-index: 2;
  display: flex;
  min-width: max(150px, var(--event-width));
  max-width: 260px;
  flex-direction: column;
  gap: 1px;
  padding: 8px 12px;
  overflow: hidden;
  border: 1px solid rgba(47, 128, 237, .25);
  border-radius: 14px;
  background: var(--wf-primary-soft);
  color: var(--wf-text);
  text-align: left;
  cursor: pointer;
  transform: translateX(-8%);
}
.daily-progress-timeline-event::after {
  content: '';
  position: absolute;
  left: 18px;
  bottom: -12px;
  width: 1px;
  height: 12px;
  background: var(--wf-primary);
}
.daily-progress-timeline-event:hover,
.daily-progress-timeline-event.is-active { border-color: var(--wf-primary); box-shadow: var(--wf-shadow-sm); }
.daily-progress-timeline-event.is-active { background: #e4f1ff; }
.daily-progress-timeline-event--completed { border-color: rgba(34, 197, 94, .35); background: var(--wf-success-soft); }
.daily-progress-timeline-event--paused { border-color: rgba(245, 158, 11, .35); background: var(--wf-warning-soft); }
.daily-progress-timeline-event--overdue { border-color: rgba(239, 68, 68, .35); background: var(--wf-danger-soft); }
.daily-progress-timeline-event-time { color: var(--wf-primary); font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.daily-progress-timeline-event-title { overflow: hidden; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.daily-progress-timeline-event-context { overflow: hidden; color: var(--wf-text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 768px) {
  #daily-progress-strip { left: 0; padding: 7px 10px; min-height: 78px; max-height: 88px; }
  #daily-progress-strip.is-expanded { max-height: min(620px, 82vh); padding: 10px; }
  .daily-progress-strip.is-collapsed { gap: 8px; min-height: 54px; }
  .daily-progress-strip.is-empty { gap: 8px; min-height: 54px; }
  .daily-progress-strip.is-empty .daily-progress-empty-message { display: none; }
  .daily-progress-event-track { height: 62px; }
  .daily-progress-event { width: 100%; margin: 0 0 4px 2px; padding: 7px 11px 7px 9px; }
  .daily-progress-event-time { top: 0; left: 8px; font-size: 10px; }
  .daily-progress-event-dot { width: 24px; height: 24px; flex-basis: 24px; border-width: 5px; }
  .daily-progress-event-status { display: none; }
  .daily-progress-event-title { font-size: 13px; }
  .daily-progress-actions { gap: 3px; }
  .daily-progress-action { width: 30px; height: 30px; }
  .daily-progress-action svg { width: 15px; height: 15px; }
  .daily-progress-action--label { padding: 0 7px; }
  .daily-progress-action--label span { display: none; }
  .daily-progress-timeline { min-height: 156px; margin-right: -2px; margin-left: -2px; }
  .daily-progress-active-detail { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .daily-progress-event,
  .daily-progress-action { transition: none; }
}

/* ---- Task description rich text ---- */
.wf-rich-text { border: 1px solid var(--wf-border); border-radius: var(--wf-radius-md); background: var(--wf-surface); overflow: hidden; }
.wf-rich-text:focus-within { border-color: var(--wf-primary); box-shadow: 0 0 0 3px rgba(47, 128, 237, .14); }
.wf-rich-text-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 7px 8px; border-bottom: 1px solid var(--wf-border-soft); background: var(--wf-surface-soft); }
.wf-rich-text-toolbar button { min-height: 30px; padding: 4px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--wf-text); font: inherit; font-size: var(--wf-font-xs); cursor: pointer; }
.wf-rich-text-toolbar button:hover, .wf-rich-text-toolbar button:focus-visible { border-color: var(--wf-border); background: var(--wf-surface); outline: 0; }
.wf-rich-text-separator { width: 1px; height: 20px; margin: 0 2px; background: var(--wf-border); }
.wf-rich-text-editor { min-height: 132px; padding: 11px 12px; outline: 0; line-height: 1.55; }
.wf-rich-text-editor:empty::before { content: 'Escribí una descripción…'; color: var(--wf-text-soft); }
.wf-rich-text-editor p { margin: 0 0 10px; }
.wf-rich-text-editor p:last-child { margin-bottom: 0; }
.wf-rich-text-editor ul, .wf-rich-text-editor ol, .wf-task-description ul, .wf-task-description ol { margin: 8px 0 10px 20px; padding-left: 18px; }
.wf-rich-text-editor a, .wf-task-description a { color: var(--wf-primary); text-decoration: underline; }
.wf-task-description { margin-top: 6px; line-height: 1.6; }
.wf-task-description p { margin: 0 0 10px; }
.wf-task-description p:last-child { margin-bottom: 0; }
.wf-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 520px) { .wf-rich-text-toolbar { gap: 2px; } .wf-rich-text-toolbar button { padding: 4px 6px; } .wf-rich-text-separator { display: none; } }
