:root {
  --bg: #ffffff;
  --sidebar: #f9f9f9;
  --text: #0d0d0d;
  --muted: #5d5d5d;
  --line: #e5e5e5;
  --hover: #ececec;
  --composer-bg: #f4f4f4;
  --shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 4px 14px rgba(0, 0, 0, 0.06);
  --sans: "Söhne", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; }

.app {
  display: flex;
  height: 100%;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 12px 10px 14px;
  gap: 6px;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 8px;
}

.sidebar-top-actions { display: flex; gap: 2px; }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.logo-btn {
  color: #0d0d0d;
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.logo-btn:hover {
  background: var(--hover);
  color: #0d0d0d;
}
.gpt-logo {
  width: 22px;
  height: 22px;
  display: block;
  shape-rendering: geometricPrecision;
}

.new-chat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  background: #efefef;
  font-size: 14px;
  font-weight: 500;
}
.new-chat:hover { background: #e6e6e6; }
.new-chat svg { width: 18px; height: 18px; }

.side-nav,
.side-bottom {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}
.side-nav button,
.side-bottom button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  text-align: left;
}
.side-nav button:hover,
.side-bottom button:hover { background: var(--hover); }
.side-nav svg,
.side-bottom svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }

.sidebar-spacer { flex: 1; min-height: 24px; }

.tailor-card {
  margin-top: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.tailor-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}
.tailor-desc {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.tailor-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #111;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
}
.tailor-login:hover { background: #f7f7f7; }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #fff;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  min-height: 56px;
}

.model-menu {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
}
.model-menu:hover { background: var(--hover); }
.model-menu svg { width: 16px; height: 16px; color: var(--muted); }

.top-actions { display: flex; align-items: center; gap: 8px; }

.btn-login,
.btn-signup {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}
.btn-login {
  background: #0d0d0d;
  color: #fff;
}
.btn-login:hover { background: #2a2a2a; }
.btn-signup {
  background: #fff;
  border: 1px solid #cfcfcf;
}
.btn-signup:hover { background: #f7f7f7; }

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 12px;
  gap: 28px;
}

.hero-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
}

.composer {
  width: min(720px, 100%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 8px;
  border-radius: 999px;
  background: var(--composer-bg);
  box-shadow: var(--shadow);
}

.plus-btn,
.mic-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex-shrink: 0;
}
.plus-btn:hover,
.mic-btn:hover { background: #e8e8e8; color: var(--text); }
.plus-btn svg,
.mic-btn svg { width: 18px; height: 18px; }

#input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  padding: 8px 4px;
}
#input::placeholder { color: #8f8f8f; }

.composer-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.voice-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  font-weight: 500;
}
.voice-btn:hover { background: #fafafa; }
.voice-btn svg { width: 16px; height: 16px; }

.footer-note {
  margin: 0;
  padding: 10px 16px 18px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: #8e8e8e;
}
.footer-note a {
  color: #8e8e8e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 40;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  place-items: center;
}
.mobile-menu svg { width: 18px; height: 18px; }

.wa-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.wa-modal[hidden] { display: none !important; }
.wa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.wa-modal-panel {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}
.wa-modal-panel iframe {
  width: 100%;
  height: 560px;
  max-height: calc(100vh - 48px);
  border: 0;
  display: block;
  background: #fff;
}
.wa-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f0f2f5;
  color: #667781;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.wa-modal-close:hover { background: #e8eaed; color: #111; }

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 8px 0 24px rgba(0,0,0,.08);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .mobile-menu { display: grid; }
  .topbar { padding-left: 56px; }
  .btn-signup { display: none; }
  .hero-title { font-size: 28px; }
}
