
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f6f7fb;
  --ink: #172033;
  --muted: #788196;
  --line: #e8ebf2;
  --purple: #6558e8;
  --purple2: #8478ff;
  --navy: #111827;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
}

button, input, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 15%, #e6e5ff 0, transparent 32%),
    radial-gradient(circle at 90% 85%, #dff5f4 0, transparent 30%),
    #f8f9fd;
}

.auth-brand, .side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 800 21px Manrope, sans-serif;
  letter-spacing: -.8px;
}

.auth-brand {
  position: absolute;
  top: 32px;
  left: 5vw;
}

.auth-brand b, .side-brand b {
  color: var(--purple);
}

.logo-mark {
  height: 36px;
  width: 36px;
  border-radius: 12px;
  background: linear-gradient(145deg, #786cff, #5144d4);
  color: white;
  display: grid;
  place-items: center;
  font: 800 20px Manrope;
  box-shadow: 0 7px 18px #6659e844;
}

.auth-card {
  width: min(100%, 440px);
  background: #ffffffed;
  border: 1px solid #fff;
  border-radius: 24px;
  padding: 38px;
  box-shadow: 0 24px 80px #29335b12;
  z-index: 1;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 700;
  color: var(--purple);
}

h1, h2 {
  font-family: Manrope, sans-serif;
  letter-spacing: -1.1px;
}

.auth-card h1 {
  font-size: 29px;
  margin: 12px 0 8px;
}

.muted, .tool-heading p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  margin-top: 26px;
  gap: 9px;
}

.auth-form label, .tool-card label {
  font-size: 12px;
  font-weight: 700;
  margin-top: 5px;
}

.auth-form input, .tool-card input,
.tool-card textarea, .tool-card select {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
  width: 100%;
}

.auth-form input:focus, .tool-card input:focus,
.tool-card textarea:focus {
  border-color: #8b82f4;
  box-shadow: 0 0 0 3px #7668ef18;
}

.auth-form small {
  font-size: 11px;
  color: var(--muted);
}

.primary {
  border: 0;
  border-radius: 11px;
  background: linear-gradient(110deg, #675be9, #786cf5);
  color: white;
  padding: 13px 17px;
  font-weight: 700;
  box-shadow: 0 8px 18px #6558e833;
}

.primary span {
  float: right;
  font-size: 18px;
  line-height: 14px;
}

.primary:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.full {
  width: 100%;
  margin-top: 12px;
}

.switch {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
}

.text-btn {
  border: 0;
  background: none;
  color: var(--purple);
  font-weight: 700;
}

.auth-foot {
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 24px;
  color: #9aa2b2;
  font-size: 10px;
}

.notice {
  font-size: 12px;
  padding: 11px 13px;
  border-radius: 9px;
  margin-top: 15px;
}

.error {
  background: #fff0f0;
  color: #bb3b49;
}

.info {
  background: #f0efff;
  color: #5146c8;
}

.app {
  height: 100vh;
  display: flex;
  overflow: hidden;
}

.sidebar {
  width: 248px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 25px 16px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.side-brand {
  padding: 0 8px 30px;
}

.new-chat {
  border: 0;
  border-radius: 10px;
  padding: 12px;
  background: #f0efff;
  color: #5549d2;
  font-weight: 700;
  text-align: left;
}

.side-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #a0a7b5;
  margin: 28px 8px 10px;
}

.nav-item {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px;
  border-radius: 9px;
  color: #667085;
  font-size: 12px;
  margin: 2px 0;
}

.nav-item.active {
  color: #584bd7;
  background: #f0efff;
  font-weight: 700;
}

.account {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 7px;
  font-size: 11px;
}

.account small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  max-width: 150px;
  overflow-wrap: anywhere;
}

.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e9e7ff;
  color: #5c50d9;
  font-weight: 800;
}

.logout {
  border: 0;
  background: none;
  text-align: left;
  padding: 12px;
  color: #9a5260;
  font-size: 12px;
}

.side-bottom {
  margin-top: auto;
  padding: 15px 8px 0;
  font-size: 10px;
  line-height: 1.7;
  color: #9ba3b2;
}

.side-bottom span {
  font-size: 9px;
  letter-spacing: 1px;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 65px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: #ffffffb8;
}

.crumb {
  font-size: 12px;
  color: #8992a5;
}

.crumb span {
  margin: 0 9px;
  color: #c2c7d2;
}

.crumb b {
  color: var(--ink);
}

.top-right {
  margin-left: auto;
  font-size: 10px;
  color: #7f899b;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #32b88a;
  border-radius: 50%;
  margin-right: 5px;
}

