/* Tro ly AI (ngan keo hoi dap). (Tach tu styles.css - nap theo DUNG thu tu trong index.html) */

/* =====================================================================
   Tro ly AI
   ===================================================================== */
:root { --ai-grad: linear-gradient(135deg, #7c5cff 0%, #3b82f6 50%, #06b6d4 100%); }

/* Nut mo tro ly trong sidebar (tren nen gradient) */
.ai-trigger {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 10px; width: calc(100% - 32px);
  margin: 0 16px 10px; padding: 9px 12px; border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .95);
  color: var(--text); text-align: left;
  box-shadow: 0 8px 22px rgba(0, 30, 100, .25);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.ai-trigger::after { /* vet sang luot qua khi re chuot */
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent);
  transform: skewX(-20deg); transition: left .6s var(--ease);
}
.ai-trigger:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0, 30, 100, .32); }
.ai-trigger:hover::after { left: 120%; }
.ai-trigger-icon {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; color: #fff;
  display: flex; align-items: center; justify-content: center; background: var(--ai-grad);
  box-shadow: 0 4px 10px rgba(124, 92, 255, .35);
}
.ai-trigger-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ai-trigger-text strong {
  font-size: 13.5px; background: var(--ai-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ai-trigger-text small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Nut "Tom tat AI" trong chat-header */
.chat-header-actions .ai-summarize-btn {
  color: var(--ux-on-primary); border: none; background: var(--ux-primary); font-weight: 600;
  box-shadow: none;
}
.chat-header-actions .ai-summarize-btn svg { color: currentColor; }
.chat-header-actions .ai-summarize-btn:hover { filter: none; box-shadow: none; color: var(--ux-on-primary); background: var(--ux-primary-hover); }
.chat-header-actions .ai-summarize-btn:hover svg { color: currentColor; }

/* Nut bat/tat AI trong danh sach nhan vien */
.ai-perm-btn.on { color: #6d4aff; border-color: #d9d0ff; background: #f3f0ff; }

/* ---------- Ngan keo ---------- */
.ai-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
  width: 460px; max-width: 100vw;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -18px 0 48px rgba(23, 32, 51, .18);
  animation: slide-in .3s var(--ease);
}
.ai-panel-header {
  position: relative; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 12px 14px 18px; color: #fff; background: var(--ai-grad);
}
.ai-panel-header::before {
  content: ""; position: absolute; width: 200px; height: 200px; right: -60px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .3), transparent 70%);
}
.ai-title { position: relative; display: flex; align-items: center; gap: 11px; min-width: 0; }
.ai-badge {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35);
}
.ai-title-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.ai-title-text strong { font-size: 16px; }
.ai-title-text span { color: rgba(255, 255, 255, .8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-header-actions { position: relative; display: flex; gap: 2px; }
.ai-icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none; background: transparent; color: rgba(255, 255, 255, .9);
  display: inline-flex; align-items: center; justify-content: center; transition: background .2s;
}
.ai-icon-btn:hover { background: rgba(255, 255, 255, .2); color: #fff; }

.ai-chat-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ai-scope-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2);
  font-size: 12.5px; color: var(--muted); font-weight: 500;
}
.ai-scope-row .select-wrap .tag-filter-select { max-width: 230px; padding-left: 12px; }

