/* =========================================================================
   Gassy Cassie - Strathalbyn H Hardware
   Design System: Warm & Energetic, Flame-forward, Elgas Brand Colors
   ========================================================================= */

:root {
  /* Elgas Colors */
  --color-primary: #F1255C;
  --color-primary-hover: #D01C4B;
  --color-orange: #FF6B35;
  --color-orange-dark: #E55A25;
  --color-black: #1A1A1A;
  --color-white: #FFFFFF;
  --color-bg: #F9F6F4;
  /* Slightly warm light background */

  /* Gradient */
  --gradient-warm: linear-gradient(135deg, #FF6B35 0%, #F1255C 100%);
  --gradient-warm-subtle: linear-gradient(160deg, rgba(255, 107, 53, 0.07) 0%, rgba(241, 37, 92, 0.04) 100%);

  /* Additional UI Colors */
  --color-surface: #FFFFFF;
  --color-border: #EDE8E5;
  --color-text-main: #2D2D2D;
  --color-text-muted: #2D2D2D;

  /* Typography */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;

  /* Layout & Spacing */
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 10px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  /* Shadows */
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.09);
  --shadow-warm: 0 16px 40px rgba(255, 107, 53, 0.28);
  --shadow-pink: 0 16px 40px rgba(241, 37, 92, 0.22);

  /* Animation */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Critical utility — must come early */
.hidden {
  display: none !important;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background: linear-gradient(145deg, #fff1eb 0%, #fce4ec 100%);
  line-height: 1.6;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-md);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-black);
  line-height: 1.2;
}

button {
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: none;
  transition: all var(--transition-fast);
}

input,
select,
textarea {
  font-family: var(--font-body);
  font-size: 1rem;
}

/* --- Layout --- */

