/* =====================================================================
   Tab topbar + Bảng timeline dự án (scripts/app/timeline) — dùng token trong app.css
   ===================================================================== */
.topbar-tabs { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.topbar-tab {
    height: 34px; padding: 0 14px;
    border: 1px solid transparent; border-radius: 8px;
    background: transparent; color: #c0cfff;
    font-family: inherit; font-size: 13px; font-weight: 600; white-space: nowrap;
    cursor: pointer;
}
.topbar-tab:hover { background: rgba(255,255,255,.1); color: #fff; }
.topbar-tab.active { background: #fff; color: var(--navy-800); border-color: #fff; }

.tab-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.tl-root { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }

.tl-toolbar .tl-project-select { min-width: 280px; max-width: 460px; font-weight: 600; color: var(--ink-900); }
.tl-toolbar .btn-muted.sm, .tl-toolbar .btn-primary.sm {
    height: 34px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.link-btn {
    border: none; background: none; padding: 0 4px;
    color: var(--blue-600); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--coral-500); }

.tl-body { flex: 1; min-height: 0; overflow: auto; padding: 16px 20px 32px; display: flex; flex-direction: column; gap: 14px; }
.tl-state {
    background: #fff; border: 1px dashed var(--border-default); border-radius: 12px;
    padding: 28px; text-align: center; color: var(--gray-500); font-size: 13.5px;
    display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.tl-state.error { color: var(--coral-500); border-color: #ffd0cb; background: #fff7f6; }
.tl-pre { white-space: pre-wrap; word-break: break-word; }

/* Popup chia sẻ: QBIS chọn đơn vị khách */
.share-unit { display: flex; flex-direction: column; gap: 6px; }
.share-unit label { font-size: 12.5px; font-weight: 600; color: var(--gray-500); }
.share-unit .modal-ac input { width: 100%; box-sizing: border-box; }

/* ---------- Header dự án ---------- */
.tl-head {
    background: #fff; border: 1px solid var(--border-subtle); border-radius: 14px;
    padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; flex-shrink: 0;
}
.tl-head-top { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.tl-head-title { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 6px; }
.tl-head-title h1 { margin: 0; font-size: 21px; font-weight: 800; color: var(--navy-900); line-height: 1.3; }
.tl-head-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tl-code { font-weight: 800; font-size: 12px; color: var(--blue-600); background: var(--blue-100); padding: 3px 9px; border-radius: 100px; }
.tl-status { font-weight: 700; font-size: 12px; color: #0d7a59; background: #dcf7ee; padding: 3px 9px; border-radius: 100px; }
.tl-hidden-badge { font-weight: 700; font-size: 12px; color: #8a5a00; background: var(--cream-100); padding: 3px 9px; border-radius: 100px; }
.tl-unit { font-size: 12px; color: var(--ink-700); font-weight: 600; }
.tl-head-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-700); align-items: center; }
.tl-contract { font-size: 11.5px; font-weight: 700; color: var(--navy-800); border: 1px solid var(--blue-200); border-radius: 6px; padding: 2px 7px; }

.tl-progress-card {
    display: flex; gap: 14px; align-items: center;
    background: var(--surface-100); border-radius: 12px; padding: 12px 16px; min-width: 300px;
}
.tl-progress-num { font-size: 34px; font-weight: 900; color: var(--navy-800); line-height: 1; }
.tl-progress-num small { font-size: 16px; font-weight: 800; }
.tl-progress-info { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.tl-progress-text { font-size: 12.5px; color: var(--ink-700); }
.tl-overdue-count { color: var(--coral-500); font-weight: 700; }
.tl-bar { height: 8px; background: #e3e8f4; border-radius: 100px; overflow: hidden; }
.tl-bar span { display: block; height: 100%; background: var(--teal-500); border-radius: 100px; }

.tl-milestones {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.tl-milestones li { position: relative; padding: 18px 10px 0 0; display: flex; flex-direction: column; gap: 2px; }
.tl-milestones li::before {
    content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: var(--border-default);
}
.tl-milestones li.past::before { background: var(--teal-500); }
.tl-ms-dot {
    position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%;
    background: #fff; border: 2px solid var(--gray-300); box-sizing: border-box;
}
.tl-milestones li.past .tl-ms-dot { background: var(--teal-500); border-color: var(--teal-500); }
.tl-ms-date { font-size: 12px; font-weight: 700; color: var(--blue-600); }
.tl-milestones li.past .tl-ms-date { color: #0d7a59; }
.tl-ms-title { font-size: 12.5px; font-weight: 800; color: var(--ink-900); text-transform: uppercase; letter-spacing: .3px; }
.tl-ms-desc { font-size: 12px; color: var(--gray-500); line-height: 1.4; }

.tl-info { border-top: 1px solid var(--border-subtle); padding-top: 10px; }
.tl-info-toggle { border: none; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-700); cursor: pointer; }
.tl-info-body { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--ink-700); line-height: 1.55; }
.tl-info-body p { margin: 0; }
.tl-principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.tl-principle { background: var(--surface-100); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* ---------- Lọc mục ---------- */
.tl-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex-shrink: 0; }
.tl-filters select {
    height: 34px; border: 1px solid var(--border-default); border-radius: 8px;
    padding: 0 8px; font-size: 13px; color: var(--ink-700); background: #fff;
}
.tl-chips { display: flex; gap: 4px; background: #fff; border: 1px solid var(--border-default); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.tl-chips button {
    height: 28px; padding: 0 11px; border: none; border-radius: 7px; background: transparent;
    font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-700); cursor: pointer;
}
.tl-chips button:hover { background: var(--surface-100); }
.tl-chips button.active { background: var(--navy-800); color: #fff; }
.tl-chips button.warn.active { background: #e89a00; }
.tl-chips button.danger.active { background: var(--coral-500); }

/* ---------- Bảng ---------- */
.tl-table-wrap { background: #fff; border: 1px solid var(--border-subtle); border-radius: 14px; overflow-x: auto; flex-shrink: 0; }
.tl-table { width: 100%; min-width: 1320px; border-collapse: collapse; font-size: 13px; }
.tl-table th {
    background: var(--surface-100);
    text-align: left; padding: 9px 10px; white-space: nowrap;
    font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px;
    border-bottom: 1px solid var(--border-default);
}
.tl-table th.w-code { width: 78px; }
.tl-table th.w-date { width: 110px; }
.tl-table th.w-work { min-width: 320px; }
.tl-table th.w-party { width: 70px; }
.tl-table th.w-tags { width: 120px; }
.tl-table th.w-done { width: 62px; text-align: center; }
.tl-table th.w-result { width: 250px; }
.tl-table th.w-ddate { width: 140px; }
.tl-table th.w-notes, .tl-table th.w-files { width: 72px; text-align: center; }
.tl-table th.w-act { width: 44px; }
.tl-table td { padding: 10px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }

.tl-sec-row td { background: #f0f4ff; border-bottom: 1px solid var(--blue-200); padding: 9px 12px; cursor: pointer; }
.tl-sec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-caret { color: var(--blue-600); width: 12px; }
.tl-sec-name { font-size: 13.5px; color: var(--navy-900); }
.tl-sec-note { font-size: 12px; color: var(--gray-500); }
.tl-sec-overdue { font-size: 12px; font-weight: 700; color: var(--coral-500); }
.tl-mini-bar { width: 90px; height: 6px; background: #dfe6f7; border-radius: 100px; overflow: hidden; }
.tl-mini-bar span { display: block; height: 100%; background: var(--teal-500); }
.tl-sec-count { font-size: 12px; font-weight: 700; color: var(--ink-700); min-width: 40px; text-align: right; }

.tl-row:hover td { background: #fafbff; }
.tl-row.done td { background: #f4fbf8; }
.tl-row.selected td { background: var(--blue-100); }
.tl-row.done .tl-title { color: #0d7a59; }
.tl-row.overdue td:first-child { box-shadow: inset 3px 0 0 var(--coral-500); }
.tl-row.soon td:first-child { box-shadow: inset 3px 0 0 #e89a00; }
.tl-row.busy { opacity: .6; }

.c-code b { color: var(--blue-600); font-size: 13px; }
.tl-type { display: block; font-size: 10.5px; font-weight: 700; color: #8a5a00; margin-top: 3px; }
.c-date { white-space: nowrap; color: var(--ink-700); font-weight: 600; }
.tl-badge { display: inline-block; margin-top: 4px; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 100px; white-space: nowrap; }
.tl-badge.red { background: #ffecea; color: var(--coral-500); }
.tl-badge.amber { background: var(--cream-100); color: #8a5a00; }
.c-date .tl-badge, .c-ddate .tl-badge { display: block; width: max-content; }
.tl-title { font-weight: 700; color: var(--ink-900); line-height: 1.4; }
.tl-desc { color: var(--ink-700); font-size: 12.5px; line-height: 1.45; margin-top: 3px; white-space: pre-wrap; }
.tl-deliv { color: #0d7a59; font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.tl-usedfor { color: var(--gray-500); font-size: 12px; margin-top: 3px; }
.tl-party { font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.tl-party.p-A { background: var(--cream-100); color: #8a5a00; }
.tl-party.p-B { background: var(--blue-100); color: var(--blue-600); }
.tl-party.p-AB { background: #ece7ff; color: #5b3fc4; }
.tl-tag {
    display: inline-block; margin: 0 4px 4px 0; font-size: 11px; font-weight: 600; white-space: nowrap;
    color: var(--ink-700); background: var(--surface-100); border: 1px solid var(--border-default);
    padding: 1px 6px; border-radius: 5px;
}
.c-done { text-align: center; }
.c-done input { width: 18px; height: 18px; accent-color: var(--teal-500); cursor: pointer; }
.c-done input:disabled { cursor: not-allowed; opacity: .55; }
.tl-doneby { font-size: 10.5px; color: var(--gray-500); margin-top: 3px; word-break: break-all; }
.c-result textarea {
    width: 100%; min-height: 38px; resize: vertical; box-sizing: border-box;
    border: 1px solid transparent; border-radius: 7px; background: var(--surface-100);
    padding: 6px 8px; font: inherit; font-size: 12.5px; color: var(--ink-900); outline: none;
}
.c-result textarea:hover { border-color: var(--border-default); }
.c-result textarea:focus { border-color: var(--blue-600); background: #fff; }
.c-result .tl-pre { font-size: 12.5px; color: var(--ink-700); }
.c-ddate input.tl-date {
    width: 128px; height: 30px; border: 1px solid var(--border-default); border-radius: 7px;
    padding: 0 6px; font: inherit; font-size: 12.5px; color: var(--ink-900); box-sizing: border-box;
}
.c-notes, .c-files { text-align: center; }
.tl-count-btn {
    display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px;
    border: 1px solid var(--border-default); border-radius: 100px; background: #fff;
    font: inherit; font-size: 12px; font-weight: 700; color: var(--ink-700); cursor: pointer;
}
.tl-count-btn:hover { border-color: var(--blue-600); color: var(--blue-600); }
.c-act .icon-btn { width: 28px; height: 28px; font-size: 13px; cursor: pointer; }

/* ---------- Ô kết quả + popup soạn định dạng ---------- */
.tl-result-cell { position: relative; }
.tl-result-cell textarea { padding-right: 26px; }
.tl-rich-preview {
    max-height: 84px; overflow: hidden; position: relative; cursor: zoom-in;
    font-size: 12.5px; line-height: 1.45; color: var(--ink-900);
    background: var(--surface-100); border-radius: 7px; padding: 6px 26px 6px 8px;
}
.tl-rich-preview::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px;
    background: linear-gradient(rgba(245,247,251,0), var(--surface-100));
}
.tl-rich-preview p, .tl-rich-preview ul, .tl-rich-preview ol, .tl-rich-preview h3 { margin: 0 0 4px; }
.tl-rich-preview ul, .tl-rich-preview ol { padding-left: 18px; }
.tl-rich-preview h3 { font-size: 13px; }
.tl-rich-preview img { max-width: 100%; max-height: 60px; }
.tl-expand-btn {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-default); border-radius: 6px; background: #fff;
    color: var(--gray-500); cursor: pointer; opacity: .75;
}
.tl-row:hover .tl-expand-btn, .tl-expand-btn:focus { opacity: 1; }
.tl-expand-btn:hover { color: var(--blue-600); border-color: var(--blue-600); }

.modal.tl-result-modal { width: 900px; max-width: calc(100vw - 32px); gap: 10px; }
.modal.tl-result-modal > * { flex-shrink: 0; }
.tl-result-head { display: flex; align-items: center; gap: 10px; }
.tl-result-sub { color: var(--gray-500) !important; font-size: 13px !important; margin-top: -6px !important; }
.tl-rich-view {
    min-height: min(200px, 40vh); max-height: 65vh; overflow: auto;
    border: 1px solid var(--border-subtle); border-radius: 10px; padding: 14px 16px;
    font-size: 14px; line-height: 1.6; color: var(--ink-900);
}
.tl-editor { display: flex; flex-direction: column; border: 1px solid var(--border-default); border-radius: 10px; overflow: hidden; }
.tl-editor-bar {
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
    padding: 6px 8px; background: var(--surface-100); border-bottom: 1px solid var(--border-default);
}
.tl-editor-bar > span:first-child { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tl-editor-bar button {
    min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px;
    background: transparent; font: inherit; font-size: 13px; color: var(--ink-900); cursor: pointer;
}
.tl-editor-bar button:hover { background: #fff; border-color: var(--border-default); }
.tl-editor-bar button.swatch { min-width: 18px; width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border-default); }
.tl-editor-bar button.mode { font-weight: 700; color: var(--blue-600); }
.tl-editor-bar button.mode.active { background: var(--navy-800); color: #fff; }
.tl-editor-bar .sep { width: 1px; height: 20px; background: var(--border-default); margin: 0 4px; }
.tl-editor-area, .tl-editor-html {
    min-height: min(320px, 45vh); max-height: 60vh; overflow: auto; box-sizing: border-box;
    padding: 14px 16px; outline: none; border: none; width: 100%;
}
.tl-editor-area { font-size: 14px; line-height: 1.6; color: var(--ink-900); }
.tl-editor-area:empty::before { content: "Nhập kết quả…"; color: var(--gray-300); }
.tl-editor-area img, .tl-rich-view img { max-width: 100%; height: auto; border-radius: 6px; }
.tl-editor-html { font-family: Consolas, Menlo, monospace; font-size: 12.5px; resize: vertical; background: #fbfcff; color: var(--ink-900); }

/* ---------- Panel ghi chú / ảnh ---------- */
.tl-panel { width: 440px; max-width: 100%; }
.tl-panel-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.tl-panel-tabs { display: flex; border-bottom: 1px solid var(--border-subtle); padding: 0 12px; gap: 4px; }
.tl-panel-tabs button {
    border: none; background: none; padding: 10px; font: inherit; font-size: 13px; font-weight: 600;
    color: var(--gray-500); border-bottom: 2px solid transparent; cursor: pointer;
}
.tl-panel-tabs button.active { color: var(--blue-600); border-bottom-color: var(--blue-600); }
.tl-notes { gap: 10px; }
.tl-note { background: var(--surface-100); border-radius: 10px; padding: 9px 12px; font-size: 13px; line-height: 1.5; color: var(--ink-900); }
.tl-note.log { background: #f4fbf8; border: 1px solid #ccefe1; font-size: 12.5px; color: var(--ink-700); }
.tl-note-head { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 3px; }
.tl-log-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; color: #0d7a59; background: #dcf7ee; padding: 1px 6px; border-radius: 4px; }
.tl-drop {
    border: 2px dashed var(--gray-300); border-radius: 12px; padding: 20px; text-align: center;
    font-size: 13px; color: var(--gray-500); cursor: pointer;
}
.tl-drop:hover, .tl-files.drag-over .tl-drop { border-color: var(--blue-600); color: var(--blue-600); background: var(--blue-100); }
.tl-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tl-thumb { position: relative; padding-top: 100%; border-radius: 10px; overflow: hidden; background: var(--surface-100); border: 1px solid var(--border-subtle); }
.tl-thumb img, .tl-thumb .tl-file-chip { position: absolute; inset: 0; width: 100%; height: 100%; }
.tl-thumb img { object-fit: cover; cursor: zoom-in; display: block; }
.tl-file-chip { display: flex; align-items: center; justify-content: center; padding: 8px; box-sizing: border-box; font-size: 12px; text-align: center; word-break: break-all; }
.tl-thumb-del {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: none; border-radius: 50%;
    background: rgba(20,25,58,.65); color: #fff; font-size: 11px; cursor: pointer; display: none;
}
.tl-thumb:hover .tl-thumb-del { display: block; }
.tl-panel-error { padding: 0 18px 8px; }
.tl-compose { align-items: flex-end; }
.tl-compose textarea {
    flex: 1; resize: none; border: 1px solid var(--border-default); border-radius: 10px;
    padding: 8px 10px; font: inherit; font-size: 13px; outline: none;
}
.tl-compose textarea:focus { border-color: var(--blue-600); }

/* ---------- Modal ---------- */
.modal.tl-modal { width: 520px; max-width: calc(100vw - 32px); max-height: calc(100vh - 40px); overflow: auto; }
.modal.tl-modal-wide { width: 640px; }
.tl-form { display: grid; grid-template-columns: 130px 1fr; gap: 10px 12px; align-items: center; }
.tl-form label { font-size: 12.5px; font-weight: 600; color: var(--gray-500); }
.tl-form input[type="text"], .tl-form input[type="date"], .tl-form select, .tl-form textarea,
.tl-form-row input[type="text"], .tl-form-row input[type="date"], .tl-form-row select {
    height: 36px; border: 1px solid var(--border-default); border-radius: 8px; padding: 0 10px;
    font: inherit; font-size: 13px; color: var(--ink-900); background: #fff; outline: none; box-sizing: border-box;
}
.tl-form > input[type="text"], .tl-form > select, .tl-form > textarea, .tl-form .modal-ac input { width: 100%; }
.tl-form textarea { height: auto; padding: 8px 10px; resize: vertical; }
.tl-form input:focus, .tl-form select:focus, .tl-form textarea:focus { border-color: var(--blue-600); }
.tl-form-row { display: flex; gap: 8px; align-items: center; }
.tl-form-row input[type="text"] { flex: 1; min-width: 0; }
.tl-form-row input.w-sm { flex: 0 0 80px; }
/* Popup chia sẻ: tab mở mặc định */
.share-mode { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.share-mode label { font-size: 12.5px; font-weight: 600; color: var(--gray-500); }

/* Lịch chọn ngày (jQuery UI) — nổi trên bảng và popup */
#ui-datepicker-div { z-index: 1300 !important; font-family: inherit; font-size: 12.5px; box-shadow: 0 8px 24px rgba(20,25,58,.18); }
#ui-datepicker-div select { font: inherit; font-size: 12px; }

/* Popup sửa dự án: tab Header & mốc */
.modal.tl-proj-modal { width: 760px; }
.modal.tl-proj-modal > * { flex-shrink: 0; }
.tl-form-tabs { padding: 0; margin-top: -4px; }
.tl-hdr { display: flex; flex-direction: column; gap: 14px; }
.tl-hdr-block { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border-subtle); padding-top: 10px; }
.tl-hdr-title { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-900); }
.tl-hdr-title .muted { font-size: 12px; }
.tl-hdr-title .link-btn { margin-left: auto; }
.tl-hdr-row { display: flex; gap: 8px; align-items: center; }
.tl-hdr-row.top { align-items: flex-start; }
.tl-hdr-row input[type="text"], .tl-hdr-row input[type="date"], .tl-hdr-row textarea, .tl-hdr-block > textarea {
    height: 34px; border: 1px solid var(--border-default); border-radius: 8px; padding: 0 10px;
    font: inherit; font-size: 13px; color: var(--ink-900); background: #fff; outline: none; box-sizing: border-box;
}
.tl-hdr-row input[type="text"] { flex: 1; min-width: 0; }
.tl-hdr-row input.w-sm2 { flex: 0 0 110px; }
.tl-hdr-row input.w-md { flex: 0 0 200px; }
.tl-hdr-row input[type="text"].tl-date { flex: 0 0 130px; }
.tl-hdr-row textarea, .tl-hdr-block > textarea { flex: 1; height: auto; min-height: 34px; padding: 7px 10px; resize: vertical; width: 100%; }
.tl-hdr-row input:focus, .tl-hdr-row textarea:focus, .tl-hdr-block > textarea:focus { border-color: var(--blue-600); }
.tl-hdr-row .icon-btn { width: 30px; height: 30px; flex-shrink: 0; cursor: pointer; }
.tl-hdr-move { display: inline-flex; gap: 4px; }
.tl-hdr-sec { flex: 0 0 260px; font-size: 12.5px; font-weight: 600; color: var(--ink-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tl-imp-mode { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-700); }
.tl-imp-mode label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.tl-json {
    width: 100%; box-sizing: border-box; border: 1px solid var(--border-default); border-radius: 10px;
    padding: 10px; font-family: Consolas, Menlo, monospace; font-size: 12px; resize: vertical; outline: none;
}
.tl-json:focus { border-color: var(--blue-600); }
.tl-imp-preview {
    background: var(--surface-100); border-radius: 10px; padding: 12px 14px;
    display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-700);
}
.tl-imp-preview .ok { color: #0d7a59; font-weight: 600; }
.tl-imp-preview .warn { color: #8a5a00; display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 760px) {
    .topbar-tabs { margin-left: 0; }
    .topbar-tab { padding: 0 9px; font-size: 12px; }
    .tl-body { padding: 12px; }
    .tl-toolbar .tl-project-select { min-width: 0; width: 100%; }
    .tl-progress-card { min-width: 0; width: 100%; }
    .tl-panel { width: 100%; }
    .tl-form { grid-template-columns: 1fr; }
}
