/* Tasks v4 — daily checklist of clips */

/* Day switcher */
.day-switcher {
  max-width: 960px; margin: 0 auto;
  padding: 6px 16px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.day-switcher > div {
  flex: 1; text-align: center;
  font-weight: 700; font-size: 15px; color: var(--text);
}
.day-switcher .btn-icon { width: 36px; height: 36px; font-size: 18px; }

/* Big progress */
.big-progress {
  max-width: 928px; margin: 0 auto 12px;
  padding: 0 16px;
}
.big-progress .bp-row {
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(135deg, var(--primary-soft), var(--purple-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 6px;
  box-shadow: var(--shadow-sm);
}
.bp-pct {
  font-size: 36px; font-weight: 800; line-height: 1;
  letter-spacing: -1px; color: var(--success);
}
.bp-pct.low  { color: var(--danger); }
.bp-pct.mid  { color: var(--warn); }
.bp-pct.high { color: var(--success); }
.bp-text {
  font-size: 13px; color: var(--text-2); margin-top: 4px;
}
.bp-text b { color: var(--text); font-size: 14px; }

.bp-mini-stats {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; font-weight: 600;
}
.mini { display: inline-block; min-width: 40px; text-align: right; }
.mini.ok    { color: var(--success); }
.mini.pend  { color: var(--warn); }
.mini.bad   { color: var(--danger); }
.mini.empty { color: var(--muted); }

.bp-bar {
  width: 100%; height: 8px;
  background: var(--surface);
  border-radius: 999px; overflow: hidden;
  border: 1px solid var(--border);
}
.bp-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--success), #22c55e);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.bp-bar-fill.low { background: linear-gradient(90deg, var(--danger), #ef4444); }
.bp-bar-fill.mid { background: linear-gradient(90deg, var(--warn), #f59e0b); }

/* ========== งานค้าง (missed work) ========== */
#missed-list { margin-bottom: 4px; }
.missed-empty {
  text-align: center;
  color: var(--success);
  font-size: 13px; font-weight: 600;
  padding: 10px;
  background: var(--success-soft);
  border-radius: 10px;
  border: 1px solid rgba(22,163,74,0.2);
}
.missed-card {
  background: linear-gradient(135deg, var(--danger-soft), var(--warn-soft));
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.missed-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px 8px;
}
.missed-icon { font-size: 18px; }
.missed-title { font-weight: 700; font-size: 15px; flex: 1; color: var(--text); }
.missed-title b { color: var(--danger); font-size: 17px; }
.missed-sub { font-size: 11.5px; color: var(--text-2); font-weight: 500; }

.missed-rows { display: flex; flex-direction: column; }
.missed-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.6);
  border-top: 1px solid rgba(220,38,38,0.12);
  cursor: pointer; transition: 0.15s;
}
.missed-row:hover { background: white; }
.missed-row-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.missed-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: white; flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.missed-row-title { font-weight: 600; font-size: 13.5px; color: var(--text); }
.missed-row-sub { font-size: 12px; color: var(--text-2); margin-top: 1px; }
.missed-reason.rej   { color: var(--danger); font-weight: 600; }
.missed-reason.empty { color: var(--warn); font-weight: 600; }
.missed-row-act {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.missed-row.rej .missed-row-act { background: var(--danger); }

/* Business cards */
#biz-list { display: flex; flex-direction: column; gap: 12px; }

.biz-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.biz-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--tab-color, var(--primary));
  color: white;
}
.biz-emoji { font-size: 20px; }
.biz-name-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.biz-name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.biz-lead { font-size: 11.5px; opacity: 0.9; font-weight: 500; }
.biz-progress {
  font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,0.25); padding: 3px 10px; border-radius: 999px;
}

.biz-slots { display: flex; flex-direction: column; }

/* Daily slot row */
.day-slot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  cursor: pointer; transition: 0.15s;
}
.day-slot:hover { background: var(--surface); }
.day-slot.empty {
  background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0,0,0,0.015) 8px, rgba(0,0,0,0.015) 16px);
}
.day-slot.empty:hover { background: var(--primary-soft); }
.day-slot.empty.drop-hover {
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 2px var(--primary);
}
.day-slot.uploading { background: var(--primary-soft); cursor: wait; }

.day-slot .ds-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.day-slot .ds-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.day-slot .ds-thumb {
  width: 52px; height: 52px; border-radius: 8px;
  background: #000; overflow: hidden; flex-shrink: 0;
  position: relative;
}
.day-slot .ds-thumb img,
.day-slot .ds-thumb video { width: 100%; height: 100%; object-fit: cover; }
.day-slot .ds-title { font-weight: 600; font-size: 14px; color: var(--text); }
.day-slot .ds-sub {
  font-size: 12.5px; color: var(--text-2); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.day-slot .ds-sub.cmt-approved { color: var(--success); }
.day-slot .ds-sub.cmt-rejected { color: var(--danger); }
.day-slot .ds-sub.cmt-pending  { color: var(--warn); }

.day-slot .ds-action {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  background: var(--surface); color: var(--muted);
}
.day-slot.empty .ds-action { background: var(--primary); color: white; font-size: 22px; line-height: 1; }
.day-slot .ds-action.badge-pending  { background: var(--warn);    color: white; }
.day-slot .ds-action.badge-approved { background: var(--success); color: white; }
.day-slot .ds-action.badge-rejected { background: var(--danger);  color: white; }

/* Status overlay for detail modal */
.status-chip-big {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: white;
}
.badge-pending  { background: var(--warn); }
.badge-approved { background: var(--success); }
.badge-rejected { background: var(--danger); }

@media (max-width: 480px) {
  .bp-row { padding: 12px 14px; }
  .bp-pct { font-size: 30px; }
  .day-slot { padding: 10px 12px; }
  .day-slot .ds-title { font-size: 13.5px; }
  .day-slot .ds-sub { font-size: 12px; }
}
