/* V33.10.97 — readable timeline ownership, colourful but purposeful controls. */
.sidebar nav a{border-left:3px solid transparent!important;transition:background .16s ease,border-color .16s ease,color .16s ease!important}.sidebar nav a:nth-child(1){--nav-accent:#60a5fa}.sidebar nav a:nth-child(2){--nav-accent:#8b5cf6}.sidebar nav a:nth-child(3){--nav-accent:#14b8a6}.sidebar nav a:nth-child(4){--nav-accent:#f59e0b}.sidebar nav a:nth-child(5){--nav-accent:#ec4899}.sidebar nav a:nth-child(6){--nav-accent:#22c55e}.sidebar nav a:nth-child(7){--nav-accent:#38bdf8}.sidebar nav a:nth-child(8){--nav-accent:#a78bfa}.sidebar nav a:hover,.sidebar nav a.active{border-left-color:var(--nav-accent,#58a6ff)!important}.sidebar nav a:hover span,.sidebar nav a.active span{color:inherit!important}
/* Timeline origin: customer=cyan, AI=violet, staff/system=green/blue. */
.case-reader .case-timeline-item.message-in .timeline-body,.case-reader .case-message.in{border-left:4px solid #18a7c7!important}.case-reader .case-timeline-item.message-in .timeline-dot{background:#18a7c7!important;box-shadow:0 0 0 2px rgba(24,167,199,.3)!important}.case-reader .case-timeline-item.message-in .timeline-title:before{content:'ลูกค้า';display:inline-block;margin-right:8px;padding:2px 7px;border-radius:999px;background:rgba(24,167,199,.16);color:#087e99;font-size:11px;font-weight:900;vertical-align:middle}
.case-reader .case-timeline-item.event-ai_resolution_analyzed .timeline-body,.case-reader .case-timeline-item.event-ai_resolution_reanalyzed .timeline-body{border-left:4px solid #8b5cf6!important}.case-reader .case-timeline-item.event-ai_resolution_analyzed .timeline-dot,.case-reader .case-timeline-item.event-ai_resolution_reanalyzed .timeline-dot{background:#8b5cf6!important;box-shadow:0 0 0 2px rgba(139,92,246,.3)!important}.case-reader .case-timeline-item.event-ai_resolution_analyzed .timeline-title:before,.case-reader .case-timeline-item.event-ai_resolution_reanalyzed .timeline-title:before{content:'AI';display:inline-block;margin-right:8px;padding:2px 7px;border-radius:999px;background:rgba(139,92,246,.16);color:#6d42c4;font-size:11px;font-weight:900;vertical-align:middle}
.case-reader .case-timeline-item.message-out .timeline-body,.case-reader .case-timeline-item.event-agent_reply .timeline-body{border-left:4px solid #18a05e!important}.case-reader .case-timeline-item.message-out .timeline-dot,.case-reader .case-timeline-item.event-agent_reply .timeline-dot{background:#18a05e!important;box-shadow:0 0 0 2px rgba(24,160,94,.28)!important}.case-reader .case-timeline-item.message-out .timeline-title:before,.case-reader .case-timeline-item.event-agent_reply .timeline-title:before{content:'พนักงาน';display:inline-block;margin-right:8px;padding:2px 7px;border-radius:999px;background:rgba(24,160,94,.16);color:#087443;font-size:11px;font-weight:900;vertical-align:middle}
.case-reader .case-timeline-item:not(.message-in):not(.message-out):not(.event-ai_resolution_analyzed):not(.event-ai_resolution_reanalyzed):not(.event-agent_reply) .timeline-body{border-left:4px solid #4b7db9!important}
html[data-theme="dark"] .case-reader .case-timeline-item.message-in .timeline-title:before{color:#67e8f9!important}html[data-theme="dark"] .case-reader .case-timeline-item.event-ai_resolution_analyzed .timeline-title:before,html[data-theme="dark"] .case-reader .case-timeline-item.event-ai_resolution_reanalyzed .timeline-title:before{color:#c4b5fd!important}html[data-theme="dark"] .case-reader .case-timeline-item.message-out .timeline-title:before,html[data-theme="dark"] .case-reader .case-timeline-item.event-agent_reply .timeline-title:before{color:#86efac!important}
/* Ticket Control is a compact, visual action palette in both themes. */
.quick-status-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.quick-status-grid form{min-width:0}.quick-status-grid .quick-action{width:100%;min-height:42px!important;border-radius:9px!important;font-weight:850!important;line-height:1.18!important;white-space:normal!important}.quick-status-grid .start,.quick-status-grid .reopen{background:#2563eb!important;border-color:#1d4ed8!important;color:#fff!important}.quick-status-grid .waiting{background:#e87916!important;border-color:#c95f08!important;color:#fff!important}.quick-status-grid .resolved,.quick-status-grid .closed{background:#16804b!important;border-color:#0e693d!important;color:#fff!important}.quick-status-grid .quick-action:hover{filter:brightness(1.08);transform:translateY(-1px)}
/* Reports: no white in dark mode, scan-friendly daily/company hierarchy. */
.report-day-group{margin:16px 0 22px}.report-day-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 9px;padding:11px 14px;border-radius:10px;background:#eee8de;border:1px solid #d8d2c8}.report-day-title h3{margin:0;font-size:17px}.report-day-title span{color:#627084;font-size:13px;font-weight:800}.report-company-group{margin:0 0 12px}.report-company-title{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 14px;border:1px solid #d8d2c8;border-bottom:0;border-radius:10px 10px 0 0;background:#f8f5ef}.report-company-title h3{margin:0;font-size:15px}.report-company-title span{display:block;margin-top:2px;color:#6b7280;font-size:12px}.compact-report-scroll{max-width:100%;overflow-x:auto}.compact-report-table{table-layout:fixed!important;min-width:1120px!important}.compact-report-table th,.compact-report-table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compact-report-table th:nth-child(1){width:145px}.compact-report-table th:nth-child(2){width:115px}.compact-report-table th:nth-child(3),.compact-report-table th:nth-child(4),.compact-report-table th:nth-child(5){width:132px}.compact-report-table th:nth-child(6),.compact-report-table th:nth-child(7){width:92px}.compact-report-table th:nth-child(8){width:92px}.compact-report-table th:nth-child(9){width:100px}.compact-report-table th:nth-child(10){width:180px}.compact-report-table th:nth-child(11){width:220px}.compact-report-table th:nth-child(12){width:96px}
html[data-theme="dark"] .report-provenance-banner,html[data-theme="dark"] .prosoft-safe-note,html[data-theme="dark"] .prosoft-mirror-summary{background:#2d333b!important;color:#c9d1d9!important;border-color:#444c56!important}html[data-theme="dark"] .report-day-title{background:#21262d!important;border-color:#30363d!important}html[data-theme="dark"] .report-day-title h3{color:#c9d1d9!important}html[data-theme="dark"] .report-day-title span{color:#8b949e!important}html[data-theme="dark"] .report-company-title{background:#2d333b!important;border-color:#30363d!important}html[data-theme="dark"] .report-company-title h3{color:#c9d1d9!important}html[data-theme="dark"] .report-company-title span{color:#8b949e!important}html[data-theme="dark"] .report-list,html[data-theme="dark"] .report-list .table-wrap,html[data-theme="dark"] .compact-report-table,html[data-theme="dark"] .compact-report-table tbody,html[data-theme="dark"] .compact-report-table tr,html[data-theme="dark"] .compact-report-table td{background:#21262d!important;color:#c9d1d9!important;border-color:#30363d!important}html[data-theme="dark"] .compact-report-table thead,html[data-theme="dark"] .compact-report-table th{background:#2d333b!important;color:#c9d1d9!important;border-color:#30363d!important}html[data-theme="dark"] .compact-report-table a{color:#93c5fd!important}
@media(max-width:720px){.quick-status-grid{grid-template-columns:1fr!important}.report-day-title,.report-company-title{align-items:flex-start;flex-direction:column}}
