/* Shared theme applied directly to the original page containers. */
:root{--primary:#d45b35;--primary-light:#e77a55;--secondary:#b94a2b;--accent:#d45b35;--bg:#f6f7f9;--card-bg:#fff;--text:#26313f;--text-light:#727e8c;--text-muted:#727e8c;--border:#e5e9ee;--site-shadow:0 4px 20px #25304405}
*{box-sizing:border-box}body.site-body{margin:0!important;padding:24px!important;display:block!important;background:var(--bg)!important;color:var(--text);font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;min-height:100vh;overflow-x:hidden!important}button,input,select,textarea{font:inherit}a{color:inherit}button,a,input,select,textarea{outline-offset:4px}button:focus-visible,a:focus-visible{outline:3px solid #efad93}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}
.site-topbar{position:sticky;top:0;height:64px;margin:-24px -24px 24px;background:white;border-bottom:1px solid var(--border);z-index:1040;display:flex;align-items:center;gap:24px;padding:0 24px}.site-brand{font-size:17px;font-weight:700;text-decoration:none;white-space:nowrap}.site-brand-mark{display:inline-grid;place-items:center;width:35px;height:35px;border-radius:10px;background:var(--primary);color:white}.site-tools{position:relative}.site-tools summary{cursor:pointer;font-size:13px;color:var(--text-light)}.site-nav{position:absolute;top:32px;left:0;width:240px;max-height:70vh;overflow:auto;border:1px solid var(--border);border-radius:10px;background:white;box-shadow:0 10px 30px #26313f20;padding:8px}.site-nav-link{display:block;padding:10px 12px;text-decoration:none;font-size:13px;border-radius:6px}.site-nav-link:hover,.site-nav-link.active{background:#fdf0eb;color:var(--primary)}.site-account{margin-left:auto;display:flex;align-items:center;gap:16px;font-size:12px}.site-account small{display:block;color:var(--text-light);font-size:10px}.site-logout{border:0;background:transparent;color:var(--text-light);padding:8px}.site-page-heading{margin:0 0 24px}.site-page-heading h1{font-size:26px;font-weight:650;margin:0 0 10px}.site-page-heading p{font-size:13px;color:var(--text-light);line-height:1.8;margin:0}.site-eyebrow{font-size:10px;color:#a2a9b2;letter-spacing:1.5px;margin-bottom:9px}
body.site-body:not(.site-business)>div,body.site-body:not(.site-business)>section,body.site-body:not(.site-business)>.site-note{max-width:1200px;margin-left:auto;margin-right:auto}
/* Original widgets, headers and functional sidebars retain their own DOM. */
body.site-business .bg-shapes,body.site-business .particles,body.site-business .back-link,body.site-business #btnHome,body.site-business #btnLogout{display:none!important}
body.site-business .content-layer{position:relative!important;z-index:auto!important;width:100%!important;max-width:1200px!important;margin:0 auto!important}
body.site-business .page-wrap,body.site-business .container-main,body.site-business>.main-content,body.site-business .page-container{width:100%!important;max-width:1200px!important;margin:0 auto!important;padding:0!important}
body.site-business .app-header{position:static!important;display:flex!important;background:transparent!important;box-shadow:none!important;border:0!important;padding:0 0 24px!important;margin:0 auto!important;max-width:1200px!important;color:var(--text)!important}
body.site-business .app-header h1,body.site-business .app-header h2,body.site-business .app-header .header-title,body.site-business .page-title{font-size:26px!important;color:var(--text)!important;background:none!important;-webkit-text-fill-color:initial!important}
body.site-business .header-icon{background:var(--primary)!important;box-shadow:none!important}
body.site-business .card,body.site-business .data-card,body.site-business .table-container,body.site-business .latest-card,body.site-business .belt-card,body.site-business .main-container,body.site-business[data-page=upload]>.container{border:1px solid var(--border)!important;border-radius:10px!important;box-shadow:var(--site-shadow)!important;background:white!important;backdrop-filter:none!important}
body.site-business .data-card,body.site-business .main-container{margin:0 auto!important;max-width:1200px!important;width:100%!important;padding:24px!important}
body.site-business .header-buttons{display:flex!important;flex-wrap:wrap}
body.site-business [class*="btn-primary-grad"],body.site-business .btn-primary{background:var(--primary)!important;border-color:var(--primary)!important;box-shadow:none!important}
body.site-business .table th{background:#fafbfc!important;color:#758090!important}
body.site-business .page-header{padding:0 0 20px!important}body.site-business .page-sub{color:var(--text-light)!important}
body.site-business[data-page=converter] .app-body{min-height:620px!important;max-width:1200px!important;margin:0 auto!important}
body.site-business[data-page=upload]>.container{max-width:1200px!important;padding:24px!important}
body.site-chat{padding:0!important}body.site-chat .site-topbar{margin:0!important}body.site-chat .content-layer{height:calc(100dvh - 64px)!important;max-width:none!important}body.site-chat .app-layout{height:100%!important;width:100%!important;max-width:none!important;min-height:0!important;margin:0!important;position:relative!important}body.site-chat .sidebar{z-index:1020!important}body.site-chat .main-area{min-width:0}body.site-chat .chat-header{background:white!important;box-shadow:none!important;border-bottom:1px solid var(--border)!important}
.site-toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;margin:0 0 22px;flex-wrap:wrap}.site-search{position:relative;max-width:340px;flex:1;min-width:180px}.site-search input{width:100%;height:39px;border:1px solid var(--border);background:#fff;border-radius:8px;padding:0 14px 0 36px;color:#394453;font-size:12px}.site-search span{position:absolute;left:14px;top:10px;color:#98a1ad}.site-count{font-size:11px;color:#8a94a1}.site-section-heading{display:flex;gap:10px;align-items:center;margin:30px 0 15px;font-size:13px;font-weight:650;color:#485463}.site-section-heading span{font-size:10px;font-weight:400;color:#a1aab6}.site-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.site-card{background:#fff;border:1px solid var(--border);border-radius:11px;padding:22px;text-decoration:none;display:flex;flex-direction:column;min-height:154px;box-shadow:var(--site-shadow);transition:transform .15s,border-color .15s}.site-card:hover{transform:translateY(-3px);border-color:#ddad97}.site-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:19px}.site-card-icon{height:35px;width:35px;background:#fdf1eb;border-radius:10px;display:grid;place-items:center;font-size:18px}.site-card-arrow{color:#c3c9d1;font-size:17px}.site-card h3{font-size:14px;font-weight:650;margin:0 0 6px;color:#33404f}.site-card p{font-size:11px;color:#939daa;margin:0;line-height:1.7}.site-empty{padding:42px 20px;text-align:center;color:#8a94a1;font-size:13px;background:white;border:1px dashed var(--border);border-radius:10px}.site-error{border:1px solid #f6d2cb;color:#b74432;background:#fff0ec;padding:12px 16px;border-radius:8px;font-size:12px;margin:16px 0}.site-success{background:#eaf6ed;color:#357245;border:1px solid #d1ead8;padding:12px 16px;border-radius:8px;font-size:12px}.site-hidden{display:none!important}.site-skeleton{background:linear-gradient(100deg,#eceff3,#f6f7f9,#eceff3);height:150px;border-radius:11px}
.site-button{background:#d45b35;color:#fff;border:1px solid #d45b35;border-radius:7px;padding:10px 15px;line-height:1.2;font-size:12px;white-space:nowrap;text-decoration:none;display:inline-block}.site-button:hover{background:#c4512f}.site-button.secondary{background:white;color:#697482;border-color:var(--border)}.site-button.danger{background:#fff5f2;color:#b84932;border-color:#f2d2c7}.site-button.small{padding:7px 10px;font-size:11px}.site-panel{background:white;border:1px solid var(--border);border-radius:11px;box-shadow:var(--site-shadow);overflow:hidden}.site-table-wrap{overflow:auto}.site-table{width:100%;border-collapse:collapse;min-width:650px;font-size:12px}.site-table th{text-align:left;font-size:10px;font-weight:600;color:#919ba7;letter-spacing:.5px;background:#fafbfc;padding:14px 20px;white-space:nowrap;border-bottom:1px solid var(--border)}.site-table td{padding:17px 20px;border-bottom:1px solid #f0f2f5;color:#6f7a88;vertical-align:middle}.site-table tr:last-child td{border-bottom:0}.site-table td strong{color:#354252;font-weight:600}.site-table small{display:block;color:#a0a9b4;font-size:10px;margin-top:4px}.site-badge{display:inline-block;border-radius:5px;background:#f1f3f6;color:#798491;font-size:10px;padding:4px 7px;white-space:nowrap}.site-badge.on{color:#438457;background:#edf7ee}.site-badge.admin{color:#c16a45;background:#fdf0e9}.site-inline-actions{display:flex;gap:7px;flex-wrap:wrap}
.site-dialog{border:1px solid var(--border);border-radius:14px;padding:0;width:560px;max-width:calc(100vw - 28px);max-height:90vh;box-shadow:0 30px 100px #26313f30;color:#26313f}.site-dialog::backdrop{background:#26313f55;backdrop-filter:blur(3px)}.site-dialog-head{padding:22px 26px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}.site-dialog h2{font-size:17px;margin:0}.site-dialog-close{border:0;background:transparent;font-size:22px;color:#939daa}.site-form{padding:22px 26px}.site-form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}.site-field{margin-bottom:18px}.site-field label{display:block;font-size:11px;font-weight:600;margin-bottom:7px;color:#748090}.site-field input:not([type=checkbox]),.site-field select,.site-field textarea{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:7px;color:#354252;background:white;font-size:12px;min-width:0}.site-field small{display:block;margin-top:6px;color:#969fab;font-size:10px}.site-permissions{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-height:230px;overflow:auto;padding:4px 0}.site-check{display:flex!important;align-items:center;gap:8px;background:#f8f9fb;border:1px solid #edf0f4;border-radius:7px;padding:10px;font-size:11px!important;font-weight:400!important;margin:0!important}.site-check input{accent-color:#d45b35}.site-form-footer{display:flex;justify-content:flex-end;gap:9px;border-top:1px solid var(--border);padding-top:18px;margin-top:20px}.site-note{font-size:11px;color:#8e99a6;line-height:1.9;padding:15px 0}
/* The login form stays hidden until the server explicitly reports no session. */
#loginView[hidden],#homeBoot[hidden],#homeRetryButton[hidden]{display:none!important}
.site-home-boot{min-height:100vh;min-height:100dvh;padding:24px;background:var(--bg);color:var(--text);font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif}.site-home-placeholder-header{position:relative;background:var(--card-bg)}.site-home-status,.site-home-skeleton{max-width:1200px;margin-left:auto;margin-right:auto}.site-home-status{margin-top:0;margin-bottom:24px}.site-home-status h1{font-size:26px;font-weight:650;margin:0 0 10px}.site-home-status p{font-size:13px;line-height:1.8;color:var(--text-light);margin:0}.site-home-status .site-button{margin-top:20px}.site-home-toolbar-placeholder{height:39px;max-width:340px;background:#eceff3;border-radius:8px}.site-home-section-placeholder{height:15px;width:84px;background:#eceff3;border-radius:4px;margin:30px 0 15px}body[data-session=error] .site-home-skeleton{display:none}@media(max-width:760px){.site-home-boot{padding:16px}.site-home-status h1{font-size:24px}}
body[data-page=login]{margin:0;background:var(--card-bg)}.site-login{min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);background:var(--card-bg);font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;color:var(--text)}.site-login-intro{padding:50px 70px;background:#faf6f2;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden;isolation:isolate}.site-login-intro::after{content:"";position:absolute;z-index:0;height:450px;width:450px;border-radius:50%;background:#f1e3d7;bottom:-240px;right:-180px;pointer-events:none}.site-login-intro>*{position:relative;z-index:1}.site-login-copy{max-width:400px;margin:70px 0}.site-login-copy h1{font-size:48px;font-weight:600;letter-spacing:-2px;line-height:1.35;margin:16px 0 24px}.site-login-copy p{color:#9a8f85;font-size:14px;line-height:2}.site-login-intro footer{font-size:10px;color:#b4a79c;letter-spacing:1px}.site-login-main{display:flex;align-items:center;justify-content:center;padding:50px}.site-login-form{width:100%;max-width:340px}.site-login-form h2{font-size:25px;font-weight:600;margin:0 0 12px}.site-login-form>p{font-size:12px;color:#99a1ad;margin-bottom:36px}.site-login-form .site-field{margin-bottom:22px}.site-login-form .site-field input{height:45px}.site-login-form .site-button{width:100%;height:45px;margin-top:6px}.site-login-help{margin-top:25px;font-size:10px;text-align:center;color:#a3abb5}.site-login-wordmark{font-size:20px;font-weight:700;line-height:1.4;text-decoration:none;display:flex;gap:12px;align-items:center;min-width:0;max-width:100%}.site-login-wordmark .site-brand-mark{flex-shrink:0}.site-login-wordmark-text{min-width:0;overflow-wrap:anywhere}.site-password-wrap{position:relative}.site-password-wrap input{padding-right:54px!important}.site-password-toggle{position:absolute;right:10px;top:10px;border:0;background:transparent;color:#9aa3ae;font-size:10px}

/* One account navigation; keep only each tool's own action buttons below it. */
body.site-business #logoutBtn,body.site-business [onclick*="index.html"],body.site-chat #btnBack{display:none!important}
body.site-business .app-header{height:auto!important;min-height:52px!important}
body.site-business .app-header .header-left h5,body.site-business[data-page=upload]>.container>h1,body.site-business .header-title h3{font-size:26px!important;font-weight:650!important;line-height:1.3!important}
body.site-business .app-header .logo,body.site-chat .chat-empty .empty-icon{background:var(--primary)!important;box-shadow:none!important}
body.site-business .app-wrap{max-width:1200px!important;padding:0!important}
body.site-business .cat-btn.active{background:#fdf0eb!important}
body.site-business .upload-zone{box-shadow:var(--site-shadow)!important}
:root[data-theme=dark]{--bg:#17212d;--card-bg:#24313f;--text:#e2e8f0;--text-light:#a2b1c2;--text-muted:#a2b1c2;--border:#3c4b5d;--accent:#ef916d;--primary:#ef916d;--user-bubble:#b75432;--sidebar-bg:#24313f;--assistant-bubble:#24313f;--input-bg:#17212d}
:root[data-theme=dark] .site-login-intro{background:#20303e}:root[data-theme=dark] .site-login-intro::after{background:#293f4f}:root[data-theme=dark] .site-login-copy p,:root[data-theme=dark] .site-login-intro footer,:root[data-theme=dark] .site-login-form>p,:root[data-theme=dark] .site-login-help,:root[data-theme=dark] .site-login-form label,:root[data-theme=dark] .site-password-toggle{color:var(--text-light)}:root[data-theme=dark] .site-login-form input{background:var(--bg);color:var(--text)}:root[data-theme=dark] .site-login-form input::placeholder{color:var(--text-light)}
body.site-chat .site-topbar,body.site-chat .chat-header{background:var(--card-bg)!important}
@media(max-width:760px){body.site-chat .sidebar{top:64px!important}body.site-business .app-header .header-left h5,body.site-business[data-page=upload]>.container>h1,body.site-business .header-title h3{font-size:22px!important}}
@media(min-width:1500px){.site-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1100px){.site-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.site-login-intro{padding:45px}.site-login-copy h1{font-size:38px}}
@media(max-width:760px){body.site-body{padding:16px!important}.site-topbar{margin:-16px -16px 20px;padding:0 16px;gap:18px}.site-brand{font-size:15px}.site-account-details{display:none}.site-tools summary{font-size:12px}.site-nav{left:-100px;width:240px}.site-page-heading h1{font-size:24px}.site-grid{gap:10px}.site-card{padding:17px;min-height:149px}.site-card p{font-size:10px}.site-toolbar{gap:10px}.site-login{display:block}.site-login-intro{padding:25px;min-height:100px}.site-login-copy,.site-login-intro footer{display:none}.site-login-main{padding:55px 28px}.site-login-form{max-width:380px}.site-form-row{grid-template-columns:1fr;gap:0}.site-form{padding:20px}.site-table td,.site-table th{padding-left:14px;padding-right:14px}body.site-business .data-card,body.site-business .main-container{padding:16px!important}body.site-chat{padding:0!important}body.site-business[data-page=converter] .app-body{min-height:480px!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
