:root {
  --blue: #3378f6;
  --blue-soft: #eaf2ff;
  --ink: #1f2937;
  --muted: #7b8799;
  --line: #e7ebf2;
  --panel: #ffffff;
  --canvas: #f6f8fb;
  --sidebar: #edf3fc;
  --success: #26a66a;
  --warning: #ef9a2d;
  --danger: #e05252;
  --shadow: 0 8px 28px rgba(43, 66, 104, .08);
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body { font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: var(--ink); background: var(--canvas); font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.shell { display: grid; grid-template-columns: 58px 250px minmax(0, 1fr); height: 100vh; overflow: hidden; }
.rail { background: #dbe8fa; border-right: 1px solid #d6e1f1; display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 9px; }
.brand { width: 38px; height: 38px; border-radius: 13px; color: white; background: linear-gradient(145deg, #3986ff, #6b56e8); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; box-shadow: 0 7px 18px rgba(51, 120, 246, .28); }
.rail-btn { width: 40px; height: 40px; border: 0; border-radius: 10px; color: #68788e; background: transparent; display: grid; place-items: center; position: relative; }
.rail-btn:hover, .rail-btn.active { background: white; color: var(--blue); box-shadow: 0 4px 15px rgba(53, 94, 155, .12); }
.rail-btn .icon { font-size: 18px; }
.rail-btn .tip { display: none; position: absolute; left: 47px; white-space: nowrap; background: #1e293b; color: white; padding: 6px 9px; border-radius: 6px; z-index: 20; font-size: 12px; }
.rail-btn:hover .tip { display: block; }
.rail-spacer { flex: 1; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #f59f4a; color: white; display: grid; place-items: center; font-weight: 700; }
.avatar-button { border: 0; padding: 0; }

.side { background: #f4f7fc; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.side-head { height: 72px; padding: 21px 22px 15px; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.side-head small { font-size: 11px; color: var(--muted); font-weight: 500; }
.side-menu { padding: 0 10px; overflow: auto; }
.menu-label { color: #9aa5b5; font-size: 12px; margin: 18px 12px 8px; }
.menu-item { display: flex; gap: 10px; align-items: center; padding: 11px 13px; border-radius: 9px; color: #566477; margin: 3px 0; cursor: pointer; }
.menu-item:hover { background: #ebf1fa; }
.menu-item.active { color: #246ee8; background: #dfeaff; font-weight: 600; }
.menu-item .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 12px; background: #dff6e9; color: var(--success); font-size: 12px; }
.menu-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }

.workspace { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--panel); }
.topbar { height: 58px; flex: 0 0 58px; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 22px; gap: 12px; }
.topbar h1 { font-size: 17px; margin: 0; }
.topbar .grow { flex: 1; }
.save-marker { color: #8b96a6; font-size: 11px; }
.env { padding: 5px 9px; border-radius: 6px; background: #fff4dd; color: #a86412; font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: inline-block; margin-right: 5px; }
.availability { display: inline-flex; align-items: center; border: 1px solid #dfe5ed; border-radius: 16px; padding: 6px 10px; background: white; color: #526174; cursor: pointer; }
.availability.online { color: #24875b; background: #eefaf4; border-color: #ccebdc; }
.availability.offline { color: #9a4c4c; background: #fff5f5; border-color: #f2d3d3; }
.availability.offline .status-dot { background: #d45b5b; }
.content { min-height: 0; flex: 1; overflow: auto; background: var(--canvas); }

.btn { border: 1px solid #dfe5ed; background: white; color: #4a596b; border-radius: 7px; padding: 8px 13px; }
.btn:hover { border-color: #b8c7db; background: #f9fbff; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: white; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .48; cursor: not-allowed; }
.input { border: 1px solid #dfe5ed; background: white; border-radius: 7px; padding: 9px 11px; outline: none; color: var(--ink); }
.input:focus { border-color: #70a2ff; box-shadow: 0 0 0 3px #e7f0ff; }

.chat-grid { height: 100%; min-height: 0; overflow: hidden; display: grid; grid-template-columns: 350px minmax(380px, 1fr) 330px; background: white; }
.conversation-list { border-right: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; }
.list-tools { padding: 13px; border-bottom: 1px solid var(--line); }
.search { width: 100%; }
.tabs { display: flex; gap: 4px; margin-top: 10px; }
.tab { padding: 6px 11px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; }
.tab.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.conversation-scroll { overflow: auto; flex: 1; }
.conversation { padding: 14px 13px; display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; border-bottom: 1px solid #f0f2f6; cursor: pointer; position: relative; }
.conversation:hover { background: #f8faff; }
.conversation.active { background: #eaf2ff; }
.conversation.awaiting-reply::before { content: ""; width: 3px; background: #79a4ef; position: absolute; left: 0; top: 10px; bottom: 10px; border-radius: 3px; }
.conversation.awaiting-reply.warning::before { background: #f0a126; }
.conversation.awaiting-reply.overdue::before { background: var(--danger); }
.reply-wait { width: fit-content; margin-top: 6px; border-radius: 10px; padding: 2px 7px; color: #3769b6; background: #edf4ff; font-size: 10px; font-weight: 650; }
.reply-wait.warning { color: #9a6414; background: #fff4dc; }
.reply-wait.overdue { color: #bf3030; background: #ffeded; }
.contact-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: white; font-weight: 700; background: linear-gradient(140deg, #52a3ff, #746bdf); }
.c-name { font-weight: 650; display: flex; align-items: center; gap: 6px; }
.c-preview { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 6px; font-size: 13px; }
.c-meta { color: #a0a8b4; font-size: 11px; text-align: right; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 10px; font-size: 10px; font-weight: 500; background: #e9eff7; color: #617084; }
.badge.blue { color: #246ee8; background: #e2edff; }
.badge.green { color: #24875b; background: #ddf6e9; }
.badge.orange { color: #aa681c; background: #fff0da; }
.badge.red { color: #b84040; background: #ffe4e4; }
.unread { margin: 8px 0 0 auto; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center; color: white; background: #ff4d4f; font-size: 11px; font-weight: 700; }

.chat-pane { height: 100%; min-height: 0; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.chat-head { height: 64px; border-bottom: 1px solid var(--line); padding: 10px 17px; display: flex; align-items: center; gap: 11px; }
.chat-head .title { font-weight: 650; }
.chat-head .sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.chat-head .grow { flex: 1; }
.toggle { display: inline-flex; gap: 7px; align-items: center; color: #637187; font-size: 12px; }
.switch { width: 32px; height: 18px; border-radius: 10px; background: #bdc6d4; position: relative; border: 0; padding: 0; }
.switch::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: white; position: absolute; top: 2px; left: 2px; transition: .15s; }
.switch.on { background: var(--blue); }
.switch.on::after { left: 16px; }
.messages { flex: 1; min-height: 0; overflow: auto; padding: 22px 24px; background: #f7f9fc; }
.message-row { display: flex; gap: 8px; margin: 14px 0; align-items: flex-end; }
.message-row.mine { flex-direction: row-reverse; }
.bubble { max-width: 72%; padding: 10px 13px; border-radius: 11px; background: white; box-shadow: 0 2px 8px rgba(50, 70, 105, .08); line-height: 1.55; }
.mine .bubble { background: #dfeaff; }
.translation { border-top: 1px dashed #cfd7e4; padding-top: 6px; margin-top: 6px; color: #5b6879; font-size: 12px; }
.msg-time { color: #a1a9b5; font-size: 10px; margin-top: 5px; }
.composer { border-top: 1px solid var(--line); background: white; padding: 10px 14px 13px; }
.translation-bar { display: flex; gap: 12px; align-items: center; min-height: 27px; margin: -10px -14px 8px; padding: 0 10px; border-bottom: 1px solid var(--line); color: #7a8799; font-size: 11px; }
.translation-link { border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--blue); font-weight: 650; padding: 6px 13px 6px 0; cursor: pointer; }
.translation-link:disabled { color: #a9b1bd; cursor: not-allowed; }
.composer-tabs { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.composer-tab { border: 0; background: transparent; color: var(--muted); padding: 5px 7px 7px; cursor: pointer; border-bottom: 2px solid transparent; }
.composer-tab.active { color: var(--blue); font-weight: 650; border-bottom-color: var(--blue); }
.language-pill { border: 0; border-radius: 6px; padding: 5px 8px; color: #326fe8; background: #eef4ff; margin-left: 3px; }
.translation-note { color: #8b6a24; background: #fff8e8; border-radius: 5px; padding: 5px 8px; font-size: 11px; margin-bottom: 7px; }
.compose-row { display: flex; gap: 9px; align-items: flex-end; }
.compose { flex: 1; min-height: 62px; max-height: 120px; resize: vertical; }
.compose-stack { display: grid; gap: 7px; }
.preview-row, .compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.translated-compose { min-height: 54px; background: #f8fbff; }
.translation-preview { display: grid; gap: 6px; padding: 8px; border: 1px solid #dce6f5; border-radius: 7px; background: #f8fbff; }
.translation-preview[hidden], .translation-progress[hidden], .send-menu[hidden] { display: none; }
.translation-progress { display: flex; align-items: center; gap: 8px; color: #256be8; background: #eef5ff; border-radius: 7px; padding: 9px 11px; font-size: 12px; }
.spinner { width: 12px; height: 12px; border: 2px solid #b9d0fa; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.send-split { display: flex; position: relative; }
.send-main, .send-menu-toggle { border: 0; background: var(--blue); color: white; cursor: pointer; height: 34px; }
.send-main { border-radius: 6px 0 0 6px; padding: 0 15px; min-width: 100px; }
.send-menu-toggle { border-left: 1px solid rgba(255,255,255,.35); border-radius: 0 6px 6px 0; width: 34px; }
.send-main:disabled { opacity: .65; cursor: wait; }
.send-menu { position: absolute; right: 0; bottom: 39px; width: 132px; padding: 5px; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: var(--shadow); z-index: 5; }
.send-menu button { width: 100%; border: 0; background: transparent; text-align: left; padding: 8px 9px; border-radius: 5px; cursor: pointer; }
.send-menu button:hover { background: #eef4ff; color: var(--blue); }
.message-row.note { justify-content: center; }
.message-row.note .bubble { max-width: 82%; color: #765b21; background: #fff8df; border: 1px solid #f1df9c; box-shadow: none; }
.bubble.failed { border: 1px solid #f0b9b9; background: #fff4f4; }
.attachment { display: block; margin-bottom: 8px; }
.attachment.image img { display: block; width: min(320px, 100%); max-height: 320px; object-fit: contain; border-radius: 8px; background: #eef1f5; }
.attachment.file { padding: 9px 11px; border: 1px solid #d7e1ef; border-radius: 7px; color: var(--blue); background: #f8fbff; text-decoration: none; }
.attachment.audio, .attachment.video { width: min(340px, 100%); max-height: 260px; }
.attachment.pending { color: var(--muted); font-size: 12px; padding: 10px; border: 1px dashed #cbd6e5; border-radius: 7px; }
.message-retry { border: 0; background: transparent; color: var(--danger); padding: 0 0 0 5px; font-size: 10px; font-weight: 650; }
.quick-replies { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 8px; }
.quick-replies[hidden] { display: none; }
.quick-replies button { flex: 0 0 auto; max-width: 280px; border: 1px solid #dbe5f4; border-radius: 15px; padding: 6px 10px; background: #f7faff; color: #526174; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-replies button:hover { color: var(--blue); border-color: #9ebcf0; background: #eef5ff; }
.claim-composer { border-top: 1px solid var(--line); padding: 16px 20px; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: #f8fbff; }
.claim-composer span { color: var(--muted); font-size: 12px; }
.notification-toggle { border: 1px solid var(--line); border-radius: 16px; padding: 5px 9px; color: var(--muted); background: white; cursor: pointer; font-size: 11px; }
.notification-toggle.on { color: #1d7a50; border-color: #a9dfc5; background: #eefaf4; }

.profile { border-left: 1px solid var(--line); overflow: auto; background: white; }
.profile-title { height: 64px; display: flex; align-items: center; padding: 0 18px; font-weight: 650; border-bottom: 1px solid var(--line); }
.profile-section { padding: 15px 18px; border-bottom: 1px solid #eef1f5; }
.section-title { font-size: 13px; font-weight: 650; display: flex; justify-content: space-between; margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: 82px 1fr; gap: 8px; margin: 8px 0; font-size: 12px; }
.kv label { color: #8b96a6; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { border: 1px solid #d9e2ef; border-radius: 5px; padding: 4px 7px; font-size: 11px; color: #536174; background: #f8faff; }
.follow-card { background: #f6f9ff; border: 1px solid #dfe9fb; padding: 11px; border-radius: 8px; font-size: 12px; }
.follow-date { color: var(--danger); font-weight: 650; margin-bottom: 5px; }

.page { padding: 20px 22px 30px; min-height: 100%; }
.page-actions { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.page-actions .grow { flex: 1; }
.customer-filterbar { flex-wrap: wrap; }
.customer-filterbar #customer-search { width: min(380px, 100%); }
.customer-filterbar select { min-width: 128px; }
.customer-metrics .metric .value { font-size: 24px; }
.customer-table-wrap { overflow-x: auto; }
.customer-table-wrap table { min-width: 1120px; }
.history-filterbar { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(120px, .7fr)) auto; gap: 9px; padding: 13px; border-bottom: 1px solid var(--line); }
.history-table-wrap { overflow-x: auto; }
.history-table-wrap table { min-width: 1040px; }
.history-preview { max-width: 300px; color: #5d697a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.history-messages { display: grid; gap: 10px; max-height: 55vh; overflow: auto; padding: 14px 2px 2px; }
.history-message { max-width: 82%; padding: 10px 12px; border-radius: 9px; background: #f3f6fa; line-height: 1.55; }
.history-message.mine { margin-left: auto; background: #e6efff; }
.history-message.note { margin: 0 auto; background: #fff8df; color: #765b21; }
.history-message-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 4px; color: #536174; font-size: 11px; }
.history-message small { display: block; margin-top: 5px; padding-top: 5px; border-top: 1px dashed #ccd6e4; color: var(--muted); }
.muted-line, .result-count { color: var(--muted); font-size: 11px; }
.tags.compact { margin-top: 7px; gap: 4px; }
.tags.compact .tag { padding: 2px 5px; font-size: 10px; }
.row-actions { white-space: nowrap; }
.row-actions .btn { padding: 6px 9px; margin-right: 4px; }
.task-tabs { display: flex; gap: 3px; margin-left: 12px; }
.tag-cloud { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 18px; }
.tag-card { border: 1px solid var(--line); border-radius: 9px; background: #f8fbff; color: #536174; padding: 14px; text-align: left; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px; }
.tag-card:hover { border-color: #9ab9ef; background: #eef5ff; }
.tag-card span { font-weight: 650; }
.tag-card strong { color: var(--blue); font-size: 20px; }
.tag-card small { grid-column: 1 / -1; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 17px; box-shadow: 0 4px 18px rgba(42, 63, 95, .04); }
.metric .label { color: var(--muted); font-size: 12px; }
.metric .value { font-size: 27px; font-weight: 720; margin: 10px 0 5px; }
.metric .trend { color: var(--success); font-size: 11px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 16px; }
.panel-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 9px; font-weight: 650; }
.panel-head .grow { flex: 1; }
table { width: 100%; border-collapse: collapse; background: white; }
th { background: #f8fafd; color: #6c7889; font-weight: 500; text-align: left; padding: 11px 13px; font-size: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 13px; border-bottom: 1px solid #edf0f4; font-size: 12px; }
tr:last-child td { border-bottom: 0; }
tr.clickable:hover td { background: #f7faff; cursor: pointer; }
.status { display: inline-flex; align-items: center; gap: 5px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--success); }
.status.warn { color: var(--warning); }
.status.bad { color: var(--danger); }
.toolbar { padding: 13px; display: flex; gap: 10px; border-bottom: 1px solid var(--line); }
.toolbar .input { min-width: 250px; }
.progress { height: 7px; background: #edf1f6; border-radius: 4px; overflow: hidden; min-width: 90px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #548df7, #736de9); border-radius: 4px; }
.chart { height: 210px; display: flex; align-items: flex-end; gap: 17px; padding: 26px 25px 20px; }
.bar-group { flex: 1; text-align: center; color: var(--muted); font-size: 11px; }
.bar { min-height: 4px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #5f91ef, #4676d7); margin-bottom: 8px; position: relative; }
.bar span { position: absolute; top: -19px; width: 100%; left: 0; color: #657286; font-size: 10px; }
.empty { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 12px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(23, 34, 50, .38); z-index: 50; display: grid; place-items: center; }
.modal { width: min(680px, calc(100vw - 30px)); max-height: calc(100vh - 40px); overflow: auto; background: white; border-radius: 12px; box-shadow: 0 24px 70px rgba(20, 35, 60, .25); }
.modal-head { padding: 17px 20px; border-bottom: 1px solid var(--line); font-weight: 700; display: flex; }
.modal-head .grow { flex: 1; }
.modal-body { padding: 20px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; margin-bottom: 6px; color: #637084; font-size: 12px; }
.form-row .input { width: 100%; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.landing-settings-body { max-width: 980px; padding: 4px 22px 24px; }
.settings-block { padding: 20px 0; border-bottom: 1px solid var(--line); }
.settings-block:last-child { border-bottom: 0; }
.settings-block h3 { margin: 0 0 6px; font-size: 15px; }
.settings-block p { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.settings-block-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.copy-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.zalo-account-list { display: grid; gap: 9px; margin-bottom: 13px; }
.zalo-account-row { display: grid; grid-template-columns: 105px minmax(130px, .65fr) minmax(260px, 1.5fr) 70px auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #f9fbfe; }
.zalo-active, .zalo-enabled { display: flex; align-items: center; gap: 6px; color: #5f6d80; font-size: 12px; white-space: nowrap; }
.zalo-account-row .input { width: 100%; }
.channel-error { display: inline-block; max-width: 280px; margin-top: 4px; font-size: 11px; }
.risk-confirm { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid #f1cf8d; border-radius: 10px; background: #fff9ec; color: #71531e; line-height: 1.55; }
.risk-confirm input { margin-top: 4px; }
.zalo-qr-wrap { text-align: center; }
.zalo-qr-box { width: 280px; height: 280px; margin: 0 auto 14px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; background: #f7f9fc; }
.zalo-qr-box img { width: 260px; height: 260px; object-fit: contain; }
.zalo-qr-loading { color: var(--muted); padding: 30px; }
.zalo-qr-status { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 10px 0; color: var(--muted); }
.zalo-qr-wrap ol { max-width: 420px; margin: 16px auto 0; text-align: left; line-height: 1.9; color: var(--muted); }
.modal-hint { color: var(--muted); background: #f6f8fc; border-radius: 7px; padding: 10px 12px; font-size: 12px; line-height: 1.6; }
.modal-actions { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; }
.customer-detail-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.customer-detail-head h3 { margin: 0 0 5px; font-size: 18px; }
.customer-detail-head > div:nth-child(2) { flex: 1; color: var(--muted); font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; padding: 12px 0; }
.detail-section-title { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.mini-list { display: grid; gap: 8px; }
.mini-list > div { display: flex; justify-content: space-between; gap: 12px; background: #f7f9fc; border-radius: 7px; padding: 10px 12px; }
.mini-list span { color: var(--muted); font-size: 11px; }
.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 18px 1fr; gap: 8px; min-height: 68px; }
.timeline-item i { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--blue); position: relative; }
.timeline-item i::after { content: ""; position: absolute; width: 1px; top: 11px; bottom: -54px; left: 4px; background: #dce5f2; }
.timeline-item:last-child i::after { display: none; }
.timeline-item strong { font-size: 12px; }
.timeline-item p { margin: 4px 0; color: #5c6878; font-size: 12px; line-height: 1.5; }
.timeline-item small { color: #9aa3b0; }
.toast { position: fixed; right: 22px; top: 20px; padding: 11px 15px; background: #243247; color: white; border-radius: 8px; opacity: 0; transform: translateY(-8px); transition: .18s; z-index: 100; box-shadow: var(--shadow); pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
.report-filters select { width: auto; min-width: 132px; }
.report-note { color: var(--muted); font-size: 12px; }
.metric .value.compact { font-size: 23px; }
.danger-value, .danger-text { color: var(--danger) !important; }
.sla-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 20px; }
.sla-bars > div { display: grid; grid-template-columns: 90px 1fr 54px; align-items: center; gap: 12px; }
.sla-bars .progress { margin: 0; }
.sla-bars strong { text-align: right; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1fr) 480px; background: #f5f8fc; }
.login-art { padding: 9vh 8vw; color: white; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 28%), linear-gradient(140deg, #287ce9, #5b62d8 62%, #7753ca); display: flex; flex-direction: column; justify-content: center; }
.login-logo { width: 60px; height: 60px; border-radius: 18px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.34); display: grid; place-items: center; font-size: 25px; font-weight: 800; }
.login-art h1 { font-size: 40px; margin: 24px 0 12px; }
.login-art p { max-width: 570px; font-size: 18px; line-height: 1.8; opacity: .9; }
.login-points { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; font-size: 15px; opacity: .92; }
.login-card { align-self: center; margin: 46px; background: white; padding: 38px; border-radius: 15px; box-shadow: 0 24px 70px rgba(39, 59, 94, .14); display: flex; flex-direction: column; gap: 17px; }
.login-card small { color: var(--blue); font-weight: 650; }
.login-card h2 { margin: 9px 0 5px; font-size: 26px; }
.login-card p { margin: 0; color: var(--muted); }
.login-card label { color: #5e6b7e; font-size: 12px; }
.login-card label .input { display: block; width: 100%; margin-top: 7px; }
.login-card > .btn { width: 100%; padding: 11px; }
.login-error { background: #fff0f0; color: var(--danger); border-radius: 7px; padding: 9px 11px; font-size: 12px; }
.demo-users { border-top: 1px solid var(--line); padding-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; color: var(--muted); font-size: 11px; }
.demo-users strong { grid-column: 1 / -1; color: #586578; }

@media (max-width: 1180px) {
  .chat-grid { grid-template-columns: 320px 1fr; }
  .profile { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .shell { grid-template-columns: 54px 1fr; }
  .side { display: none; }
  .workspace { grid-column: 2; }
  .chat-grid { grid-template-columns: 1fr; }
  .conversation-list { display: none; }
  .cards { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-card { margin: 24px; }
  .landing-settings-body { padding: 4px 14px 18px; }
  .zalo-account-row { grid-template-columns: 1fr auto; }
  .zalo-account-row .input { grid-column: 1 / -1; }
  .history-filterbar { grid-template-columns: 1fr 1fr; }
  .sla-bars { grid-template-columns: 1fr; }
  .report-filters { align-items: stretch; }
  .report-filters select { width: 100%; }
}
