@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --ink: #1f1f1d;
  --muted: #6f6b63;
  --line: #e2ded5;
  --paper: #f7f5ef;
  --panel: #fbfaf6;
  --white: #ffffff;
  --orange: #c96442;
  --orange-dark: #9b4a31;
  --lime: #d8f15a;
  --green: #234c39;
  --red: #9f2b1d;
  --shadow: 0 18px 55px rgba(39, 35, 28, 0.08);
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  background: var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

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

.topbar {
  height: 64px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(31, 31, 29, 0.1);
  background: rgba(247, 245, 239, 0.88);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

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

.brand > strong {
  display: block;
  color: #1f1f1d;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand > div {
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #22211f;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 800;
  box-shadow: none;
}

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

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

.brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

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

.logout-form {
  margin: 0;
}

.panel-toggle {
  height: 34px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.panel-toggle {
  cursor: pointer;
  text-decoration: none;
}

.workspace {
  height: calc(100vh - 64px);
  min-height: 0;
  display: grid;
  grid-template-columns: 292px minmax(560px, 700px) minmax(460px, 1fr);
  transition: grid-template-columns 240ms ease;
}

.workspace.left-hidden {
  grid-template-columns: 0 minmax(560px, 740px) minmax(560px, 1fr);
}

.workspace.right-hidden {
  grid-template-columns: 292px minmax(680px, 1fr) 0;
}

.workspace.left-hidden.right-hidden {
  grid-template-columns: 0 minmax(560px, 1fr) 0;
}

.conversation-sidebar {
  min-width: 0;
  padding: 16px 12px;
  overflow: auto;
  background: #f2f0ea;
  border-right: 1px solid var(--line);
  transition: opacity 180ms ease, transform 240ms ease, padding 240ms ease;
  display: flex;
  flex-direction: column;
}

.sidebar-main {
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.left-hidden .conversation-sidebar {
  opacity: 0;
  transform: translateX(-100%);
  pointer-events: none;
  padding-left: 0;
  padding-right: 0;
}

.user-card {
  margin: 16px 4px 2px;
  padding: 12px 12px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(31, 31, 29, 0.06);
  border-radius: 14px;
  flex: 0 0 auto;
}

.user-card span,
.user-card strong {
  display: block;
}

.user-card span {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.user-card strong {
  font-size: 15px;
}

.conversation-head {
  padding: 0 4px;
  display: grid;
  gap: 10px;
}

.conversation-head h2 {
  margin: 0;
  font-size: 18px;
}

.conversation-head small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.conversation-head button {
  height: 40px;
  border: 1px solid rgba(31, 31, 29, 0.08);
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  color: #3d3932;
  font-size: 12px;
  font-weight: 800;
}

.conversation-list {
  margin-top: 14px;
  display: grid;
  gap: 4px;
}

.conversation-item {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
}

.conversation-item:hover,
.conversation-item.active {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(31, 31, 29, 0.08);
}

.conversation-item.active {
  box-shadow: none;
}

.conversation-item strong,
.conversation-item span {
  display: block;
}

.conversation-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.conversation-item span,
.conversation-empty {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.config-panel {
  min-width: 0;
  overflow: auto;
  padding: 34px 40px 42px;
  background: #fbfaf6;
  border-right: 1px solid var(--line);
  transition: opacity 180ms ease, transform 240ms ease;
}

.agent-input-card {
  padding-top: 8px;
}

.agent-input-card .form-section {
  margin-top: 22px;
}

.agent-input-card .form-section:first-child {
  margin-top: 16px;
}

.agent-input-card .field-label {
  margin-bottom: 9px;
  color: #4f4a42;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.agent-input-card input {
  height: 44px;
  border-radius: 7px;
  font-size: 15px;
}

.agent-input-card textarea {
  min-height: 88px;
  border-radius: 7px;
  font-size: 15px;
}

.agent-input-card input::placeholder,
.agent-input-card textarea::placeholder {
  color: #8e8980;
}

.workflow-stepper {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid #d8d2c7;
  border-radius: 14px;
  overflow: hidden;
  background: #fffdf8;
}

.workflow-stepper button {
  min-width: 0;
  padding: 14px 8px;
  border: 0;
  border-right: 1px solid #d7d1c5;
  background: transparent;
  cursor: pointer;
}

.workflow-stepper button:last-child {
  border-right: 0;
}

.workflow-stepper button.active {
  background: #eee5d7;
}

.workflow-stepper span,
.workflow-stepper strong {
  display: block;
}

.workflow-stepper span {
  color: var(--muted);
  font-size: 10px;
}

.workflow-stepper strong {
  margin-top: 3px;
  font-size: 14px;
}

.step-pane {
  display: none;
  animation: fadeInUp 180ms ease;
}

.step-pane.active {
  display: block;
}

.right-hidden .result-panel {
  opacity: 0;
  transform: translateX(100%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange-dark);
  font: 700 11px/1 "Space Grotesk", sans-serif;
  letter-spacing: 0.18em;
}

.config-head h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.config-head > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.form-section {
  margin-top: 26px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.choice-row button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #cfc8bc;
  background: #fffdf8;
  border-radius: 999px;
  cursor: pointer;
  color: #4f4a42;
  font-size: 12px;
  font-weight: 700;
}

.choice-row button.active {
  color: #205493;
  background: #dcebff;
  border-color: #c4d8f7;
}

.quick-choice-row {
  gap: 8px;
}

.quick-choice-row button {
  min-height: 34px;
  padding: 0 14px;
  color: #393631;
  background: #fffdf8;
  border: 1px solid #cfc8bc;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.quick-choice-row button.active {
  color: #2563a5;
  background: #dcebff;
  border-color: #c8dcf6;
}

.step-actions {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.step-actions .panel-toggle {
  min-width: 96px;
  justify-content: center;
}

.final-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.final-summary div {
  padding: 12px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.final-summary div.wide {
  grid-column: 1 / -1;
}

.final-summary strong,
.final-summary span {
  display: block;
}

.final-summary strong {
  color: var(--muted);
  font-size: 11px;
}

.final-summary span {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.5;
}

.field-label,
.advanced-fields label span {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: #4c4941;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.field-label em {
  padding: 2px 5px;
  color: var(--orange-dark);
  background: #ffe6dc;
  border-radius: 3px;
  font-size: 9px;
  font-style: normal;
}

.duration-options,
.mode-options {
  display: grid;
  gap: 8px;
}

.duration-options {
  grid-template-columns: repeat(4, 1fr);
}

.duration-options.agent-duration-options,
.duration-options.agent-duration-options.ai-duration-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.duration-options.ai-duration-options {
  grid-template-columns: repeat(3, 1fr);
}

.mode-options {
  grid-template-columns: 1fr;
}

.duration-option,
.mode-option {
  min-width: 0;
  padding: 12px 6px 10px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: 160ms ease;
}

.mode-option {
  position: relative;
  padding: 14px 14px 14px 44px;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 10px;
}

.mode-option::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 19px;
  width: 14px;
  height: 14px;
  border: 2px solid #b9b1a4;
  border-radius: 50%;
  background: white;
}

.mode-option::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 24px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
}

.duration-option:hover,
.mode-option:hover {
  border-color: #ada699;
}

.duration-option strong,
.duration-option span,
.mode-option strong,
.mode-option span {
  display: block;
}

.duration-option strong,
.mode-option strong {
  font-size: 15px;
}

.duration-option span,
.mode-option span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.mode-option span {
  font-size: 11px;
  line-height: 1.5;
}

.duration-option.active {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--orange);
  transform: translate(-2px, -2px);
}

.agent-duration-options .duration-option {
  width: auto;
  min-height: 34px;
  padding: 0 14px;
  color: #393631;
  background: #fffdf8;
  border: 1px solid #cfc8bc;
  border-radius: 999px;
  box-shadow: none;
  transform: none;
}

.agent-duration-options .duration-option strong {
  font-size: 13px;
}

.agent-duration-options .duration-option.active {
  color: #2563a5;
  background: #dcebff;
  border-color: #c8dcf6;
  box-shadow: none;
  transform: none;
}

.mode-option.active {
  color: var(--ink);
  background: #fff5ee;
  border: 2px solid var(--orange);
  box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-2px, -2px);
}

.mode-option.active::before {
  border-color: var(--orange);
}

.mode-option.active::after {
  background: var(--orange);
}

.duration-option.active span {
  color: #cbc5b9;
}

.mode-option.active span {
  color: #6f4a3a;
}

.mode-option.locked {
  color: #8f877c;
  background: #f1ede4;
  border-style: dashed;
  cursor: pointer;
  box-shadow: none;
}

.mode-option.locked::before {
  border-radius: 4px;
  background: #e2ddd3;
}

.mode-option.locked::after {
  left: 19px;
  top: 22px;
  width: 9px;
  height: 5px;
  background: transparent;
  border-left: 2px solid #9d9488;
  border-bottom: 2px solid #9d9488;
  border-radius: 0;
  transform: rotate(-45deg);
}

.mode-option.locked strong {
  color: #4f4a42;
}

.mode-option.locked span {
  color: var(--orange-dark);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 7px;
  outline: none;
  transition: border 150ms ease, box-shadow 150ms ease;
}

input,
select {
  height: 42px;
  padding: 0 11px;
}

textarea {
  min-height: 170px;
  padding: 12px;
  resize: vertical;
  line-height: 1.7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 92, 53, 0.1);
}

.field-note {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  color: #999287;
  font-size: 10px;
}

.field-note b {
  font-weight: 600;
}

.field-note .warn {
  color: var(--red);
  font-weight: 800;
}

.field-tip {
  display: block;
  margin-top: 7px;
  color: #8b8277;
  font-size: 11px;
  line-height: 1.6;
}

.advanced-fields {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.advanced-fields summary {
  padding: 13px 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.advanced-fields summary span {
  margin-left: 5px;
  color: var(--muted);
  font-weight: 500;
}

.advanced-fields label {
  display: block;
  margin: 0 0 14px;
}

.advanced-fields textarea {
  min-height: 76px;
}

.generate-button {
  width: 100%;
  height: 54px;
  margin-top: 24px;
  padding: 0 17px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: var(--orange);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.generate-button:hover:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.generate-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.generate-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.error-message {
  padding: 10px;
  color: var(--red);
  background: #ffebe6;
  border-radius: 6px;
  font-size: 12px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.result-panel {
  min-width: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: none;
  background: var(--paper);
}

.field-hidden-select,
.system-defaults {
  display: none !important;
}

.auto-card {
  margin-top: 24px;
  padding: 16px 18px;
  background: #f8f4ec;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.auto-card strong,
.auto-card span {
  display: block;
}

.auto-card strong {
  font-size: 15px;
}

.auto-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.report-export-actions {
  position: static;
  margin: 0 0 16px;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
  background: transparent;
}

.report-export-actions button {
  height: 34px;
  padding: 0 12px;
  color: #4d4941;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.report-export-actions button.primary {
  color: white;
  background: var(--orange);
  border-color: var(--orange);
}

.report-export-actions button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.result-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 28px 34px 42px;
}

.empty-state,
.loading-state {
  min-height: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-state h2,
.loading-state h2 {
  margin: 2px 0 14px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.loading-state > p:last-child {
  max-width: 480px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.loading-rings {
  width: 78px;
  height: 78px;
  margin-bottom: 30px;
  position: relative;
}

.loading-rings i {
  position: absolute;
  inset: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

.loading-rings i:nth-child(2) { animation-delay: 0.25s; }
.loading-rings i:nth-child(3) { animation-delay: 0.5s; }

@keyframes pulse {
  0% { transform: scale(0.5); opacity: 0; }
  45% { opacity: 1; }
  100% { transform: scale(1.2); opacity: 0; }
}

.full-report {
  max-width: 980px;
  margin: 0 auto;
  padding-top: 0;
  position: relative;
  min-height: 100%;
}

.client-document {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(31, 31, 29, 0.08);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(39, 35, 28, 0.07);
  animation: none;
}

.client-title {
  padding: 38px 42px 30px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.client-title p {
  margin: 0 0 8px;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.client-title h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.client-section {
  padding: 28px 42px 34px;
  border-bottom: 1px solid var(--line);
}

.client-section:last-child {
  border-bottom: 0;
}

.client-section > header {
  margin-bottom: 18px;
  padding-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid #ded8ce;
}

.client-section > header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.summary-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.summary-grid div {
  min-width: 0;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-grid dt,
.summary-grid dd {
  margin: 0;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.65;
}

.summary-grid dt {
  color: #5f5a50;
  background: #f2efe8;
  font-weight: 800;
}

.summary-grid dd {
  overflow-wrap: anywhere;
}

.speech-copy p {
  margin: 0 0 10px;
  color: #35322c;
  font-size: 15px;
  line-height: 1.9;
}

.speech-copy p:last-child {
  margin-bottom: 0;
}

.prep-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.prep-group {
  padding: 18px 20px;
  background: #f7f5f0;
  border: 1px solid #e7e2d8;
  border-radius: 6px;
}

.prep-group:last-child {
  grid-column: 1 / -1;
}

.package-grid .package-group:nth-last-child(-n + 3) {
  grid-column: 1 / -1;
}

.prep-group h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.prep-group ul,
.document-list {
  margin: 0;
  padding-left: 18px;
  color: #565149;
  font-size: 12px;
  line-height: 1.85;
}

.shoot-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.shoot-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
}

.shoot-table th,
.shoot-table td {
  padding: 10px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

.shoot-table th {
  color: white;
  background: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.shoot-table td {
  color: #423f38;
  font-size: 10px;
  line-height: 1.55;
}

.shoot-table th:nth-child(1),
.shoot-table td:nth-child(1) { width: 50px; }
.shoot-table th:nth-child(2),
.shoot-table td:nth-child(2) { width: 88px; }
.shoot-table th:nth-child(3),
.shoot-table td:nth-child(3) { width: 52px; }
.shoot-table th:nth-child(4),
.shoot-table td:nth-child(4) { width: 155px; }
.shoot-table th:nth-child(5),
.shoot-table td:nth-child(5) { width: 190px; }
.shoot-table th:nth-child(6),
.shoot-table td:nth-child(6) { width: 130px; }
.shoot-table th:nth-child(7),
.shoot-table td:nth-child(7) { width: 120px; }
.shoot-table th:nth-child(8),
.shoot-table td:nth-child(8) { width: 135px; }
.shoot-table th:nth-child(9),
.shoot-table td:nth-child(9) { width: 150px; }

.shoot-table tr:last-child td {
  border-bottom: 0;
}

.shoot-table th:last-child,
.shoot-table td:last-child {
  border-right: 0;
}

.duration-check {
  display: grid;
  gap: 5px;
}

.pass-result {
  color: var(--green);
  font-weight: 800;
}

.package-copy {
  margin: 0;
  color: #565149;
  font-size: 12px;
  line-height: 1.85;
}

.asset-prompt {
  margin: 10px 0 0;
  padding: 10px;
  color: #312e28;
  background: #fff7ed;
  border: 1px solid #f1d7c7;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.8;
}

.prompt-list {
  display: grid;
  gap: 12px;
}

.prompt-card {
  padding: 14px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.prompt-card h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.prompt-card p {
  margin: 0;
  color: #4c4941;
  font-size: 12px;
  line-height: 1.85;
}

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

.login-shell {
  min-height: 100vh;
  padding: 28px;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(980px, 100%);
  padding: 0;
  display: grid;
  grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-panel,
.login-results {
  padding: 42px;
}

.login-results {
  background: #f4efe6;
  border-left: 1px solid var(--line);
}

.login-brand {
  margin-bottom: 42px;
}

.login-card h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.login-intro {
  margin: 10px 0 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.login-results h2 {
  max-width: 460px;
  margin: 0;
  color: #1f1f1d;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: 0;
}

.login-results-intro {
  max-width: 500px;
  margin: 14px 0 24px;
  color: #625c52;
  font-size: 14px;
  line-height: 1.8;
}

.outcome-list {
  display: grid;
  gap: 10px;
}

.outcome-list div {
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid #ded5c7;
  border-radius: 8px;
}

.outcome-list strong,
.outcome-list span {
  display: block;
}

.outcome-list strong {
  color: #211f1b;
  font-size: 14px;
}

.outcome-list span {
  color: #5c564d;
  font-size: 13px;
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-form label > span {
  display: block;
  margin-bottom: 8px;
  color: #4c4941;
  font-size: 12px;
  font-weight: 800;
}

.login-button {
  margin-top: 6px;
}

.login-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tech-contact-card {
  margin-top: 22px;
  padding: 12px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  background: #fff7ed;
  border: 1px solid #efd3c2;
  border-radius: 12px;
}

.tech-qr-wrap {
  width: 82px;
  height: 82px;
  padding: 5px;
  display: grid;
  place-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.tech-contact-card .tech-qr-wrap img {
  width: 70px !important;
  height: 70px !important;
  max-width: 70px !important;
  max-height: 70px !important;
  display: block;
  object-fit: contain;
  border: 0;
  border-radius: 4px;
}

.tech-contact-card strong,
.tech-contact-card span {
  display: block;
}

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

.tech-contact-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.admin-success {
  padding: 12px;
  color: var(--green);
  background: #e4f0e8;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.7;
}

.admin-shell {
  min-height: 100vh;
  background: #f7f5ef;
}

.admin-card {
  width: min(1120px, calc(100% - 40px));
  margin: 26px auto;
  padding: 28px;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.admin-create-form {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 180px;
  gap: 12px;
  align-items: end;
}

.admin-create-form label span {
  display: block;
  margin-bottom: 7px;
  color: #4c4941;
  font-size: 12px;
  font-weight: 800;
}

.admin-create-form .generate-button {
  margin: 0;
}

.admin-title {
  margin: 0 0 18px;
  font-size: 22px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.admin-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 12px;
}

.admin-table th {
  background: #f1ece3;
  font-weight: 900;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.inline-form {
  margin: 0 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inline-form input {
  width: 92px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
}

.copy-button {
  padding: 5px 9px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  font-size: 9px;
}

.hashtag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hashtag-row span {
  padding: 6px 8px;
  color: var(--orange-dark);
  background: #ffe5dc;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.result-footer {
  min-height: 44px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8d877c;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 240px minmax(460px, 1fr) minmax(360px, 1fr);
  }

  .result-body {
    padding: 28px;
  }

}

@media (max-width: 760px) {
  .topbar {
    height: 66px;
    padding: 0 16px;
  }

  .brand span {
    display: none;
  }

  .login-shell {
    padding: 16px;
  }

  .login-card {
    padding: 30px 22px;
  }

  .login-card {
    padding: 0;
    grid-template-columns: 1fr;
  }

  .login-panel,
  .login-results {
    padding: 30px 22px;
  }

  .login-results {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .login-results h2 {
    font-size: 24px;
  }

  .outcome-list div {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .workspace,
  .workspace.left-hidden,
  .workspace.right-hidden,
  .workspace.left-hidden.right-hidden {
    display: block;
  }

  .conversation-sidebar {
    max-height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .config-panel {
    padding: 26px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .left-hidden .conversation-sidebar,
  .right-hidden .result-panel {
    display: none;
  }

  .admin-card {
    width: calc(100% - 24px);
    padding: 20px;
  }

  .admin-create-form {
    grid-template-columns: 1fr;
  }

  .result-body {
    min-height: 560px;
    padding: 22px 16px 34px;
  }

  .result-footer {
    padding: 10px 18px;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .report-export-actions {
    margin-bottom: 12px;
  }

  .report-export-actions button {
    flex: 1;
  }

  .client-title,
  .client-section {
    padding-left: 22px;
    padding-right: 22px;
  }

  .summary-grid,
  .prep-grid {
    grid-template-columns: 1fr;
  }

  .prep-group:last-child {
    grid-column: auto;
  }

  .summary-grid div {
    grid-template-columns: 94px minmax(0, 1fr);
  }

}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  * {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  html,
  body {
    background: white !important;
  }

  .topbar,
  .conversation-sidebar,
  .config-panel,
  .result-footer {
    display: none !important;
  }

  .workspace,
  .workspace.left-hidden,
  .workspace.right-hidden,
  .workspace.left-hidden.right-hidden {
    display: block !important;
    min-height: auto;
  }

  .result-panel,
  .result-body {
    display: block;
    min-height: auto;
    padding: 0;
  }

  .full-report {
    max-width: none;
    padding: 0;
  }

  .client-document {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .client-title,
  .client-section {
    padding: 8mm 0;
  }

  .client-title {
    break-after: avoid;
  }

  .client-section {
    break-inside: auto;
  }

  .client-section > header,
  .prep-group,
  .summary-grid div,
  .shoot-table tr,
  .document-list li {
    break-inside: avoid;
  }

  .shoot-table-wrap {
    overflow: visible;
  }

  .shoot-table {
    min-width: 0;
    font-size: 8px;
  }

  .shoot-table th,
  .shoot-table td {
    width: auto !important;
    padding: 5px 4px;
    font-size: 7px;
  }

  .copy-button {
    display: none !important;
  }

  .report-export-actions {
    display: none !important;
  }
}

.right-hidden .result-panel {
  visibility: hidden;
}

.right-hidden .config-panel {
  border-right: 0;
}

/* Account menu and centered creation type */
.user-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.user-menu-wrap .user-card {
  width: calc(100% - 8px);
  min-height: 58px;
  margin: 16px 4px 2px;
  padding: 10px;
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(31, 31, 29, 0.08);
  border-radius: 14px;
}

.user-card i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #c75d10;
  border-radius: 50%;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.user-card em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.user-card b {
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
  text-align: right;
}

.account-popover {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 76px;
  z-index: 30;
  padding: 9px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(31, 31, 29, 0.1);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(39, 35, 28, 0.14);
}

.account-popover form {
  margin: 0;
}

.account-menu-item {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #24221f;
  background: transparent;
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
}

.account-menu-item:hover {
  background: #f2eee7;
}

.account-menu-item em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.account-menu-item.disabled {
  cursor: default;
}

.account-menu-item.disabled:hover {
  background: transparent;
}

.account-menu-item.danger {
  color: #9d3b22;
}

.agent-input-card > .form-section:first-child .mode-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.agent-input-card > .form-section:first-child .mode-option {
  min-height: 54px;
  padding: 10px 12px;
  background: #fffdf8;
  border: 1px solid #d8d1c5;
  border-radius: 12px;
  box-shadow: none;
  transform: none;
}

.agent-input-card > .form-section:first-child .mode-option::before,
.agent-input-card > .form-section:first-child .mode-option::after {
  display: none;
}

.agent-input-card > .form-section:first-child .mode-option.active {
  color: #1f1f1d;
  background: #efe5d7;
  border-color: #c9bdab;
  box-shadow: inset 0 0 0 1px rgba(31, 31, 29, 0.04);
  transform: none;
}

.agent-input-card > .form-section:first-child .mode-option.locked {
  background: #f7f4ee;
  border-style: solid;
}

.agent-input-card > .form-section:first-child .mode-option span,
.agent-input-card > .form-section:first-child .mode-option.active span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.agent-input-card > .form-section:first-child .mode-option strong {
  font-size: 13px;
}

.platform-tip {
  display: block;
  margin-top: 9px;
  max-width: 760px;
  color: #746d62;
  line-height: 1.7;
}

.report-export-actions {
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(31, 31, 29, 0.06);
}

@media (max-width: 1050px) {
  .agent-input-card > .form-section:first-child .mode-options {
    grid-template-columns: 1fr;
  }
}
