*{box-sizing:border-box}
*::-webkit-scrollbar{display:none}
*{scrollbar-width:none;-ms-overflow-style:none}
html,body{width:100vw;height:100vh}
body{margin:0;font-family:Inter,system-ui,Segoe UI,Arial;background:#0b1520;color:#e8eef5;overflow:hidden}
.app{height:100vh}
.auth{display:flex;align-items:center;justify-content:center;height:100vh;background:radial-gradient(1200px 600px at 20% 10%,#132434 30%,#0b1520 60%)}
.auth-card{width:360px;background:#0e1a28;border:1px solid #1f3246;border-radius:14px;padding:20px;box-shadow:0 10px 30px rgba(0,0,0,.3)}
.brand{font-weight:600;font-size:20px;margin-bottom:14px;display:flex;align-items:center;gap:8px}
.tabs{display:flex;gap:8px;margin-bottom:12px}
.tab{flex:1;background:#152537;color:#cfe1ff;border:1px solid #27435f;border-radius:10px;padding:10px;cursor:pointer}
.tab.active{background:#1f3650}
.tab-content{display:flex;flex-direction:column;gap:10px}
.tab-content.hidden{display:none}
.auth input{background:#0b1520;border:1px solid #193048;color:#dbe7f3;border-radius:10px;padding:10px}
.auth select{background:#0b1520;border:1px solid #193048;color:#dbe7f3;border-radius:10px;padding:10px;width:100%}
.row{display:flex;gap:10px}
.row>*{flex:1}
.phone-row{display:flex;gap:0;align-items:center}
.phone-row .code{background:#0b1520;border:1px solid #193048;color:#cfe1ff;border-radius:10px 0 0 10px;padding:10px 16px;min-width:80px;text-align:center;border-right:0;font-weight:600}
.phone-row input{background:#0b1520;border:1px solid #193048;color:#e8eef5;border-radius:0 10px 10px 0;padding:12px;flex:1;border-left:0}
.phone-row .code, .phone-row input{height:44px}
.forgot{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(11,21,32,.7)}
.forgot.hidden{display:none}
.reset{min-height:100vh;display:flex;align-items:center;justify-content:center;background:radial-gradient(1000px 500px at 15% 0%,#132434 30%,#0b1520 60%)}
.card{width:380px;background:#0e1a28;border:1px solid #1f3246;border-radius:16px;padding:22px;box-shadow:0 20px 60px rgba(0,0,0,.35)}
.subtitle{color:#9fb2c6;font-size:13px;margin:6px 0 14px}
.input-group{position:relative}
.input-group input{width:100%;background:#0b1520;border:1px solid #193048;color:#e8eef5;border-radius:12px;padding:12px 44px 12px 12px}
.input-group .toggle{position:absolute;right:8px;top:8px;background:#132434;color:#cfe1ff;border:1px solid #193048;border-radius:8px;padding:6px 10px;cursor:pointer}
.meter{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px}
.meter .bar{height:8px;border-radius:6px;background:#132434}
.meter.weak .bar:nth-child(1){background:#ff4d4f}
.meter.medium .bar:nth-child(-n+2){background:#f7b500}
.meter.strong .bar{background:#27ae60}
.actions{margin-top:12px}
.actions .primary{width:100%;background:#5293DE;border:none;border-radius:12px;padding:12px;color:#fff;cursor:pointer}
.actions .primary:disabled{opacity:.6;cursor:not-allowed}
.auth button{background:#5293DE;border:none;border-radius:10px;padding:10px;color:#fff;cursor:pointer}
.auth-note{margin-top:10px;font-size:12px;color:#9fb2c6;text-align:center}
.layout{display:grid;grid-template-columns:260px 1fr 280px;gap:12px;padding:12px;height:100vh}
.sidebar,.rightbar{background:#0e1a28;border:1px solid #1f3246;border-radius:14px;padding:14px;overflow:auto}
.sidebar{display:flex;flex-direction:column;gap:12px}
.menu{display:flex;flex-direction:column;flex:1 1 auto}
.menu .menu-title:nth-of-type(2){margin-top:auto}
.profile-card{margin-top:0}
.content{background:#0e1a28;border:1px solid #1f3246;border-radius:14px;padding:14px;display:flex;flex-direction:column;overflow:auto}
.menu-title{font-weight:600;color:#cfe1ff;margin:8px 0 12px}
.menu-item{display:block;padding:10px;border-radius:10px;color:#cfe1ff;text-decoration:none;background:#0b1520;border:1px solid #193048;margin-bottom:8px}
.menu-item:hover{background:#17273a}
.history-item{display:flex;align-items:center;justify-content:space-between;background:#0b1520;border:1px solid #193048;border-radius:10px;padding:8px;color:#cfe1ff}
.history-item .title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-item .actions{display:flex;gap:6px}
.history-item .btn{background:#152537;border:1px solid #27435f;color:#cfe1ff;border-radius:8px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0}
.history-item .btn:hover{background:#1f3650}
.stats{margin-top:20px;font-size:12px;color:#9fb2c6}
.stat{margin-top:6px}
.profile-card{margin-top:auto;background:#0b1520;border:1px solid #193048;border-radius:14px;padding:10px;box-shadow:0 6px 20px rgba(0,0,0,.25)}
.profile-row{display:flex;gap:10px;align-items:flex-start}
.avatar-col{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.profile-card .avatar{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#5293DE;color:#fff;font-weight:700}
.profile-card .info .name{font-weight:600;color:#cfe1ff}
.profile-card .info .sub{font-size:11px;color:#9fb2c6}
.profile-card .edit.hidden{display:none}
.profile-card .input{background:#0b1520;border:1px solid #193048;color:#e8eef5;border-radius:10px;padding:8px;margin-top:6px;width:100%}
.profile-card .actions{display:flex;gap:8px;margin-top:8px}
.chat-header{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.chat-title{font-weight:600;display:flex;align-items:center;gap:8px}
.brand-logo{height:24px;width:auto;object-fit:contain;border-radius:6px}
.weather{color:#9fb2c6;font-size:12px}
.chat-tools{display:flex;gap:8px;align-items:center;background:#0b1520;border:1px solid #193048;border-radius:12px;padding:8px;margin-bottom:4px}
.tool-btn{background:transparent;color:#cfe1ff;border:1px solid #27435f;border-radius:10px;padding:6px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px}
.tool-btn:hover{background:#152537}
.tool-space{flex:1}
.select{background:#0b1520;color:#cfe1ff;border:1px solid #193048;border-radius:10px;padding:8px}
.icon{width:16px;height:16px}
.hamburger{display:none}
.backdrop{position:fixed;inset:0;background:rgba(0,0,0,.35);display:none;z-index:999}
.google-btn{display:flex;align-items:center;justify-content:center;gap:8px;background:#fff;color:#1c1f24;border:1px solid #e0e0e0;border-radius:12px;padding:10px 14px;cursor:pointer;width:fit-content;margin:6px auto 0 auto;font-weight:600}
.google-btn:hover{background:#f7f7f7}
.google-icon{width:18px;height:18px}
.dropdown{position:absolute;background:#0e1a28;border:1px solid #1f3246;border-radius:10px;padding:8px;display:flex;gap:6px}
.dropdown .pill{padding:8px}
.chat{flex:1;min-height:0;overflow:auto;background:#0b1520;border:1px solid #193048;border-radius:16px;padding:20px;box-shadow:0 6px 20px rgba(0,0,0,.25)}
.msg{padding:14px 16px;border-radius:16px;margin-bottom:12px;max-width:85%;width:fit-content;box-shadow:0 4px 12px rgba(0,0,0,.25)}
.msg.user{background:linear-gradient(180deg,#234a78,#1f3650);color:#e8eef5;margin-left:auto}
.msg.assistant{background:linear-gradient(180deg,#14283f,#132434);color:#cfe1ff}
.msg .meta{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.msg .avatar{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}
.msg .avatar.assistant{background:#1f3650;color:#fff}
.msg .avatar.user{background:#5293DE;color:#fff}
.msg .name{font-weight:600;color:#cfe1ff}
.msg .content{white-space:pre-wrap;line-height:1.6;word-break:break-word}
.msg-actions{display:flex;gap:6px;margin-top:8px}
.msg-action{border:1px solid #27435f;color:#5293DE;background:transparent;width:28px;height:28px;border-radius:8px}
.msg-action:hover{background:#152537}
.msg-action.active{color:#7fb3ff;border-color:#3a6ea5}
.chat-table{width:100%;border-collapse:collapse;margin-top:8px;font-size:12px}
.chat-table th,.chat-table td{border:1px solid #193048;padding:6px;color:#cfe1ff}
.chat-table th{background:#132434}
.welcome{background:#132434;border:1px solid #1f3246;border-radius:12px;padding:14px;color:#cfe1ff;margin-bottom:16px}
.welcome-header{display:flex;align-items:center;gap:8px;font-weight:600;margin-bottom:8px}
.welcome-header .badge{background:#1f3650;color:#fff;border-radius:8px;padding:4px 8px;font-size:12px}
.welcome-body{font-size:14px;color:#cfe1ff}
.welcome-body p{margin:8px 0}
.welcome-list{list-style:none;padding:0;margin:8px 0}
.welcome-list li{position:relative;padding-left:22px;margin:6px 0}
.welcome-list li::before{content:none}
.chat-input{display:flex;gap:10px;margin-top:6px;background:#0b1520;border:1px solid #193048;border-radius:14px;padding:10px}
.chat-input input{flex:1;background:#0b1520;border:1px solid #193048;color:#e8eef5;border-radius:12px;padding:14px}
.chat-input button{background:#5293DE;border:none;border-radius:12px;padding:12px 16px;color:#fff;cursor:pointer}
.chat-input .icon-btn{background:transparent !important;border:1px solid #27435f;border-radius:10px;padding:0;width:36px;height:36px;color:#cfe1ff;display:inline-flex;align-items:center;justify-content:center}
.chat-input .icon-btn:hover{background:#152537}
.chat-input .icon{width:18px;height:18px}
.right-title{font-weight:600;margin-bottom:8px}
.right-list{display:flex;flex-direction:column;gap:8px}
.rightbar .right-list:first-of-type{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}
.integration{display:flex;align-items:center;justify-content:space-between;background:#0b1520;border:1px solid #193048;border-radius:12px;padding:8px}
.integration .left{display:flex;align-items:center;gap:6px}
.integration .badge{display:none}
.integration .name{font-weight:400;color:#cfe1ff;font-size:11px}
.integration .actions{display:flex;gap:8px}
.integration .actions .pill{padding:8px 10px;font-size:12px}
.integration .status{font-size:11px;color:#9fb2c6}
.pill{background:#0b1520;color:#cfe1ff;border:1px solid #193048;border-radius:10px;padding:10px;cursor:pointer;text-align:left}
.pill:hover{background:#132434}
.rightbar .right-list:first-of-type .prompt{background:linear-gradient(180deg,#0f1e2c,#0b1520);border:1px solid rgba(39,67,95,.6);color:#cfe1ff;border-radius:14px;padding:8px 12px;font-size:12px;font-weight:400;cursor:pointer;box-shadow:0 6px 18px rgba(16,32,48,.25);transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease,background .15s ease}
.rightbar .right-list:first-of-type .prompt:hover{transform:translateY(-1px);box-shadow:0 10px 28px rgba(42,120,255,.18);border-color:#315274;background:linear-gradient(180deg,#132434,#0b1520)}
.rightbar .right-list:first-of-type .prompt:active{transform:translateY(0)}
.rightbar .right-list:first-of-type .prompt:focus{outline:none}
.rightbar .right-list:first-of-type .prompt-add{grid-column:1/-1;background:#0b1520;border:1px solid #193048;border-radius:12px;padding:8px}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background:transparent;border:1px solid #27435f;border-radius:10px;color:#cfe1ff}
.icon-btn:hover{background:#152537}
.icon-btn.hamburger{display:none}
.chat-actions{display:flex;gap:8px;margin-left:auto}
.chat-header .pill.icon-btn{background:transparent}
.prompt-add{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.prompt-add{display:grid;grid-template-columns:1fr 44px;grid-template-areas:'name add' 'content content';gap:6px}
.prompt-add #prompt-name{grid-area:name}
.prompt-add #prompt-content{grid-area:content;min-height:72px}
.prompt-add #add-prompt{grid-area:add;width:44px;height:44px;padding:0;align-self:center}
.prompt-add input,.prompt-add textarea{background:#0b1520;border:1px solid #193048;color:#e8eef5;border-radius:8px;padding:8px;font-size:12px}
.add-btn{display:flex;align-items:center;justify-content:center;gap:6px;background:linear-gradient(135deg,#4a8fd6,#6fb2f0);color:#fff;border:none;border-radius:12px;padding:0;font-weight:600;cursor:pointer}
.add-btn .icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:8px;background:rgba(255,255,255,.18)}
.add-btn:hover{filter:brightness(1.05);transform:translateY(-1px);box-shadow:0 8px 24px rgba(42,120,255,.25)}
.add-btn:active{transform:translateY(0)}
.panel{display:flex;flex-direction:column;gap:12px}
.panel-title{font-weight:600}
.toolbar{display:flex;gap:8px;align-items:center}
.toolbar .input{flex:1;background:#0b1520;border:1px solid #193048;color:#e8eef5;border-radius:10px;padding:10px}
.pager{display:flex;gap:8px}
.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.menu-item.active{background:#1f3650}
.metric{background:#0b1520;border:1px solid #193048;border-radius:12px;padding:14px;text-align:center}
.table{width:100%;border-collapse:collapse}
.table td,.table th{border:1px solid #193048;padding:8px}
.chart{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.bar{height:60px;background:#5293DE;border-radius:8px}
@media(max-width:980px){.layout{grid-template-columns:1fr} .chat{height:55vh} .hamburger{display:inline-flex} .icon-btn.hamburger{display:inline-flex} .weather{display:none}
 .sidebar{position:fixed;left:0;top:0;bottom:0;width:80%;max-width:340px;background:#0e1a28;border:1px solid #1f3246;border-radius:0;transform:translateX(-100%);transition:transform .25s ease;z-index:1000;display:block}
 .rightbar{position:fixed;right:0;top:0;bottom:0;width:80%;max-width:340px;background:#0e1a28;border:1px solid #1f3246;border-radius:0;transform:translateX(100%);transition:transform .25s ease;z-index:1000;display:block}
 body.mobile-left-open .sidebar{transform:translateX(0)}
 body.mobile-right-open .rightbar{transform:translateX(0)}
 body.mobile-left-open .backdrop, body.mobile-right-open .backdrop{display:block}
}
.add-btn.icon-btn{border:none}
.menu .prompt-add #conv-new{color:#5293DE;border-color:#27435f;background:transparent}
.menu .prompt-add #conv-new:hover{background:#152537}