:root {
  color-scheme: light dark;
  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
  background-color: #070c15;
  color: #e2e8f0;
}

body {
  margin: 0;
  min-height: 100vh;
  display: block;
  background: #000;
  padding: 0;
}

.site-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem clamp(1rem, 3vw, 2.4rem);
  background: rgba(7, 11, 20, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.6);
  position: sticky;
  top: 0;
  z-index: 60;
}

.site-topbar__brand a {
  color: #e2e8f0;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 600;
  text-decoration: none;
}

.site-topbar__tag {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.72);
}

.site-topbar__nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: rgba(226, 232, 240, 0.92);
}

.site-topbar__nav form {
  margin: 0;
}

.site-topbar__nav a {
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-topbar__nav a:hover,
.site-topbar__nav a:focus {
  color: #38bdf8;
}

.site-topbar__user {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.78);
}

.site-topbar__button {
  border: none;
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.site-topbar__button:hover {
  background: rgba(59, 130, 246, 0.32);
}

.site-topbar__cta {
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #07111f;
  padding: 0.5rem 1.2rem;
  font-weight: 600;
}

.site-claim {
  background: rgba(15, 23, 42, 0.85);
  color: rgba(226, 232, 240, 0.88);
  padding: 0.75rem clamp(1rem, 3vw, 2.4rem);
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.6);
}

.site-claim a {
  color: #38bdf8;
}

.site-flashes {
  padding: 0.6rem clamp(1rem, 3vw, 2.4rem);
  display: grid;
  gap: 0.5rem;
}

.flash {
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 0.92rem;
  background: rgba(56, 189, 248, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.flash-success { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.32); }
.flash-warning { background: rgba(250, 204, 21, 0.15); border-color: rgba(250, 204, 21, 0.35); }
.flash-danger { background: rgba(248, 113, 113, 0.18); border-color: rgba(248, 113, 113, 0.4); }
.flash-info { background: rgba(129, 140, 248, 0.18); border-color: rgba(129, 140, 248, 0.38); }

#hero {
  position: relative;
  min-height: 100vh;
  background: #000;
}


#errorOverlay {
  display: grid;
  place-items: center;
  background: #000;
}

#errorOverlay .panel {
  opacity: 0;
  transform: scale(0.94);
}

#errorOverlay .panel-body {
  color: #ffd54a;
}

#titleWrap h1 {
  color: #ffd54a;
  text-shadow: 0 0 24px rgba(255, 213, 74, 0.32);
}

#titleWrap .cta {
  background: linear-gradient(90deg, #ffd54a, #ffb400);
  color: #111;
  box-shadow: 0 10px 28px rgba(255, 213, 74, 0.35);
}

* {
  box-sizing: border-box;
}

.composer-panel,
.chat-panel {
  display: flex;
  flex-direction: column;
  background: rgba(13, 20, 36, 0.94);
}

.composer-panel {
  padding: clamp(0.45rem, 1vw, 0.75rem) clamp(0.35rem, 1.2vw, 0.65rem);
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.section-header h2,
.section-header h3 {
  margin: 0;
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  font-weight: 600;
}

.section-header p {
  margin: 0;
  color: rgba(226, 232, 240, 0.68);
  font-size: clamp(0.85rem, 1vw, 0.95rem);
}

.composer-header {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  padding-bottom: 1rem;
}

.composer-heading {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.composer-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(148, 163, 184, 0.72);
}

.composer-header h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-weight: 600;
  color: #e2e8f0;
}

.composer-subtitle {
  margin: 0;
  color: rgba(203, 213, 225, 0.75);
  font-size: clamp(0.92rem, 1.2vw, 1.05rem);
  max-width: 640px;
}

.composer-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.8rem;
}

.composer-draftbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.65);
}

.composer-draftbar label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.78);
}

.draft-picker-controls {
  display: flex;
  align-items: center;
  gap: 0;
}

.composer-draftbar select,
.composer-draftbar input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.55);
  color: #f8fafc;
  padding: 0.4rem 0.55rem;
  font-size: 0.85rem;
}

