.online-header { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.online-header h2 { margin:0 0 6px; font-size:1.45rem; }
.online-header p { margin:0; color:var(--gray-500,#64748b); font-size:.9rem; }
.online-header__links,.online-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.online-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }
.online-tabs button { display:flex; align-items:center; gap:8px; padding:10px 14px; border:1px solid var(--gray-200,#e2e8f0); background:var(--white,#fff); color:var(--gray-700,#334155); border-radius:10px; cursor:pointer; font:inherit; font-size:.9rem; }
.online-tabs button[aria-pressed="true"] { border-color:#dc1f2e; color:#b91c2c; background:#fff1f2; font-weight:700; }
.online-tabs span,.online-unread { min-width:23px; padding:2px 7px; border-radius:20px; background:#fce7eb; color:#b91c2c; font-size:.75rem; text-align:center; }
.online-notice { margin:0 0 12px; padding:12px 16px; border-radius:9px; background:#eff6ff; color:#1e40af; overflow-wrap:anywhere; }
.online-notice.is-error { background:#fef2f2; color:#991b1b; }
.online-workspace { display:grid; grid-template-columns:minmax(260px,340px) minmax(0,1fr); gap:18px; align-items:start; }
.online-panel { min-width:0; border:1px solid var(--gray-200,#e2e8f0); border-radius:14px; background:var(--white,#fff); overflow:hidden; }
.online-panel__head { display:flex; justify-content:space-between; gap:10px; align-items:center; padding:16px; border-bottom:1px solid var(--gray-200,#e2e8f0); }
.online-panel__head h3,.online-panel__head p { margin:0; }
.online-panel__body { padding:20px; }
.online-list { display:grid; gap:8px; padding:10px; max-height:65dvh; overflow:auto; }
.online-list-row { display:grid; gap:7px; width:100%; min-width:0; padding:14px; border:1px solid transparent; border-radius:10px; background:var(--gray-50,#f8fafc); color:var(--gray-800,#1e293b); font:inherit; text-align:left; cursor:pointer; }
.online-list-row:hover { border-color:#fda4af; }
.online-list-row[aria-current="true"] { background:#fff1f2; border-color:#e11d48; box-shadow:inset 3px 0 #e11d48; }
.online-list-row__line { display:flex; justify-content:space-between; gap:8px; align-items:center; min-width:0; }
.online-list-row__line strong { overflow-wrap:anywhere; }
.online-list-row small { color:var(--gray-500,#64748b); }
.online-ellipsis { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.online-pager { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:12px; border-top:1px solid var(--gray-200,#e2e8f0); font-size:.85rem; }
.online-empty { padding:48px 20px; text-align:center; color:var(--gray-500,#64748b); }
.online-empty i { display:block; font-size:2rem; margin-bottom:14px; color:#f0a2ad; }
.online-detail-title { margin:0; font-size:1.25rem; color:var(--brand,#be123c); overflow-wrap:anywhere; }
.online-badge { display:inline-block; padding:5px 9px; border-radius:7px; background:#eff6ff; color:#1d4ed8; font-size:.8rem; }
.online-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:18px 0; padding:16px; border-radius:10px; background:var(--gray-50,#f8fafc); }
.online-facts dt { color:var(--gray-500,#64748b); font-size:.8rem; margin-bottom:5px; }
.online-facts dd { margin:0; overflow-wrap:anywhere; font-size:.95rem; }
.online-note { font-size:.9rem; white-space:pre-wrap; overflow-wrap:anywhere; margin:12px 0; }
.online-items { width:100%; table-layout:fixed; border-collapse:collapse; margin:16px 0; font-size:.9rem; }
.online-items th,.online-items td { padding:10px 6px; text-align:left; border-bottom:1px solid var(--gray-200,#e2e8f0); }
.online-items th { color:var(--gray-500,#64748b); font-size:.8rem; }
.online-items th:first-child { width:52px; }
.online-items th:nth-child(3) { width:74px; text-align:center; }
.online-items td:nth-child(3) { text-align:center; }
.online-items th:last-child,.online-items td:last-child { width:100px; text-align:right; }
.online-items img { width:40px; height:40px; object-fit:contain; background:#fff; border-radius:6px; }
.online-items .online-product-name { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.online-items small { display:block; color:var(--gray-500,#64748b); font-size:.75rem; }
.online-items input { width:100%; padding:7px 4px; text-align:center; }
.online-total { display:flex; justify-content:space-between; gap:12px; padding:12px 0; font-size:1.1rem; font-weight:700; }
.online-total strong { color:#16803e; }
.online-inline-form { display:grid; gap:12px; padding:16px; margin-top:16px; border:1px solid #f6c8ce; background:#fff7f8; color:#44242b; border-radius:12px; }
.online-inline-form h4,.online-inline-form p { margin:0; }
.online-inline-form label { display:grid; gap:6px; font-size:.9rem; }
.online-inline-form input,.online-inline-form textarea { width:100%; }
.online-slip { margin-top:14px; }
.online-slip summary { cursor:pointer; padding:12px; background:var(--gray-50,#f8fafc); border-radius:8px; }
.online-slip img { display:block; max-width:100%; max-height:650px; margin:12px auto; object-fit:contain; }
.online-chat-workspace { height:calc(100dvh - 200px); min-height:460px; align-items:stretch; }
.online-chat-sidebar { display:flex; flex-direction:column; min-height:0; }
.online-chat-search { display:grid; gap:10px; padding:14px; border-bottom:1px solid var(--gray-200,#e2e8f0); }
.online-chat-search input[type="search"] { width:100%; }
.online-chat-search label { font-size:.85rem; }
.online-chat-sidebar .online-list { flex:1; max-height:none; min-height:0; }
.online-chat-thread { display:flex; flex-direction:column; min-height:0; }
.online-chat-thread .online-panel__head { flex-shrink:0; }
.online-chat-thread .online-panel__head p { margin-top:5px; color:var(--gray-500,#64748b); font-size:.85rem; }
.online-messages { display:flex; flex-direction:column; gap:14px; padding:20px; flex:1; min-height:0; overflow:auto; background:var(--gray-50,#f8fafc); }
.online-message { max-width:85%; align-self:flex-start; padding:11px 14px; background:var(--white,#fff); border:1px solid var(--gray-200,#e2e8f0); border-radius:14px 14px 14px 3px; }
.online-message.is-staff { align-self:flex-end; background:#fff1f2; color:#52252e; border-color:#fecdd3; border-radius:14px 14px 3px 14px; }
.online-message.is-system { align-self:center; text-align:center; background:transparent; border:0; font-size:.85rem; }
.online-message p { white-space:pre-wrap; overflow-wrap:anywhere; margin:6px 0; }
.online-message small { display:block; font-size:.72rem; color:var(--gray-500,#64748b); }
.online-message img { display:block; max-width:100%; max-height:300px; border-radius:8px; margin:8px 0; }
.online-composer { flex-shrink:0; padding:14px; border-top:1px solid var(--gray-200,#e2e8f0); }
.online-composer textarea { display:block; width:100%; resize:vertical; min-height:64px; max-height:160px; margin-bottom:10px; }
.online-composer__attachment { display:flex; gap:10px; align-items:center; padding:8px 0; }
.online-composer__attachment img { width:64px; height:64px; object-fit:contain; }
.online-mobile-back { display:none; }
.online-workspace [hidden], [hidden].online-notice { display:none !important; }
@media(max-width:900px) { .online-workspace { grid-template-columns:280px minmax(0,1fr); gap:12px; } .online-panel__body { padding:14px; } }
@media(max-width:700px) {
 .online-workspace { grid-template-columns:minmax(0,1fr); }
 .online-workspace.has-selection > .online-panel:first-child { display:none; }
 .online-workspace:not(.has-selection) > .online-panel:last-child { display:none; }
 .online-mobile-back { display:inline-flex; }
 .online-chat-workspace { height:calc(100dvh - 220px); min-height:440px; }
 .online-facts { gap:12px; padding:12px; }
 .online-tabs { gap:6px; } .online-tabs button { font-size:.8rem; padding:8px; }
 .online-items th:first-child { width:43px; } .online-items th:nth-child(3) { width:57px; } .online-items th:last-child,.online-items td:last-child { width:79px; }
}
