:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #162b26;
  background: #eef2ed;
  --sidebar: #102925;
  --muted: #52665e;
  --line: #dce5de;
  --mint: #daefdb;
  --lime: #dbf4ab;
  --green: #174a3e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #468366; outline-offset: 3px; }
svg { display: block; width: 22px; height: 22px; }
h1, h2, h3, p { margin: 0; }
.loading { padding: 2rem; }
.shell { display: grid; grid-template-columns: 318px minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar { background: var(--sidebar); color: #f4fff8; display: flex; flex-direction: column; min-height: 0; padding: 27px 16px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.sidebar .brand { margin: 0 10px 22px; }
.brand-symbol { display: grid; place-items: center; width: 44px; height: 44px; background: var(--lime); color: #1e4537; border-radius: 13px; }
.brand-symbol svg { width: 30px; height: 30px; }
.brand strong { display: block; font-size: 17px; font-weight: 740; letter-spacing: -.035em; }
.brand small { display: block; font-size: 9px; font-weight: 700; letter-spacing: .19em; margin-top: 4px; opacity: .66; }
.workspace-label { display: flex; align-items: center; gap: 8px; color: #c5d9ce; border: 1px solid #3b554c; border-radius: 30px; align-self: flex-start; margin: 0 10px 30px; padding: 6px 10px; font-size: 11px; }
.workspace-label i { width: 7px; height: 7px; background: #c8e99d; border-radius: 50%; }
.inbox-title { display: flex; justify-content: space-between; align-items: center; margin: 0 10px 14px; }
.inbox-title h2 { font-size: 29px; letter-spacing: -.05em; }
.icon-button { padding: 0; border: 0; background: transparent; color: inherit; border-radius: 9px; width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; }
.icon-button:hover { background: #7d9a9028; }
.icon-button.add { background: var(--lime); color: #1e4537; }
.search { margin: 0 10px 17px; display: flex; align-items: center; height: 41px; gap: 9px; padding: 0 11px; background: #203933; border: 1px solid #3d564d; border-radius: 9px; color: #a9beb4; }
.search svg { width: 18px; height: 18px; flex-shrink: 0; }
.search input { width: 100%; color: #edf8f1; background: transparent; border: 0; padding: 0; outline: none; font-size: 13px; }
.search:focus-within { border-color: #a3c789; }
.search input::placeholder { color: #a9beb4; }
.chat-list { flex: 1; overflow: auto; }
.chat-list h3 { font-size: 10px; letter-spacing: .15em; color: #a2b9ac; margin: 21px 10px 9px; }
.chat-item { display: flex; align-items: center; text-align: left; width: 100%; gap: 10px; border: 1px solid transparent; border-radius: 11px; padding: 10px 9px; color: #f1f9f4; background: transparent; min-height: 64px; }
.chat-item:hover, .side-action:hover { background: #243e36; }
.chat-item.selected { background: #2a443a; border-color: #496455; }
.chat-label { min-width: 0; flex: 1; }
.chat-label strong, .chat-label small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-label strong { font-size: 14px; margin-bottom: 4px; }
.chat-label small { font-size: 12px; color: #b8cfc1; }
.ai-label { font-size: 10px; border-radius: 6px; background: #deedbe; padding: 4px 6px; color: #234332; font-weight: 750; }
.avatar { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; background: #cde5d2; color: #234737; font-size: 13px; font-weight: 750; }
.avatar.bot { background: var(--lime); color: #285644; }
.avatar.lilac { background: #e2dced; color: #4e3f64; }
.avatar.group { background: #d3e7ea; color: #315a65; }
.avatar.small-avatar { width: 31px; height: 31px; border-radius: 10px; font-size: 10px; margin-top: 20px; }
.small-avatar svg { width: 17px; height: 17px; }
.search-empty { color: #c4d6ce; padding: 12px 10px; font-size: 13px; }
.sidebar-bottom { margin: 12px 0 0; border-top: 1px solid #395349; padding: 9px 0 10px; }
.side-action { color: #e3f0e8; display: flex; width: 100%; gap: 12px; align-items: center; text-align: left; background: transparent; border: 0; border-radius: 9px; padding: 8px 9px; font-size: 13px; }
.side-action.current { background: #2a443a; }
.side-action svg { width: 17px; height: 17px; }
.profile { display: flex; align-items: center; gap: 11px; padding: 10px 8px 3px; }
.profile > div { flex: 1; min-width: 0; }
.profile strong, .profile small { display: block; overflow: hidden; text-overflow: ellipsis; }
.profile strong { font-size: 13px; }
.profile small { margin-top: 3px; color: #c2d3c9; font-size: 11px; }
.profile .avatar { width: 35px; height: 35px; border-radius: 10px; }
.main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.main-header { display: flex; align-items: center; gap: 13px; padding: 15px 30px; min-height: 77px; background: #fbfdf9; border-bottom: 1px solid var(--line); }
.main-header > div { min-width: 0; flex: 1; }
.main-header h1 { font-size: 19px; letter-spacing: -.03em; overflow-wrap: anywhere; }
.main-header p { margin-top: 4px; font-size: 12px; color: var(--muted); }
.private { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 100px; padding: 6px 10px; font-size: 11px; color: #455f52; }
.private svg, .chat-intro svg { width: 14px; height: 14px; flex: 0 0 auto; }
.mobile-back { display: none; }
.chat-scroll { flex: 1; overflow: auto; background-color: #f1f5ee; background-image: radial-gradient(#78907b25 0.65px, transparent 0.65px); background-size: 15px 15px; }
.chat-content { max-width: 1020px; min-height: 100%; margin: 0 auto; padding: 24px 31px 25px; display: flex; flex-direction: column; align-items: stretch; }
.chat-intro { display: flex; justify-content: center; align-items: center; gap: 7px; color: #4c6458; padding: 8px 12px; font-size: 12px; margin: 0 auto; text-align: center; background: #f7faf5; border: 1px solid var(--line); border-radius: 9px; }
#messages { margin-top: auto; }
.day { display: flex; gap: 13px; align-items: center; justify-content: center; margin: 25px 0 20px; color: #52685d; font-size: 11px; }
.day::before, .day::after { content: ''; height: 1px; background: #d9e3d9; flex: 1; }
.day span { padding: 4px 12px; border: 1px solid #dbe5db; border-radius: 30px; background: #f7faf5; min-width: max-content; }
.message { display: flex; gap: 8px; margin-top: 16px; }
.message.out { justify-content: flex-end; }
.message-block { max-width: min(72%, 650px); min-width: 0; }
.message-meta { display: flex; gap: 8px; align-items: center; color: #51675c; font-size: 11px; margin: 0 3px 5px; }
.message-meta time { color: #586c61; }
.out .message-meta { justify-content: flex-end; }
.bubble { background: #fff; border-radius: 3px 12px 12px 12px; border: 1px solid #dfe6dd; padding: 11px 13px; color: #203930; box-shadow: 0 2px 3px #071d1006; }
.bubble p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.out .bubble { background: #dbeeda; border-color: #c9e2c6; border-radius: 12px 3px 12px 12px; }
.bubble.pending { border-color: #e1d6ad; background: #fffaf0; }
.bubble.approved { border-color: #b5d5b5; background: #f9fff7; }
.message-tag { display: inline-block; padding: 3px 7px; border-radius: 5px; margin-bottom: 7px; font-size: 10px; font-weight: 750; }
.message-tag.pending { background: #f2e7c5; color: #5c491d; }
.message-tag.approved { background: #dbefdb; color: #265542; }
blockquote { border-left: 2px solid #9aaa8e; padding: 4px 8px; margin: 0 0 7px; color: #4b5e50; font-size: 12px; overflow-wrap: anywhere; }
.empty-chat { color: var(--muted); text-align: center; margin: 18px 0; font-size: 13px; }
.older { align-self: center; margin: 14px 0; }
.composer-wrap { background: #f9fcf7; border-top: 1px solid var(--line); padding: 13px 28px max(11px, env(safe-area-inset-bottom)); }
.composer { display: flex; gap: 10px; max-width: 956px; margin: 0 auto; align-items: center; border: 1px solid #ccdacf; background: white; border-radius: 13px; padding: 7px; }
.composer:focus-within { border-color: #7aab8c; }
.composer textarea { border: 0; resize: none; flex: 1; min-width: 0; min-height: 42px; max-height: 130px; field-sizing: content; padding: 11px 9px; color: inherit; background: transparent; outline: none; font-size: 14px; line-height: 20px; }
.send { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 9px; background: #1e5948; color: #f8fff4; flex: 0 0 auto; }
.send:hover, .primary:hover { background: #266b55; }
.send svg { width: 20px; height: 20px; }
.composer-note { max-width: 956px; margin: 7px auto 0; color: var(--muted); font-size: 10px; }
.panel { overflow: auto; padding: 27px clamp(16px, 4vw, 56px); background: #f1f5ee; flex: 1; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel h2 { font-size: 20px; letter-spacing: -.025em; }
.panel > h2 { margin-top: 26px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 12px 0; background: #fcfefa; overflow-wrap: anywhere; }
.card h3 { font-size: 15px; margin: 4px 0; }
.card p, .card small, .subtle { color: var(--muted); font-size: 13px; line-height: 1.5; }
.card button { margin-top: 12px; }
.primary, .secondary { border: 1px solid transparent; border-radius: 8px; padding: 9px 13px; font-weight: 680; font-size: 13px; }
.primary { background: #1e5948; color: #f8fff4; }
.secondary { background: #edf4eb; color: #244e40; border-color: #cddbd0; }
.secondary:hover { background: #e1eee2; }
dialog { width: min(480px, calc(100% - 27px)); max-height: min(90dvh, 850px); overflow: auto; border: 1px solid var(--line); border-radius: 15px; padding: 20px; background: #fbfdf9; color: inherit; }
dialog::backdrop { background: #102923aa; }
dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
dialog h2 { font-size: 21px; letter-spacing: -.025em; }
dialog form, .login form { display: grid; gap: 12px; margin-top: 14px; }
dialog form label, .login form label { font-size: 13px; font-weight: 650; display: grid; gap: 5px; }
dialog form input:not([type=checkbox],[type=radio]), dialog textarea, dialog select, .login input { background: white; border: 1px solid #cad9cf; border-radius: 8px; padding: 9px; color: inherit; width: 100%; font-size: 14px; min-width: 0; }
dialog textarea { resize: vertical; }
dialog fieldset { border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 9px; font-size: 13px; }
dialog form label.check { display: flex; align-items: center; font-weight: 500; }
.check small { color: var(--muted); }
#reuse-fields { display: grid; gap: 8px; }
.quote { background: #edf4eb; padding: 12px; margin-bottom: 8px; border-radius: 8px; overflow-wrap: anywhere; }
.toast { position: fixed; z-index: 10; inset: auto 18px 18px auto; max-width: min(420px, calc(100% - 36px)); background: #183a30; color: white; padding: 10px 14px; border-radius: 8px; box-shadow: 0 5px 20px #172e2560; font-size: 13px; }
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; background: #eaf2e8 radial-gradient(#78907b33 .6px, transparent .6px); background-size: 14px 14px; padding: 20px; }
.login-card { width: min(100%, 418px); background: #fcfefa; padding: 28px; border: 1px solid #d1e1d4; border-radius: 18px; box-shadow: 0 15px 65px #142e2115; }
.sample-tag { display: inline-block; margin-top: 25px; font-weight: 750; font-size: 9px; letter-spacing: .1em; color: #315c49; background: #e5f0df; border-radius: 20px; padding: 5px 8px; }
.login h1 { margin: 9px 0 5px; font-size: 31px; letter-spacing: -.06em; }
.login p { font-size: 14px; color: var(--muted); }
.login form { margin-top: 20px; }
.sample-accounts { border-top: 1px solid var(--line); margin-top: 19px; padding-top: 15px; display: grid; gap: 6px; }
.sample-accounts h2 { font-size: 12px; margin-bottom: 3px; color: var(--muted); }
.sample-account { border: 1px solid var(--line); border-radius: 9px; padding: 6px; background: #f5f8f3; color: inherit; display: flex; gap: 8px; align-items: center; font-size: 12px; text-align: left; }
.sample-account:hover { background: #e8f1e7; }
.sample-account .avatar { width: 26px; height: 26px; border-radius: 7px; font-size: 9px; }
.sample-account small { margin-left: auto; color: var(--muted); }
@media (max-width: 650px) {
  .shell { display: block; }
  .sidebar, .main { height: 100%; }
  .sidebar { padding: 20px 13px 0; }
  .shell:not(.mobile-open) .main, .shell.mobile-open .sidebar { display: none; }
  .main-header { padding: 10px 12px 10px 6px; min-height: 65px; gap: 8px; }
  .main-header > .avatar { width: 34px; height: 34px; border-radius: 10px; }
  .main-header h1 { font-size: 17px; }
  .mobile-back { display: grid; width: 34px; }
  .chat-content { padding: 14px 12px 19px; }
  .chat-intro { font-size: 11px; }
  .message-block { max-width: 83%; }
  .bubble { padding: 9px 10px; }
  .bubble p { font-size: 13px; }
  .composer-wrap { padding-inline: 10px; }
  .panel { padding-top: 16px; }
}

/* Frosted CTH surfaces over a soft, mineral-green background. */
:root {
  --canvas: radial-gradient(ellipse at 88% 4%, #f4f3cb 0%, transparent 42%),
    radial-gradient(ellipse at 18% 84%, #a4cfb4 0%, transparent 54%),
    radial-gradient(ellipse at 90% 93%, #c5dcef 0%, transparent 48%), #d9e9df;
  --glass: linear-gradient(138deg, #ffffffc9, #ffffff57);
  --glass-edge: #ffffffdb;
  --glass-shadow: inset 0 1px 0 #ffffffeb, 0 8px 24px #20453a16;
  --green: #215a48;
}
body { background: var(--canvas); }
.shell { gap: 13px; padding: 13px; grid-template-columns: 317px minmax(0, 1fr); }
.sidebar {
  position: relative;
  border: 1px solid #ffffff4c;
  border-radius: 28px;
  background: radial-gradient(ellipse at 10% 0%, #619d7b6b, transparent 46%),
    linear-gradient(154deg, #26554bf5, #132e2cef 72%, #193f3bea);
  box-shadow: inset 0 1px 0 #ffffff44, 0 12px 35px #21483a29;
  backdrop-filter: blur(22px) saturate(140%);
}
.sidebar .brand { margin-bottom: 15px; }
.brand-symbol { background: linear-gradient(148deg, #f5ffd4, #c9efad); border: 1px solid #f6ffdd; box-shadow: inset 0 1px 1px #fff, 0 4px 15px #173a2d38; }
.workspace-label { border-color: #ffffff35; background: #efffed12; margin-bottom: 24px; }
.inbox-title h2 { font-size: 34px; }
.icon-button.add { border-radius: 50%; background: linear-gradient(155deg, #efffcb, #cbefad); box-shadow: inset 0 1px 1px #fff, 0 4px 10px #14302957; }
.search { border-color: #ffffff32; background: #f1fff01c; border-radius: 30px; padding-inline: 13px; }
.chat-list h3 { color: #c2d9cc; }
.chat-item { border-radius: 17px; min-height: 68px; }
.chat-item.selected { border-color: #ffffff43; background: linear-gradient(135deg, #f1ffe136, #dcffe216); box-shadow: inset 0 1px 0 #ffffff26, 0 4px 11px #132a2433; }
.chat-label small { color: #cae0d3; }
.sidebar-bottom { border-color: #ffffff31; }
.avatar { border-radius: 50%; border: 1px solid #ffffffbd; box-shadow: inset 0 1px 0 #ffffffa3, 0 2px 6px #1634291c; }
.avatar.bot { background: linear-gradient(155deg, #f2ffce, #c6ebad); }
.avatar.group { background: linear-gradient(155deg, #eff9ff, #c5e0df); }
.avatar.lilac { background: linear-gradient(155deg, #f4effd, #dbd3eb); }
.avatar.person { background: linear-gradient(155deg, #f2fbef, #c8e1ce); }
.avatar.small-avatar, .profile .avatar { border-radius: 50%; }
.main { border: 1px solid #ffffffb5; border-radius: 28px; position: relative; overflow: hidden; box-shadow: var(--glass-shadow); }
.main-header, .composer-wrap {
  position: relative;
  z-index: 1;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: inset 0 1px 0 #ffffffad;
  border-color: #ffffffb8;
}
.main-header { min-height: 72px; }
.private { border-color: #ffffffd9; background: #ffffff69; box-shadow: inset 0 1px 0 #fff; }
.chat-scroll { background: radial-gradient(#3f66501c .65px, transparent .65px), linear-gradient(140deg, #f8fcef55, #e4f4e027 55%, #e0edf650); background-size: 18px 18px, auto; }
.chat-content { max-width: 930px; }
.chat-intro { background: #f8fff4a8; border-color: #ffffffcc; box-shadow: 0 3px 12px #1843380a; border-radius: 30px; }
.day { margin-block: 16px; }
.day::before, .day::after { background: #719a803b; }
.day span { background: #f6fff0a6; border-color: #ffffffb5; }
.bubble { border-color: #ffffffea; border-radius: 17px 17px 17px 5px; background: linear-gradient(145deg, #fffffff0, #f1fcf3b5); box-shadow: inset 0 1px 0 #ffffffbc, 0 4px 13px #2b533917; }
.out .bubble { border-color: #f3ffd8d4; border-radius: 17px 17px 5px 17px; background: linear-gradient(145deg, #efffcded, #d1efbde6); }
.bubble.approved { border-color: #f8ffead9; background: linear-gradient(145deg, #f9ffee, #d9f1dacc); }
.bubble.pending { border-color: #fff8e5ed; background: linear-gradient(145deg, #fffdf3, #ffefccd9); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 6px; max-width: 866px; margin: 0 auto 7px; }
.chat-time { align-self: flex-start; margin-top: 6px; color: #cfe6d5; font-size: 10px; white-space: nowrap; }
.quick-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid #ffffffe0; border-radius: 30px; background: #f4ffebe0; color: #265847; font-size: 11px; }
.quick-chip:hover { background: #fff; }
.quick-chip svg { width: 14px; height: 14px; }
.source-link { display: inline-block; color: #205e4b; text-underline-offset: .18em; font-size: .94em; font-weight: 650; }
.composer { max-width: 866px; border-color: #ffffffdf; border-radius: 30px; padding: 5px 6px 5px 12px; background: #ffffffe0; box-shadow: inset 0 1px 0 white, 0 4px 16px #244f3819; }
.composer-note { max-width: 866px; }
.send { border-radius: 50%; background: linear-gradient(150deg, #37745b, #204d40); border: 1px solid #78a790; box-shadow: inset 0 1px 0 #ffffff51, 0 2px 5px #193c3536; }
.panel { background: #f3faef85; }
.card, dialog, .login-card { background: var(--glass); border-color: var(--glass-edge); box-shadow: var(--glass-shadow); }
dialog { backdrop-filter: blur(26px) saturate(140%); background-color: #f1faefde; border-radius: 23px; }
.login { background: var(--canvas); }
.login-card { border-radius: 28px; backdrop-filter: blur(24px) saturate(140%); }
.sample-account { border-color: #ffffffc2; background: #f5faf3b5; }
.source-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 10px; margin: 0 0 18px; }
.linked-card { margin: 9px 0 0; }
.linked-card small { font-size: 10px; font-weight: 720; letter-spacing: .06em; color: #366b56; }
#teach-ai { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
#teach-ai svg { width: 15px; height: 15px; }
@media (max-width: 650px) {
  .shell { padding: 0; }
  .sidebar, .main { border: 0; border-radius: 0; }
  .sidebar { padding-top: max(19px, env(safe-area-inset-top)); }
  .main-header { min-height: 66px; }
  .main-header > .avatar { border-radius: 50%; }
  .message-block { max-width: 83%; }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar, .main-header, .composer-wrap, .login-card, dialog { backdrop-filter: none; }
  .main-header, .composer-wrap, .login-card, dialog { background: #f6faf4; }
}
