:root{
  --bg:#03101f;
  --panel:#081827;
  --panel-2:#0a1d2d;
  --line:#16304a;
  --line-soft:#1a3450;
  --text:#eaf3ff;
  --muted:#8ea4bf;
  --blue:#4a8dff;
  --blue-2:#326fdf;
  --bubble:#122235;
  --bubble-user:#4a89ff;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at 50% 18%, #082352 0%, #04152a 33%, #02101d 72%, #010b14 100%);
  overflow:hidden;
}

.shell{
  display:grid;
  grid-template-columns:274px 1fr;
  height:100vh;
}

.sidebar{
  padding:18px 16px;
  border-right:1px solid var(--line);
  background:linear-gradient(180deg,#071628 0%,#04111f 100%);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}

.brand-badge{
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-weight:700;
  font-size:28px;
  color:#cfe1ff;
  background:linear-gradient(180deg,#17395b,#0d2844);
  border:1px solid #244566;
}

.brand-title{
  font-weight:800;
  letter-spacing:1px;
  font-size:17px;
}

.brand-sub{
  color:var(--muted);
  font-size:12px;
  margin-top:4px;
}

.primary-btn,.secondary-btn,.chat-pill,.trash-pill,.lock-btn{
  border:1px solid transparent;
  outline:none;
  cursor:pointer;
}

.primary-btn{
  width:100%;
  border-radius:16px;
  padding:14px 16px;
  background:linear-gradient(180deg,#5c9bff,#4a86ea);
  color:#fff;
  font-size:15px;
  font-weight:700;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14);
}

.sidebar-label{
  margin:18px 2px 10px;
  color:#9fb5cf;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.8px;
}

.saved-chats{
  min-height:88px;
}

.chat-pill-row{
  display:grid;
  grid-template-columns:1fr 42px;
  align-items:center;
  gap:10px;
}

.chat-pill{
  text-align:left;
  border-radius:28px;
  padding:14px 16px;
  min-height:62px;
  color:#fff;
  background:linear-gradient(180deg,#16365d,#102a48);
  border-color:#38679b;
  font-size:13px;
  line-height:1.2;
}

.trash-pill,
.mini-trash{
  width:40px;
  height:40px;
  border-radius:12px;
  background:#13263a;
  color:#d5e4f7;
  border:1px solid #28455f;
}

.workspace-card{
  margin-top:18px;
  border:1px solid var(--line-soft);
  border-radius:20px;
  padding:14px;
  background:linear-gradient(180deg,#0b1d2e 0%,#09192a 100%);
}

.workspace-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}

.workspace-title{
  font-size:30px;
  font-weight:700;
  line-height:1;
  transform:scale(.48);
  transform-origin:left center;
  width:120px;
  margin-left:0;
}

.workspace-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}

.secondary-btn{
  border-radius:14px;
  padding:14px 10px;
  background:#1a2a3c;
  border-color:#2f4a67;
  color:#fff;
  font-weight:700;
  font-size:12px;
  line-height:1.2;
}

.latest-file-box{
  margin-top:12px;
  border-radius:14px;
  border:1px solid #213952;
  background:#0f1d2d;
  color:#9cb0c8;
  font-size:12px;
  padding:14px 12px;
}

.main{
  padding:14px 16px 14px 14px;
  display:flex;
  flex-direction:column;
  min-width:0;
}

.top-pills{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}

.status-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid #244e3e;
  background:rgba(10,29,25,.35);
  color:#e8fff0;
  border-radius:999px;
  padding:10px 14px;
  font-weight:700;
  font-size:14px;
}

.dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#26d85a;
  display:inline-block;
}

.speak-pill input{
  accent-color:#6aa5ff;
}

.top-right-lock{
  margin-left:auto;
}

.lock-btn{
  width:48px;
  height:40px;
  border-radius:14px;
  background:linear-gradient(180deg,#10263f,#0c1d33);
  border-color:#2a4f75;
  color:#ffcb67;
  font-size:18px;
}

.hero-card{
  display:flex;
  align-items:center;
  gap:18px;
  border:1px solid var(--line);
  border-radius:26px;
  min-height:96px;
  padding:18px 22px;
  background:linear-gradient(180deg,rgba(10,26,41,.62),rgba(6,19,31,.48));
}

.orb-wrap{
  width:88px;
  height:88px;
  border-radius:50%;
  display:grid;
  place-items:center;
}

.orb{
  width:64px;
  height:64px;
  border-radius:50%;
  background:
    radial-gradient(circle at 35% 35%, #b8dcff 0%, #6ea8ff 16%, #234980 40%, #10294a 68%, #09172c 100%);
  box-shadow:
    0 0 0 8px rgba(49,92,150,.18),
    0 0 22px rgba(92,152,255,.32),
    inset 0 0 10px rgba(255,255,255,.22);
}

.hero-title{
  font-size:22px;
  font-weight:800;
  margin-bottom:6px;
}

.hero-sub{
  color:#9ab2cf;
  font-size:14px;
}

.chat-area{
  flex:1;
  min-height:0;
  padding:18px 8px 10px;
  overflow:auto;
}

.msg-row{
  display:flex;
  margin:0 0 14px;
}

.msg-row.user{
  justify-content:flex-end;
}

.msg-row.assistant{
  justify-content:flex-start;
}

.bubble{
  max-width:420px;
  border-radius:20px;
  padding:16px 18px;
  line-height:1.35;
  font-size:15px;
  box-shadow:0 2px 12px rgba(0,0,0,.12);
  white-space:pre-wrap;
}

.msg-row.assistant .bubble{
  background:linear-gradient(180deg,#1a2838,#111f2f);
  color:#fff;
  border:1px solid #263c54;
}

.msg-row.user .bubble{
  background:linear-gradient(180deg,#5b95ff,#4a85ea);
  color:#fff;
}

.sources{
  margin-top:8px;
  font-size:12px;
  line-height:1.4;
}

.sources a{
  color:#86b5ff;
  text-decoration:none;
  word-break:break-all;
}

.composer{
  display:grid;
  grid-template-columns:1fr 104px;
  gap:12px;
  border:1px solid var(--line);
  border-radius:24px;
  padding:14px;
  background:linear-gradient(180deg,rgba(9,22,35,.68),rgba(7,17,28,.72));
}

.composer input{
  width:100%;
  background:#17273a;
  border:1px solid #263b53;
  color:#fff;
  border-radius:18px;
  padding:16px 18px;
  font-size:16px;
  outline:none;
}

.composer button{
  border:none;
  border-radius:18px;
  background:linear-gradient(180deg,#5c9bff,#4a86ea);
  color:#fff;
  font-size:18px;
  font-weight:700;
  cursor:pointer;
}

@media (max-width: 1100px){
  .shell{grid-template-columns:250px 1fr}
  .bubble{max-width:340px}
}
