/* Cleaning Tasks - widget desktop vertical (moderne, plein) */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: #F5F6F4;
  color: #111827;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  font-size: 14px;
}
#app { height: 100%; display: flex; flex-direction: column; min-height: 0; }

/* ─── LIVE DOT ─────────────────────────────────────────────── */
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.55);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.live-dot.offline { background: #ef4444; animation: none; box-shadow: none; }
.btn-icon {
  background: #F5F6F4;
  color: #6b7280;
  border: none;
  border-radius: 9px;
  padding: 7px 9px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.btn-icon:hover { background: #ebedea; color: #111827; }

/* ─── TABS ───────────────────────────────────────────────── */
.tabs {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #FFFFFF;
  padding: 12px 10px;
  gap: 8px;
}
.tab {
  appearance: none;
  background: #F5F6F4;
  border: none;
  border-radius: 12px;
  padding: 12px 6px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: background 0.15s ease, transform 0.1s ease, color 0.15s ease;
}
.tab:hover { background: #ebedea; }
.tab:active { transform: scale(0.97); }
.tab .num {
  font-size: 22px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums; color: #0b1220;
}
.tab .lbl {
  font-size: 11px; font-weight: 600; line-height: 1.1;
  color: #6b7280;
  text-align: center;
}
.tab.todo.active { background: #fee2e2; }
.tab.todo.active .num { color: #b91c1c; }
.tab.todo.active .lbl { color: #b91c1c; }
.tab.progress.active { background: #fef3c7; }
.tab.progress.active .num { color: #92400e; }
.tab.progress.active .lbl { color: #92400e; }
.tab.done.active { background: #d1fae5; }
.tab.done.active .num { color: #065f46; }
.tab.done.active .lbl { color: #065f46; }
.tab.history.active { background: #ede9fe; }
.tab.history.active .num { color: #5b21b6; }
.tab.history.active .lbl { color: #5b21b6; }
.tabs.tabs-4 { grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 12px 8px; }
.tabs.tabs-4 .tab { padding: 10px 4px; }
.tabs.tabs-4 .tab .num { font-size: 20px; }
.tabs.tabs-4 .tab .lbl { font-size: 10px; }

/* ─── LIST ───────────────────────────────────── */
.list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
  background: #F5F6F4;
}
.list > .task,
.list > .empty,
.list > .hist-group { flex-shrink: 0; }
.subtabs { flex-shrink: 0; }

/* ─── TASK CARD ───────────────────────────────────── */
.task {
  position: relative;
  display: block;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 14px 16px 14px;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 4px 14px rgba(15,23,42,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.task:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(15,23,42,0.08); }
.task:active { transform: translateY(0); }

/* TODO : fond rouge plein */
.task.todo {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(220,38,38,0.32), 0 10px 30px rgba(220,38,38,0.18);
}
.task.todo .task-title { color: #fff; }
.task.todo .task-cat { background: rgba(255,255,255,0.20); color: #fff; }
.task.todo .task-elapsed { color: #fff; background: rgba(0,0,0,0.22); }
.task.todo .task-meta { color: rgba(255,255,255,0.85); }
.task.todo .task-people {
  border-top-color: rgba(255,255,255,0.18);
}
.task.todo .task-people .line { color: rgba(255,255,255,0.92); }
.task.todo .task-people .line strong { color: #fff; }
.task.todo .task-people .line .time { color: rgba(255,255,255,0.75); }
/* IN PROGRESS : carte blanche avec halo doré */
.task.in_progress {
  background: #FFFFFF;
  border-top: 3px solid #F0AF02;
}
/* DONE : carte légèrement teintée */
.task.done {
  background: #FFFFFF;
  opacity: 0.85;
}
.task.cancelled {
  background: #FFFFFF;
  opacity: 0.6;
}

.task.enter { animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes slideIn {
  0%   { transform: translateY(-16px) scale(0.98); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.task.flash::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(240,175,2,0.22);
  animation: flashFade 1.8s ease forwards;
  pointer-events: none;
  border-radius: 14px;
}
@keyframes flashFade {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

.task-row1 {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 8px;
}
.task-title {
  font-size: 11px; font-weight: 700; color: #0b1220;
  flex: 1; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  letter-spacing: -0.005em;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.task-prio {
  flex-shrink: 0;
  font-size: 10px; padding: 3px 7px; border-radius: 5px;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 800;
}
.task-prio.urgent { background: #7f1d1d; color: #fee2e2; }
.task-prio.high   { background: #ffedd5; color: #9a3412; }
.task-prio.normal,
.task-prio.low    { display: none; }

.task-elapsed {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  background: #F5F6F4;
  padding: 3px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-top: 1px;
}
.task-elapsed.warn { color: #92400e; background: #fef3c7; }
.task-elapsed.alert { color: #b91c1c; background: #fee2e2; }
.task-elapsed.ok { color: #065f46; background: #d1fae5; }
.task-elapsed.muted { color: #6b7280; background: #f3f4f6; }

.task-meta {
  display: flex; flex-wrap: wrap; gap: 6px 12px;
  font-size: 11px; color: #6b7280;
  margin-top: 4px;
  align-items: center;
}
.task-cat {
  background: #f3f4f6;
  color: #374151;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}
.task.in_progress .task-cat.commercial   { background: #dbeafe; color: #1e40af; }
.task.in_progress .task-cat.technique    { background: #ede9fe; color: #6d28d9; }
.task.in_progress .task-cat.secretariat  { background: #fce7f3; color: #9d174d; }
.task.done .task-cat.commercial   { background: #dbeafe; color: #1e40af; }
.task.done .task-cat.technique    { background: #ede9fe; color: #6d28d9; }
.task.done .task-cat.secretariat  { background: #fce7f3; color: #9d174d; }
.task-caller {
  font-weight: 700;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.task.todo .task-caller { color: #fff; }

.task-people {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(15,23,42,0.06);
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px;
}
.task-people .line { display: flex; align-items: center; gap: 6px; color: #4b5563; }
.task-people .line .ico { width: 14px; flex-shrink: 0; opacity: 0.85; }
.task-people .line strong { color: #0b1220; font-weight: 700; }
.task-people .line .time { color: #9ca3af; margin-left: auto; font-variant-numeric: tabular-nums; }
.task-people .line.viewing { color: #047857; font-weight: 600; }
.task-people .line.viewing strong { color: #065f46; }
.task-people .line .viewing-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.7);
  animation: viewPulse 1.4s infinite;
}
@keyframes viewPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.task.todo .task-people .line.viewing { color: #d1fae5; }
.task.todo .task-people .line.viewing strong { color: #fff; }
.task.todo .task-people .line .viewing-dot { background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,0.7); animation: viewPulseW 1.4s infinite; }
@keyframes viewPulseW {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* ─── EMPTY ───────────────────────────────────────────────── */
.empty {
  font-size: 13px; color: #9ca3af;
  padding: 60px 20px;
  text-align: center;
}
.empty .em-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(15,23,42,0.06);
}

/* ─── EVENT FEED ──────────────────────────────────────────── */
.feed {
  flex-shrink: 0;
  background: #FFFFFF;
  padding: 12px 16px 14px;
  max-height: 26%;
  overflow-y: auto;
}
.feed-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em;
  color: #9ca3af; font-weight: 800;
  margin-bottom: 8px;
}
.evt {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 5px 0;
  font-size: 12px;
  color: #374151;
  line-height: 1.45;
}
.evt-ico {
  width: 22px; height: 22px; border-radius: 50%;
  background: #e5e7eb;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 0;
  color: #fff;
  font-weight: 700;
}
.evt-ico.create { background: #3b82f6; }
.evt-ico.open   { background: #F0AF02; color: #000; }
.evt-ico.done   { background: #10b981; }
.evt-ico.cancel { background: #9ca3af; }
.evt-ico.assign { background: #8b5cf6; }
.evt-time { color: #9ca3af; margin-left: auto; flex-shrink: 0; font-variant-numeric: tabular-nums; font-size: 11px; }
.evt strong { color: #0b1220; font-weight: 700; }

/* ─── LOGIN ───────────────────────────────────────────────── */
.login {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(240,175,2,0.14), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(240,175,2,0.08), transparent 60%),
    #F5F6F4;
}
.login-card {
  width: 100%; max-width: 360px;
  background: #FFFFFF;
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.03);
}
.login-card h2 { margin: 14px 0 6px; font-size: 20px; color: #0b1220; letter-spacing: -0.01em; }
.login-card p { font-size: 13px; color: #6b7280; margin: 0 0 18px; }
.login-card label { font-size: 11px; color: #4b5563; text-align: left; display: block; margin-bottom: 5px; font-weight: 700; letter-spacing: 0.02em; }
.login-card input {
  width: 100%;
  background: #F5F6F4;
  border: none;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  color: #0b1220;
  margin-bottom: 12px;
}
.login-card input:focus { outline: none; box-shadow: 0 0 0 3px rgba(240,175,2,0.30); background: #fff; }
.login-card .btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #F0AF02, #FFD24D);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(240,175,2,0.32);
}
.login-card .btn-primary:disabled { opacity: 0.5; cursor: wait; }
.login-card .err { color: #b91c1c; font-size: 12px; margin-top: 10px; min-height: 16px; }

/* ─── NEW TASK OVERLAY ────────────────────────────────────── */
.new-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: overlayIn 0.3s ease;
}
@keyframes overlayIn { 0% { opacity: 0; } 100% { opacity: 1; } }
.new-overlay.out { animation: overlayOut 0.35s ease forwards; }
@keyframes overlayOut { 0% { opacity: 1; } 100% { opacity: 0; } }
.new-card {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  border-radius: 22px;
  padding: 32px 26px 24px;
  text-align: center;
  width: 100%; max-width: 380px;
  box-shadow: 0 24px 80px rgba(220,38,38,0.5), 0 0 0 8px rgba(220,38,38,0.25);
  animation: cardIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cardIn {
  0%   { transform: scale(0.85) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.new-card .pulse-ring {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  position: relative;
}
.new-card .pulse-ring::before,
.new-card .pulse-ring::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.7);
  animation: ring 1.6s ease-out infinite;
}
.new-card .pulse-ring::after { animation-delay: 0.8s; }
@keyframes ring {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}
.new-card .pulse-ring svg { width: 36px; height: 36px; color: #fff; }
.new-card .badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.new-card h3 { margin: 0 0 8px; font-size: 22px; color: #fff; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.new-card .desc {
  font-size: 13px; color: rgba(255,255,255,0.88); margin: 0 0 20px;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.45;
}
.new-card .actions { display: flex; gap: 10px; }
.new-card .btn {
  flex: 1;
  padding: 12px;
  border-radius: 11px;
  border: none;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.new-card .btn-primary {
  background: #FFFFFF;
  color: #b91c1c;
}
.new-card .btn-secondary {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

/* ─── HISTORY (tab) ──────────────────────────────────────── */
.hist-group { margin-bottom: 6px; }
.hist-hour {
  font-size: 11px; font-weight: 800;
  color: #6b7280;
  letter-spacing: 0.06em;
  margin: 6px 4px 8px;
  display: flex; align-items: center; gap: 8px;
}
.hist-hour::after {
  content: '';
  flex: 1; height: 1px;
  background: linear-gradient(to right, rgba(15,23,42,0.10), transparent);
}
.hist-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.hist-ico {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 12px;
  flex-shrink: 0;
  background: #9ca3af;
}
.hist-ico.create { background: #3b82f6; }
.hist-ico.open   { background: #F0AF02; color: #000; }
.hist-ico.done   { background: #10b981; }
.hist-ico.cancel { background: #9ca3af; }
.hist-ico.assign { background: #8b5cf6; }
.hist-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.hist-line {
  flex: 1; min-width: 0;
  font-size: 13px; color: #374151; line-height: 1.4;
}
.hist-line strong { color: #0b1220; font-weight: 700; }
.hist-task { color: #6b7280; }
.hist-time {
  font-size: 11px; font-weight: 700; color: #9ca3af;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ─── FOOTER BAR ─────────────────────────────────────────── */
.footer-bar {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #FFFFFF;
  box-shadow: 0 -2px 10px rgba(15,23,42,0.04);
}
.footer-bar .user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.footer-bar .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F0AF02, #FFD24D);
  color: #000; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(240,175,2,0.30);
}
.footer-bar .user-meta { min-width: 0; line-height: 1.2; }
.footer-bar .user-name {
  font-size: 12px; font-weight: 700; color: #0b1220;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 160px;
}
.footer-bar .user-role {
  font-size: 10px; color: #6b7280; font-weight: 500;
  text-transform: capitalize;
}
.footer-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  color: #065f46;
  background: #d1fae5;
  padding: 4px 9px;
  border-radius: 999px;
}
.status.off { color: #b91c1c; background: #fee2e2; }
.status .live-dot { width: 7px; height: 7px; }
.refresh-time {
  font-size: 11px; font-weight: 600;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}
.btn-icon.danger { color: #dc2626; }
.btn-icon.danger:hover { background: #fee2e2; color: #b91c1c; }

/* ─── DETAIL OVERLAY ─────────────────────────────────────── */
.detail-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 90;
  display: flex; align-items: stretch; justify-content: center;
  animation: overlayIn 0.25s ease;
}
.detail-overlay.out { animation: overlayOut 0.28s ease forwards; }
.detail-sheet {
  background: #FFFFFF;
  width: 100%;
  max-width: 540px;
  display: flex; flex-direction: column;
  animation: sheetIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -8px 0 30px rgba(0,0,0,0.25);
  overflow: hidden;
}
@keyframes sheetIn {
  0% { transform: translateY(40px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.detail-head {
  flex-shrink: 0;
  padding: 14px 18px 14px;
  background: #FFFFFF;
  display: flex; flex-direction: column; gap: 10px;
  border-bottom: 1px solid #f3f4f6;
}
.detail-head-row {
  display: flex; align-items: center; gap: 10px;
}
.detail-head-status {
  flex-shrink: 0;
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f3f4f6; color: #374151;
}
.detail-head-status.status-todo { background: #fee2e2; color: #991b1b; }
.detail-head-status.status-in_progress { background: #fef3c7; color: #92400e; }
.detail-head-status.status-done { background: #d1fae5; color: #065f46; }
.detail-head-status.status-cancelled { background: #f3f4f6; color: #6b7280; }
.detail-head-ref {
  flex: 1; min-width: 0;
  text-align: right;
  font-size: 12px; font-weight: 700;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.detail-head-title {
  font-size: 18px; font-weight: 800; color: #0b1220;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 24px;
  background: #FBFCFA;
}
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
.detail-meta .chip {
  background: #FFFFFF;
  color: #374151;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.05);
  text-transform: capitalize;
}
.detail-meta .chip.prio-urgent { background: #fee2e2; color: #991b1b; }
.detail-meta .chip.prio-high   { background: #ffedd5; color: #9a3412; }
.detail-meta .chip.cat-commercial   { background: #dbeafe; color: #1e40af; }
.detail-meta .chip.cat-technique    { background: #ede9fe; color: #6d28d9; }
.detail-meta .chip.cat-secretariat  { background: #fce7f3; color: #9d174d; }

.detail-block {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.detail-block-title {
  font-size: 11px; font-weight: 800; color: #6b7280;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 8px;
}
.detail-desc {
  font-size: 13px; color: #1f2937; line-height: 1.55;
  white-space: pre-wrap;
}
.muted { color: #9ca3af; font-size: 12px; }

.assignees { display: flex; flex-wrap: wrap; gap: 6px; }
.assignee {
  display: inline-flex; align-items: center; gap: 6px;
  background: #F5F6F4;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #1f2937;
}
.assignee .av {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F0AF02, #FFD24D);
  color: #000; font-weight: 800; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}

.timeline {
  position: relative;
  padding-left: 18px;
}
.timeline::before {
  content: '';
  position: absolute; left: 10px; top: 4px; bottom: 4px;
  width: 2px;
  background: linear-gradient(to bottom, #e5e7eb, #f3f4f6, transparent);
}
.tl-item {
  position: relative;
  padding: 8px 0 8px 14px;
  display: flex; gap: 10px; align-items: flex-start;
}
.tl-ico {
  position: absolute; left: -14px; top: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #9ca3af; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  box-shadow: 0 0 0 3px #FFFFFF;
}
.tl-ico.create { background: #3b82f6; }
.tl-ico.open   { background: #F0AF02; color: #000; }
.tl-ico.done   { background: #10b981; }
.tl-ico.cancel { background: #9ca3af; }
.tl-ico.assign { background: #8b5cf6; }
.tl-body { flex: 1; min-width: 0; padding-left: 18px; }
.tl-head { font-size: 13px; color: #374151; line-height: 1.45; }
.tl-head strong { color: #0b1220; font-weight: 700; }
.tl-detail { color: #6b7280; }
.tl-time { color: #9ca3af; font-size: 11px; margin-left: 4px; font-variant-numeric: tabular-nums; }
.vocal-block {
  border: 1px solid #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 60%);
}
.vocal-block .detail-block-title {
  color: #92400e;
}
.vocal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.vocal-table tr { border-bottom: 1px solid #fef3c7; }
.vocal-table tr:last-child { border-bottom: none; }
.vocal-table td { padding: 8px 4px; vertical-align: top; }
.vt-ico { width: 22px; text-align: center; font-size: 14px; padding-right: 6px !important; color: #92400e; }
.vt-lbl { width: 110px; color: #6b7280; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; padding-right: 10px !important; }
.vt-val { color: #0b1220; font-weight: 600; word-break: break-word; }

.tl-comment-body {
  margin-top: 6px;
  background: #FBFCFA;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px; color: #1f2937; line-height: 1.5;
  white-space: pre-wrap;
}

/* ─── SVG ICONS ──────────────────────────────────────────── */
.svg-ico {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
.task-meta .svg-ico { width: 12px; height: 12px; vertical-align: -2px; }
.chip .svg-ico { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.task-people .ico .svg-ico,
.line .ico .svg-ico { width: 14px; height: 14px; }
.tl-ico .svg-ico,
.hist-ico .svg-ico { width: 14px; height: 14px; }
.detail-block-title .svg-ico { width: 16px; height: 16px; margin-right: 6px; }
.btn-icon .svg-ico { width: 16px; height: 16px; vertical-align: middle; }
.em-icon .svg-ico { width: 28px; height: 28px; opacity: .5; }

.svg-dot {
  display: inline-block;
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; opacity: .5;
  vertical-align: middle;
}
.prio-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  vertical-align: -1px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.4) inset;
}
.task-prio.urgent .prio-dot { background: #b91c1c; }
.task-prio.high   .prio-dot { background: #ea580c; }
.chip.prio-urgent .prio-dot { background: #b91c1c; }
.chip.prio-high   .prio-dot { background: #ea580c; }
.task.todo .task-prio.high .prio-dot { background: #fff; box-shadow: none; }
.task.todo .task-prio.urgent .prio-dot { background: #fff; box-shadow: none; }

/* Vocal table icon column */
.vocal-table .vt-ico .svg-ico { width: 16px; height: 16px; }

/* ─── SUBTABS (Hier / Aujourd'hui) ──────────────────────── */
.subtabs {
  display: flex; gap: 6px;
  padding: 8px 14px 4px;
  background: #FBFCFA;
  flex-shrink: 0;
}
.subtab {
  flex: 1;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 12px; font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .15s ease;
}
.subtab:hover { border-color: #d1d5db; color: #111827; }
.subtab.active {
  background: #111827; color: #fff; border-color: #111827;
}
.subtab-num {
  background: rgba(0,0,0,0.08);
  color: inherit;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}
.subtab.active .subtab-num { background: rgba(255,255,255,0.22); }

/* ─── VOCAL TRANSCRIPT ──────────────────────────────────── */
.vocal-recording {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 10px;
}
.vocal-recording audio { width: 100%; height: 36px; }

.vocal-transcript {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
}
.vt-title {
  font-size: 12px; font-weight: 700; color: #374151;
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.vt-chat { display: flex; flex-direction: column; gap: 8px; }
.vt-msg { display: flex; flex-direction: column; max-width: 80%; }
.vt-msg.vt-agent { align-self: flex-start; }
.vt-msg.vt-caller { align-self: flex-end; align-items: flex-end; }
.vt-who {
  font-size: 10px; color: #9ca3af; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 3px; padding: 0 4px;
}
.vt-bubble {
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 13px; line-height: 1.45;
  background: #f3f4f6; color: #111827;
  white-space: pre-wrap; word-break: break-word;
}
.vt-msg.vt-agent .vt-bubble {
  background: #eef2ff; color: #1e3a8a;
  border-bottom-left-radius: 4px;
}
.vt-msg.vt-caller .vt-bubble {
  background: #FFF7E0; color: #7a5800;
  border-bottom-right-radius: 4px;
}
.vt-text {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: #f9fafb; padding: 10px;
  border-radius: 8px;
  white-space: pre-wrap;
}

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
::-webkit-scrollbar-track { background: transparent; }