.app-layout {
  width: 100%;
  max-width: 900px;
  height: 100%;
  /* fills body minus its padding */
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

/* --- Left Pane (Sidebar & Menu) --- */
.left-pane {
  width: 360px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 12px var(--spacing-lg);
  overflow: hidden;
  /* never scrolls — content must fit */
}

.return-link {
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}

.return-link:hover {
  color: var(--color-orange-dark);
}

.profile-header-side {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  margin-bottom: 10px;
}

.profile-avatar-large {
  width: 74px;
  height: 74px;
  border-radius: var(--border-radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 3px solid var(--color-white);
  background-color: var(--color-white);
  flex-shrink: 0;
}

.profile-brand-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 2px;
}

.profile-brand-side h1 {
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  color: var(--color-black);
  margin-bottom: 2px;
  line-height: 1;
}

.profile-brand-side h2 {
  font-size: 0.94rem;
  color: var(--color-orange);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 3px;
}

.profile-brand-side .tagline {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.left-pane-scrollable {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Layout for Matrix in Sidebar */
.matrix-header {
  margin-top: 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 6px;
}

.matrix-header h4 {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.chat-matrix {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.matrix-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 10px var(--spacing-md);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
  text-align: left;
}

.matrix-card:hover {
  border-color: var(--color-orange);
  background: var(--gradient-warm-subtle);
  transform: translateX(4px);
}

.matrix-card .card-icon {
  font-size: 1.25rem;
  background: var(--color-bg);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  flex-shrink: 0;
}

.matrix-card .card-content {
  text-align: left;
}

.matrix-card h3 {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 2px;
  color: var(--color-black);
}

.matrix-card p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}


/* --- Right Pane (The Detached Chat Box Container) --- */
.right-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
  margin: var(--spacing-xl) var(--spacing-xl) var(--spacing-xl) 0;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
  overflow: hidden;
}

/* --- Sign Me Up button in chat header --- */
.header-signup-btn {
  margin-left: auto;
  position: relative;
  z-index: 1;
  background: var(--color-white);
  color: var(--color-primary);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.header-signup-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

/* Chat Box Header */
.chat-box-header {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-white);
  display: flex;
  align-items: center;
}

.chat-header-user {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.chat-avatar-small {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
}

.chat-header-info h2 {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.chat-header-info .status {
  font-size: 0.75rem;
  font-weight: 700;
  color: #10B981;
  /* Green status indicator */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10B981;
  border-radius: 50%;
  display: inline-block;
}

.content-area {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view {
  padding: var(--spacing-lg);
  opacity: 1;
  transition: opacity var(--transition-fast);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.view.hidden {
  display: none;
  opacity: 0;
}

/* --- Responsive Adjustments --- */
@media (max-width: 950px) {
  body {
    overflow-y: auto;
    align-items: flex-start;
    padding: var(--spacing-sm);
    height: auto;
    min-height: 100vh;
  }

  .app-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .left-pane {
    width: 100%;
    padding: var(--spacing-md);
  }

  .left-pane-scrollable {
    overflow-y: visible;
  }

  .right-pane {
    margin: 0 var(--spacing-sm) var(--spacing-sm);
    height: 88vh; /* taller than before, still a contained card */
    flex: none;
  }

  /* Welcome zone scrolls internally — chat-container keeps overflow:hidden so card border stays intact */
  .chat-welcome-zone {
    flex: 999 1 0; /* absorbs nearly all space; when hidden, chat-history gets 100% */
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--spacing-md);
  }

  /* Revert overrides from previous approach */
  .chat-container {
    overflow-y: hidden;
  }

  .chat-history {
    flex: 1 1 0;
    overflow-y: auto;
    min-height: 0;
  }

  .chat-input-area {
    position: static;
    margin-top: auto;
    z-index: auto;
  }

}

/* --- 1. Landing Screen (Hidden/Removed in strict layout) --- */
.hero {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-lg) 0 var(--spacing-sm);
}

.flame-decoration {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: var(--spacing-sm);
  display: block;
  filter: drop-shadow(0 4px 10px rgba(255, 107, 53, 0.45));
  animation: flamePulse 3s ease-in-out infinite;
}

@keyframes flamePulse {

  0%,
  100% {
    transform: scale(1) rotate(-2deg);
  }

  50% {
    transform: scale(1.08) rotate(2deg);
  }
}

.hero h2 {
  font-size: 1.8rem;
  margin-bottom: var(--spacing-sm);
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* --- Welcome Header in Chat --- */
.chat-welcome-hero {
  text-align: center;
  margin-bottom: var(--spacing-md);
  padding-top: var(--spacing-sm);
  animation: slideUp 0.4s ease-out;
}

.chat-welcome-hero .hero-flame {
  display: none;
}

.chat-welcome-hero h2 {
  font-size: 1.35rem;
  font-family: var(--font-display);
  font-weight: 800;
  color: #FF5252;
  margin-bottom: 6px;
  line-height: 1.2;
}

.chat-welcome-hero p {
  color: #2D2D2D;
  font-size: 0.75rem;
  max-width: 80%;
  margin: 0 auto;
}

/* Return Link Minimal */
.return-link {
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  margin-bottom: var(--spacing-lg);
  transition: color var(--transition-fast);
}

.return-link:hover {
  color: var(--color-orange-dark);
}

/* Legend inside Left Pane */
.legend-section {
  background: var(--color-bg);
  padding: 0;
  border-radius: 0;
  margin-bottom: 0;
  border: none;
}

.matrix-card .card-icon {
  font-size: 1.5rem;
  margin-bottom: 0;
  width: 48px;
  height: 48px;
  background: rgba(255, 107, 53, 0.1);
  color: var(--color-orange-dark);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.matrix-card .card-content {
  text-align: left;
}

.matrix-card h3 {
  color: var(--color-black);
  font-size: 1rem;
  margin-bottom: 2px;
}

.matrix-card p {
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
}

/* --- Action Cards --- */
.action-card {
  width: 100%;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-md);
  text-align: left;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition: transform var(--transition-bounce), box-shadow var(--transition-fast);
}

.action-card:hover {
  transform: translateY(-4px);
}

.action-card:active {
  transform: translateY(-1px);
}

/* Card icon */
.card-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: var(--spacing-sm);
  line-height: 1;
}

/* Primary card - big & gradient */
.action-card.primary {
  background: var(--gradient-warm);
  color: var(--color-white);
  box-shadow: var(--shadow-warm);
  padding: var(--spacing-xl) var(--spacing-lg);
}

.action-card.primary::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.action-card.primary h3 {
  color: var(--color-white);
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.action-card.primary p {
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

/* Secondary cards - clean with warm accent */
.action-card.secondary {
  background: var(--color-white);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
}

.action-card.secondary .card-icon {
  font-size: 1.8rem;
  margin-bottom: 0;
  width: 52px;
  height: 52px;
  background: var(--gradient-warm-subtle);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.action-card.secondary .card-content {
  text-align: left;
}

.action-card.secondary h3 {
  color: var(--color-black);
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.action-card.secondary p {
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.88rem;
}

.action-card.secondary:hover {
  border-color: var(--color-orange);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.12);
}

/* --- Shared UI Elements --- */
.back-btn {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-md);
  gap: 4px;
}

.back-btn:hover {
  color: var(--color-orange);
}

.primary-btn {
  width: 100%;
  padding: 16px;
  background: var(--gradient-warm);
  color: var(--color-white);
  border-radius: var(--border-radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  box-shadow: var(--shadow-warm);
  transition: all var(--transition-fast);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(255, 107, 53, 0.35);
}

.primary-btn:disabled {
  background: var(--color-text-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* --- Forms --- */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--color-black);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  background: var(--color-bg);
  transition: all var(--transition-fast);
  color: var(--color-black);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-orange);
  background: var(--color-white);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.safety-callout {
  background: linear-gradient(135deg, #FFF3E0, #FFF8F0);
  border-left: 4px solid var(--color-orange);
  padding: var(--spacing-md);
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  margin-bottom: var(--spacing-lg);
  font-size: 0.92rem;
  color: #C84B00;
}

.error-state {
  background: linear-gradient(135deg, #FEF2F2, #FFF5F5);
  color: #B91C1C;
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-md);
  text-align: center;
  font-weight: 600;
  margin-top: var(--spacing-md);
  border: 1px solid #FECACA;
}

.success-state {
  background: linear-gradient(135deg, #ECFDF5, #F0FDF4);
  color: #047857;
  padding: var(--spacing-xl) var(--spacing-lg);
  border-radius: var(--border-radius-md);
  text-align: center;
  margin-top: var(--spacing-md);
  border: 1px solid #A7F3D0;
}

.success-state h3 {
  color: #047857;
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

.details-panel {
  background: var(--gradient-warm-subtle);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-md);
  text-align: center;
  margin-top: var(--spacing-lg);
  border: 2px solid rgba(255, 107, 53, 0.15);
}

.highlight-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-lg);
}

.subtext {
  margin-top: var(--spacing-sm);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* --- 2. Chat UI --- */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100% - 40px);
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding-bottom: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.chat-history::-webkit-scrollbar {
  width: 6px;
}

.chat-history::-webkit-scrollbar-track {
  background: transparent;
}

.chat-history::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

.message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.assistant {
  align-self: flex-start;
}

.message.user {
  align-self: flex-end;
}

.bubble {
  padding: 14px 18px;
  border-radius: var(--border-radius-lg);
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.message.assistant .bubble {
  background: var(--color-white);
  color: var(--color-black);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 4px;
}

.message.user .bubble {
  background: linear-gradient(135deg, #FF3366 0%, #F1255C 100%);
  color: var(--color-white);
  border-bottom-right-radius: 4px;
  box-shadow: 0 8px 20px rgba(241, 37, 92, 0.25);
}

.message.assistant .bubble p {
  margin: 0 0 0.5em;
}
.message.assistant .bubble p:last-child {
  margin-bottom: 0;
}
.message.assistant .bubble ul {
  margin: 0.25em 0 0.5em;
  padding-left: 1.2em;
}
.message.assistant .bubble ul:last-child {
  margin-bottom: 0;
}
.message.assistant .bubble li {
  margin-bottom: 0.2em;
}
.message.assistant .bubble .chat-link-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 18px;
  border: 1.5px solid #F1255C;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #F1255C;
  background: transparent;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.message.assistant .bubble .chat-link-btn:hover {
  background: #F1255C;
  color: #fff;
}

/* Inline links — subtle, text-level, for mid-sentence references like boc.com.au */
.message.assistant .bubble .chat-link-inline {
  color: #F1255C;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  transition: color 0.15s ease;
}
.message.assistant .bubble .chat-link-inline:hover {
  color: #D01C4B;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 6px;
  padding: 16px 20px;
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  border-bottom-left-radius: 4px;
  width: fit-content;
  align-self: flex-start;
  margin-top: var(--spacing-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background-color: #F1255C;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Chat Box Header */
.chat-top-bar {
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, #FF6B35 0%, #F1255C 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.chat-top-bar::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.chat-top-bar::before {
  content: "";
  position: absolute;
  right: 80px;
  bottom: -40px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.chat-header-user {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  position: relative;
  z-index: 1;
}

.chat-avatar-small {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.chat-header-info h2 {
  font-size: 1.35rem;
  margin-bottom: 2px;
  color: var(--color-white);
  letter-spacing: -0.01em;
}

.chat-header-info .status {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
}

/* Chat Input Area */
.chat-input-area {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  padding-top: var(--spacing-md);
  background: var(--color-surface);
}

/* --- Sexy Chat Starters Layout --- */
.starters-layout {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  width: 100%;
}

.chat-starter-card {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: 14px 18px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  width: 100%;
  text-align: left;
}

.chat-starter-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--color-orange);
}

/* Hero starter card — LPG Services gets full gradient */
.chat-starter-card.primary-starter {
  background: var(--gradient-warm);
  border: none;
  box-shadow: var(--shadow-warm);
  position: relative;
  overflow: hidden;
}

.chat-starter-card.primary-starter::after {
  content: '';
  position: absolute;
  bottom: -15px;
  right: -15px;
  width: 90px;
  height: 90px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  pointer-events: none;
}

.chat-starter-card.primary-starter:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 107, 53, 0.45);
  border: none;
}

.chat-starter-card.primary-starter .starter-text h4 {
  color: var(--color-white);
  font-size: 1.1rem;
}

.chat-starter-card.primary-starter .starter-text p {
  color: rgba(255, 255, 255, 0.88);
}

.chat-starter-card.primary-starter .starter-icon-box {
  background: rgba(255, 255, 255, 0.25);
  font-size: 1.4rem;
  width: 46px;
  height: 46px;
}

.starter-icon-box {
  width: 42px;
  height: 42px;
  background: #F3F4F6;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.starter-icon-box.orange-tint {
  background: #FFEBE1;
}

.starter-text h4 {
  font-size: 1rem;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-black);
  margin-bottom: 2px;
}

.starter-text p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.qr-btn {
  /* Base — overridden by context (starters vs suggestion pills) */
  padding: 0;
}

/* Suggestion pills shown after each Cassie response */
.suggestions-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0 12px;
}

.suggestions-layout .qr-btn {
  padding: 8px 18px;
  border: 1.5px solid #F1255C;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #F1255C;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1.3;
}

.suggestions-layout .qr-btn:hover {
  background: #F1255C;
  color: #fff;
}

#chat-form {
  display: flex;
  gap: var(--spacing-xs);
  background: var(--color-white);
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: 40px;
  transition: border-color var(--transition-fast);
}

#chat-form:focus-within {
  border-color: #FFB3A1;
}

#chat-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 20px;
  outline: none;
  font-size: 0.95rem;
  color: var(--color-black);
}

#send-btn {
  background: linear-gradient(135deg, #FF6B35 0%, #F1255C 100%);
  color: var(--color-white);
  padding: 0 28px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(241, 37, 92, 0.25);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition-fast);
}

#send-btn:hover {
  box-shadow: 0 6px 16px rgba(241, 37, 92, 0.35);
  transform: translateY(-2px);
}

/* --- Prominent sidebar action buttons --- */
.order-btn {
  background: var(--gradient-warm) !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4) !important;
  padding: 14px var(--spacing-md) !important;
}

.order-btn h3 {
  color: var(--color-white) !important;
  font-size: 1.05rem !important;
}

.order-btn p {
  color: rgba(255, 255, 255, 0.88) !important;
}

.order-btn .card-icon {
  background: rgba(255, 255, 255, 0.2) !important;
  font-size: 1.4rem !important;
}

.order-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 14px 32px rgba(255, 107, 53, 0.5) !important;
}

