*{box-sizing:border-box} :root{--bg:#06111d;--panel:#091827;--panel2:#0d2031;--line:#1b3448;--cyan:#1dd8f4;--blue:#1682ff;--text:#eef8ff;--muted:#83a0b5;--green:#37e1a1} html,body{height:100%;margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)} button,input,textarea{font:inherit} button{cursor:pointer}.toast{position:fixed;z-index:100;top:20px;left:50%;transform:translate(-50%,-20px);background:#10293c;border:1px solid #2d536d;border-radius:12px;padding:12px 18px;opacity:0;pointer-events:none;transition:.25s;box-shadow:0 15px 50px #0008}.toast.show{opacity:1;transform:translate(-50%,0)}.toast.error{border-color:#a84b58;color:#ffd8dd}.brand{display:flex;align-items:center;gap:10px}.brand .mark{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:linear-gradient(140deg,#147aff,#2be9eb);color:#00111c;font-size:23px;font-weight:1000;transform:skew(-5deg)}.brand strong,.brand span{display:block}.brand strong{font-size:17px;letter-spacing:.18em}.brand span{font-size:7px;letter-spacing:.14em;color:#73dcee}.brand.big .mark{width:52px;height:52px;font-size:31px}.brand.big strong{font-size:22px}
.auth-view{min-height:100%;display:grid;grid-template-columns:1.08fr .92fr;background:radial-gradient(circle at 20% 10%,#0c3350 0,transparent 34%),#06111d}.auth-art{position:relative;overflow:hidden;padding:42px 7vw;display:flex;flex-direction:column;border-right:1px solid #173147}.auth-art:before{content:"";position:absolute;inset:0;background-image:linear-gradient(#17314944 1px,transparent 1px),linear-gradient(90deg,#17314944 1px,transparent 1px);background-size:52px 52px;mask-image:linear-gradient(to bottom,transparent,#000 45%,transparent)}.auth-copy{position:relative;margin:auto 0;max-width:680px}.eyebrow{font-size:11px;letter-spacing:.2em;color:var(--cyan);font-weight:800}.auth-copy h1,.welcome h1{font-size:clamp(42px,5.5vw,76px);line-height:1.04;margin:20px 0;font-weight:750;letter-spacing:-.055em}.auth-copy h1 em,.welcome h1 em{font-style:normal;color:var(--cyan)}.auth-copy p{max-width:590px;color:#a9becd;line-height:1.7;font-size:17px}.feature-row{position:relative;display:flex;gap:28px;color:#8caabd;font-size:12px}.feature-row span::first-letter{color:var(--cyan)}.chart-decor{position:absolute;right:-70px;bottom:70px;display:flex;align-items:flex-end;gap:18px;opacity:.55}.chart-decor i{display:block;width:8px;background:var(--cyan);height:90px;box-shadow:0 0 20px #18dffa88}.chart-decor i:nth-child(2){height:160px;background:#f35e73}.chart-decor i:nth-child(3){height:120px}.chart-decor i:nth-child(4){height:230px}.chart-decor i:nth-child(5){height:185px;background:#f35e73}.chart-decor i:nth-child(6){height:270px}.auth-panel{display:grid;place-items:center;padding:34px;background:linear-gradient(140deg,#081522,#06101b)}.auth-card{width:min(430px,100%)}.auth-tabs{display:flex;background:#091927;border:1px solid #173247;border-radius:13px;padding:5px;margin-bottom:40px}.auth-tabs button{flex:1;border:0;background:transparent;color:#7897ac;border-radius:9px;padding:11px}.auth-tabs button.active{background:#102a3d;color:white;box-shadow:inset 0 0 0 1px #254a62}.auth-card h2{font-size:29px;margin:0 0 8px}.auth-card form>p{margin:0 0 28px;color:var(--muted)}.auth-card label{display:block;color:#a9c2d3;font-size:12px;font-weight:700;margin:18px 0}.auth-card input{display:block;width:100%;margin-top:8px;border:1px solid #1d3b50;background:#091825;color:white;border-radius:12px;padding:14px;outline:none}.auth-card input:focus{border-color:var(--cyan);box-shadow:0 0 0 3px #1dd8f415}.primary{width:100%;display:flex;justify-content:space-between;border:0;border-radius:12px;padding:15px 18px;background:linear-gradient(90deg,#147efe,#1dd8f4);color:#00121e;font-weight:900}.secure-note{text-align:center;margin-top:25px;color:#67889e;font-size:11px}.mobile-brand{display:none}
.app-view{height:100%;display:grid;grid-template-columns:270px 1fr}.sidebar{background:#06111d;border-right:1px solid var(--line);padding:18px 13px;display:flex;flex-direction:column;min-height:0}.sidebar>.brand{padding:0 7px 20px}.new-chat{border:1px solid #24516a;background:linear-gradient(120deg,#0b273a,#0e1f30);color:#eafaff;padding:12px 13px;border-radius:11px;text-align:left;font-weight:750}.new-chat b{color:var(--cyan);font-size:18px;margin-right:7px}.nav-title,.history-head{font-size:9px;letter-spacing:.15em;color:#58788f;margin:24px 9px 8px}.nav-item{border:0;background:transparent;color:#84a2b7;padding:11px;border-radius:9px;text-align:left}.nav-item.active{background:#0c2334;color:#e8fbff;border-left:2px solid var(--cyan)}.nav-item span{float:right;color:var(--green);font-size:8px;margin-top:4px}.history-head{display:flex;justify-content:space-between;align-items:center}.history-head button{border:0;background:transparent;color:#65879f}.chat-list{flex:1;min-height:80px;overflow:auto}.chat-item{position:relative;padding:10px;border-radius:9px;color:#9bb3c3;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:27px}.chat-item:hover,.chat-item.active{background:#0a1f2f;color:#effaff}.chat-item button{display:none;position:absolute;right:6px;top:6px;border:0;background:#183246;color:#8fb0c6;border-radius:6px}.chat-item:hover button{display:block}.account-box{border-top:1px solid var(--line);padding:14px 5px 0;display:grid;grid-template-columns:34px 1fr 26px;gap:9px;align-items:center}.account-box>div:first-child{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:#12324a;color:var(--cyan);font-weight:800}.account-box b,.account-box small{display:block;overflow:hidden;text-overflow:ellipsis}.account-box b{font-size:11px}.account-box small{font-size:8px;color:#66869c;margin-top:3px}.account-box button{border:0;background:transparent;color:#6f8ca0}.workspace{min-width:0;min-height:0;display:grid;grid-template-rows:62px 1fr auto;background:radial-gradient(circle at 50% 18%,#0b2637 0,transparent 33%),#07131e}.topbar{border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 20px;background:#07131eea;backdrop-filter:blur(12px)}.topbar>div:first-of-type b,.topbar>div:first-of-type span{display:block}.topbar b{font-size:11px;letter-spacing:.12em}.topbar span{font-size:9px;color:#68899f;margin-top:4px}.topbar i{display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--green);box-shadow:0 0 7px var(--green)}.privacy{margin-left:auto;font-size:10px;color:#7697aa}.menu{display:none;border:0;background:transparent;color:white;font-size:21px;margin-right:10px}.conversation{overflow:auto;position:relative}.welcome{max-width:900px;margin:7vh auto 40px;text-align:center;padding:20px}.welcome h1{font-size:clamp(37px,4.5vw,62px);margin:14px 0}.welcome>p{color:#8eaabc;margin:0 auto 25px;max-width:610px}.vision-orb{width:64px;height:64px;margin:auto;position:relative}.vision-orb .mark{width:58px;height:58px;border-radius:17px;display:grid;place-items:center;background:linear-gradient(140deg,#147aff,#2be9eb);color:#00111c;font-size:33px;font-weight:1000;box-shadow:0 0 38px #13cde844}.vision-orb span{position:absolute;inset:-7px;border:1px solid #1dd8f44a;border-radius:22px}.dropzone{max-width:660px;margin:auto;min-height:150px;border:1px dashed #2c5a72;border-radius:17px;background:#091a2888;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;transition:.2s}.dropzone:hover,.dropzone.drag{border-color:var(--cyan);background:#0b2434}.dropzone strong{font-size:14px;margin:8px}.dropzone span{font-size:10px;color:#68889d}.upload-icon{font-size:27px;color:var(--cyan);position:relative}.upload-icon b{position:absolute;font-size:12px;right:-10px;top:-3px}.analysis-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:22px auto 0;max-width:660px}.analysis-grid div{border:1px solid #173348;background:#091823;padding:12px;text-align:left;border-radius:10px}.analysis-grid b,.analysis-grid span,.analysis-grid strong{display:block}.analysis-grid b{float:right;color:#21445c;font-size:18px}.analysis-grid span{font-size:7px;color:var(--cyan);letter-spacing:.14em}.analysis-grid strong{font-size:9px;margin-top:7px;color:#8da9bb}.messages{max-width:860px;margin:auto;padding:20px 18px 50px}.msg{display:grid;grid-template-columns:36px 1fr;gap:12px;margin:22px 0}.msg .avatar{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:#142b3c;font-weight:900}.msg.assistant .avatar{background:linear-gradient(140deg,#147aff,#2be9eb);color:#00111c}.bubble{min-width:0;line-height:1.68;color:#dcebf4;white-space:pre-wrap}.msg.user .bubble{background:#0b1f2e;border:1px solid #1b394e;border-radius:14px;padding:13px}.bubble img{display:block;max-width:min(550px,100%);max-height:390px;object-fit:contain;border-radius:10px;margin-bottom:10px;border:1px solid #24465c}.loading .bubble{color:#84a2b6}.composer-wrap{padding:8px 18px 14px;background:linear-gradient(180deg,transparent,#07131e 20%)}.composer{max-width:860px;margin:auto;display:grid;grid-template-columns:43px 1fr 44px;align-items:end;border:1px solid #27465a;background:#0c1c29;border-radius:17px;padding:8px}.composer:focus-within{border-color:#2a7993}.composer textarea{border:0;outline:0;resize:none;max-height:160px;background:transparent;color:white;padding:9px}.attach,.send{width:40px;height:40px;border-radius:11px;display:grid;place-items:center}.attach{border:1px solid #24465b;color:var(--cyan);font-size:23px;cursor:pointer}.send{border:0;background:linear-gradient(140deg,#1682ff,#1dd8f4);color:#00111d;font-weight:900}.composer-note{max-width:850px;margin:6px auto 0;display:flex;justify-content:space-between;color:#4e7188;font-size:8px}.image-preview{max-width:850px;margin:0 auto 7px;padding:8px;background:#0d2130;border:1px solid #23465c;border-radius:12px;display:grid;grid-template-columns:48px 1fr 30px;align-items:center;gap:9px}.image-preview img{width:48px;height:38px;object-fit:cover;border-radius:6px}.image-preview b,.image-preview span{display:block;font-size:10px}.image-preview span{color:#6e91a7;margin-top:3px}.image-preview button{border:0;background:transparent;color:#8da9bb;font-size:20px}
.knowledge-used{margin-top:12px;padding-top:8px;border-top:1px solid #18384c;color:#53d9ee;font-size:9px;letter-spacing:.04em}
@media(max-width:850px){.auth-view{grid-template-columns:1fr}.auth-art{display:none}.auth-panel{padding:22px}.mobile-brand{display:flex;position:absolute;top:25px;left:25px}.auth-card{margin-top:70px}.app-view{grid-template-columns:1fr}.sidebar{position:fixed;z-index:30;inset:0 auto 0 0;width:280px;transform:translateX(-102%);transition:.22s;box-shadow:25px 0 60px #000a}.sidebar.open{transform:none}.menu{display:block}.privacy{display:none}.welcome{margin-top:3vh;padding:15px}.analysis-grid{grid-template-columns:1fr 1fr}.messages{padding-left:12px;padding-right:12px}.composer-wrap{padding-left:9px;padding-right:9px}.composer-note span:last-child{display:none}}
@media(max-width:480px){.welcome h1{font-size:36px}.dropzone{min-height:135px}.analysis-grid{display:none}.auth-card h2{font-size:25px}}
.brand .brand-logo{display:block;width:118px;height:auto;object-fit:contain}.brand.big .brand-logo{width:150px}.mobile-brand .brand-logo{width:126px}.install-app{margin:10px 0 0;border:1px solid #24708a;background:linear-gradient(120deg,#0c2b40,#0d2030);color:#dffaff;padding:10px 12px;border-radius:10px;display:flex;align-items:center;gap:9px;text-align:left;font-weight:700;font-size:11px}.install-app:hover{border-color:var(--cyan);background:#0c3044}.install-app img{width:25px;height:25px;border-radius:7px}.vision-orb>img{width:58px;height:58px;border-radius:17px;display:block;object-fit:cover;box-shadow:0 0 38px #13cde844}.msg .avatar{overflow:hidden}.msg .avatar img{width:100%;height:100%;object-fit:cover}.msg.assistant .avatar{background:#061431}
[hidden]{display:none!important}
@media(max-width:1100px){.fund-metrics{grid-template-columns:repeat(3,1fr)}}

/* KEYTECH — deep emerald, gold & ivory identity */
:root{--bg:#03120f;--panel:#071d18;--panel2:#0b2922;--line:#24483d;--cyan:#e8bd63;--blue:#f7d990;--text:#fffaf0;--muted:#9aafa7;--green:#5fd3a5}
html,body{background:#03120f;color:var(--text)}
.auth-view{background:radial-gradient(circle at 20% 10%,#164b3b 0,transparent 36%),#03120f}.auth-art{border-color:#21483c}.auth-art:before{background-image:linear-gradient(#5e8c7930 1px,transparent 1px),linear-gradient(90deg,#5e8c7930 1px,transparent 1px)}.auth-panel{background:linear-gradient(140deg,#09231c,#02100d)}
.auth-tabs,.auth-card input{background:#071d18;border-color:#285044}.auth-tabs button.active{background:#123b30;box-shadow:inset 0 0 0 1px #5c806f}.auth-card input:focus{box-shadow:0 0 0 3px #e8bd631c}.primary,.send{background:linear-gradient(115deg,#8a6428,#f6d58a 52%,#a77832);color:#102018}
.brand .brand-logo{width:132px;filter:drop-shadow(0 0 20px #dfb65a36)}.brand.big .brand-logo{width:178px}.brand-logo{border-radius:12px}.sidebar{background:#041511;border-color:#21483c}.new-chat{border-color:#7a6031;background:linear-gradient(120deg,#173c31,#0a211b);color:#fff5d8}.nav-item.active{background:#12372d;color:#fff7e6}.chat-item:hover,.chat-item.active{background:#0e2c24;color:#fffaf0}.account-box>div:first-child{background:#153d32;color:#f2ca77}
.workspace{background:radial-gradient(circle at 50% 18%,#154639 0,transparent 36%),#041511}.topbar{background:#041511ed}.vision-orb>img{box-shadow:0 0 38px #e8bd6345;border:1px solid #a47a35}.vision-orb span{border-color:#e8bd6352}.dropzone{border-color:#6d6643;background:#08251e8f}.dropzone:hover,.dropzone.drag{background:#12372d}.analysis-grid div{border-color:#315348;background:#08231d}.analysis-grid b{color:#648779}
.msg.assistant .avatar{background:#071b16;border:1px solid #9b7636}.msg.user .bubble{background:#09251e;border-color:#315348}.composer{border-color:#456b5d;background:#071d18}.composer:focus-within{border-color:#d4aa54}.attach{border-color:#536f64}.image-preview{background:#0b2922;border-color:#456b5d}.knowledge-used{color:#e4bf70;border-color:#3c5f53;background:#09251e}.install-app{border-color:#755b2d;background:#0d2e25;color:#f2d58e}

.affiliate-dashboard{overflow:auto;padding:28px clamp(16px,3vw,44px) 50px;background:radial-gradient(circle at 70% 0,#194d3e 0,transparent 36%),#041511}.affiliate-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}.affiliate-head h1{font-size:clamp(27px,3vw,42px);margin:8px 0 4px}.affiliate-head p{margin:0;color:#91a99f}.admin-badge{border:1px solid #a67d38;border-radius:999px;padding:9px 14px;color:#f3cf83;background:#392b12;font-size:9px;font-weight:900;letter-spacing:.14em}.affiliate-card{border:1px solid #315348;background:#08231d;border-radius:15px;padding:17px;margin-bottom:13px}.rate-form{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr)) auto;gap:12px;align-items:end;margin-top:16px}.rate-form label>span,.custom-rate-fields label{display:block;color:#8ca79d;font-size:9px;font-weight:800;letter-spacing:.12em}.rate-form label>div,.custom-rate-fields label>div{display:grid;grid-template-columns:1fr 34px;align-items:center;margin-top:7px;border:1px solid #3f6558;border-radius:11px;background:#061a15;overflow:hidden}.rate-form input,.custom-rate-fields input{width:100%;border:0;outline:0;background:transparent;color:#fff7e5;padding:12px;font-size:18px;font-weight:800}.rate-form label b,.custom-rate-fields label b{text-align:center;color:#e8bd63}.affiliate-save{border:0;border-radius:11px;padding:14px 18px;background:linear-gradient(115deg,#8a6428,#f6d58a 52%,#a77832);color:#102018;font-weight:900;white-space:nowrap}.affiliate-save.full{width:100%;margin-top:18px}.affiliate-grid{display:grid;grid-template-columns:minmax(330px,1.1fr) minmax(300px,.9fr);gap:13px}.accounts-card,.editor-card{min-height:470px;margin:0}.account-search{height:45px;margin:15px 0;display:grid;grid-template-columns:36px 1fr;align-items:center;border:1px solid #3a6053;border-radius:12px;background:#061a15}.account-search span{text-align:center;color:#e8bd63;font-size:20px}.account-search input{height:100%;min-width:0;border:0;outline:0;background:transparent;color:#fffaf0;padding:0 12px 0 0}.affiliate-accounts{display:grid;gap:7px;max-height:380px;overflow:auto}.affiliate-account{width:100%;display:grid;grid-template-columns:38px 1fr;gap:10px;align-items:center;text-align:left;border:1px solid transparent;border-radius:11px;background:#0b2a22;color:#fffaf0;padding:10px}.affiliate-account:hover,.affiliate-account.active{border-color:#b78b41;background:#12382e}.affiliate-account-avatar,.selected-user>div:first-child{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:#173f34;color:#f4cf82;font-weight:900}.affiliate-account b,.affiliate-account small,.affiliate-account em{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.affiliate-account b{font-size:11px}.affiliate-account small{font-size:9px;color:#89a59a;margin-top:3px}.affiliate-account em{font-size:8px;color:#d8b76f;margin-top:4px;font-style:normal}.affiliate-no-result,.affiliate-editor-empty{min-height:300px;display:grid;place-items:center;align-content:center;text-align:center;color:#769388}.affiliate-editor-empty b{color:#fff3d5;margin-bottom:7px}.affiliate-editor-empty span{font-size:10px}.selected-user{display:grid;grid-template-columns:52px 1fr;gap:12px;align-items:center;padding-bottom:16px;border-bottom:1px solid #315348}.selected-user>div:first-child{width:52px;height:52px;font-size:20px}.selected-user b,.selected-user span,.selected-user small{display:block}.selected-user span{font-size:10px;color:#8fa99f;margin-top:4px}.selected-user small{font-size:9px;color:#d8b76f;margin-top:5px}.custom-switch{display:grid;grid-template-columns:38px 1fr;gap:10px;align-items:center;margin:19px 0;cursor:pointer}.custom-switch input{display:none}.custom-switch>span{width:36px;height:21px;border-radius:12px;background:#315348;position:relative;transition:.2s}.custom-switch>span:after{content:"";position:absolute;width:15px;height:15px;left:3px;top:3px;border-radius:50%;background:#9bb0a8;transition:.2s}.custom-switch input:checked+span{background:#a67d38}.custom-switch input:checked+span:after{left:18px;background:#fff3d2}.custom-switch b,.custom-switch small{display:block}.custom-switch b{font-size:11px}.custom-switch small{font-size:9px;color:#7e9b90;margin-top:4px}.custom-rate-fields{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.custom-rate-fields.disabled{opacity:.4}.effective-rate-note{margin-top:15px;padding:11px;border-radius:10px;background:#0b2a22;color:#b5c8c0;font-size:9px;line-height:1.5}
@media(max-width:850px){.affiliate-dashboard{padding:18px 10px 35px}.affiliate-grid{grid-template-columns:1fr}.rate-form{grid-template-columns:repeat(3,1fr)}.rate-form .affiliate-save{grid-column:1/-1}.affiliate-head{align-items:flex-start}.admin-badge{font-size:7px}.accounts-card,.editor-card{min-height:auto}.affiliate-accounts{max-height:310px}}
@media(max-width:480px){.rate-form,.custom-rate-fields{grid-template-columns:1fr}.affiliate-head p{font-size:11px}.panel-title span{display:none}}

/* KEYTECH V3 - trình soạn thảo thuần văn bản */
.composer{grid-template-columns:1fr 44px}
.brand-orb{width:64px;height:64px;margin:auto;position:relative}.brand-orb>img{width:58px;height:58px;border-radius:17px;object-fit:cover;box-shadow:0 0 38px #e8bd6345;border:1px solid #a47a35}.brand-orb span{position:absolute;inset:-7px;border:1px solid #e8bd6352;border-radius:22px}
