@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--bg:#fff;--sidebar:#fcfcfd;--surface:#fff;--surface-alt:#f8f8f9;--surface-soft:#f5f5f7;--ink:#1b1b21;--ink-soft:#5d606a;--muted:#979aa4;--line:#eaeaf0;--accent:#df172d;--accent-dark:#aa0018;--accent-soft:#fff0f1;--shadow:0 14px 50px rgba(20,20,30,.06);--radius:16px;--green:#31b17e}
*{box-sizing:border-box}html,body{margin:0;height:100%;min-height:100%;font-family:'DM Sans',Inter,system-ui,-apple-system,Segoe UI,sans-serif;background:var(--bg);color:var(--ink)}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:inherit;text-decoration:none}.ico{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round;flex-shrink:0}.hidden{display:none!important}.app-shell{height:100dvh;min-height:580px;display:flex;width:100%;overflow:hidden}.sidebar{width:258px;flex:0 0 258px;background:var(--sidebar);border-right:1px solid var(--line);display:flex;flex-direction:column;padding:25px 17px 16px;gap:0;z-index:3}.brand-wrap{display:flex;align-items:center;gap:8px;height:49px;margin:0 0 27px 5px}.brand-img{width:144px;height:54px;object-fit:contain;object-position:left center}.brand-ia{background:#16171b;color:white;padding:5px 8px 6px;border-radius:8px;font-weight:800;font-size:17px;letter-spacing:-1px;margin-left:-5px}.brand-dot{color:#f14455}.new-chat{width:100%;background:#1c1d21;color:#fff;border:0;border-radius:12px;padding:13px 14px;display:flex;gap:10px;align-items:center;text-align:left;font-size:13px;font-weight:700;box-shadow:0 7px 18px rgba(20,20,23,.12);transition:.18s}.new-chat:hover{background:#33343a;transform:translateY(-1px)}.new-chat .ico{width:16px;height:16px}.new-plus{margin-left:auto;font-size:17px;color:#aeb0b7}.side-label,.history-title{font-size:10px;letter-spacing:1.55px;color:var(--muted);font-weight:800}.side-label{margin:33px 11px 13px}.side-nav{display:grid;gap:5px}.nav-item{border:0;background:transparent;color:var(--ink-soft);padding:12px 13px;text-align:left;display:flex;align-items:center;gap:12px;border-radius:10px;font-size:13px;font-weight:600;white-space:nowrap;transition:.2s}.nav-item .ico{width:18px;height:18px;stroke-width:1.6}.nav-item:hover{color:var(--ink);background:var(--surface-soft)}.nav-item.active{background:var(--accent-soft);color:#ce1028;font-weight:800}.nav-item.active .ico{stroke-width:2}.history-title{display:flex;justify-content:space-between;margin:35px 12px 11px}.history-title>span:last-child{font-size:11px;letter-spacing:0}.chat-list{flex:1;overflow:auto;min-height:55px;scrollbar-width:thin}.chat-row{width:100%;border:0;background:transparent;border-radius:10px;display:flex;align-items:center;gap:8px;padding:10px;color:var(--ink-soft);font-size:12px;text-align:left;transition:.15s}.chat-row>span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1}.chat-row .ico{width:15px;height:15px;color:#999}.chat-row:hover,.chat-row.current{background:var(--surface-soft);color:var(--ink)}.chat-row.current{font-weight:700}.chat-row .delete-chat{border:0;background:transparent;padding:1px;display:none}.chat-row:hover .delete-chat{display:block}.chat-row .delete-chat:hover{color:var(--accent)}.sidebar-muted{padding:12px;font-size:12px;color:var(--muted);line-height:1.65}.sidebar-bottom{padding-top:15px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:5px}.side-foot{display:flex;align-items:center;gap:11px;text-align:left;border:0;background:transparent;padding:11px 12px;color:var(--ink-soft);font-size:12px;font-weight:600;border-radius:8px}.side-foot:hover{background:var(--surface-soft)}.side-foot .ico{width:16px;height:16px}.side-profile{display:flex;gap:10px;align-items:center;padding:16px 4px 0;margin-top:10px;border-top:1px solid var(--line)}.avatar{width:36px;height:36px;background:linear-gradient(140deg,#fe6371,#d00621);color:#fff;border-radius:11px;display:grid;place-items:center;font-weight:800;font-size:15px}.side-profile>div{min-width:0;flex:1}.side-profile strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.side-profile small{display:block;font-size:10px;color:var(--muted);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.online-dot{width:8px;height:8px;border-radius:50%;background:var(--green)}.main{flex:1;min-width:0;position:relative;display:flex;flex-direction:column;background:var(--bg)}.topbar{height:83px;flex:0 0 83px;display:flex;align-items:center;justify-content:space-between;padding:0 33px;border-bottom:1px solid var(--line)}.top-left,.top-actions{display:flex;align-items:center;gap:13px}.top-title{font-size:13px;font-weight:800;letter-spacing:-.2px}.top-divider{height:17px;width:1px;background:var(--line)}.top-context{font-size:12px;color:var(--muted)}.top-actions{gap:17px}.status-pill,.license-pill{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:700}.status-pill{color:#84868f}.pulse{width:7px;height:7px;display:inline-block;background:#3cb981;border-radius:50%;box-shadow:0 0 0 4px rgba(60,185,129,.09)}.license-pill{border:1px solid var(--line);border-radius:30px;padding:9px 13px;color:var(--ink-soft);background:var(--surface)}.license-pill .ico{width:14px;height:14px;color:var(--accent)}.icon-btn{border:1px solid var(--line);width:36px;height:36px;background:var(--surface);border-radius:10px;display:grid;place-items:center;color:var(--ink-soft)}.icon-btn:hover{border-color:#c2c2c6}.icon-btn .ico{width:17px;height:17px}.mobile-only{display:none}.chat-pane{flex:1;overflow:auto;display:flex;justify-content:center;scrollbar-width:thin}.chat-content{width:min(100%,950px);padding:16px 41px 25px;display:flex;flex-direction:column}.hero{margin:auto;width:100%;max-width:730px;padding:18px 0 5px;animation:fadeup .4s ease-out}.hero-eyebrow{display:flex;align-items:center;justify-content:center;gap:8px;color:var(--accent);font-size:10px;font-weight:800;letter-spacing:2.1px}.red-dash{height:2px;width:17px;background:var(--accent)}.hero-mark{margin:29px auto 14px;display:grid;place-items:center;width:56px;height:56px;border-radius:18px;background:#fef0f2;transform:rotate(-10deg);box-shadow:0 8px 28px rgba(214,20,35,.08)}.hero-mark .ico{width:29px;height:29px;color:var(--accent);stroke-width:1.8;transform:rotate(10deg)}.hero h1{font-family:Manrope,'DM Sans',sans-serif;font-size:clamp(32px,3.45vw,53px);line-height:1.14;text-align:center;font-weight:800;letter-spacing:-2.4px;margin:0}.hero h1 span{background:linear-gradient(105deg,#dc091f,#f34b5a);background-clip:text;-webkit-background-clip:text;color:transparent}.hero>p{margin:15px auto 37px;max-width:515px;color:var(--ink-soft);font-size:13px;line-height:1.8;text-align:center}.hero-modes{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.hero-modes button{border:1px solid var(--line);background:var(--surface);padding:18px 17px;border-radius:14px;display:grid;grid-template-columns:45px 1fr 22px;grid-template-rows:24px 22px;text-align:left;align-items:center;column-gap:13px;transition:.2s;min-height:86px;box-shadow:0 2px 3px rgba(20,20,30,.008)}.hero-modes button:hover{transform:translateY(-2px);border-color:#e7b8c0;box-shadow:0 14px 30px rgba(34,34,34,.06)}.feature-icon{grid-row:1/3;width:44px;height:44px;border-radius:12px;display:grid;place-items:center}.feature-icon .ico{width:21px;height:21px}.pale-red{background:#fff0f1;color:var(--accent)}.pale-gray{background:var(--surface-soft);color:#565963}.hero-modes strong{font-size:13px;font-weight:800}.hero-modes small{color:var(--muted);font-size:11px}.feature-arrow{grid-column:3;grid-row:1/3;color:var(--muted);font-size:18px;align-self:start;justify-self:end}.hero-foot{text-align:center;font-size:9px;color:#afb0b7;margin:41px 0 10px;letter-spacing:1.6px;font-weight:700}.hero-foot span{color:var(--accent);padding:0 7px}.messages{padding:20px 3px 30px;display:flex;flex-direction:column;gap:27px;max-width:830px;width:100%;margin:auto}.chat-message{display:flex;align-items:flex-start;gap:13px}.msg-avatar{border-radius:11px;width:32px;height:32px;flex:0 0 32px;display:grid;place-items:center;font-weight:800;font-size:12px;background:var(--surface-soft);color:var(--ink)}.chat-message.assistant .msg-avatar{background:#16171b;color:white}.msg-avatar .ico{width:17px;height:17px;color:#f94c62}.msg-content{flex:1;min-width:0}.msg-meta{font-size:11px;font-weight:800;margin:4px 0 12px;display:flex;justify-content:space-between;gap:8px}.msg-meta small{font-weight:500;color:var(--muted)}.msg-body{color:var(--ink);font-size:13px;line-height:1.83;overflow-wrap:anywhere}.msg-body h1,.msg-body h2,.msg-body h3{font-family:Manrope,system-ui;letter-spacing:-.35px;margin:20px 0 8px}.msg-body h1{font-size:21px}.msg-body h2{font-size:18px}.msg-body h3{font-size:15px}.msg-body p{margin:8px 0}.msg-body ul{padding-left:22px;margin:7px 0 14px}.msg-body li{margin:4px 0}.msg-body pre{background:#191a20;color:#e5e7eb;padding:16px 18px;border-radius:12px;overflow:auto;position:relative;line-height:1.6;font-size:12px}.msg-body code{font-family:Consolas,Menlo,monospace}.msg-body p code{padding:2px 5px;border-radius:4px;background:var(--surface-soft);color:var(--accent-dark)}.msg-body .code-top{display:flex;justify-content:space-between;background:#101116;color:#bfc1ca;padding:8px 13px;font-size:10px;border-radius:10px 10px 0 0;margin-top:12px}.msg-body .code-top+pre{border-radius:0 0 10px 10px;margin-top:0}.msg-body .code-top button{background:transparent;color:#ddd;border:0;font-size:11px}.message-tools{display:flex;gap:6px;margin-top:12px}.mini-action{padding:7px 10px;border-radius:7px;background:var(--surface);border:1px solid var(--line);font-size:11px;color:var(--ink-soft)}.mini-action:hover{color:var(--accent);border-color:#e9aeb6}.msg-attachment{display:inline-flex;border:1px solid var(--line);background:var(--surface-soft);border-radius:7px;padding:5px 9px;font-size:11px;margin-right:5px}.composer-area{padding:8px clamp(20px,4vw,61px) 20px;background:var(--bg);z-index:1}.prompt-form{max-width:830px;margin:auto;border:1px solid #dddde4;border-radius:18px;box-shadow:0 14px 40px rgba(23,22,25,.075);padding:14px 14px 10px;background:var(--surface);transition:.2s}.prompt-form:focus-within{border-color:#b2b3b8;box-shadow:0 15px 40px rgba(23,22,25,.09)}.prompt-form textarea{display:block;width:100%;resize:none;border:0;background:transparent;outline:0;color:var(--ink);font-size:13px;line-height:1.6;min-height:60px;max-height:160px;padding:4px 6px}.prompt-form textarea::placeholder{color:#a6a7ad}.prompt-tools,.tools-left{display:flex;align-items:center;gap:11px}.prompt-tools{justify-content:space-between}.attach-button{display:flex;align-items:center;gap:7px;border:1px solid var(--line);padding:9px 11px;background:var(--surface-soft);color:var(--ink-soft);font-size:11px;font-weight:700;border-radius:9px}.attach-button .ico{width:13px;height:13px}.tool-divider{height:21px;width:1px;background:var(--line)}.tools-left select{border:0;background:transparent;font-size:11px;font-weight:800;color:var(--ink-soft);max-width:142px;outline:none;cursor:pointer}.send-btn{border:0;border-radius:11px;width:39px;height:39px;background:var(--accent);color:white;display:grid;place-items:center;box-shadow:0 5px 14px rgba(214,20,35,.2)}.send-btn:hover{background:var(--accent-dark)}.send-btn .ico{width:18px;height:18px}.composer-note{text-align:center;color:var(--muted);font-size:10px;margin:10px 0 0}.attachment-chips{max-width:830px;margin:0 auto 7px;display:flex;gap:7px;flex-wrap:wrap}.attachment-chip{border:1px solid var(--line);border-radius:8px;padding:6px 9px;background:var(--surface);font-size:11px;display:flex;align-items:center;gap:8px;max-width:220px}.attachment-chip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-chip button{border:0;background:transparent;color:var(--muted);padding:0 3px}.studio-panel{width:299px;flex:0 0 299px;border-left:1px solid var(--line);background:var(--sidebar);display:flex;flex-direction:column;overflow:auto;padding:26px 20px 17px;scrollbar-width:thin}.studio-head{font-size:10px;font-weight:900;letter-spacing:1.3px;display:flex;justify-content:space-between;align-items:center;margin-bottom:23px}.studio-badge{font-size:9px;border:1px solid #e1e1e5;background:#fff;padding:5px 7px;border-radius:5px;color:#8b8d96;letter-spacing:.45px}.credit-card{border-radius:17px;background:radial-gradient(circle at 120% -30%,#7a151f 0%,transparent 50%),linear-gradient(145deg,#24252b,#101116);padding:20px 19px 18px;color:white;box-shadow:0 16px 30px rgba(25,25,28,.12)}.credit-top{display:flex;justify-content:space-between;align-items:center}.credit-top>span:first-child{display:flex;align-items:center;gap:7px;font-size:9px;font-weight:800;letter-spacing:1.1px;color:#e8e9ef}.credit-top .ico{width:15px;height:15px;color:#ff576a}.live-indicator{color:#4fd59d;font-size:9px;letter-spacing:1px}.credit-value{font-size:35px;font-family:Manrope,sans-serif;font-weight:800;letter-spacing:-1.5px;margin:24px 0 17px}.credit-value span{font-size:12px;font-weight:600;color:#9ea0ab;letter-spacing:0}.credit-meter{height:5px;background:#4d4d56;border-radius:5px;overflow:hidden}.credit-meter i{display:block;background:linear-gradient(90deg,#f6384b,#ff8691);height:100%;border-radius:5px;transition:width .35s}.credit-caption{font-size:10px;color:#a8a9b0;margin:10px 0 20px;line-height:1.5}.card-activate{display:flex;width:100%;justify-content:space-between;background:#fff;border:0;border-radius:9px;padding:11px 13px;color:#232329;font-size:11px;font-weight:800}.card-activate span{font-size:15px;color:var(--accent)}.card-activate:hover{background:#fff1f3}.panel-section{border-bottom:1px solid var(--line);padding:23px 0 21px}.panel-title{display:flex;justify-content:space-between;align-items:center;letter-spacing:1.04px;font-size:10px;font-weight:900;margin-bottom:17px}.panel-title>span{font-size:9px;color:var(--muted);font-weight:700;letter-spacing:.3px}.panel-title button{border:0;background:transparent;color:var(--muted)}.panel-title button .ico{width:14px;height:14px}.export-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.export-grid button{background:var(--surface);border:1px solid var(--line);border-radius:10px;min-height:92px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;transition:.15s}.export-grid button:hover{border-color:#eea8b0;transform:translateY(-2px)}.filetype{width:29px;height:29px;border-radius:8px;display:grid;place-items:center;font-size:12px;font-weight:900;margin-bottom:3px}.filetype.word{background:#e9eeff;color:#3955a9}.filetype.pdf{background:#fff0f0;color:#e13847}.filetype.txt{background:#ededf0;color:#535561}.filetype.pptx{background:#fff2e6;color:#d07432}.filetype.code{background:#e6fbf2;color:#11805b;font-size:9px}.export-grid b{font-size:10px}.export-grid small{font-size:9px;color:var(--muted)}.panel-help{color:var(--muted);font-size:10px;line-height:1.6;margin:12px 1px 0}.files-list{display:flex;flex-direction:column;gap:6px;max-height:235px;overflow:auto}.empty-file{border:1px dashed var(--line);padding:21px 8px;display:flex;gap:10px;align-items:center;justify-content:center;color:#a3a5ad;font-size:11px;border-radius:10px}.empty-file .ico{width:17px;height:17px}.file-entry{display:flex;gap:8px;align-items:center;border:1px solid var(--line);padding:9px;border-radius:9px;background:var(--surface);font-size:10px;min-width:0}.file-entry>.ico{width:16px;height:16px;color:var(--accent)}.file-entry .file-name{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-entry a{color:var(--accent);font-size:13px;font-weight:800}.contact-card{margin-top:24px;border:1px solid var(--line);border-radius:13px;padding:15px;background:var(--surface);display:flex;align-items:flex-start;gap:11px}.contact-icon{width:32px;height:32px;flex:0 0 32px;background:#eaf8f2;color:#209a69;display:grid;place-items:center;border-radius:9px}.contact-icon .ico{width:16px;height:16px}.contact-card strong{font-size:11px}.contact-card p{font-size:10px;color:var(--muted);line-height:1.65;margin:7px 0 9px}.contact-card a{font-size:10px;color:#12895c;font-weight:800}.panel-signature{margin-top:auto;padding:18px 5px 0;display:flex;justify-content:space-between;font-size:10px;color:var(--muted);font-weight:800;letter-spacing:.5px}.panel-signature span{color:#b4b5b9}.overlay{position:fixed;inset:0;background:rgba(15,16,20,.54);z-index:20;display:grid;place-items:center;padding:20px;backdrop-filter:blur(7px)}.dialog{background:var(--surface);color:var(--ink);border-radius:22px;box-shadow:0 24px 85px rgba(0,0,0,.2);position:relative;padding:33px;max-height:90vh;overflow:auto}.auth-dialog{width:min(460px,95vw)}.dialog-logo{display:flex;align-items:center;gap:6px}.dialog-logo img{width:143px;height:53px;object-fit:contain}.dialog-logo span{background:#18191e;color:#fff;border-radius:7px;padding:5px 8px;font-weight:900}.dialog-kicker{font-size:10px;letter-spacing:1.4px;color:var(--accent);font-weight:900;margin-top:21px}.dialog h2{font-size:24px;letter-spacing:-.7px;margin:10px 0 9px;font-family:Manrope,sans-serif}.dialog p{font-size:12px;line-height:1.75;color:var(--ink-soft);margin:6px 0 20px}.auth-tabs,.admin-tabs{display:flex;gap:2px;background:var(--surface-soft);border-radius:9px;padding:4px;margin-bottom:18px}.auth-tabs button,.admin-tabs button{flex:1;border:0;background:transparent;border-radius:7px;padding:10px 7px;font-size:12px;color:var(--ink-soft);font-weight:700}.auth-tabs button.selected,.admin-tabs button.selected{background:var(--surface);color:var(--accent);box-shadow:0 2px 8px rgba(0,0,0,.07)}.dialog form label{display:block;font-size:11px;color:var(--ink-soft);font-weight:700;margin:0 0 12px}.dialog input,.dialog select{width:100%;border:1px solid var(--line);background:var(--surface);border-radius:9px;outline:none;color:var(--ink);padding:12px 11px;font-size:12px;margin-top:7px}.dialog input:focus{border-color:#e66c7c;box-shadow:0 0 0 3px rgba(223,23,45,.07)}.primary-wide{width:100%;padding:13px;background:var(--accent);color:white;font-weight:800;font-size:12px;border:0;border-radius:10px;margin-top:10px}.primary-wide:hover{background:var(--accent-dark)}.form-error{background:#fff0f0;border:1px solid #f3cbcf;color:#c8152d;padding:10px;border-radius:8px;font-size:11px;margin-bottom:9px}.auth-support{padding-top:19px;text-align:center;font-size:11px;color:var(--muted)}.auth-support a,.contact-license{font-weight:800;color:var(--accent)}.compact-dialog{width:min(450px,95vw)}.close-dialog{position:absolute;top:17px;right:17px;width:32px;height:32px;border:1px solid var(--line);border-radius:9px;color:var(--ink-soft);background:var(--surface);display:grid;place-items:center}.close-dialog .ico{width:15px;height:15px}.dialog-icon{width:44px;height:44px;border-radius:12px;color:var(--accent);background:var(--accent-soft);display:grid;place-items:center}.compact-dialog .dialog-kicker{margin-top:16px}.contact-license{display:block;text-align:center;font-size:11px;margin-top:20px}.admin-dialog{width:min(1000px,98vw);padding:30px;max-height:94vh}.admin-top{display:flex;align-items:flex-start;justify-content:space-between}.admin-top .dialog-kicker{margin-top:0}.close-dialog.plain{position:static}.admin-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:23px 0}.admin-stat{background:var(--surface-soft);border-radius:12px;padding:15px}.admin-stat strong{display:block;font-size:23px}.admin-stat span{display:block;color:var(--ink-soft);font-size:10px;margin-top:6px}.admin-content{min-height:200px}.inline-form{display:flex;align-items:end;gap:10px;flex-wrap:wrap;background:var(--surface-soft);border-radius:13px;padding:14px;margin:15px 0}.dialog .inline-form label{margin:0;flex:1;min-width:115px}.inline-form input{margin-top:5px}.admin-create{border:0;border-radius:9px;background:var(--accent);padding:12px 15px;color:white;font-size:12px;font-weight:800}.admin-table-wrap{overflow:auto;max-height:310px;border:1px solid var(--line);border-radius:10px}.admin-table-wrap table{border-collapse:collapse;width:100%;font-size:11px;white-space:nowrap}.admin-table-wrap th{text-align:left;color:var(--muted);background:var(--surface-soft);font-size:9px;letter-spacing:.6px;padding:11px}.admin-table-wrap td{padding:12px 11px;border-top:1px solid var(--line)}.admin-table-wrap td button{font-size:10px;padding:6px 8px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--ink-soft);margin-right:5px}.admin-table-wrap td button:hover{color:var(--accent)}.new-key-result{padding:12px;background:#ebf9f0;border:1px solid #b9e3c6;border-radius:8px;color:#22673a;font-size:12px;line-height:1.5;margin-bottom:14px}.new-key-result code{font-weight:900;display:block;overflow-wrap:anywhere;margin:7px 0}.provider-forms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.provider-card{border:1px solid var(--line);border-radius:12px;padding:17px}.provider-card h3{font-size:13px;margin:0 0 8px;display:flex;justify-content:space-between}.provider-card h3 span{font-size:10px;color:var(--muted);font-weight:500}.provider-card .provider-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.provider-card input,.provider-card select{padding:9px}.provider-card label{margin-bottom:8px;font-size:10px}.provider-card .full{grid-column:1/-1}.provider-card button{background:#1d1e23;color:white;border:0;border-radius:8px;padding:10px 13px;font-size:11px;font-weight:700}.provider-check{display:inline-flex!important;align-items:center;gap:6px}.provider-check input{width:auto;margin:0}.toast{position:fixed;bottom:24px;right:25px;background:#1e2025;color:white;padding:12px 18px;font-size:12px;border-radius:11px;box-shadow:0 10px 40px rgba(0,0,0,.2);z-index:50;max-width:340px;line-height:1.4;animation:fadeup .2s ease-out}.toast.error{background:#a7172a}@keyframes fadeup{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
/* Dark theme follows the same red/black identity rather than inverting brand assets. */
body.dark{--bg:#15161a;--sidebar:#191a20;--surface:#222329;--surface-alt:#26272c;--surface-soft:#2b2c33;--ink:#f5f5f6;--ink-soft:#b7b8c0;--muted:#888a95;--line:#33343c;--accent:#fb364c;--accent-dark:#d71931;--accent-soft:#402329;--shadow:0 14px 50px rgba(0,0,0,.2)}.dark .studio-badge{background:#27282e;border-color:#393940}.dark .credit-card{background:radial-gradient(circle at 120% -30%,#5c1c27 0%,transparent 50%),linear-gradient(145deg,#292a31,#0e0f13)}.dark .new-chat{background:#e9e9ec;color:#202127}.dark .new-chat:hover{background:#fff}.dark .hero-mark,.dark .pale-red{background:#44252b}.dark .pale-gray{background:#34353e;color:#c7c8d0}.dark .contact-icon{background:#173b2e}.dark .prompt-form{border-color:#43434c}.dark .brand-ia{background:#4b4b55}.dark .new-key-result{background:#213c2d;border-color:#356449;color:#a2e3b6}.dark .form-error{background:#41242b;border-color:#70313b;color:#ffabb5}
@media(max-width:1390px){.sidebar{width:232px;flex-basis:232px}.studio-panel{width:267px;flex-basis:267px;padding:22px 16px}.topbar{padding:0 24px}.chat-content{padding:16px 26px 25px}.hero h1{font-size:43px}.composer-area{padding-left:29px;padding-right:29px}}
@media(max-width:1150px){.studio-panel{display:none}.hero{max-width:700px}.hero h1{font-size:47px}}
@media(max-width:720px){.app-shell{min-height:0}.sidebar{position:fixed;inset:0 auto 0 0;width:270px;transform:translateX(-100%);transition:transform .22s;box-shadow:15px 0 50px rgba(0,0,0,.12)}.sidebar.open{transform:translateX(0)}.mobile-only{display:grid}.topbar{height:64px;flex-basis:64px;padding:0 15px;gap:8px}.top-title{font-size:12px}.top-context,.top-divider,.status-pill{display:none}.top-actions{gap:7px}.license-pill{padding:8px;font-size:10px}.license-pill .ico{width:13px;height:13px}.chat-content{padding:14px 19px}.hero{padding-top:16px}.hero h1{font-size:35px;letter-spacing:-1.5px}.hero>p{font-size:12px;margin-bottom:23px}.hero-modes{gap:8px}.hero-modes button{padding:11px;grid-template-columns:35px 1fr 10px;column-gap:9px;min-height:78px}.feature-icon{width:32px;height:32px;border-radius:9px}.feature-icon .ico{width:18px;height:18px}.hero-modes strong{font-size:11px}.hero-modes small{font-size:9px}.feature-arrow{font-size:14px}.hero-foot{margin:26px 0 4px;font-size:8px}.hero-mark{margin:16px auto 13px}.composer-area{padding:7px 13px 16px}.prompt-form{padding:10px}.tools-left{gap:7px}.tools-left select{max-width:103px;font-size:10px}.attach-button{font-size:0;gap:0}.attach-button .ico{width:17px;height:17px}.composer-note{font-size:9px}.msg-body{font-size:12px}.chat-message{gap:8px}.admin-stats{grid-template-columns:repeat(2,1fr)}.provider-forms{grid-template-columns:1fr}.dialog{padding:23px}.admin-dialog{padding:19px}.admin-tabs button{font-size:11px}}
@media(max-width:385px){.hero-modes{grid-template-columns:1fr}.hero-modes button{min-height:65px}.hero-foot{display:none}.license-pill{font-size:0}.topbar{padding:0 9px}.hero h1{font-size:30px}}

.html-preview-dialog{width:min(1050px,96vw);height:min(740px,95vh);display:flex;flex-direction:column;gap:10px}.preview-top{display:flex;justify-content:space-between;align-items:center}.preview-top .dialog-kicker{margin-top:0}.preview-top h2{margin:5px 0}.preview-warning{font-size:11px;color:var(--ink-soft)}#htmlSandbox{width:100%;min-height:300px;flex:1;border:1px solid var(--line);border-radius:12px;background:#fff}.msg-body .code-top .preview-html{margin-right:10px;color:#ff8b98}.msg-body .code-top .preview-html:hover{text-decoration:underline}

.file-delete{border:0;background:transparent;color:var(--muted);font-size:15px;padding:1px 2px}.file-delete:hover{color:var(--accent)}

.hero-modes button,.export-grid button{color:var(--ink)}.dark .brand-img{border-radius:6px}

/* REDAC Tesis Studio entry points and protected vector identity. */
.nav-item.thesis-link {display:flex;align-items:center;text-decoration:none;color:var(--ink-soft)}
.nav-item.thesis-link:hover {background:var(--accent-soft);color:var(--accent)}
.thesis-link .red-dot {width:7px;height:7px;border-radius:50%;background:var(--accent);margin-left:auto}
.hero-modes .hero-thesis {border:1px solid var(--line);background:var(--surface);border-radius:12px;text-decoration:none;color:var(--ink);display:grid;grid-template-columns:40px 1fr 12px;grid-template-rows:repeat(2,auto);align-items:center;gap:2px 10px;padding:17px;transition:.2s;min-height:93px}
.hero-modes .hero-thesis:hover {border-color:var(--accent);transform:translateY(-2px);box-shadow:var(--shadow)}
.hero-thesis .feature-icon {grid-row:1/3}.hero-thesis strong {font-size:12px}.hero-thesis small {font-size:10px;color:var(--muted)}.hero-thesis .feature-arrow {grid-column:3;grid-row:1/3;color:var(--accent)}
.dark .brand-img,.dark .dialog-logo img {background:#fff;padding:3px;border-radius:7px}

/* REDAC IA 1.3: scientific workspace and manual plans */
.side-label-science{margin-top:17px!important;color:var(--accent)!important}
.science-hero-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:center;max-width:720px;margin:12px auto 23px}
.science-hero-actions button{border:1px solid var(--border,#e4e4e7);background:var(--surface,#fff);color:var(--text,#202024);padding:9px 13px;border-radius:999px;font-size:12px;font-weight:650;cursor:pointer;transition:.2s}
.science-hero-actions button:hover{border-color:#da1930;color:#b3142a}
#variantSelect{max-width:187px;min-width:110px}
#modeSelect{max-width:178px}
.public-plans{display:flex;flex-direction:column;gap:8px}
.public-plan{border:1px solid var(--border,#e5e5e5);border-radius:13px;padding:12px;background:var(--surface,#fff);display:grid;grid-template-columns:1fr auto;column-gap:7px;row-gap:5px}
.public-plan strong{font-size:13px}.public-plan span{font-weight:800;font-size:11px;color:#d81c30}.public-plan small{grid-column:1/-1;color:var(--muted,#777)}.public-plan p{grid-column:1/-1;color:var(--muted,#777);font-size:11px;margin:0}.public-plan a{grid-column:1/-1;font-size:11px;font-weight:750;color:#c91d2e;text-decoration:none}
.official-link{display:block;font-size:11px;margin-top:10px;color:var(--accent,#ca1930);text-decoration:none}
.plan-form textarea{width:100%;resize:vertical;min-height:65px}
.dark .public-plan,.dark .science-hero-actions button{background:#1f2025;border-color:#3a3c44;color:#f4f4f7}
@media(max-width:960px){.science-hero-actions{gap:6px}.science-hero-actions button{font-size:11px;padding:8px}.tools-left{flex-wrap:wrap}#variantSelect{max-width:155px}}

/* Keep scientific tools reachable on short laptop screens. */
.sidebar .side-nav{min-height:0;max-height:44vh;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}
@media(max-height:750px){.sidebar{padding-top:14px}.brand-wrap{margin-bottom:15px}.side-label{margin:18px 11px 9px}.history-title{margin-top:15px}.sidebar .side-nav{max-height:39vh}}

/* REDAC IA 1.4: visible response progress, high-contrast accessible spinner */
.generation-status{font-size:12px;color:var(--accent);font-weight:700;padding:0 6px 8px;display:flex;align-items:center;gap:9px}
.generation-status:before{content:"";width:8px;height:8px;border-radius:50%;background:var(--accent);animation:redac-pulse 1s ease-in-out infinite alternate}
.generation-status.hidden{display:none}
.redac-spinner{width:19px;height:19px;display:inline-block;border:2.5px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:redac-spin .8s linear infinite}
@keyframes redac-spin{to{transform:rotate(360deg)}}
@keyframes redac-pulse{from{opacity:.3;transform:scale(.75)}to{opacity:1;transform:scale(1)}}
#speedSelect{max-width:115px;min-width:85px}
@media(prefers-reduced-motion:reduce){.redac-spinner,.generation-status:before{animation:none}}

.usage-note{font-size:13px;color:var(--ink-soft);line-height:1.5;padding:12px 6px}
