
:root{--navy:#08213f;--blue:#1677ff;--bg:#f4f7fb;--card:#fff;--text:#17233c;--muted:#667085;--line:#dfe6ef;--orange:#ef8b17;--green:#159957;--red:#d94b4b}
*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}
button,input,select,textarea{font:inherit}.app{display:grid;grid-template-columns:245px 1fr;min-height:100vh}
.sidebar{background:linear-gradient(180deg,var(--navy),#06172c);color:white;padding:22px 16px;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:12px;margin-bottom:28px}.logo{width:38px;height:38px;border-radius:11px;background:linear-gradient(135deg,#2f91ff,#0a3a7b);display:grid;place-items:center;font-weight:800}
.brand h1{font-size:20px;margin:0}.brand small{display:block;color:#a9bed6;font-size:10px;letter-spacing:1px}.new{width:100%;border:0;border-radius:8px;background:var(--blue);color:white;padding:13px;font-weight:700;margin-bottom:22px;cursor:pointer}
.navlabel{font-size:10px;color:#8198b3;margin:16px 8px 8px;letter-spacing:.8px}.navitem{padding:11px 12px;border-radius:8px;color:#dbe7f3;margin:4px 0}.navitem.active{background:#17395f;color:white}
.assistant{position:absolute;bottom:22px;left:16px;right:16px;padding:14px;border-radius:10px;background:#15375d}.online{color:#159957;font-size:12px}.offline{color:#ffb4ab;font-size:12px}
.main{min-width:0}.topbar{height:70px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px}
.title{font-size:20px;font-weight:800}.subtitle,.small{font-size:12px;color:var(--muted);margin-top:3px}.model{font-size:12px;color:var(--muted)}
.content{padding:24px}.casebar{display:flex;justify-content:space-between;margin-bottom:18px}.casebar select{min-width:380px;padding:10px;border:1px solid var(--line);border-radius:8px;background:white}.casebar button{border:1px solid var(--line);background:white;border-radius:8px;padding:10px 15px;cursor:pointer}
.casehead{margin-bottom:18px}.casehead h2{margin:5px 0 10px;font-size:25px}.badge{display:inline-block;padding:6px 10px;border-radius:18px;background:#eaf3ff;color:#0867d2;font-size:11px;margin-right:6px}.badge.orange{background:#fff5e6;color:#a45c00}
.workspace{display:grid;grid-template-columns:320px minmax(520px,1fr);gap:16px}.card{background:white;border:1px solid var(--line);border-radius:11px;box-shadow:0 2px 8px rgba(10,35,66,.04)}
.docs{padding:16px;height:calc(100vh - 220px);overflow:auto}.cardhead{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:12px}.cardhead h3{font-size:12px;margin:0;letter-spacing:.4px}
.upload{display:block;border:1px dashed #8bb8ef;background:#f5f9ff;color:#0b66d0;text-align:center;border-radius:9px;padding:18px;cursor:pointer;font-weight:700}.upload input{display:none}.uploadHint{font-size:10px;color:var(--muted);text-align:center;margin:7px 0 15px}
.doc{display:flex;gap:10px;align-items:center;padding:11px 8px;border-bottom:1px solid #edf1f5;font-size:12px}.docIcon{width:32px;height:32px;border-radius:7px;background:#eaf3ff;display:grid;place-items:center}.docName{word-break:break-word}
.discipline{margin-top:20px;padding:13px;border-radius:9px;background:#fff7e8;border-left:4px solid var(--orange);font-size:12px}.discipline p{line-height:1.45;margin-bottom:0}
.chat{height:calc(100vh - 220px);display:flex;flex-direction:column;padding:16px}.messages{flex:1;overflow:auto;padding:4px 8px 8px}.msg{max-width:86%;padding:12px 14px;border-radius:11px;margin:10px 0;font-size:13px;line-height:1.55;white-space:pre-wrap}.assistantMsg{background:#eaf3ff;margin-right:auto}.userMsg{background:#eef0f3;margin-left:auto}.who{font-weight:800;margin-bottom:4px;font-size:12px}
.typing{font-size:12px;color:#0b66d0;padding:6px 10px}.hidden{display:none}.suggestions{display:flex;gap:7px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:10px}.suggestions button{border:1px solid #bed6f3;background:#f5f9ff;color:#0b66d0;border-radius:18px;padding:7px 10px;cursor:pointer;font-size:11px}
.composer{display:flex;gap:9px;margin-top:10px}.composer textarea{flex:1;border:1px solid var(--line);border-radius:10px;padding:11px;resize:none}.composer button{border:0;border-radius:9px;background:var(--blue);color:white;font-weight:700;padding:0 22px;cursor:pointer}.composer button:disabled{opacity:.55}
.disclaimer{font-size:10px;color:var(--muted);margin-top:7px;text-align:center}dialog{border:0;border-radius:12px;padding:22px;box-shadow:0 20px 60px rgba(0,0,0,.2);width:430px}dialog::backdrop{background:rgba(5,22,42,.55)}dialog h3{margin-top:0}dialog label{display:block;font-size:12px;font-weight:700;margin:14px 0}dialog input{width:100%;padding:10px;border:1px solid var(--line);border-radius:7px;margin-top:6px}.dialogActions{display:flex;justify-content:flex-end;gap:8px}.dialogActions button{padding:9px 14px;border-radius:7px;border:1px solid var(--line);cursor:pointer}.dialogActions button:last-child{background:var(--blue);color:white;border-color:var(--blue)}
.toast{position:fixed;right:25px;bottom:25px;background:#0d315d;color:white;padding:12px 16px;border-radius:9px;display:none;max-width:420px}
@media(max-width:900px){.app{grid-template-columns:1fr}.sidebar{display:none}.workspace{grid-template-columns:1fr}.docs,.chat{height:auto;min-height:500px}.content{padding:15px}.casebar select{min-width:0;flex:1;margin-right:8px}}

/* Tayra dark theme */
:root{
  --navy:#07111f;
  --blue:#3182f6;
  --bg:#0b1220;
  --card:#111b2c;
  --text:#e8eef8;
  --muted:#91a0b7;
  --line:#26354a;
  --orange:#f5a524;
  --green:#39c985;
  --red:#ff6b6b;
}

body{
  background:var(--bg);
  color:var(--text);
}

.sidebar{
  background:linear-gradient(180deg,#07111f,#050b14);
  border-right:1px solid #1d2b3d;
}

.topbar{
  background:#0f1929;
  border-bottom:1px solid var(--line);
}

.card,
.casebar select,
.casebar button,
.composer textarea,
dialog{
  background:var(--card);
  color:var(--text);
  border-color:var(--line);
}

.casebar select,
.composer textarea,
dialog input{
  color-scheme:dark;
}

.card{
  box-shadow:0 8px 24px rgba(0,0,0,.22);
}

.badge{
  background:#132c4d;
  color:#76b5ff;
}

.badge.orange{
  background:#3a2910;
  color:#ffc66d;
}

.upload{
  background:#101f34;
  border-color:#3f6fa8;
  color:#75b4ff;
}

.doc{
  border-bottom-color:#223044;
}

.docIcon{
  background:#16304f;
}

.discipline{
  background:#2b2113;
  color:#f5dfb5;
}

.assistantMsg{
  background:#152b47;
  color:#e8eef8;
}

.userMsg{
  background:#263244;
  color:#f3f6fb;
}

.suggestions button{
  background:#13243b;
  border-color:#35577f;
  color:#79b8ff;
}

.composer textarea::placeholder{
  color:#7f8da3;
}

.navitem{
  color:#b9c7d9;
}

.navitem.active{
  background:#17395f;
}

.assistant{
  background:#122943;
  border:1px solid #234568;
}

.toast{
  background:#18365c;
}

dialog input{
  background:#0d1726;
  color:var(--text);
  border-color:var(--line);
}

.dialogActions button{
  background:#172235;
  color:var(--text);
}

select option{
  background:#111b2c;
  color:#e8eef8;
}