.signup-btn {
  background: linear-gradient(135deg, #F1255C 0%, #C41249 100%) !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(241, 37, 92, 0.38) !important;
  padding: 14px var(--spacing-md) !important;
}

.signup-btn h3 {
  color: var(--color-white) !important;
  font-size: 1.05rem !important;
}

.signup-btn p {
  color: rgba(255, 255, 255, 0.88) !important;
}

.signup-btn .card-icon {
  background: rgba(255, 255, 255, 0.2) !important;
  font-size: 1.4rem !important;
}

.signup-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 14px 32px rgba(241, 37, 92, 0.5) !important;
}

/* --- Signup content area --- */
.signup-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.view-header {
  margin-bottom: var(--spacing-sm);
}

.view-header h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.view-header p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* --- Legend section styling --- */
.legend-section {
  padding: 8px 0;
  margin-bottom: 6px;
}

.legend-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.legend-header h3 {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.legend-section p {
  font-size: 0.82rem;
  color: var(--color-text-main);
  line-height: 1.55;
  margin-bottom: 6px;
}

.legend-section p:last-child {
  margin-bottom: 0;
}

/* --- Chat container layout fix for back button --- */
.chat-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  padding: var(--spacing-md) var(--spacing-lg) 0;
}

#back-to-starters {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
  text-align: left;
  padding: 0;
}

#back-to-starters:hover {
  color: var(--color-primary-hover);
}

#chat-screen,
#signup-screen {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding-bottom: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  min-height: 0;
}

/* Welcome zone — shown at top of chat before any messages */
.chat-welcome-zone {
  flex-shrink: 0;
  padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-md);
}

.chat-welcome-zone .starters-layout {
  margin-top: var(--spacing-md);
}

.ai-disclaimer {
  margin-top: var(--spacing-md);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.45;
  padding: 0 var(--spacing-sm);
}

.chat-input-area {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-surface);
  flex-shrink: 0;
}