:root {
  --navy: #0b1f33;
  --navy-2: #132c46;
  --ink: #172231;
  --muted: #687789;
  --line: #e4e9ef;
  --soft: #f5f7fa;
  --white: #ffffff;
  --accent: #b89255;
  --accent-soft: #f7f1e7;
  --success: #2f8f63;
  --shadow: 0 12px 40px rgba(8, 26, 44, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef2f6;
  color: var(--ink);
}

button, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  height: 100vh;
  min-height: 680px;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  max-width: 1680px;
  margin: 0 auto;
  background: var(--white);
  box-shadow: var(--shadow);
}

.sidebar {
  background: var(--navy);
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 26px 20px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 26px;
}

.brand-mark,
.welcome-icon {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

.brand-name {
  font-size: 20px;
  line-height: 1.05;
  font-weight: 750;
}

.brand-subtitle {
  color: #9fb0c2;
  font-size: 12px;
  margin-top: 4px;
}

.new-chat {
  width: 100%;
  border: 1px solid rgba(255,255,255,.17);
  background: rgba(255,255,255,.08);
  color: white;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  font-weight: 650;
  transition: .18s ease;
}

.new-chat span {
  font-size: 20px;
  margin-right: 8px;
}

.new-chat:hover {
  background: rgba(255,255,255,.13);
}

.sidebar-section-title {
  color: #8194a8;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 10px;
  font-weight: 800;
  padding: 27px 8px 10px;
}

.history-list {
  overflow-y: auto;
  min-height: 120px;
  flex: 1;
}

.history-empty {
  color: #8194a8;
  font-size: 13px;
  padding: 12px 8px;
  line-height: 1.5;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 4px;
  align-items: center;
  border-radius: 10px;
  margin-bottom: 4px;
  background: transparent;
}

.history-open {
  border: 0;
  background: transparent;
  color: #c7d2de;
  padding: 10px 8px;
  text-align: left;
  min-width: 0;
}

.history-title {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 600;
}

.history-time {
  display: block;
  color: #75899e;
  font-size: 10px;
  margin-top: 3px;
}

.history-delete {
  opacity: 0;
  border: 0;
  background: transparent;
  color: #8ea0b2;
  border-radius: 7px;
  height: 28px;
}

.history-item:hover {
  background: rgba(255,255,255,.055);
}

.history-item.active {
  background: rgba(255,255,255,.095);
}

.history-item:hover .history-delete {
  opacity: 1;
}

.history-delete:hover {
  background: rgba(255,255,255,.08);
  color: white;
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,.11);
  padding: 18px 4px 0;
}

.privacy-note {
  display: flex;
  gap: 9px;
  color: #aab8c7;
  font-size: 11px;
  line-height: 1.35;
}

.privacy-note strong {
  display: block;
  color: #d9e1e8;
  margin-bottom: 2px;
}

.privacy-note span {
  display: block;
}

.shield {
  width: 21px;
  height: 21px;
  display: grid !important;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  font-size: 10px;
}

.firm-address {
  color: #6f8499;
  font-size: 10px;
  margin-top: 15px;
}

.main-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr) auto;
  background: var(--white);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 30px;
  background: rgba(255,255,255,.96);
}

.topbar-title {
  font-size: 15px;
  font-weight: 750;
}

.online-status {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.online-status span {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--success);
  margin-right: 5px;
}

.callback-btn {
  border: 1px solid #d8c39e;
  color: #73562c;
  background: var(--accent-soft);
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
}

.callback-btn:hover {
  filter: brightness(.98);
}

.mobile-menu {
  display: none;
  border: 0;
  background: transparent;
  font-size: 22px;
}

.chat-area {
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 0%, rgba(184,146,85,.075), transparent 32%),
    #fff;
  padding: 34px 34px 24px;
}

.welcome {
  width: min(840px, 100%);
  margin: 30px auto 10px;
  text-align: center;
}

.welcome-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  margin: 0 auto 15px;
  box-shadow: 0 8px 26px rgba(184,146,85,.24);
}

.eyebrow {
  color: #9a7946;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 10px;
  font-weight: 800;
  margin: 0 0 7px;
}

.welcome h1 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 4vw, 44px);
  letter-spacing: -.025em;
  font-weight: 600;
}

.welcome-copy {
  margin: 12px auto 24px;
  max-width: 610px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  text-align: left;
}

.quick-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 13px;
  padding: 13px 14px;
  color: var(--ink);
  box-shadow: 0 3px 12px rgba(10,31,51,.025);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.quick-card:hover {
  transform: translateY(-1px);
  border-color: #cdd6e0;
  box-shadow: 0 7px 20px rgba(10,31,51,.07);
}

.quick-card.highlighted {
  border-color: #ddc8a6;
  background: #fffdf9;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 800;
}

.quick-card strong,
.quick-card small {
  display: block;
}

.quick-card strong {
  font-size: 13px;
}

.quick-card small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.quick-card b {
  color: #9aa8b6;
}

.capabilities {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: #8592a0;
  font-size: 10px;
  margin-top: 22px;
}

.capabilities span::before {
  content: "✓";
  color: var(--success);
  font-weight: 800;
  margin-right: 5px;
}

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

.message-row {
  display: flex;
  gap: 10px;
  margin: 19px 0;
  align-items: flex-start;
}

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