.ai-context-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--accent-soft, var(--surface-2));
  min-width: 0;
}
.ai-context-banner.hidden,
.ai-context-banner[hidden] { display: none !important; }
.ai-context-copy { min-width: 0; flex: 1 1 160px; max-width: 100%; overflow: hidden; display: flex; flex-direction: column; gap: 1px; }
.ai-context-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted, var(--muted));
}
.ai-context-title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary, var(--text));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.ai-context-account {
  display: block;
  font-size: 12px;
  color: var(--text-muted, var(--muted));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.ai-context-actions { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 0 auto; }
.ai-context-btn {
  border: 1px solid var(--border-strong, var(--border));
  background: var(--bg-surface, var(--surface));
  color: var(--dash-primary, var(--accent, #2854ff));
  border-radius: 999px;
  padding: 5px 11px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ai-context-btn:hover { border-color: var(--accent, #2854ff); }
.ai-context-btn:focus-visible { outline: 2px solid var(--accent, #2854ff); outline-offset: 2px; }
.ai-context-btn.ghost { color: var(--text-secondary, var(--muted)); }
@media (max-width: 760px) {
  .ai-context-banner { align-items: flex-start; flex-wrap: wrap; padding: 8px 12px; }
  .ai-context-copy,
  .ai-context-actions { width: 100%; max-width: 100%; }
}

.ai-messages {
  flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 14px;
  background:
    radial-gradient(400px 300px at 100% 0%, rgba(124, 92, 255, .07), transparent 70%),
    radial-gradient(400px 300px at 0% 100%, rgba(6, 182, 212, .07), transparent 70%);
}

/* Man hinh chao + goi y */
.ai-empty { margin: auto 0; text-align: center; padding: 8px 6px; animation: card-rise .4s var(--ease); }
.ai-empty-orb {
  width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 24px; font-size: 32px;
  display: flex; align-items: center; justify-content: center; background: var(--ai-grad);
  box-shadow: 0 14px 34px rgba(124, 92, 255, .35); animation: mark-bob 4s ease-in-out infinite;
}
.ai-empty h3 {
  margin: 0 0 6px; font-size: 18px;
  background: var(--ai-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ai-empty p { margin: 0 auto; max-width: 340px; color: var(--muted); font-size: 13.5px; }
.ai-warning {
  margin: 14px auto 0; max-width: 360px; padding: 9px 12px; border-radius: var(--radius-sm);
  background: #fff7e6; border: 1px solid #ffe2a8; color: #8a5a00; font-size: 12.5px;
}
.ai-suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; text-align: left; }
.ai-suggestion {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: 12.5px; line-height: 1.4; text-align: left;
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease), color .2s;
}
.ai-suggestion span { font-size: 15px; line-height: 1.2; }
.ai-suggestion:hover { border-color: #cfc4ff; color: var(--text); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(124, 92, 255, .15); }

/* Bong bong hoi dap */
.ai-msg { display: flex; flex-direction: column; animation: msg-in .3s var(--ease); }
.ai-msg-user { align-items: flex-end; }
.ai-msg-assistant { align-items: flex-start; }
.ai-bubble { max-width: 92%; font-size: 13.5px; line-height: 1.6; word-wrap: break-word; overflow-wrap: anywhere; }
.ai-msg-user .ai-bubble {
  padding: 9px 14px; border-radius: 16px 16px 4px 16px; color: #fff; background: var(--ai-grad);
  box-shadow: 0 6px 16px rgba(59, 130, 246, .25); white-space: pre-wrap;
}
.ai-msg-assistant .ai-bubble {
  width: 100%; max-width: 100%; padding: 12px 15px; border-radius: 4px 16px 16px 16px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.ai-msg-error .ai-bubble { background: var(--danger-soft); border-color: #f5c2c3; color: #a12a2e; }
.ai-bubble h3, .ai-bubble h4, .ai-bubble h5, .ai-bubble h6 { margin: 12px 0 6px; font-size: 14px; color: var(--text); }
.ai-bubble h3 { font-size: 15px; }
.ai-bubble > :first-child { margin-top: 0; }
.ai-bubble > :last-child { margin-bottom: 0; }
.ai-bubble p { margin: 6px 0; }
.ai-bubble ul, .ai-bubble ol { margin: 6px 0; padding-left: 20px; }
.ai-bubble li { margin: 3px 0; }
.ai-bubble li.sub { margin-left: 16px; list-style-type: circle; }
.ai-bubble strong { color: var(--text); }
.ai-bubble code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; font-size: 12.5px; }
.ai-bubble hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.ai-table-wrap { overflow-x: auto; margin: 8px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ai-bubble table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.ai-bubble th, .ai-bubble td { padding: 6px 9px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.ai-bubble th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
.ai-bubble tr:last-child td { border-bottom: none; }
.ai-copy-btn {
  margin-top: 4px; padding: 2px 8px; border: none; background: transparent; border-radius: 6px;
  color: var(--muted); font-size: 11.5px; opacity: 0; transition: opacity .2s, background .2s;
}
.ai-msg:hover .ai-copy-btn { opacity: 1; }
.ai-copy-btn:hover { background: var(--surface-hover); color: var(--text); }

/* "Dang phan tich..." */
.ai-thinking .ai-bubble { display: inline-flex; align-items: center; gap: 10px; width: auto; color: var(--muted); }
.ai-dots { display: inline-flex; gap: 4px; }
.ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ai-grad); animation: ai-dot 1.2s ease-in-out infinite; }
.ai-dots i:nth-child(2) { animation-delay: .15s; }
.ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* O nhap */
.ai-input-wrap { flex-shrink: 0; padding: 10px 14px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.ai-input-row {
  display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px;
  border: 1.5px solid var(--border-strong); border-radius: 18px; background: var(--surface-2);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.ai-input-row:focus-within { border-color: #8b7bff; box-shadow: 0 0 0 4px rgba(124, 92, 255, .13); background: var(--surface); }
.ai-input-row textarea,
.ai-input-row textarea:focus {
  flex: 1; min-width: 0; resize: none; border: none; background: transparent; box-shadow: none; outline: none;
  padding: 7px 0; font-size: 14px; line-height: 1.45; max-height: 140px;
}
#ai-send-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none; flex-shrink: 0; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; background: var(--ai-grad);
  box-shadow: 0 6px 14px rgba(124, 92, 255, .35); transition: transform .2s var(--ease), filter .2s;
}
#ai-send-btn:hover { transform: scale(1.06); filter: brightness(1.08); }
#ai-send-btn:disabled { opacity: .5; cursor: progress; transform: none; }
.ai-disclaimer { margin: 7px 2px 0; font-size: 11px; color: var(--muted); }
.ai-disclaimer kbd {
  font-family: inherit; font-size: 10px; font-weight: 600; background: var(--surface-2);
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px;
}

/* Cai dat */
.ai-settings-view { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; }
.ai-settings-view h4 { margin: 0 0 4px; font-size: 16px; }
.ai-settings-view input[type="password"] { width: 100%; padding: 10px 12px; }
.ai-settings-view .muted.small { margin: 6px 0 4px; line-height: 1.5; }
.select-wrap.select-block { display: flex; margin-left: 0; }
.select-wrap.select-block .tag-filter-select { max-width: none; width: 100%; padding: 9px 30px 9px 12px; font-size: 13.5px; border-radius: var(--radius-sm); }
.ai-mask-label { margin: 14px 0 4px; font-size: 13.5px; }
.ai-usage-box {
  display: flex; justify-content: space-between; align-items: center; margin: 12px 0 6px; padding: 12px 14px;
  border-radius: var(--radius); background: linear-gradient(135deg, #f3f0ff, #eaf6ff); border: 1px solid #ddd5ff;
  font-size: 13px; color: var(--text-2);
}
.ai-usage-box strong { color: #5b3fe0; }
.ai-settings-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; padding-top: 16px; }
.ai-primary-btn, .ai-secondary-btn {
  padding: 9px 16px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; border: 1px solid transparent;
  transition: filter .2s, background .2s;
}
.ai-primary-btn { color: #fff; background: var(--ai-grad); box-shadow: 0 6px 14px rgba(124, 92, 255, .3); }
.ai-primary-btn:hover { filter: brightness(1.07); }
.ai-secondary-btn { background: var(--surface-2); border-color: var(--border); color: var(--text-2); }
.ai-secondary-btn:hover { background: var(--surface-hover); }
.ai-secondary-btn.danger { color: var(--danger); }
.ai-secondary-btn.danger:hover { background: var(--danger-soft); }

/* Modal nhan vien: rong hon de du cho cac nut Phan quyen / Khoa / AI / Xoa */
#staff-modal .modal-box { width: 480px; }

/* ---------- Lenh nhanh ---------- */
.ai-input-wrap { position: relative; }
.ai-cmd-btn {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; border: none; cursor: pointer; align-self: flex-end;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(124, 92, 255, .1); color: #7c5cff; transition: background .2s, color .2s, transform .2s var(--ease);
}
.ai-cmd-btn:hover, .ai-cmd-btn.active { background: var(--ai-grad); color: #fff; transform: scale(1.05); }
.ai-cmd-popover {
  position: absolute; left: 14px; right: 14px; bottom: calc(100% - 4px); z-index: 20;
  display: flex; flex-direction: column; max-height: min(460px, 62vh);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 -10px 40px rgba(23, 32, 51, .16); overflow: hidden;
  animation: ai-cmd-in .16s var(--ease);
}
@keyframes ai-cmd-in { from { opacity: 0; transform: translateY(8px); } }
.ai-cmd-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px 8px;
  font-size: 13px; font-weight: 700; color: var(--text); border-bottom: 1px solid var(--border);
}
.ai-cmd-hint { font-size: 11px; font-weight: 500; color: var(--muted); }
.ai-cmd-list { overflow-y: auto; padding: 4px 6px 6px; }
.ai-cmd-group {
  display: flex; align-items: center; gap: 8px; margin: 8px 8px 4px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.ai-cmd-conv {
  text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 11px; color: #7c5cff;
  background: rgba(124, 92, 255, .1); padding: 1px 8px; border-radius: 999px;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ai-cmd-conv.off { color: var(--muted); background: var(--surface-2); }
.ai-cmd-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  font-size: 13px; color: var(--text);
}
.ai-cmd-item.active { background: rgba(124, 92, 255, .1); }
.ai-cmd-item.disabled { opacity: .45; cursor: not-allowed; }
.ai-cmd-icon { width: 22px; text-align: center; font-size: 15px; flex-shrink: 0; }
.ai-cmd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-cmd-del {
  border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px;
  width: 22px; height: 22px; border-radius: 50%; opacity: 0; flex-shrink: 0;
}
.ai-cmd-item:hover .ai-cmd-del { opacity: 1; }
.ai-cmd-del:hover { background: var(--danger-soft); color: var(--danger); }
.ai-cmd-empty { padding: 14px 10px; font-size: 12.5px; color: var(--muted); }
.ai-cmd-foot { border-top: 1px solid var(--border); padding: 6px; }
.ai-cmd-save {
  width: 100%; text-align: left; border: none; background: transparent; cursor: pointer;
  padding: 8px 10px; border-radius: 10px; font-size: 12.5px; color: #7c5cff; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ai-cmd-save:hover:not(:disabled) { background: rgba(124, 92, 255, .08); }
.ai-cmd-save:disabled { color: var(--muted); font-weight: 500; cursor: default; }
.ai-suggestion-more { grid-column: 1 / -1; justify-content: center; color: #7c5cff; font-weight: 600; border-style: dashed; }
.info-intelligence { padding: 4px 16px 12px; }
.info-intelligence h4 { margin: 10px 0 4px; font-size: 13px; }
.info-intelligence p, .info-intelligence li { font-size: 13px; line-height: 1.45; }
.info-intelligence ul { margin: 0; padding-left: 18px; }

/* Live today brief — operational scan, not a Markdown report */
.ai-msg-brief { align-items: stretch; width: 100%; }
.daily-brief {
  width: 100%;
  border: 1px solid var(--border-default, var(--border));
  border-radius: 14px;
  background: var(--bg-surface, var(--surface));
  color: var(--text-primary, var(--text));
  overflow: hidden;
}
.daily-brief-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 16px 12px; border-bottom: 1px solid var(--border-subtle, var(--border));
}
.daily-brief-kicker {
  margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-muted, var(--muted));
}
.daily-brief-head h2 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; }
.daily-brief-meta { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; color: var(--text-muted, var(--muted)); }
.daily-brief-head-actions { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 0 auto; }
.daily-brief-refresh, .daily-brief-ask, .daily-brief-open {
  border: 1px solid var(--border-strong, var(--border));
  background: var(--bg-surface, var(--surface));
  color: var(--dash-primary, var(--accent, #2854ff));
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer;
}
.daily-brief-refresh { background: var(--accent-soft, #f6f7ff); }
.daily-brief-refresh:disabled, .daily-brief.is-refreshing .daily-brief-refresh { opacity: .6; cursor: progress; }
.daily-brief-ask { color: var(--text-secondary, var(--muted)); }
.daily-brief-refresh:focus-visible, .daily-brief-ask:focus-visible, .daily-brief-open:focus-visible {
  outline: 2px solid var(--primary, var(--accent, #2854ff)); outline-offset: 2px;
}
.daily-brief-notice {
  margin: 0; padding: 8px 16px; font-size: 12.5px; color: var(--text-secondary, #536176);
  background: var(--accent-soft, #f6f7ff); border-bottom: 1px solid var(--border-subtle, var(--border));
}
.daily-brief-notice.is-error { background: var(--warning-soft, #fff7e6); color: #8a5a00; }
.daily-brief-empty { padding: 28px 18px; text-align: left; }
.daily-brief-empty p { margin: 0 0 6px; font-size: 14px; }
.daily-brief-empty-hint, .daily-brief-quiet, .daily-brief-truncation { font-size: 12.5px; color: var(--text-muted, var(--muted)); }
.daily-brief-quiet, .daily-brief-truncation { margin: 0; padding: 10px 16px 14px; }
.daily-brief-section { padding: 10px 16px 12px; border-top: 1px solid var(--border-subtle, var(--border)); }
.daily-brief-section:first-of-type { border-top: 0; }
.daily-brief-section h3 {
  margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-muted, var(--muted));
}
.daily-brief-highlights { margin: 0; padding-left: 18px; }
.daily-brief-highlights li { margin: 4px 0; font-size: 13.5px; line-height: 1.45; }
.daily-brief-list { display: flex; flex-direction: column; gap: 8px; }
.daily-brief-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 10px 0;
}
.daily-brief-item + .daily-brief-item { border-top: 1px solid var(--border-subtle, var(--border)); }
.daily-brief-item-main { min-width: 0; flex: 1; }
.daily-brief-item-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.daily-brief-item-title { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-brief-type {
  flex: 0 0 auto; font-size: 11px; font-weight: 650; color: var(--text-muted, var(--muted));
  border: 1px solid var(--border-default, var(--border)); border-radius: 999px; padding: 1px 7px;
}
.daily-brief-item-meta, .daily-brief-owner { margin: 2px 0 0; font-size: 12px; color: var(--text-muted, var(--muted)); }
.daily-brief-item-reason { margin: 4px 0 0; font-size: 12px; font-weight: 650; color: var(--text-secondary, #536176); }
.daily-brief-item-summary { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; }
.daily-brief-due { margin: 4px 0 0; font-size: 12.5px; color: var(--text-secondary, #536176); }
.daily-brief-item.is-risk { border-left: 2px solid var(--warning, #d97706); padding-left: 10px; }
.daily-brief-item.is-system { border-left: 2px solid var(--warning, #d97706); padding-left: 10px; }
.daily-brief-open { flex: 0 0 auto; align-self: center; white-space: nowrap; }
@media (max-width: 480px) {
  .daily-brief-head, .daily-brief-item { flex-direction: column; }
  .daily-brief-head-actions, .daily-brief-open { width: 100%; }
  .daily-brief-refresh, .daily-brief-ask, .daily-brief-open { width: 100%; text-align: center; }
  .daily-brief-item-title { white-space: normal; }
}
