:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#192b3c;background:#f6f8fb;font-size:16px;--blue:#1859cf;--line:#e0e6ef}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}#app{display:flex;min-height:100vh}aside{width:248px;flex-shrink:0;background:#10283d;color:#d7e2ed;padding:30px 20px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0}.brand{display:flex;gap:12px;align-items:center;font-size:20px;font-weight:650;margin-bottom:40px}.brand small{display:block;font-size:12px;letter-spacing:2px;color:#9eb3c9;margin-top:5px}.mark{display:grid;place-items:center;width:40px;height:40px;background:#286ae7;color:white;border-radius:10px;font-size:22px}.new{background:#286ae7;color:white;border:0;padding:13px;border-radius:8px;text-align:left}.nav-label{font-size:12px;color:#8ea4bb;margin:30px 10px 12px}.nav{display:block;width:100%;padding:13px 12px;border:0;background:transparent;color:inherit;text-align:left;border-radius:7px;margin:3px 0;font-size:14px}.nav.active{background:#254158;color:white}.sidebar-bottom{margin-top:auto;color:#9eb3c9;font-size:13px;padding-top:20px}main{margin-left:248px;width:calc(100% - 248px);min-height:100vh;display:flex;flex-direction:column}header{height:80px;display:flex;justify-content:space-between;align-items:center;padding:0 40px;border-bottom:1px solid var(--line);background:white}header span{font-size:14px;color:#738298}.welcome{max-width:840px;width:100%;margin:auto;padding:65px 40px}.eyebrow{color:var(--blue);font-size:14px;font-weight:600;letter-spacing:2px}h1{font-size:34px;line-height:1.4;letter-spacing:-1px;margin:18px 0}p{color:#627387;line-height:1.8}.suggestions{display:grid;gap:12px;grid-template-columns:1fr;margin-top:35px}.suggestions button{background:white;border:1px solid var(--line);border-radius:10px;text-align:left;padding:18px 20px;color:#344d68}.suggestions button:hover{border-color:#1859cf;color:#1859cf}.notice{font-size:14px;color:#61758b;padding:16px 0;line-height:1.8}footer{padding:20px 40px 28px;max-width:920px;width:100%;margin:0 auto}footer small{display:block;text-align:center;font-size:12px;color:#7e8c9c;margin-top:12px}.composer{display:flex;align-items:flex-end;gap:16px;padding:16px;background:white;border:1px solid #ccd6e5;border-radius:14px;box-shadow:0 5px 20px #142a4610}textarea{width:100%;resize:vertical;min-height:56px;max-height:180px;border:0;outline:0;line-height:1.7;background:transparent;color:#1d3044}.composer button,.primary{border:0;background:var(--blue);color:white;border-radius:8px;padding:11px 20px;white-space:nowrap}button:focus-visible,a:focus-visible{outline:3px solid #74a5fb;outline-offset:3px}@media(max-width:760px){aside{width:185px;padding:24px 12px}main{margin-left:185px;width:calc(100% - 185px)}header{padding:0 20px}header span{display:none}.welcome{padding:35px 22px}h1{font-size:27px}footer{padding:20px}.brand{font-size:16px}}@media(max-width:520px){#app{display:block}aside{position:relative;width:100%;padding:16px;display:flex;flex-direction:row;flex-wrap:wrap;gap:8px}.brand{margin:0 auto 0 0}.brand small,.nav-label,.sidebar-bottom{display:none}.new{padding:10px}.nav{width:auto;margin:0;padding:9px}.brand .mark{width:32px;height:32px}main{margin:0;width:100%;min-height:80vh}header{height:65px}h1{font-size:25px}}
:root{color-scheme:light}.auth{width:100%;min-height:100vh;display:grid;place-content:center;background:linear-gradient(125deg,#10283d 0%,#163b59 42%,#f2f6fc 42%);padding:35px}.auth-brand .brand{color:white;margin-bottom:28px}.auth-card{background:white;border:1px solid var(--line);border-radius:18px;padding:36px;width:min(480px,calc(100vw - 48px));box-shadow:0 20px 70px #10283d25}.auth-card h1{font-size:28px}.auth-card label,label{display:flex;flex-direction:column;gap:9px;font-size:14px;font-weight:550;margin:20px 0}.auth-card button{width:100%}.auth-card small{display:block;text-align:center;color:#728299;margin-top:22px;font-size:12px}input,select{border:1px solid #ccd6e5;padding:12px;border-radius:8px;background:white;color:#192b3c;width:100%;outline:0}input:focus,select:focus{border-color:#1859cf;box-shadow:0 0 0 3px #1859cf15}label small{font-weight:400;color:#6a7f93;font-size:12px;line-height:1.7}.form-error{color:#b22a36;font-size:14px}#surface{flex:1;min-height:0}.chat-surface{display:flex;flex-direction:column;height:calc(100vh - 80px)}.messages{flex:1;overflow:auto;padding:28px max(24px,calc((100% - 840px)/2));scroll-behavior:smooth}.message{margin:18px 0 30px}.user-message{display:flex;justify-content:flex-end}.bubble{background:#e6effe;padding:14px 20px;border-radius:14px 14px 2px 14px;max-width:85%;line-height:1.8;white-space:pre-wrap}.assistant-label{font-size:14px;font-weight:600;display:flex;align-items:center;gap:9px;margin-bottom:14px}.mini-mark{background:#1859cf;color:white;border-radius:5px;padding:3px 6px;font-size:13px}.answer{padding-left:35px;line-height:1.8}.answer-text{white-space:pre-wrap}.table-scroll{overflow:auto;background:white;border:1px solid var(--line);border-radius:10px;margin:18px 0}table{width:100%;border-collapse:collapse;font-size:14px;text-align:left;white-space:nowrap}th{background:#edf2f9;color:#63778d;font-weight:500}th,td{padding:13px 15px;border-bottom:1px solid #e8edf4}tr:last-child td{border-bottom:0}.unit{font-size:12px;color:#6a7f93}.sources{margin-top:18px;display:flex;flex-wrap:wrap;gap:8px}.source-label{width:100%;font-size:12px;color:#6b7f94}.source{background:#f0f4fa;border:1px solid #dfe7f1;border-radius:7px;color:#42658b;text-align:left;padding:10px 12px;font-size:12px;line-height:1.65;max-width:100%;overflow-wrap:anywhere}.source span{color:#70849b}.choices{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.choices button,.secondary{background:white;border:1px solid #ccd6e5;color:#1859cf;padding:10px 14px;border-radius:8px;font-size:14px}.notes,.evidence{margin:18px 0;border:1px solid var(--line);background:white;border-radius:8px;padding:14px;font-size:14px}.notes p,.evidence p,.source-row p{white-space:pre-wrap;overflow-wrap:anywhere;color:#41586e}.notes summary,.evidence summary{cursor:pointer;color:#365979}.schedule{font-size:14px}.thinking{color:#617b96;font-size:14px;padding:18px}.history-item{display:block;border:0;border-radius:6px;background:none;color:#b8cadd;text-align:left;padding:10px;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.history-item:hover,.history-item.selected{background:#254158;color:white}#history{overflow:auto;max-height:35vh}.history-empty{font-size:12px;color:#8097af;padding:10px}.sidebar-bottom span{display:block}.sidebar-bottom button{color:#afc2d6;background:transparent;border:0;padding:10px 0;font-size:12px}.management{max-width:1100px;padding:34px 40px;margin:0 auto;width:100%}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.section-heading h1{font-size:28px;margin:10px 0}.section-heading p{font-size:14px;margin-top:5px}.count{font-size:13px;white-space:nowrap;color:#647990}.upload-box{border:1px dashed #9cb9dd;border-radius:12px;background:#edf4ff;padding:25px;margin:24px 0}.upload-box p{font-size:14px}.file-button{display:inline-flex;margin:6px 0;background:#1859cf;color:white;border-radius:8px;padding:10px 18px;cursor:pointer}.file-button input{max-width:240px;font-size:12px;background:white;color:#192b3c}#upload-state{white-space:pre-wrap;line-height:1.7;font-size:13px;margin-top:12px}.book-card{display:flex;align-items:center;gap:18px;background:white;border:1px solid var(--line);border-radius:12px;padding:22px;margin-bottom:13px}.file-icon{background:#e5f4ee;color:#217351;padding:15px 10px;border-radius:8px;font-size:12px;font-weight:700}.book-info{flex:1;min-width:0}.book-info strong{font-size:14px;overflow-wrap:anywhere}.book-info p{font-size:13px;margin:7px 0}.book-info small{font-size:12px;color:#8392a4}.badge{font-size:12px;white-space:nowrap;background:#e7effd;color:#245dbc;padding:6px 10px;border-radius:20px}.badge.muted{background:#eef1f5;color:#7a8899}.panel{background:white;border:1px solid var(--line);border-radius:12px;padding:24px;margin:24px 0}.inline-form{display:flex;align-items:flex-end;gap:18px}.inline-form label{flex:1;margin:0}.inline-form button{height:45px}.user-row{display:flex;justify-content:space-between;padding:18px 0;border-bottom:1px solid var(--line);font-size:14px}.user-row:last-child{border:0}.user-row span{color:#6a7f93}.settings{max-width:760px}.settings label:first-child{margin-top:0}.check{flex-direction:row;align-items:center;font-weight:400}.check input{width:18px;height:18px}.form-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}#connection-result{font-size:14px}dialog{border:1px solid var(--line);border-radius:16px;max-width:820px;width:90vw;max-height:85vh;padding:25px;box-shadow:0 25px 100px #10283d40}dialog::backdrop{background:#10283d70}.dialog-top{display:flex;justify-content:space-between;align-items:center}.dialog-top button{background:#eef3f9;border:0;border-radius:7px;width:32px;height:32px;font-size:22px}.source-row{padding:16px;background:#f4f7fb;border-radius:8px;margin:14px 0;font-size:14px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#17354f;color:white;border-radius:9px;padding:15px 24px;max-width:90vw;z-index:100;font-size:14px;box-shadow:0 8px 40px #10283d30}@media(max-width:760px){.management{padding:25px 20px}.inline-form{flex-direction:column;align-items:stretch}.book-card{flex-wrap:wrap;padding:16px}.answer{padding-left:0}.section-heading{align-items:flex-start}}@media(max-width:520px){#history,aside>.nav-label{display:none}.chat-surface{height:auto;min-height:75vh}.messages{max-height:65vh;padding:18px}.auth{background:#10283d}.auth-card{padding:25px}.management{padding:18px}.book-card{gap:10px}.badge{margin-left:52px}.auth-brand .brand{margin:0 0 25px}.inline-form{gap:15px}}

.history-card{display:block;width:100%;background:white;text-align:left;padding:18px 4px;border:0;border-bottom:1px solid var(--line);color:#263d55}.history-card small{display:block;color:#7a8b9e;margin-top:8px;font-size:12px}@media(max-width:520px){.sidebar-bottom{display:flex;width:100%;align-items:center;justify-content:space-between;margin-top:0;padding-top:4px}.sidebar-bottom span{display:block;font-size:12px}.sidebar-bottom button{padding:4px 0}}

.employee-actions{display:flex;align-items:center;gap:12px}.employee-actions button{background:white;border:1px solid #ccd6e5;color:#1859cf;border-radius:6px;padding:6px 10px;font-size:14px}.employee-actions .danger{color:#b33340;border-color:#ebc7cb}#employee-dialog{max-width:480px}.user-row{gap:16px;align-items:center}.user-row strong{flex:1;min-width:0;overflow-wrap:anywhere}.user-row .employee-actions{flex:0 0 auto;flex-wrap:nowrap}.user-row .employee-actions select{width:200px;flex:0 0 200px}.user-row .employee-actions button{flex:0 0 auto;white-space:nowrap;min-width:58px}
@media(max-width:760px){.user-row{align-items:flex-start;flex-wrap:wrap}.user-row .employee-actions{width:100%;justify-content:flex-end}.user-row .employee-actions select{width:min(200px,100%);flex-basis:min(200px,100%)}}

#image-preview{display:flex;gap:12px;padding:8px 0}.image-preview{position:relative}.image-preview img{width:100px;height:80px;object-fit:contain;border:1px solid #dce3ed;border-radius:8px}.image-preview button{position:absolute;right:0;top:0;padding:0 6px}.chat-image{display:block;max-width:320px;max-height:260px;margin-top:10px;border-radius:8px}.composer #attach-image{flex-shrink:0;background:#eef3ff;color:#1654d3;font-size:14px}

/* Model-authored tables stay within the message on narrow screens. */
.answer-text{min-width:0;white-space:normal;overflow-wrap:anywhere}
.answer-text .table-scroll{max-width:100%;overflow-x:auto;margin:12px 0}
.answer-text table{width:100%;border-collapse:collapse}
.answer-text th,.answer-text td{vertical-align:top}
@media(max-width:760px){.answer-text th,.answer-text td{padding:8px 10px;font-size:14px}.answer-text table{min-width:0}}

/* Contain employee usage columns and wrap long quota descriptions. */
.employee-usage-panel{min-width:0;max-width:100%}
.employee-usage-scroll{width:100%;max-width:100%;overflow-x:auto}
.employee-usage-table{table-layout:fixed;width:100%;min-width:960px;white-space:normal}
.employee-usage-table th,.employee-usage-table td{white-space:normal;overflow-wrap:anywhere;vertical-align:top;line-height:1.65;padding:12px}
.employee-usage-table th:first-child{width:17%}
.employee-usage-table th:nth-child(2){width:10%}
.employee-usage-table th:last-child{width:13%}
.employee-usage-table button{display:block;max-width:100%;white-space:normal;margin:0 0 6px}
@media(max-width:760px){.employee-usage-panel{padding:12px}}

.settings-nav{margin:8px 0}.settings-nav summary{cursor:pointer;padding:13px 12px;font-size:14px;border-radius:7px;color:#d7e2ed}.settings-nav summary:hover{background:#254158}.settings-children{margin-left:16px;padding-left:8px;border-left:1px solid #3c556b}.settings-children .nav{font-size:13px}
.usage-bar{display:block;min-width:2px;height:10px;border-radius:5px;background:#1859cf}

.conversation-list-row{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line)}.conversation-list-row:last-child{border-bottom:0}.conversation-list-row .history-card{flex:1;min-width:0;overflow-wrap:anywhere}.conversation-list-row>button:last-child{flex-shrink:0}

.settings-nav{margin:3px 0}.settings-nav summary{list-style:none;display:block;width:100%;padding:13px 12px;font-size:14px;font-weight:400;border-radius:7px;color:inherit}.settings-nav summary::-webkit-details-marker{display:none}.settings-nav summary::marker{content:""}.settings-nav summary:focus-visible{outline:2px solid #9eb3c9;outline-offset:2px}

/* 价表只读浏览：宽表在自身容器滚动，不撑开页面。 */
.price-management{max-width:1600px;min-width:0}
.price-tabs,.price-actions,.price-pagination{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:18px 0}
.price-filters{display:grid;gap:14px;background:white;border:1px solid var(--line);border-radius:12px;padding:20px}
.price-filters label{margin:0;min-width:0}.price-filters input,.price-filters select{min-width:0}
.price-actions{grid-column:1/-1;margin:0}
.price-hint{font-size:13px}.price-result-heading{display:flex;gap:15px;justify-content:space-between;flex-wrap:wrap;font-size:14px}
/* 内容按单行自然展开，在表格容器内横向及纵向滚动。 */
.price-table{max-width:100%;overflow:auto}
.price-table table{width:max-content;min-width:100%}
.price-table th,.price-table td{white-space:nowrap}
.price-table td{min-width:105px;vertical-align:middle;line-height:1.6}
.price-table td br{display:none}
.price-table td small{display:inline;margin-left:8px}
.price-table .price-amount{font-weight:650;font-variant-numeric:tabular-nums}
.price-status{display:inline-block;padding:3px 8px;border-radius:5px;font-size:12px;white-space:nowrap}
.price-status.active{background:#e5f4ee;color:#176342}.price-status.future{background:#e7effd;color:#245dbc}.price-status.expired{background:#eef1f5;color:#637080}
.price-detail{display:grid;grid-template-columns:145px 1fr;gap:10px;font-size:14px;line-height:1.7}.price-detail dt{color:#627387}.price-detail dd{margin:0;overflow-wrap:anywhere}
.price-notes{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:14px;line-height:1.8;color:#41586e}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:760px){.price-filters{padding:14px}.price-detail{grid-template-columns:100px 1fr}.price-pagination{justify-content:space-between}}

.price-table{max-height:65vh;min-height:180px}
.price-table thead th{position:sticky;top:0;z-index:1}.price-table td:nth-child(8){min-width:160px}
.price-table td:last-child,.price-table th:last-child{position:sticky;right:0;background:white;border-left:1px solid var(--line)}
.price-table th:last-child{background:#edf2f9;z-index:2}
@media(max-width:520px){.price-filters input,.price-filters select{padding:10px 7px}.price-table{max-height:60vh}}

.price-table button{white-space:nowrap}.price-table td:last-child,.price-table th:last-child{min-width:120px}

/* 筛选按业务顺序固定为两行，窄屏按原顺序折行。 */
.price-filter-row{display:grid;gap:14px;min-width:0}
.price-filter-main{grid-template-columns:1.4fr repeat(4,minmax(0,1fr))}
.price-filter-dates{grid-template-columns:repeat(2,minmax(0,1fr))}
.price-list-controls{display:flex;gap:14px;flex-wrap:wrap;justify-content:flex-end;margin:16px 0}
.price-list-controls label{margin:0;min-width:100px}
@media(max-width:1000px){.price-filter-main{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.price-filter-main,.price-filter-dates{grid-template-columns:repeat(2,minmax(0,1fr))}.price-filter-main label:first-child{grid-column:1/-1}.price-list-controls{justify-content:flex-start}}

/* 筛选输入框保留输入能力，并提供始终可见的下拉按钮。 */
.price-picker{position:relative;display:block}
.price-picker input{width:100%;padding-right:36px}
.price-picker input::-webkit-calendar-picker-indicator{display:none!important}
.price-picker button{position:absolute;right:1px;top:1px;bottom:1px;width:32px;padding:0;background:transparent;border:0;color:var(--muted);border-radius:8px;font-size:20px}
.price-picker button:disabled{cursor:not-allowed;opacity:.4}

/* 航线超过参考文本宽度时换行，其余列继续单行显示。 */
.price-route{display:block;width:var(--price-route-width,26ch);white-space:normal;overflow-wrap:anywhere}

.price-table td .price-route-break{display:initial}

.price-page-jump{display:flex;align-items:center;gap:8px;margin:0}
.price-page-jump label{margin:0}
.price-page-jump input{width:80px;min-width:0}

/* 桌面端采用 80% 显示密度；窄屏保留原尺寸，便于阅读和触控。
   zoom 会同时缩小 vh/vw 尺寸，因此视口容器乘以 1.25，保持满屏和弹窗边界。 */
@media (min-width: 761px) {
  :root { zoom: 0.8; }
  #app, main, .auth { min-height: 125vh; }
  .chat-surface { height: calc(125vh - 80px); }
  #history { max-height: 43.75vh; }
  .price-table { max-height: 81.25vh; }
  .auth-card { width: min(480px, calc(125vw - 48px)); }
  dialog { width: 112.5vw; max-height: 106.25vh; }
  #toast { max-width: 112.5vw; }
}

/* 数据查询操作区：文字与按钮留出间距，两个操作使用相同高度和中性样式。 */
.business-filter-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 28px;
}
.business-filter-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.business-filter-buttons button {
  height: 40px;
  padding: 0 16px;
  border: 1px solid #ccd6e5;
  border-radius: 6px;
  background: #f6f8fb;
  color: #192b3c;
  line-height: 1.2;
  white-space: nowrap;
}
.business-filter-buttons button:hover:not(:disabled) {
  background: #eef1f5;
}
/* 员工账号固定五列；缺少删除按钮时保留单元格，不挤压其他控件。 */
.employee-list-panel{padding:16px 24px}
.employee-list-scroll{overflow-x:auto}
.employee-account-table{table-layout:fixed;min-width:720px;width:100%}
.employee-account-table .account-name-col{width:auto}
.employee-account-table .account-role-col{width:220px}
.employee-account-table .account-rename-col{width:90px}
.employee-account-table .account-password-col{width:120px}
.employee-account-table .account-delete-col{width:90px}
.employee-account-table td{vertical-align:middle;padding:18px 10px}
.employee-account-table td:first-child{white-space:normal;overflow-wrap:anywhere}
.employee-account-table select{width:100%;min-width:0}
.employee-account-table button{white-space:nowrap;background:white;border:1px solid #ccd6e5;color:#1859cf;border-radius:6px;padding:8px 12px;font-size:14px}
.employee-account-table button.danger{color:#b33340;border-color:#ebc7cb}
.employee-account-table .account-placeholder{display:block;text-align:center;color:#8b97a5}
.role-permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:32px}
.module-checks{border:1px solid #dce3ec;border-radius:8px;padding:16px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.module-checks label{margin:0;display:flex;flex-direction:row;align-items:center;gap:8px}
.module-checks input{width:18px;height:18px;flex:0 0 18px}
.role-note,.permission-result{font-size:13px;line-height:1.6}
.permission-result{color:#b33340}
.role-permission-grid button{white-space:nowrap;margin-top:16px}
@media(max-width:900px){.role-permission-grid{grid-template-columns:1fr}.employee-list-panel{padding:12px}}

/* 资料录入沿用管理页布局；批量输入与结果长文本在窄窗口中可读。 */
#entry-form textarea{width:100%;box-sizing:border-box;min-height:110px;resize:vertical;padding:12px;border:1px solid var(--line);border-radius:8px;font:inherit;background:#fff}
.entry-workspace .table-scroll{max-width:100%;overflow-x:auto}
.entry-workspace table{width:100%;border-collapse:collapse;font-size:14px}
.entry-workspace th,.entry-workspace td{padding:12px 10px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}
.entry-workspace th{background:#f4f7fb}
.entry-workspace progress{width:100%;height:12px}
.entry-workspace td:last-child{min-width:160px;white-space:pre-wrap}