.mobile-menu {
  display: none;
  border: 0;
  background: none;
}

.panel {
  flex: 1;
  min-height: 0;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 35px 25px 0;
}

.welcome {
  width: min(100%, 790px);
  margin: auto 0;
}

.sparkle {
  font-size: 30px;
  color: var(--purple);
  margin-bottom: 10px;
}

.welcome h1 {
  font-size: 42px;
  line-height: 1.12;
  margin: 12px 0;
}

.welcome h1 span {
  color: var(--purple);
}

.welcome p {
  color: var(--muted);
  font-size: 13px;
}

.suggestions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 27px;
}

.suggestion {
  border: 1px solid var(--line);
  background: white;
  border-radius: 13px;
  padding: 16px;
  text-align: left;
  color: var(--ink);
}

.suggestion:hover {
  border-color: #aaa2ff;
  transform: translateY(-2px);
}

.suggestion b {
  display: block;
  font-size: 12px;
}

.suggestion small {
  display: block;
  margin-top: 7px;
  font-size: 10px;
  color: var(--muted);
}

.messages {
  width: min(100%, 790px);
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
}

.message {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

.message.user {
  justify-content: flex-end;
}

.msg-avatar {
  width: 29px;
  height: 29px;
  flex-shrink: 0;
  border-radius: 9px;
  background: #e9e7ff;
  color: #5c50d9;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
}

.bubble {
  max-width: 82%;
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 15px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.user .bubble {
  background: #665be8;
  border-color: #665be8;
  color: white;
}

.composer-wrap {
  width: min(100%, 790px);
  padding: 12px 0 17px;
  background: var(--bg);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e2e5ee;
  background: #fff;
  border-radius: 17px;
  box-shadow: 0 7px 25px #2d3a5b0a;
}

.plus-btn, .send-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 11px;
  flex-shrink: 0;
}

.plus-btn {
  background: #f0efff;
  color: #5f53dc;
  font-size: 23px;
}

.send-btn {
  background: #665be8;
  color: white;
  font-size: 21px;
}

.composer textarea {
  border: 0;
  outline: 0;
  resize: none;
  flex: 1;
  max-height: 140px;
  padding: 9px 0;
  font-size: 13px;
  color: var(--ink);
}

.composer-note {
  text-align: center;
  color: #a0a7b5;
  font-size: 9px;
  padding-top: 9px;
}

.file-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.file-chip {
  font-size: 10px;
  background: #eeedff;
  color: #564bd2;
  border-radius: 7px;
  padding: 6px 9px;
}

.tool-panel {
  overflow: auto;
  padding: 55px max(24px, calc((100% - 850px) / 2));
}

.tool-heading {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 30px;
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #eae8ff;
  color: #5e53dc;
  display: grid;
  place-items: center;
  font-size: 25px;
}

.tool-heading h1 {
  font-size: 31px;
  margin: 5px 0;
}

.tool-heading p {
  margin: 0;
}

.tool-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  max-width: 700px;
  box-shadow: 0 10px 35px #29335b08;
}

.tool-card .primary {
  align-self: flex-start;
  margin-top: 10px;
}

.result {
  font-size: 12px;
  color: #697286;
  line-height: 1.6;
}

.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #182238;
  color: white;
  padding: 12px 17px;
  border-radius: 10px;
  font-size: 12px;
  box-shadow: 0 10px 30px #0002;
}

.file-chips:empty {
  display: none;
}

@media(max-width:700px) {
  .sidebar {
    position: fixed;
    z-index: 5;
    left: -260px;
    top: 0;
    bottom: 0;
    transition: .2s;
    box-shadow: 10px 0 35px #1720331a;
  }

  .sidebar.open {
    left: 0;
  }

  .topbar {
    padding: 0 16px;
    height: 58px;
  }

  .mobile-menu {
    display: block;
    font-size: 18px;
    margin-right: 10px;
  }

  .crumb {
    margin-right: auto;
  }

  .top-right {
    display: none;
  }

  .chat-panel {
    padding: 18px 14px 0;
  }

  .welcome h1 {
    font-size: 34px;
  }

  .suggestions {
    gap: 7px;
  }

  .suggestion {
    padding: 12px;
  }

  .suggestion b {
    font-size: 11px;
  }

  .suggestion small {
    font-size: 9px;
  }

  .auth-card {
    padding: 27px 23px;
  }

  .auth-brand {
    top: 18px;
    left: 20px;
  }

  .tool-panel {
    padding: 35px 18px;
  }

  .tool-heading h1 {
    font-size: 25px;
  }

  .bubble {
    max-width: 90%;
  }
}
