:root { color-scheme: light; --ink:#17221d; --muted:#6b7770; --line:#dfe6e1; --paper:#f3f6f3; --white:#fff; --accent:#176b4d; --accent-soft:#dff3e9; --danger:#a43d32; --amber:#a65d0a; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; color:var(--ink); background:var(--paper); font:14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; }
button,input,select,textarea { font:inherit; }
button { border:0; border-radius:9px; padding:10px 14px; color:white; background:var(--accent); cursor:pointer; }
button:disabled { opacity:.45; cursor:not-allowed; }
.ghost { color:var(--ink); background:transparent; border:1px solid var(--line); }
.eyebrow { margin:0 0 4px; color:var(--accent); font-size:11px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
h1,h2,p { margin-top:0; }
.login-shell { min-height:100vh; display:grid; place-items:center; padding:24px; }
.login-card { width:min(420px,100%); padding:34px; border:1px solid var(--line); border-radius:18px; background:var(--white); box-shadow:0 20px 55px rgba(20,45,33,.08); }
.login-card label { display:grid; gap:6px; margin:16px 0; color:var(--muted); }
input,select,textarea { width:100%; border:1px solid var(--line); border-radius:9px; padding:10px 12px; background:white; color:var(--ink); }
.error { min-height:20px; color:var(--danger); margin:12px 0 0; }
.workspace { min-height:100vh; padding:18px; }
.topbar,.filters,.queue-title,.ticket-head,.operator,.actions { display:flex; align-items:center; gap:10px; }
.topbar { justify-content:space-between; margin:0 auto 14px; max-width:1500px; }
.topbar h1 { margin:0; font-size:26px; }
.filters { max-width:1500px; margin:0 auto 12px; padding:10px; border:1px solid var(--line); border-radius:12px; background:var(--white); }
.filters input[type=search] { flex:1.5; min-width:240px; }
.filters select { flex:1; }
.checkbox { display:flex; align-items:center; gap:6px; white-space:nowrap; color:var(--muted); }
.checkbox input { width:auto; }
.desk { max-width:1500px; height:calc(100vh - 142px); margin:auto; display:grid; grid-template-columns:minmax(300px,380px) minmax(0,1fr); overflow:hidden; border:1px solid var(--line); border-radius:14px; background:var(--white); }
.queue { min-width:0; border-right:1px solid var(--line); overflow:auto; }
.queue-title { position:sticky; top:0; z-index:2; justify-content:space-between; padding:12px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.95); }
.ticket-row { display:grid; gap:6px; width:100%; padding:14px; border:0; border-bottom:1px solid var(--line); border-radius:0; text-align:left; color:var(--ink); background:white; }
.ticket-row:hover,.ticket-row.active { background:var(--accent-soft); }
.row-line { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.badge { display:inline-flex; padding:3px 7px; border-radius:999px; color:#385348; background:#e8eeea; font-size:11px; font-weight:700; }
.badge.urgent,.badge.high { color:#7c321e; background:#ffe2d6; }
.row-meta,.muted { color:var(--muted); }
.ticket-panel { min-width:0; overflow:auto; background:#fafcfb; }
.empty { height:100%; display:grid; place-items:center; color:var(--muted); }
.ticket-head { position:sticky; top:0; z-index:2; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.96); }
.ticket-head h2 { margin:0; }
.owner { color:var(--accent); font-weight:700; }
.context { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; padding:14px 20px; border-bottom:1px solid var(--line); background:white; }
.context div { min-width:0; }
.context span { display:block; color:var(--muted); font-size:11px; text-transform:uppercase; }
.timeline { display:grid; gap:10px; padding:20px; }
.message { max-width:78%; padding:11px 13px; border:1px solid var(--line); border-radius:12px; background:white; white-space:pre-wrap; overflow-wrap:anywhere; }
.message.customer { justify-self:start; }
.message.bot { justify-self:end; background:#edf5ff; }
.message.operator { justify-self:end; background:var(--accent-soft); }
.message.system,.message.internal { justify-self:center; max-width:90%; color:var(--muted); background:#f0f1ef; }
.message.internal { border-style:dashed; }
.author { margin-bottom:4px; font-size:11px; font-weight:800; text-transform:uppercase; }
.composer { position:sticky; bottom:0; display:grid; gap:8px; padding:14px 20px; border-top:1px solid var(--line); background:white; }
.composer textarea { min-height:76px; resize:vertical; }
.actions { flex-wrap:wrap; }
.actions .danger { background:var(--danger); }
.actions .amber { background:var(--amber); }
.source { font-size:12px; color:var(--muted); }
@media (max-width:900px) { .filters { overflow:auto; }.desk { height:auto; min-height:calc(100vh - 180px); grid-template-columns:1fr; }.queue { max-height:340px; border-right:0; border-bottom:1px solid var(--line); }.ticket-panel { min-height:560px; }.context { grid-template-columns:1fr 1fr; } }