.composer-draftbar select:focus,
.composer-draftbar input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.toolbar-button--ghost {
  background: transparent;
  color: #38bdf8;
  border: 1px dashed rgba(56, 189, 248, 0.4);
}

.toolbar-button--ghost:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #e2e8f0;
}

.composer-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.toolbar-button {
  border: none;
  border-radius: 10px;
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #07111f;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.toolbar-button--secondary {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.toolbar-button:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.composer-status {
  margin-left: auto;
  font-size: 0.78rem;
  color: rgba(203, 213, 225, 0.85);
}

.product-list {
  flex: 1;
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: auto;
  padding-right: 0.4rem;
  scrollbar-width: thin;
}

.product-row {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(22, 32, 52, 0.92);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-row:hover {
  border-color: rgba(96, 165, 250, 0.7);
  transform: translateY(-2px);
}

.product-thumbnail {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.product-details {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.product-head {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.product-form-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.product-form-group input,
.product-form-group select,
.composer-quantity input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.55);
  color: #f8fafc;
  padding: 0.38rem 0.55rem;
  font-size: 0.82rem;
}

.product-form-group input:focus,
.composer-quantity input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.product-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8fafc;
}

.product-meta {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.78);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.product-meta__text {
  color: inherit;
}

.item-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.92);
}

.item-badge--warning {
  background: rgba(250, 204, 21, 0.22);
  color: rgba(250, 204, 21, 0.9);
}

.item-badge--danger {
  background: rgba(248, 113, 113, 0.22);
  color: rgba(248, 113, 113, 0.92);
}

.product-price {
  font-weight: 600;
  font-size: 0.95rem;
  color: #38bdf8;
}

.product-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.product-actions .action-button {
  border: none;
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.product-actions .action-button:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.product-row[data-status="pending_refresh"],
.product-row[data-status="esgotado"] {
  border-color: rgba(250, 204, 21, 0.4);
}

.product-row[data-status="esgotado"] {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(185, 28, 28, 0.12);
}

.composer-placeholder {
  padding: 1.2rem;
  text-align: center;
  color: rgba(203, 213, 225, 0.7);
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 16px;
}

.side-panel {
  display: flex;
  flex-direction: column;
  background: transparent;
  border-left: none;
  padding: clamp(0.4rem, 1.2vw, 0.8rem);
  padding-top: 0;
  gap: 0.6rem;
  min-height: 0;
}

.side-panel .chat-panel,
.side-panel .results-panel {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(13, 20, 36, 0.92);
  min-height: 0;
}

.side-panel .chat-panel {
  flex: 1 1 0;
  padding: 0;
  overflow: hidden;
}

.side-panel .results-panel {
  flex: 1 1 0;
  padding: 0.75rem;
  gap: 0.75rem;
}

.side-panel .chat-panel .chat-input {
  padding: 0.65rem;
  gap: 0.5rem;
}

.side-panel .chat-panel .chat-input textarea {
  min-height: 42px;
  max-height: 120px;
  padding: 0.35rem 0.55rem;
  resize: none;
}

.chat-history {
  padding: 0.4rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.chat-message {
  border-radius: 0;
  padding: 0.45rem 0.3rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 0.82rem;
  line-height: 1.5;
}

.chat-message.user {
  align-self: stretch;
  text-align: right;
  color: rgba(226, 232, 240, 0.88);
}

.chat-message.assistant {
  align-self: stretch;
  color: rgba(203, 213, 225, 0.88);
}

.chat-status {
  margin: 0 0.6rem;
  font-size: 0.74rem;
  color: rgba(148, 163, 184, 0.8);
  min-height: 0.9rem;
}

.chat-status[data-type="error"] {
  color: rgba(248, 113, 113, 0.9);
}

.chat-status[data-type="warning"] {
  color: rgba(250, 204, 21, 0.95);
}

.chat-input {
  display: grid;
  gap: 0;
  padding: 0.6rem;
  background: transparent;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.chat-input textarea {
  width: 100%;
  min-height: 40px;
  resize: vertical;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.45);
  color: #f8fafc;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 0;
}

.chat-actions button {
  border: none;
  border-radius: 4px;
  padding: 0.4rem 0.75rem;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #07111f;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.chat-actions button:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.chat-reset {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.results-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.results-header__intro h3 {
  margin: 0;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  font-weight: 600;
  color: #e2e8f0;
}

.results-header__intro p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: rgba(203, 213, 225, 0.72);
  max-width: 240px;
}

.results-header__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.78);
}

