/* pages/scheduler.css — Scheduler page styles */

/* ─── Stats row ──────────────────────────────────────── */
.sched-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.sched-stat-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
}
.sched-stat-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.sched-stat-icon.pending  { background: #2563eb18; color: #2563eb; }
.sched-stat-icon.done     { background: #22c55e18; color: #22c55e; }
.sched-stat-icon.error    { background: #dc262618; color: #dc2626; }
.sched-stat-icon.total    { background: #8b5cf618; color: #8b5cf6; }
.sched-stat-val  { font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.sched-stat-label { font-size: 10px; color: var(--text-tertiary); letter-spacing: 0.3px; text-transform: uppercase; }

/* ─── Job list ───────────────────────────────────────── */
.sched-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sched-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  transition: border-color var(--transition-hover);
}
.sched-item:hover {
  border-color: var(--border-default);
}

.sched-item-time {
  flex-shrink: 0;
  width: 70px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  text-align: center;
}
.sched-item-time .date { font-size: 10px; color: var(--text-disabled); }

.sched-item-content {
  flex: 1;
  min-width: 0;
}
.sched-item-hook {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sched-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.sched-item-actions {
  flex-shrink: 0;
}

/* ─── Status badge ───────────────────────────────────── */
.sched-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 2px 7px;
  border-radius: 3px;
}
.sched-badge.pending    { background: #2563eb18; color: #2563eb; }
.sched-badge.publishing { background: #d9770618; color: #d97706; }
.sched-badge.done       { background: #22c55e18; color: #22c55e; }
.sched-badge.error      { background: #dc262618; color: #dc2626; }

/* ─── New Schedule modal ─────────────────────────────── */
.sched-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

.sched-modal {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  width: 420px;
  max-width: 92vw;
  padding: 0;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  animation: slideUp 0.2s ease;
}

.sched-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.sched-modal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.sched-modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-tertiary); font-size: 18px; line-height: 1;
  padding: 2px;
}
.sched-modal-close:hover { color: var(--text-primary); }

.sched-modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sched-modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── Empty state ────────────────────────────────────── */
.sched-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--text-disabled);
  font-size: 13px;
}
