
:root {
  --bg: #f7f3ec;
  --surface: #fffdf9;
  --surface-2: #f1eadf;
  --ink: #1e1a17;
  --muted: #746b63;
  --line: #e5ddd2;
  --accent: #c76b2a;
  --accent-dark: #9f4e1c;
  --accent-soft: #f4dfcf;
  --success: #2f7d57;
  --success-soft: #e4f2e9;
  --danger: #a84b3d;
  --danger-soft: #f7e6e3;
  --shadow: 0 24px 70px rgba(49, 37, 25, 0.10);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 8%, rgba(199, 107, 42, 0.08), transparent 25rem),
    var(--bg);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  min-height: 100vh;
}

.topbar {
  width: min(calc(100% - 48px), 1320px);
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 190px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 21px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  line-height: 1;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.top-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: .2s ease;
}

.top-nav a:hover,
.top-nav a.active {
  color: var(--ink);
  background: rgba(255, 255, 255, .78);
}

.top-nav a.active {
  box-shadow: 0 3px 14px rgba(40, 30, 20, .06);
}

.orders-link {
  min-width: 135px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  font-size: 13px;
  font-weight: 700;
}

.arrow {
  font-size: 17px;
}

.ai-page {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: 66px 0 80px;
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 68px;
  align-items: start;
}

.hero-copy {
  padding-top: 52px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

.eyebrow span {
  width: 28px;
  height: 2px;
  background: var(--accent);
}

.hero-copy h1 {
  margin: 20px 0 20px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(52px, 6vw, 82px);
  line-height: .94;
  letter-spacing: -.045em;
  font-weight: 700;
}

.hero-copy h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-copy p {
  max-width: 410px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.assistant-card {
  overflow: hidden;
  border: 1px solid rgba(229, 221, 210, .95);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, .93);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.assistant-header {
  min-height: 84px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.assistant-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar,
.message-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 50%;
  font-family: Georgia, serif;
}

.ai-avatar {
  width: 45px;
  height: 45px;
  font-size: 21px;
}

.assistant-title h2 {
  margin: 0;
  font-size: 16px;
}

.assistant-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #55a875;
  box-shadow: 0 0 0 3px #e1f1e7;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 20px;
  transition: .2s ease;
}

.icon-button:hover {
  color: var(--ink);
  transform: rotate(-30deg);
}

.chat-messages {
  min-height: 390px;
  max-height: 510px;
  overflow-y: auto;
  padding: 24px 22px 14px;
  scroll-behavior: smooth;
}

.message-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

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

.message-avatar {
  width: 30px;
  height: 30px;
  margin-top: 2px;
  font-size: 13px;
}

.message {
  max-width: 78%;
  padding: 13px 15px;
  border-radius: 17px;
  font-size: 14px;
  line-height: 1.55;
}

.message p {
  margin: 0;
}

.assistant-message {
  border: 1px solid var(--line);
  border-top-left-radius: 5px;
  background: #fff;
}

.user-message {
  border-top-right-radius: 5px;
  background: var(--ink);
  color: #fff;
}

.message-time {
  display: block;
  margin-top: 6px;
  opacity: .52;
  font-size: 10px;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.quick-prompts button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.quick-prompts button:hover {
  color: var(--accent-dark);
  border-color: #d9b79e;
  background: var(--accent-soft);
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 25px 12px 62px;
  color: var(--muted);
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b5aaa0;
  animation: bounce 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
  animation-delay: .12s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: .24s;
}

.typing-indicator small {
  margin-left: 4px;
  font-size: 11px;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: .45;
  }

  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.order-preview {
  margin: 0 22px 17px;
  padding: 18px;
  border: 1px solid #d7e6dc;
  border-radius: var(--radius-md);
  background: #fbfefc;
}

.order-preview.hidden {
  display: none;
}

.preview-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
}

.preview-top h3 {
  margin: 0;
  font-size: 14px;
}

.preview-status {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.preview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #e8eee9;
  font-size: 13px;
}

.preview-item:last-of-type {
  border-bottom: 0;
}

.preview-item-name {
  font-weight: 600;
}

.preview-item-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.preview-price {
  white-space: nowrap;
  font-weight: 700;
}

.preview-total {
  display: flex;
  justify-content: space-between;
  padding-top: 13px;
  font-size: 14px;
  font-weight: 800;
}

.name-box {
  margin-top: 14px;
}

.name-box label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.name-box input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #fff;
}

.name-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(199,107,42,.11);
}

.preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}

.preview-actions button {
  height: 42px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

.reject-button {
  border: 1px solid #e4c4bd;
  background: var(--danger-soft);
  color: var(--danger);
}

.accept-button {
  border: 0;
  background: var(--success);
  color: #fff;
}

.accept-button:hover {
  filter: brightness(.94);
}

.reject-button:hover {
  background: #f3dbd7;
}

.accept-button:disabled,
.reject-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.chat-form {
  display: flex;
  gap: 9px;
  padding: 16px 22px 12px;
  border-top: 1px solid var(--line);
}

.chat-form input {
  min-width: 0;
  flex: 1;
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.chat-form input::placeholder {
  color: #aaa098;
}

.chat-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(199,107,42,.10);
}

.send-button {
  height: 48px;
  min-width: 90px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 13px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  transition: .2s ease;
}

.send-button:hover {
  background: var(--accent-dark);
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.send-icon {
  font-size: 17px;
}

.privacy-note {
  margin: 0;
  padding: 0 22px 18px;
  color: #9b9188;
  font-size: 10px;
  text-align: center;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.ai-toast {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  max-width: 330px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(30, 25, 20, .13);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  animation: toastIn .22s ease-out;
}

@keyframes toastIn {
  from {
    transform: translateY(10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .topbar {
    width: min(calc(100% - 30px), 700px);
  }

  .top-nav {
    display: none;
  }

  .orders-link {
    min-width: auto;
  }

  .ai-page {
    width: min(calc(100% - 30px), 700px);
    padding-top: 30px;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero-copy h1 {
    font-size: clamp(46px, 13vw, 68px);
  }

  .hero-copy p {
    max-width: 600px;
  }
}

@media (max-width: 560px) {
  .topbar {
    min-height: 72px;
  }

  .brand {
    min-width: auto;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .orders-link span:first-child {
    display: none;
  }

  .ai-page {
    width: calc(100% - 20px);
    padding: 20px 0 40px;
  }

  .assistant-card {
    border-radius: 21px;
  }

  .chat-messages {
    min-height: 340px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .message {
    max-width: 88%;
  }

  .chat-form {
    padding-left: 13px;
    padding-right: 13px;
  }

  .send-button {
    min-width: 48px;
  }

  .send-button span:first-child {
    display: none;
  }

  .order-preview {
    margin-left: 13px;
    margin-right: 13px;
  }

  .privacy-note {
    padding-left: 13px;
    padding-right: 13px;
  }
}
