/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1e222b;
  --border: #2a2f3a;
  --text: #e6e8eb;
  --text-dim: #9aa1ac;
  --accent: #5b8def;
  --accent-hover: #75a1f2;
  --danger: #e0576f;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  padding: 0;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: var(--accent);
}

/* --- Login screen --- */

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-card h1 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
}

.login-card .subtitle {
  margin: 0 0 12px 0;
  color: var(--text-dim);
  font-size: 13px;
}

.login-error {
  color: var(--danger);
  font-size: 13px;
  margin: 0;
}

/* --- App shell --- */

.app-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.app-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.app-header h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.app-header .app-subtitle {
  color: var(--text-dim);
  font-size: 13px;
}

/* --- Section / card --- */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.panel h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hint {
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0 0 16px 0;
  max-width: 640px;
}

.hint code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.panel + .panel {
  margin-top: 0;
}

/* --- Table --- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.03em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--surface-2);
}

.empty-row td {
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
  padding: 18px 10px;
}

/* --- Forms / inputs --- */

input[type="text"],
input[type="password"] {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--accent);
}

input::placeholder {
  color: var(--text-dim);
}

button {
  background: var(--accent);
  color: #0b0d11;
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

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

button:active {
  transform: translateY(1px);
}

.create-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.create-row input {
  flex: 1 1;
}

/* --- Badges --- */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.badge-active {
  background: rgba(91, 141, 239, 0.18);
  color: var(--accent-hover);
}

.badge-inactive {
  background: rgba(154, 161, 172, 0.15);
  color: var(--text-dim);
}

/* --- Couples debug view --- */

.couples-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.couples-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.couples-list button {
  width: 100%;
  text-align: left;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 500;
}

.couples-list button:hover {
  background: var(--border);
}

.couple-detail h3 {
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 16px 0 8px 0;
}

.couple-detail h3:first-child {
  margin-top: 0;
}

pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  font-size: 12px;
  overflow-x: auto;
  margin: 0;
}

/* --- Error banner --- */

.error-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(224, 87, 111, 0.12);
  border: 1px solid var(--danger);
  color: #f4a6b3;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

.error-dismiss {
  background: transparent;
  color: #f4a6b3;
  border: none;
  font-size: 16px;
  line-height: 1;
  padding: 0 4px;
  font-weight: 400;
}

.error-dismiss:hover {
  background: transparent;
  color: #fff;
}

/* --- Textarea --- */

textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  width: 100%;
  transition: border-color 0.15s ease;
}

textarea:focus {
  border-color: var(--accent);
}

/* --- Select --- */

select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
}

/* --- Small / secondary buttons --- */

.btn-small {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

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

.badge-toggle {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.badge-toggle:hover {
  background: transparent;
  opacity: 0.8;
}

/* --- Stack list (prompt templates) --- */

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.stack-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stack-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.stack-item-actions {
  display: flex;
  gap: 8px;
}

.template-preview {
  white-space: pre-wrap;
  max-height: 120px;
  overflow-y: auto;
}

.create-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.empty-row-inline {
  color: var(--text-dim);
  font-style: italic;
  font-size: 13px;
  margin: 0 0 14px;
}

/* --- Question Sets Editor & Cards --- */

.qs-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.qs-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease;
}

.qs-card.expanded {
  border-color: var(--accent);
}

.qs-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qs-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qs-title-area h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.qs-meta-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
}

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

.qs-questions-editor {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.qs-editor-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.question-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.question-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.question-badge {
  background: var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
}

.question-fields {
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  grid-gap: 10px;
  gap: 10px;
}

@media (max-width: 768px) {
  .question-fields {
    grid-template-columns: 1fr;
  }
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-group label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}

.btn-danger {
  background: rgba(224, 87, 111, 0.15);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
}