.results-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}

.results-badge[data-state="active"] {
  background: rgba(250, 204, 21, 0.18);
  color: #facc15;
}

.results-updated {
  font-size: 0.74rem;
  color: rgba(148, 163, 184, 0.75);
}

.results-status {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.82);
  min-height: 0.9rem;
}

.results-status[data-type="success"] {
  color: rgba(34, 197, 94, 0.85);
}

.results-status[data-type="error"] {
  color: rgba(248, 113, 113, 0.9);
}

.results-status[data-type="warning"] {
  color: rgba(250, 204, 21, 0.95);
}

.results-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
  padding-right: 0.25rem;
  min-height: 0;
}

.results-empty {
  padding: 0.85rem;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(148, 163, 184, 0.78);
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  background: rgba(10, 16, 28, 0.3);
}

.results-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(10, 17, 29, 0.65);
}

.results-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
}

.results-card__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.results-card__status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.22);
  color: #38bdf8;
}

.results-card__status[data-status="pending_suppliers"] {
  background: rgba(250, 204, 21, 0.22);
  color: #facc15;
}

.results-card__status[data-status="completed"] {
  background: rgba(34, 197, 94, 0.18);
  color: #22c55e;
}

.results-card__status[data-status="failed"],
.results-card__status[data-status="cancelled"] {
  background: rgba(248, 113, 113, 0.22);
  color: #f87171;
}

.results-card__priority {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(248, 113, 113, 0.18);
  color: #f87171;
}

.results-card__meta {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(148, 163, 184, 0.72);
}

.results-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.results-card__empty {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(148, 163, 184, 0.78);
}

.results-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.results-item + .results-item {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 0.6rem;
}

.results-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.results-item__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f8fafc;
}

.results-item__priority {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(248, 113, 113, 0.18);
  color: #f87171;
}

.results-item__contexto,
.results-item__variantes {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(203, 213, 225, 0.72);
}

.results-item__variantes {
  font-style: italic;
}

.results-item__suggestions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: rgba(203, 213, 225, 0.85);
}

.results-item__suggestions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.results-item__suggestions-list li {
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.12);
  color: rgba(226, 232, 240, 0.88);
}

.results-item__placeholder {
  margin: 0;
  color: rgba(148, 163, 184, 0.78);
}

.results-item__suppliers {
  margin: 0;
  color: rgba(129, 140, 248, 0.78);
  font-size: 0.74rem;
}

.composer-options {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  background: rgba(13, 20, 36, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.composer-options h3 {
  margin: 0;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  font-weight: 600;
  color: #e2e8f0;
}

.composer-options p {
  margin: 0;
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.82rem;
}

.composer-options form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.option-check {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 0.82rem;
  color: rgba(226, 232, 240, 0.9);
}

.option-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #38bdf8;
}

.option-check input[type="checkbox"]:disabled {
  accent-color: rgba(148, 163, 184, 0.5);
}

.option-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.option-button {
  border: none;
  border-radius: 10px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #07111f;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.option-button--secondary {
  background: rgba(148, 163, 184, 0.16);
  color: rgba(226, 232, 240, 0.88);
}

.option-button:hover {
  opacity: 0.86;
  transform: translateY(-1px);
}

.auth-body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95) 0%, #020617 70%, #000 100%);
  color: #e2e8f0;
}

.auth-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem clamp(1.4rem, 3vw, 2.4rem);
  background: rgba(7, 11, 20, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.6);
}

.auth-brand {
  color: #e2e8f0;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
}

.auth-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.auth-nav a {
  color: rgba(226, 232, 240, 0.88);
  text-decoration: none;
  font-size: 0.95rem;
}