.avatar {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
}

.assistant .avatar {
  background: var(--navy);
  color: var(--accent);
}

.message {
  max-width: min(690px, 82%);
}

.message-label {
  color: #8a97a5;
  font-size: 10px;
  font-weight: 700;
  margin: 0 0 5px 3px;
}

.user .message-label {
  text-align: right;
  margin-right: 3px;
}

.bubble {
  border-radius: 15px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.58;
  white-space: pre-wrap;
  word-break: break-word;
}

.assistant .bubble {
  color: #263545;
  background: var(--soft);
  border: 1px solid #e7ebf0;
  border-top-left-radius: 5px;
}

.user .bubble {
  background: var(--navy);
  color: white;
  border-top-right-radius: 5px;
}

.typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-width: 52px;
}

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

.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.composer-wrap {
  border-top: 1px solid #edf0f3;
  padding: 14px 28px 16px;
  background: white;
}

.composer {
  width: min(840px, 100%);
  margin: 0 auto;
  border: 1px solid #d7dde4;
  border-radius: 14px;
  min-height: 52px;
  display: flex;
  align-items: flex-end;
  padding: 8px 8px 8px 14px;
  box-shadow: 0 4px 18px rgba(12,31,50,.055);
}

.composer:focus-within {
  border-color: #a6b3c0;
  box-shadow: 0 4px 20px rgba(12,31,50,.085);
}

textarea {
  flex: 1;
  resize: none;
  max-height: 130px;
  min-height: 34px;
  border: 0;
  outline: 0;
  padding: 7px 6px 4px 0;
  color: var(--ink);
  background: transparent;
  line-height: 1.45;
}

textarea::placeholder {
  color: #98a4b0;
}

.send-btn {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 0;
  background: var(--navy);
  color: white;
  font-size: 14px;
}

.send-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.composer-note {
  width: min(840px, 100%);
  margin: 7px auto 0;
  text-align: center;
  color: #929da8;
  font-size: 9.5px;
  line-height: 1.35;
}

.mobile-overlay {
  display: none;
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(310px, 86vw);
    z-index: 30;
    transform: translateX(-102%);
    transition: transform .22s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5,15,25,.42);
    z-index: 20;
  }

  .mobile-overlay.show {
    display: block;
  }

  .main-panel {
    height: 100vh;
    grid-template-rows: 66px minmax(0, 1fr) auto;
  }

  .mobile-menu {
    display: block;
    margin-right: 4px;
  }

  .topbar {
    justify-content: flex-start;
    padding: 0 16px;
  }

  .callback-btn {
    margin-left: auto;
  }

  .chat-area {
    padding: 22px 15px 18px;
  }

  .welcome {
    margin-top: 12px;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .composer-wrap {
    padding: 11px 13px 12px;
  }

  .message {
    max-width: 88%;
  }
}

@media (max-width: 520px) {
  .callback-btn {
    font-size: 0;
    padding: 9px 10px;
  }

  .callback-btn::after {
    content: "Callback";
    font-size: 11px;
  }

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

  .welcome-copy {
    font-size: 13px;
  }
}

/* ---------------------------------------------------------------- */
/* Additive styles for enquiry submission (Send enquiry button + modal) */
/* Uses the existing design tokens above; no new palette/typography.   */
/* ---------------------------------------------------------------- */

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.enquiry-btn {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.enquiry-btn:hover {
  filter: brightness(1.08);
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 33, 0.5);
  z-index: 50;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal-card {
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px 26px 22px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  color: var(--navy);
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  flex: 0 0 auto;
}

.modal-close:hover {
  color: var(--ink);
}

.modal-intro {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  margin: 10px 0 18px;
}

.form-group {
  margin-bottom: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 13px;
  color: var(--ink);
  background: var(--soft);
}

.form-group input:focus {
  outline: none;
  border-color: #a6b3c0;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0 14px;
  cursor: pointer;
}

.consent-row input {
  margin-top: 2px;
  flex: 0 0 auto;
}

.modal-status {
  font-size: 12px;
  line-height: 1.5;
  min-height: 0;
  margin-bottom: 10px;
}

.modal-status.info {
  color: var(--muted);
}

.modal-status.success {
  color: var(--success);
}

.modal-status.error {
  color: #b3432f;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-btn {
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--line);
}

.modal-btn.secondary {
  background: white;
  color: var(--ink);
}

.modal-btn.secondary:hover {
  background: var(--soft);
}

.modal-btn.primary {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.modal-btn.primary:hover {
  filter: brightness(1.08);
}

.modal-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .topbar-actions .callback-btn {
    font-size: 0;
    padding: 9px 10px;
  }

  .topbar-actions .callback-btn::after {
    font-size: 11px;
  }

  #callbackTopBtn::after {
    content: "Callback";
  }

  #sendEnquiryBtn::after {
    content: "Send";
  }
}

.modal-summary {
  display: block;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow-y: auto;
  margin: 0 0 14px;
}

.modal-summary[hidden] {
  display: none;
}

.modal-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 12px;
  margin: 0 0 14px;
}

.modal-download::before {
  content: "\2913";
}

.modal-download:hover {
  background: var(--soft);
}

.modal-download[hidden] {
  display: none;
}
