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

118 lines
6.2 KiB
CSS

/* Shared visual tokens and accessible controls. */
:root {
color-scheme: light;
--page: #edf1f7;
--surface: #ffffff;
--surface-soft: #f6f8fc;
--surface-hover: #edf2fa;
--text: #19263d;
--secondary: #566780;
--muted: #64748b;
--border: #e2e8f1;
--brand: #315fd5;
--brand-hover: #254fbe;
--brand-soft: #edf2ff;
--brand-text: #315fd5;
--success: #148462;
--success-soft: #eaf7f1;
--danger: #c74650;
--danger-soft: #fff0f1;
--shadow: 0 10px 40px rgba(28, 47, 80, .06);
}
body.dark {
color-scheme: dark;
--page: #0c1422;
--surface: #151f30;
--surface-soft: #1a273c;
--surface-hover: #21314b;
--text: #e7eef9;
--secondary: #b2c0d5;
--muted: #95a5bd;
--border: #2a3a53;
--brand: #426bd4;
--brand-hover: #4772db;
--brand-soft: #223759;
--brand-text: #a6c2ff;
--success: #75d7b3;
--success-soft: #193b35;
--danger: #ff9ca4;
--danger-soft: #412b38;
--shadow: 0 10px 40px rgba(0, 0, 0, .2);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
color: var(--text);
background: var(--page);
font-size: 14px;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button, input, textarea, a { outline-offset: 3px; }
:focus-visible { outline: 3px solid #92b3ff; }
button { transition: background .16s, border-color .16s, color .16s, box-shadow .16s; }
a { color: var(--brand-text); }
h1, h2, h3, h4, p { margin: 0; }
svg { display: block; flex-shrink: 0; }
[hidden] { display: none !important; }
::selection { background: #cddcff; color: #122b59; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand-mark {
display: grid; place-items: center; width: 38px; height: 38px;
background: var(--brand); color: white; border-radius: 11px; flex-shrink: 0;
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .02em; line-height: 1.3; }
.brand-caption { display: block; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .12em; margin-top: 3px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--brand-text); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: inline-block; flex-shrink: 0; }
.icon-button {
display: inline-grid; place-items: center; width: 36px; height: 36px;
border: 1px solid var(--border); border-radius: 9px; color: var(--secondary); background: var(--surface);
}
.icon-button:hover { color: var(--brand-text); background: var(--brand-soft); }
.text-button { border: 0; padding: 5px 0; background: transparent; color: var(--brand-text); font-size: 12px; }
.emoji-control { position: relative; flex-shrink: 0; }
.emoji-picker { position: absolute; bottom: calc(100% + 12px); left: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); width: 230px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.emoji-picker button { border: 0; border-radius: 6px; background: transparent; font-size: 22px; padding: 6px; }
.emoji-picker button:hover { background: var(--surface-hover); }
.attachment-unavailable { display: block; max-width: 260px; padding: 12px; border: 1px dashed var(--border); border-radius: 8px; background: var(--surface-soft); color: var(--secondary); font-size: 12px; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.empty-caption { color: var(--muted); font-size: 12px; line-height: 1.8; }
.app-modal-overlay {
position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
overflow-y: auto; padding: 20px; background: rgba(18, 33, 56, .42);
}
.app-modal {
width: min(420px, 100%); max-height: min(80dvh, 680px); overflow-y: auto;
padding: 22px; border: 1px solid var(--border); border-radius: 14px;
background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.app-modal-title { margin: 0; font-size: 18px; line-height: 1.4; }
.app-modal-message { margin-top: 9px; color: var(--secondary); font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.app-modal-input { display: block; width: 100%; min-height: 44px; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; line-height: 1.6; }
textarea.app-modal-input { min-height: 112px; resize: vertical; }
.app-modal-input:focus { outline: 3px solid var(--brand-soft); border-color: var(--brand); }
.app-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.app-modal-actions button { min-width: 80px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--secondary); cursor: pointer; }
.app-modal-actions .app-modal-confirm { border-color: var(--brand); background: var(--brand); color: #fff; }
.app-modal-actions button:hover { background: var(--surface-hover); color: var(--text); }
.app-modal-actions .app-modal-confirm:hover { background: var(--brand-hover); color: #fff; }
.app-modal-actions button:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: #b7c3d5; border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 520px) {
.app-modal-overlay { align-items: end; padding: 16px; }
.app-modal { width: 100%; max-height: min(85dvh, 680px); padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 14px 14px 10px 10px; }
.app-modal-actions button { flex: 1; }
}