.auth-container {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 8vw, 5rem) 1.4rem;
}

.auth-card {
  width: min(420px, 100%);
  background: rgba(13, 20, 36, 0.94);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  border-radius: 20px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.45);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
}

.auth-card p {
  margin: 0;
  color: rgba(226, 232, 240, 0.7);
  line-height: 1.55;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-form label {
  font-size: 0.88rem;
  color: rgba(226, 232, 240, 0.75);
}

.auth-form input {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.6);
  color: #f8fafc;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
}

.auth-form input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.auth-form button {
  margin-top: 0.4rem;
  border: none;
  border-radius: 14px;
  padding: 0.7rem 1rem;
  font-size: 0.98rem;
  font-weight: 600;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #07111f;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.auth-form button:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.auth-switch {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.72);
}

.auth-switch a {
  color: #38bdf8;
  font-weight: 600;
  text-decoration: none;
}

.flash-messages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.chat-panel {
  padding: 1.6rem clamp(1.2rem, 2.6vw, 2rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.chat-header h2 {
  margin: 0;
  font-size: clamp(1.2rem, 1.6vw, 1.4rem);
  font-weight: 600;
}

.chat-header p {
  margin: 0;
  color: rgba(226, 232, 240, 0.65);
  font-size: clamp(0.85rem, 1vw, 0.92rem);
}

.chat-history {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  overflow-y: auto;
  padding-right: 0.4rem;
  min-height: 0;
}

.chat-message {
  max-width: 96%;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  line-height: 1.45;
  font-size: 0.96rem;
}

.chat-message.assistant {
  align-self: flex-start;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.chat-message.user {
  align-self: flex-end;
  background: rgba(96, 165, 250, 0.88);
  color: #0b1220;
}

.chat-input {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.8rem;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  padding: 0.85rem;
}

.chat-input textarea {
  flex: 1;
  min-height: 48px;
  max-height: 140px;
  background: transparent;
  color: inherit;
  border: none;
  resize: none;
  font-family: inherit;
  font-size: 0.95rem;
}

.chat-input textarea:focus {
  outline: none;
}

.chat-input button {
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #f8fafc;
  font-weight: 600;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-input button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

@media (max-width: 1080px) {
  .page-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }
  .composer-panel,
  .side-panel {
    border-right: none;
    padding: clamp(1rem, 4vw, 1.4rem);
  }
  .composer-panel {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }
  .side-panel {
    padding-top: 0;
  }
  .side-panel .chat-panel {
    border-radius: 14px;
  }
  .product-list {
    max-height: 360px;
  }
}

@media (max-width: 720px) {
  .product-row {
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto;
  }
  .product-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
  }
  .product-thumbnail {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 620px) {
  .chat-input {
    flex-direction: column;
    align-items: stretch;
  }
  .chat-input button {
    width: 100%;
  }
}

body.has-intro {
  overflow: hidden;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, #0f172a 0%, #020617 54%, #000 100%);
  transition: opacity 0.6s ease;
}

.intro.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.intro__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  text-align: center;
}

.intro__bolt {
  position: relative;
  width: min(320px, 62vw);
  aspect-ratio: 1/1;
  opacity: 0.12;
  transform: scale(0.92);
  transition: opacity 0.22s ease, transform 0.22s ease;
  transform-origin: 50% 50%;
}

.intro__bolt-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.intro__bolt-glow {
  position: absolute;
  inset: -12%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.45), rgba(255, 170, 0, 0.05) 70%, transparent 100%);
  filter: blur(12px);
  opacity: 0.7;
  pointer-events: none;
}

.intro__bolt.is-glow .intro__bolt-glow {
  opacity: 1;
}

.intro__bolt.is-solid {
  opacity: 1;
  transform: scale(1);
}

.intro__bolt.is-visible {
  opacity: 1;
  transform: scale(1.02);
}

