Files
baiyue-logistics-chat/static/css/admin.css
T

202 lines
18 KiB
CSS

/* A conversation-first console: compact header, session inbox and full-height chat. */
body { height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); }
.topbar { height: 56px; min-height: 56px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--border); z-index: 30; }
.app-identity, .topbar-actions { display: flex; align-items: center; gap: 20px; min-width: 0; }
.brand { gap: 10px; }
.topbar .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.topbar .brand-mark svg { width: 19px; height: 19px; }
.topbar .brand-name { font-size: 15px; white-space: nowrap; }
.nav-divider { height: 18px; width: 1px; background: var(--border); }
.app-identity h1 { font-size: 14px; font-weight: 500; color: var(--secondary); white-space: nowrap; }
.workspace-link { font-size: 12px; color: var(--secondary); text-decoration: none; white-space: nowrap; }
.workspace-link:hover { color: var(--brand); }
.data-overview { position: relative; }
.data-overview summary { display: flex; align-items: center; gap: 7px; padding: 6px 10px; font-size: 12px; color: var(--secondary); cursor: pointer; border-radius: 7px; list-style: none; border: 1px solid var(--border); }
.data-overview summary::-webkit-details-marker { display: none; }
.data-overview summary svg { width: 15px; height: 15px; }
.data-overview[open] summary, .data-overview summary:hover { color: var(--brand); border-color: #bacbf2; background: var(--brand-soft); }
.stats { position: absolute; top: calc(100% + 11px); right: 0; width: 310px; padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); box-shadow: 0 12px 40px #19263d1a; }
.stats h2 { grid-column: 1 / -1; font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.stat { display: flex; flex-direction: column; padding: 10px 12px; background: var(--surface-soft); border-radius: 7px; }
.stat > span { font-size: 11px; color: var(--secondary); }
.stat b { font-size: 23px; font-weight: 600; line-height: 1.5; font-variant-numeric: tabular-nums; }
.export-link { display: grid; place-items: center; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; color: var(--brand); text-decoration: none; }
.export-link:hover { background: var(--brand-soft); }
.sync-status { flex-shrink: 0; background: var(--danger-soft); color: var(--danger); border-bottom: 1px solid #eed0d3; padding: 7px 22px; font-size: 12px; }
.layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); overflow: hidden; }
.conv-list { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); }
.list-heading { padding: 23px 20px 18px; }
.list-heading h2 { font-size: 17px; font-weight: 650; }
.list-heading p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.session-search-wrap { position: relative; margin-top: 17px; }
.session-search-wrap svg { position: absolute; top: 12px; left: 11px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
#session-search { width: 100%; height: 38px; padding: 8px 10px 8px 34px; border: 1px solid transparent; border-radius: 7px; background: var(--surface-soft); color: var(--text); font-size: 13px; }
#session-search::placeholder { color: var(--muted); }
#session-search:focus { outline: none; border-color: #9ab4ed; background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); }
.session-tabs { display: flex; gap: 22px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.session-tabs button { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; padding: 7px 0 12px; border: 0; background: transparent; color: var(--secondary); font-size: 13px; }
.session-tabs button[aria-selected="true"] { color: var(--brand); font-weight: 600; }
.session-tabs button[aria-selected="true"]::after { position: absolute; content: ""; height: 2px; background: var(--brand); inset: auto 0 -1px; }
.section-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 5px; color: var(--muted); background: var(--surface-soft); font-size: 10px; font-variant-numeric: tabular-nums; }
[aria-selected="true"] .section-count { background: var(--brand-soft); color: var(--brand); }
.session-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; }
.list-empty { padding: 33px 14px; text-align: center; font-size: 12px; line-height: 1.8; color: var(--muted); }
.conv-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 14px 12px; margin-bottom: 4px; border: 1px solid transparent; border-radius: 8px; text-align: left; background: transparent; }
.conv-item:hover { background: var(--surface-soft); }
.conv-item.active { background: #edf3ff; border-color: #e3ebfc; }
.avatar { flex-shrink: 0; display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; color: #60728f; background: #eaf0f7; font-size: 14px; font-weight: 600; }
.active .avatar { color: var(--brand); background: #dce7fe; }
.conv-item .info { min-width: 0; flex: 1; }
.conv-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.conv-item .name { display: block; font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.conv-time { flex-shrink: 0; color: var(--muted); font-size: 10px; font-weight: 400; }
.conv-item .preview { display: block; margin-top: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--secondary); font-size: 12px; }
.badge { flex-shrink: 0; padding: 0 5px; border-radius: 5px; background: var(--brand); color: white; font-size: 10px; }
.queue-item { border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 8px; background: var(--surface); }
.queue-item .qt { font-size: 13px; font-weight: 600; color: var(--text); }
.queue-item small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 5px; }
.queue-item button { margin-top: 13px; padding: 7px 12px; min-height: 34px; width: 100%; border: 0; border-radius: 6px; background: var(--brand); color: white; font-size: 12px; }
.list-footer { flex-shrink: 0; display: flex; align-items: center; gap: 7px; padding: 14px 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.list-footer-mark { width: 6px; height: 6px; border-radius: 50%; background: #91a2bc; }
.list-footer > span { display: flex; align-items: center; gap: 7px; }
#tools-from-list { display: none; }
.chat-area { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #f5f7fa; }
.chat-header { display: flex; flex-shrink: 0; align-items: center; gap: 12px; min-height: 72px; padding: 13px 28px; background: var(--surface); border-bottom: 1px solid var(--border); }
.participant-avatar { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; background: #edf2fa; color: #6a7b96; font-size: 14px; }
.participant-copy { flex: 1; min-width: 0; }
.participant-copy h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 650; }
.participant-copy p { margin-top: 2px; color: var(--muted); font-size: 11px; }
.has-active-session .participant-copy p { color: #4b796b; }
.chat-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tools-toggle, .close { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 33px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; background: var(--surface); color: var(--secondary); white-space: nowrap; }
.tools-toggle svg { width: 16px; height: 16px; }
.tools-toggle[aria-expanded="true"], .tools-toggle:hover { border-color: #bacbf2; color: var(--brand); background: var(--brand-soft); }
.close:hover:enabled { border-color: #ecc5ca; background: var(--danger-soft); color: var(--danger); }
.close:disabled { cursor: default; opacity: .45; }
.has-active-session .participant-avatar { color: var(--brand); background: var(--brand-soft); }
body:not(.has-active-session) .close { display: none; }
.empty { flex: 1; display: grid; place-items: center; text-align: center; min-height: 0; padding: 30px; }
.empty-illustration { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 18px; border: 1px solid #e0e6ee; border-radius: 15px; background: var(--surface); color: #879bb9; }
.empty-illustration svg { width: 26px; height: 26px; }
.empty h2 { margin-bottom: 8px; font-size: 18px; font-weight: 600; }
.empty p { font-size: 13px; line-height: 1.9; color: var(--muted); }
.session-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
#chatBox { flex: 1; min-height: 0; overflow-y: auto; padding: 26px clamp(22px, 4vw, 60px); }
.msg { display: flex; align-items: flex-start; gap: 10px; max-width: 1040px; margin: 0 auto 24px; }
.msg.agent { flex-direction: row-reverse; }
.message-avatar { flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; margin-top: 24px; border-radius: 9px; background: #e6ecf4; color: #6e7e97; font-size: 12px; }
.message-avatar svg { width: 17px; height: 17px; }
.msg.agent .message-avatar { background: var(--brand); color: white; }
.message-stack { max-width: min(76%, 720px); min-width: 0; }
.meta { margin-bottom: 6px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.msg.agent .meta { text-align: right; }
.bubble { padding: 12px 16px; border-radius: 3px 10px 10px; border: 1px solid #e4e9f0; background: var(--surface); color: var(--text); font-size: 15px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.agent .bubble { background: #eaf1ff; border-color: #dce6fb; color: #213858; border-radius: 10px 3px 10px 10px; }
.message-image { display: block; max-width: min(240px, 100%); max-height: 320px; object-fit: contain; border-radius: 6px; }
.message-file { color: inherit; text-underline-offset: 3px; font-size: 13px; }
.agent-composer { flex-shrink: 0; padding: 13px 28px 16px; background: var(--surface); border-top: 1px solid var(--border); }
.composer-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--secondary); font-size: 12px; }
.composer-heading span { color: var(--muted); font-size: 11px; }
.input-bar { padding: 10px 12px 9px; border: 1px solid #dce3ed; border-radius: 8px; background: var(--surface); }
.input-bar:focus-within { border-color: #8ba8eb; box-shadow: 0 0 0 2px var(--brand-soft); }
#replyText { display: block; width: 100%; min-height: 56px; max-height: 180px; padding: 0; border: 0; resize: none; outline: none; background: transparent; color: var(--text); font-size: 14px; line-height: 1.7; }
#replyText::placeholder { color: #8b98ab; }
.input-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 7px; }
.input-actions > span { color: var(--muted); font-size: 11px; }
#reply-send { min-width: 78px; min-height: 34px; padding: 6px 20px; border: 0; border-radius: 6px; background: var(--brand); color: white; font-size: 13px; }
#reply-send:hover:enabled { background: var(--brand-hover); }
.reply-status { font-size: 12px; line-height: 1.6; color: var(--success); padding-top: 7px; }
.reply-status.is-error { color: var(--danger); }
.system-msg { display: block; text-align: center; color: var(--muted); font-size: 12px; }
.recall-button { border: 0; background: transparent; padding: 0 0 0 10px; color: var(--muted); font-size: 11px; }
.night-badge { padding: 4px 7px; border-radius: 5px; background: var(--brand-soft); color: var(--secondary); font-size: 11px; }
.note-input { width: 100%; padding: 9px; margin-bottom: 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); resize: vertical; font-size: 13px; }
.search-dialog { width: min(660px, calc(100vw - 32px)); max-height: calc(100dvh - 60px); padding: 22px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.search-dialog::backdrop { background: #19263d55; }
.search-dialog header, .search-dialog form { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.search-dialog h2 { font-size: 17px; }
.search-dialog input { flex: 1; min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 7px; }
.search-dialog .quick { width: auto; margin: 0; }
.search-result { padding: 14px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.search-result h3 { font-size: 14px; }
.search-result p { margin: 8px 0; white-space: pre-wrap; font-size: 13px; }
.search-result small { color: var(--muted); }
@media (max-width: 720px) { .night-badge { display: none; } .participant-copy { min-width: 55px; } .chat-header-actions { gap: 4px; } }
.side { display: none; min-height: 0; min-width: 0; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--border); }
.tools-open .layout { grid-template-columns: 300px minmax(0, 1fr) 310px; }
.tools-open .side { display: block; }
.side-heading { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-bottom: 1px solid var(--border); background: var(--surface); }
.side-heading h2 { font-size: 15px; font-weight: 600; }
.side-heading .icon-button { width: 28px; height: 28px; border: 0; font-size: 20px; }
.card { padding: 20px 18px; border-bottom: 1px solid var(--border); }
.card:last-child { border-bottom: 0; }
.card h3 { margin-bottom: 13px; font-size: 13px; font-weight: 600; }
.card-caption { color: var(--muted); font-size: 11px; margin: -5px 0 12px; }
.info-row { font-size: 12px; line-height: 1.8; color: var(--secondary); }
.info-hint { margin-top: 13px; padding: 10px; font-size: 11px; line-height: 1.9; background: var(--surface-soft); color: var(--secondary); border-radius: 6px; }
.quick { display: block; width: 100%; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; text-align: left; background: var(--surface); color: var(--secondary); font-size: 12px; }
.quick:hover:enabled { border-color: #a5bdee; color: var(--brand); background: var(--brand-soft); }
.quick:disabled { cursor: default; opacity: .5; }
.ticket-item { padding: 11px; margin-bottom: 9px; border: 1px solid var(--border); border-radius: 6px; color: var(--secondary); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.ticket-item span { display: block; margin-top: 6px; font-size: 10px; color: var(--muted); }
.tools-backdrop, .sessions-back { display: none; }
@media (max-width: 1200px) {
.layout, .tools-open .layout { grid-template-columns: 280px minmax(0, 1fr); }
.side { display: block; position: fixed; top: 0; bottom: 0; right: 0; z-index: 51; width: min(330px, 88vw); border-left: 1px solid var(--border); transform: translateX(105%); visibility: hidden; box-shadow: -10px 0 40px #19263d22; transition: transform .2s; }
.tools-open .side { transform: translateX(0); visibility: visible; }
.tools-open .tools-backdrop { display: block; position: fixed; inset: 0; z-index: 50; border: 0; background: #19263d55; }
.chat-header { padding-left: 22px; padding-right: 22px; }
.agent-composer { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 900px) and (min-width: 721px) {
.layout, .tools-open .layout { grid-template-columns: 248px minmax(0, 1fr); }
.list-heading { padding-left: 16px; padding-right: 16px; }
.session-tabs { padding-left: 16px; padding-right: 16px; gap: 17px; }
.tools-toggle span { display: none; }
#chatBox { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 720px) {
.topbar { height: 52px; min-height: 52px; padding: 0 16px; }
.app-identity h1, .nav-divider { display: none; }
.topbar .brand-name { font-size: 14px; }
.topbar-actions { gap: 12px; }
.data-overview summary { font-size: 11px; padding: 5px 8px; }
.stats { width: min(310px, calc(100vw - 32px)); }
.layout, .tools-open .layout { display: flex; flex-direction: column; }
.conv-list { flex: 1; min-height: 0; border-right: 0; }
.list-footer { justify-content: space-between; }
#tools-from-list { display: inline-block; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--secondary); font-size: 11px; }
.list-heading { padding: 20px 18px 15px; }
.session-tabs { padding-left: 18px; }
.list-heading h2 { font-size: 18px; }
.conv-item { padding-top: 16px; padding-bottom: 16px; }
.chat-area { display: none; flex: 1; min-height: 0; }
.chat-view .conv-list { display: none; }
.chat-view .chat-area { display: flex; }
.sessions-back { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 34px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--secondary); font-size: 28px; line-height: 1; }
.participant-avatar { display: none; }
.chat-header { min-height: 65px; padding: 11px 13px 11px 9px; gap: 8px; }
.participant-copy h2 { font-size: 14px; }
.participant-copy p { font-size: 10px; }
.chat-header-actions { gap: 7px; }
.tools-toggle { width: 33px; padding: 6px; }
.tools-toggle span { display: none; }
.close { padding: 6px 8px; font-size: 11px; }
#chatBox { padding: 21px 14px; }
.msg { gap: 7px; margin-bottom: 20px; }
.message-avatar { width: 27px; height: 27px; border-radius: 8px; }
.message-stack { max-width: calc(100% - 40px); }
.bubble { padding: 10px 12px; font-size: 15px; }
.agent-composer { padding: 11px 13px calc(11px + env(safe-area-inset-bottom)); }
.composer-heading { margin-bottom: 6px; font-size: 11px; }
.composer-heading span { font-size: 10px; }
#replyText { font-size: 16px; min-height: 54px; }
.input-actions > span { font-size: 10px; max-width: 210px; }
#reply-send { min-width: 66px; min-height: 38px; padding: 7px 14px; font-size: 12px; }
.reply-status { font-size: 11px; }
}
@media (max-width: 420px) {
.workspace-link { display: none; }
.input-actions > span { max-width: 185px; }
}