:root{color:#1f2026;background:#f7f8fb;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;--surface: #ffffff;--panel: #f2f3f6;--panel-strong: #ebecef;--border: #dde1e7;--muted: #7a7f8c;--text: #1f2026;--dark: #1f2026;--blue: #0b7ff3;--green: #28a866;--red: #df4a45;--yellow: #b9790f;--radius: 8px}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:#f7f8fb}button,input,textarea,select{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button:not(:disabled),a[href],select,input[type=date]{cursor:pointer}a{color:inherit;text-decoration:none}.screen-loader,.callback-page{min-height:100vh;display:grid;place-items:center;color:var(--muted)}.login-page{min-height:100vh;position:relative;overflow:hidden;padding:52px 52px 14px;background:#f4f7fb}.login-brand,.brand-block{display:flex;align-items:center;gap:14px}.login-brand{position:relative;z-index:1}.brand-mark{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:var(--dark);color:#fff;font-size:22px;font-weight:800}.brand-title{font-size:20px;font-weight:800}.brand-subtitle,.muted-text{color:var(--muted)}.login-auth-pill{position:absolute;top:58px;right:100px;padding:14px 26px;border:1px solid var(--border);border-radius:999px;background:#ffffffd9;color:#6b707b;font-weight:700}.login-panel{width:min(600px,calc(100vw - 40px));min-height:min(660px,calc(100vh - 130px));margin:34px auto 0;padding:34px 52px 30px;border:1px solid var(--border);border-radius:32px;background:var(--surface);box-shadow:0 24px 60px #2d35441f;display:flex;flex-direction:column;align-items:center;gap:20px}.login-panel.compact{min-height:0;margin:0;padding:56px}.login-panel-copy{text-align:center}.login-panel h1{margin:0 0 20px;font-size:34px;letter-spacing:0}.login-panel p{margin:0;color:#6d7280;line-height:1.8}.qr-box{width:300px;height:400px;border:1px solid var(--border);border-radius:24px;display:grid;place-items:center;overflow:hidden}.qr-box iframe{width:300px!important;height:400px!important;display:block;border:0}.qr-placeholder{color:var(--muted);font-weight:700}.login-fallback{padding:10px 18px;border-radius:999px;background:#e8f7ee;color:#16804c;font-weight:800}.app-shell{height:100vh;min-height:0;display:grid;grid-template-columns:280px 1fr;gap:28px;padding:48px;overflow:hidden}.sidebar{height:100%;min-height:0;padding:28px 22px;border:1px solid var(--border);border-radius:20px;background:var(--surface);box-shadow:0 16px 40px #181d260d;display:flex;flex-direction:column}.sidebar .brand-mark{width:40px;height:40px;font-size:18px}.sidebar .brand-title{font-size:17px}.sidebar-nav{margin-top:42px;display:grid;gap:14px}.nav-link,.nav-group-title{min-height:56px;display:flex;align-items:center;gap:12px;padding:0 18px;border-radius:var(--radius);color:#6a6f7c;font-weight:800}.nav-group-title{width:100%;border:0;cursor:pointer;font:inherit}.nav-group-title svg{transition:transform .16s ease}.nav-group.open .nav-group-title svg{transform:rotate(180deg)}.nav-group-children{display:grid;gap:8px;margin-top:8px}.nav-link.active{background:var(--dark);color:#fff}.nav-link:not(.active):hover,.nav-group-title{background:#f0f1f4;color:var(--text)}.nav-link.nested{margin-left:28px;min-height:48px}.nav-group-title{justify-content:space-between}.sidebar-user{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:20px;border-top:1px solid var(--border)}.sidebar-user-name{font-weight:800}.sidebar-user-role{color:var(--muted);font-size:13px}.main-surface{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.page-header{min-height:74px;display:flex;align-items:center;justify-content:space-between;gap:20px}.page-header h1{margin:0;font-size:38px;letter-spacing:0}.page-actions{display:flex;align-items:center;gap:12px}.work-panel{flex:1;min-height:0;padding:26px 30px;border:1px solid var(--border);border-radius:20px;background:var(--surface);display:flex;flex-direction:column;overflow:hidden}.panel-title-row{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.panel-title-row h2,.conversation-header h2,.ticket-list-panel h2{margin:0;font-size:24px;letter-spacing:0}.primary-button,.dark-button,.ghost-button,.danger-button,.icon-button,.text-link{border:0;cursor:pointer;font-weight:800;transition:transform .15s ease,background .15s ease,color .15s ease,border-color .15s ease}.primary-button,.dark-button,.ghost-button.with-icon{min-height:52px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 22px;border-radius:999px}.primary-button{background:var(--blue);color:#fff}.dark-button{background:var(--dark);color:#fff}.dark-button:disabled,.primary-button:disabled,.ghost-button:disabled,.page-dot:disabled{opacity:.45;cursor:not-allowed}.ghost-button{min-height:44px;padding:0 18px;border-radius:999px;background:#f4f5f7;color:var(--text);display:inline-flex;align-items:center;justify-content:center;gap:8px;line-height:1}.danger-button{min-height:44px;padding:0 12px;background:transparent;color:var(--red);display:inline-flex;align-items:center;justify-content:center;line-height:1}.icon-button{width:40px;height:40px;border-radius:999px;display:grid;place-items:center;background:#f3f4f6;color:#6a6f7c}.icon-button.large{width:48px;height:48px}.primary-button:not(:disabled):hover,.dark-button:not(:disabled):hover,.ghost-button:not(:disabled):hover,.danger-button:hover,.icon-button:hover,.text-link:hover{transform:translateY(-1px)}.file-list{flex:1;min-height:0;display:grid;gap:12px;align-content:start;overflow:visible}.file-row{min-height:68px;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:18px;padding:0 20px;border-radius:14px;background:#f1f2f4}.file-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;font-weight:800}.row-actions{display:inline-flex;align-items:center;gap:14px}.table-footer{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:28px;color:#7c818c}.pagination{display:inline-flex;align-items:center;gap:8px}.page-dot{width:42px;height:42px;border:0;border-radius:50%;background:#f3f4f7;color:var(--text);font-weight:900}.page-dot.active{background:var(--dark);color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;display:grid;place-items:center;padding:20px;background:#12141a59}.modal{width:min(760px,calc(100vw - 32px));max-height:calc(100vh - 40px);overflow:auto;padding:34px 30px 24px;border:1px solid var(--border);border-radius:24px;background:var(--surface)}.modal-header,.modal-footer{display:flex;align-items:center;justify-content:space-between;gap:16px}.modal-header h2{margin:0;font-size:32px}.modal-body{margin-top:24px}.modal-footer{justify-content:flex-end;margin-top:24px}.upload-zone{min-height:208px;display:grid;place-items:center;gap:14px;padding:28px;border:1px solid var(--border);border-radius:16px;background:#f4f5f8;font-weight:800;cursor:pointer}.upload-zone small{max-width:100%;color:var(--muted);font-weight:600;line-height:1.6;text-align:center;word-break:break-all}.upload-zone input{display:none}.success-box{margin-top:22px;display:flex;gap:14px;padding:20px;border:1px solid #24a765;border-radius:16px;background:#ecfaf2;color:#1d8b52}.success-box span{display:block;margin-top:6px;color:#6b7a72}.field,.filter-control{display:grid;gap:10px}.field span,.filter-control span{color:#8a8f99;font-weight:800}.field input,.field textarea,.filter-control input,.filter-control select{width:100%;border:1px solid var(--border);border-radius:var(--radius);background:#f5f6f8;color:var(--text);outline:none}.field input,.filter-control input,.filter-control select{min-height:48px;padding:0 16px}.field textarea{resize:vertical;padding:16px;line-height:1.7}.field+.field{margin-top:20px}.form-error{margin:16px 0;padding:14px 16px;border-radius:var(--radius);background:#fff0ef;color:#b43632;font-weight:700}.empty-state{padding:34px;text-align:center;color:var(--muted)}.data-table{display:grid;gap:10px;min-width:960px}.table-scroll{flex:1;min-height:0;overflow:auto;padding-bottom:2px}.table-row{min-height:58px;display:grid;align-items:center;gap:14px;padding:0 18px;border:1px solid var(--border);border-radius:12px;background:#fff}.table-row>*{min-width:0}.table-row>span,.table-row>strong,.table-row>a{overflow:hidden;text-overflow:ellipsis}.table-head{min-height:48px;border:0;background:#f0f1f4;color:#8a8f99;font-weight:900}.faq-items-table .table-row{grid-template-columns:minmax(240px,1fr) minmax(280px,1.2fr) 170px}.ai-table .table-row{grid-template-columns:minmax(220px,1fr) minmax(360px,1.6fr) 180px 130px}.ticket-table .table-row{grid-template-columns:120px minmax(170px,1.2fr) minmax(120px,.9fr) 150px 150px 150px 100px 140px 100px}.ticket-table{min-width:1280px}.ticket-table .text-link{justify-self:start;white-space:nowrap}.line-clamp{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;color:#6d7280;line-height:1.45}.filter-row{flex-shrink:0;display:flex;align-items:end;gap:12px;margin-bottom:20px;flex-wrap:wrap}.filter-control{min-width:210px}.filter-control.compact{min-width:170px}.status-badge{width:max-content;height:38px;display:inline-grid;place-items:center;padding:0 16px;border-radius:999px;font-weight:900;line-height:38px;justify-self:start;white-space:nowrap}.status-badge-text{display:inline-block;line-height:38px}.ticket-waiting{background:#fff3dd;color:var(--yellow)}.ticket-processing{background:#e7f2ff;color:var(--blue)}.ticket-closed,.feedback-useful{background:#e7f8ee;color:var(--green)}.ticket-unreplied_closed,.feedback-useless{background:#ffeceb;color:var(--red)}.status-badge.muted{background:#f1f2f5;color:#7c818c}.text-link{color:var(--blue);background:transparent}.service-desk{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:24px}.main-surface:has(.service-desk) .page-header{min-height:58px}.main-surface:has(.service-desk) .page-header h1{font-size:30px}.conversation-panel,.ticket-list-panel{height:100%;min-height:0;border:1px solid var(--border);border-radius:20px;background:var(--surface)}.conversation-panel{padding:22px 24px 20px;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:14px}.conversation-header{display:flex;align-items:start;justify-content:space-between;gap:14px}.conversation-header h2{font-size:20px}.conversation-header>div>span{display:block;margin-top:4px;color:var(--muted);font-size:14px}.message-board{min-height:0;padding:18px;border-radius:16px;background:#f0f1f4;overflow:auto}.message-line{display:flex;margin-bottom:10px}.message-line:last-child{margin-bottom:0}.message-line.user{justify-content:flex-start}.message-line.staff,.message-line.ai{justify-content:flex-end}.message-line.system{justify-content:center}.message-bubble{width:min(620px,72%);padding:12px 16px;border:1px solid var(--border);border-radius:14px;background:#fff;display:grid;align-content:center;gap:6px}.message-line.staff .message-bubble{background:#e7f2ff}.message-line.system .message-bubble{width:auto;background:#f7f8fb;text-align:center}.message-bubble strong{display:block;margin-bottom:0;color:#8a8f99}.message-line.staff .message-bubble strong{color:var(--blue)}.message-bubble p{margin:0;line-height:1.55}.message-bubble time{display:block;margin-top:0;color:#9aa0aa;font-size:12px}.reply-box{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 14px;border-radius:16px;background:#f1f2f5}.reply-box textarea{min-height:48px;padding:10px 0;border:0;resize:none;background:transparent;outline:none;line-height:1.6}.reply-actions{display:inline-flex;align-items:center;gap:10px}.ticket-list-panel{padding:22px;display:flex;flex-direction:column;overflow:hidden}.ticket-card-list{flex:1;min-height:0;margin-top:18px;padding:2px 0 0;display:grid;align-content:start;gap:16px;overflow:hidden}.ticket-card{width:100%;min-height:112px;padding:18px 20px;border:1px solid var(--border);border-radius:16px;background:#fff;text-align:left;cursor:pointer;display:grid;align-content:start;gap:12px}.ticket-card.active{border-color:#cbd8e8;background:#f7fbff}.ticket-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.ticket-card-head strong{min-width:0;line-height:1.1}.ticket-card .status-badge{flex-shrink:0;height:34px;padding:0 14px;font-size:14px;line-height:34px}.ticket-card .status-badge-text{line-height:34px}.ticket-card-staff,.ticket-card-time{display:block;margin:0;color:#777d89;font-size:15px;line-height:1.55}.ticket-card-time{color:#858b96}.ticket-list-footer{flex-shrink:0;display:flex;justify-content:flex-end;margin-top:20px}.mobile-only,.mobile-drawer{display:none}@media (max-width: 1180px){.app-shell{grid-template-columns:230px 1fr;padding:28px}.sidebar{min-height:calc(100vh - 56px)}.service-desk{grid-template-columns:minmax(0,1fr)}.service-desk>.ticket-list-panel{display:none}.mobile-only{display:inline-flex}.mobile-drawer{position:fixed;top:0;right:0;bottom:0;left:0;z-index:30;display:block}.drawer-scrim{position:absolute;top:0;right:0;bottom:0;left:0;border:0;background:#14161c40}.mobile-drawer .ticket-list-panel{position:absolute;top:0;right:0;width:min(420px,84vw);min-height:100vh;border-radius:20px 0 0 20px}}@media (max-width: 820px){.login-page{padding:26px}.login-auth-pill{display:none}.login-panel{min-height:620px;margin-top:72px;padding:54px 26px;border-radius:24px}.login-panel h1{font-size:30px}.app-shell{display:block;height:auto;min-height:100vh;overflow:visible;padding:18px}.sidebar{height:auto;min-height:0;margin-bottom:18px}.sidebar-nav{margin-top:24px}.main-surface{display:block;overflow:visible}.page-header{align-items:flex-start;flex-direction:column}.page-header h1{font-size:32px}.work-panel{display:block;min-height:auto;overflow:visible;padding:18px}.file-row{grid-template-columns:1fr;padding:18px}.table-footer,.reply-box{align-items:stretch;flex-direction:column}.reply-box{grid-template-columns:1fr}.reply-actions{justify-content:flex-end;flex-wrap:wrap}.conversation-panel{min-height:calc(100vh - 220px);padding:18px}.message-board{min-height:460px;padding:16px}.message-bubble{width:86%}}