.intro__tagline {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #f8fafc;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}

.intro__tagline.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-sequence {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #000;
  animation: introBaseFade 0.4s ease-out both;
}

.intro-sequence.is-hidden {
  animation: introExit 0.75s ease forwards;
}

.intro-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.intro-stage.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.intro-stage--glitch {
  background: #004aad;
}

.intro-stage--glitch.is-active {
  animation: introHueShift 2.2s ease-in-out;
}

.intro-stage--glitch.is-glitch {
  filter: saturate(1.4) contrast(1.3);
}

.intro-stage--glitch.is-still {
  animation-play-state: paused;
}

.intro-noise {
  position: absolute;
  inset: -12%;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 6px),
              repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 3px, transparent 3px 7px);
  mix-blend-mode: screen;
  opacity: 0.35;
  animation: introNoise 0.17s steps(4) infinite;
}

.intro-bars {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 2vh 0;
  pointer-events: none;
}

.intro-bars span {
  height: 6px;
  margin: 6px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0), rgba(255, 255, 255, 0.8), rgba(15, 23, 42, 0));
  transform: scaleX(0);
  transform-origin: left;
  animation: introBarSweep 2.2s ease forwards;
}

.intro-bars span:nth-child(odd) { animation-delay: 0.18s; }
.intro-bars span:nth-child(even) { animation-delay: 0.32s; }
.intro-bars span:nth-child(3n) { animation-delay: 0.46s; }

.intro-flash {
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, transparent 55%);
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.15s ease;
}

.intro-flash.is-on {
  opacity: 1;
}

.intro-stage--solid {
  background: #000;
}

.solid-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.solid-frame.is-visible {
  opacity: 1;
  transform: scale(1.02);
}

.solid-frame--a { background: #ff0048; }
.solid-frame--b { background: #00ffd5; }
.solid-frame--c { background: #1d0c68; }

.intro-stage--terminal {
  background: #02070d;
  display: grid;
  place-items: center;
}

.terminal-frame {
  position: relative;
  width: min(720px, 94vw);
  height: min(360px, 60vh);
  background: radial-gradient(circle at top, rgba(16, 24, 40, 0.95) 0%, rgba(6, 12, 20, 0.98) 65%);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(2, 8, 20, 0.65);
  overflow: hidden;
  padding: clamp(1rem, 3vw, 1.6rem);
}

.terminal-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.04), transparent 38%);
  pointer-events: none;
}

.terminal-scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
  mix-blend-mode: screen;
  animation: terminalScan 4s linear infinite;
}

.terminal-content {
  position: relative;
  display: grid;
  grid-auto-rows: min-content;
  row-gap: 0;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  color: #38bdf8;
  overflow: hidden;
  height: 75%;
}

.terminal-line {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  white-space: nowrap;
}

.terminal-phrase {
  position: absolute;
  left: 50%;
  bottom: clamp(1.2rem, 3vw, 1.8rem);
  transform: translateX(-50%) translateY(16px);
  font-size: clamp(1.3rem, 1.8vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #f8fafc;
  text-shadow: 0 6px 35px rgba(56, 189, 248, 0.52);
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.terminal-phrase.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes introHueShift {
  0% { background-color: #004aad; }
  35% { background-color: #b3005a; }
  65% { background-color: #1d0c68; }
  100% { background-color: #003a8c; }
}

@keyframes introNoise {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, -1%); }
  50% { transform: translate(1%, 2%); }
  75% { transform: translate(-1%, 3%); }
  100% { transform: translate(2%, -2%); }
}

@keyframes introBarSweep {
  0% { transform: scaleX(0); opacity: 0; }
  10% { opacity: 1; }
  60% { transform: scaleX(1); opacity: 0.9; }
  100% { transform: scaleX(0.1); opacity: 0; }
}

@keyframes introBaseFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes introExit {
  to {
    opacity: 0;
    pointer-events: none;
  }
}

@keyframes terminalScan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.page-shell {
  display: none;
}

body:not(.has-intro) .page-shell,
.page-shell.is-visible {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 55%) minmax(0, 45%);
  height: 100vh;
  width: 100vw;
  background: transparent;
  gap: 0;
  opacity: 1;
  pointer-events: auto;
}

body:not(.has-intro) .page-shell > *,
.page-shell.is-visible > * {
  min-height: 0;
}
