@import "./brand.css";

:root {
  --bg-deep: var(--brand-green-700);
  --bg-accent: var(--brand-green-800);
  --panel: #f5f6f3;
  --card: #ffffff;
  --card-muted: #fafbf9;
  --text-dark: var(--brand-green-600);
  --text-soft: #6e8786;
  --accent: var(--brand-orange-600);
  --accent-strong: var(--brand-orange-700);
  --accent-soft: var(--brand-orange-100);
  --line: #e2e7e2;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --sidebar-width: 260px;
  --font-base: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font-base);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(160deg, var(--bg-deep) 0%, var(--bg-accent) 100%);
  color: var(--text-dark);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
}

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

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

.login-card {
  width: min(520px, 100%);
  padding: 32px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.login-brand-copy span {
  color: var(--text-soft);
}

.login-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.05;
  max-width: 10ch;
}

.login-copy {
  margin: 10px 0 24px;
  color: var(--text-soft);
  line-height: 1.6;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 600;
}

.login-submit {
  width: 100%;
}

.login-links {
  margin-top: 18px;
}

.login-links a {
  color: var(--text-dark);
  font-weight: 700;
  text-decoration: none;
}

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

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

.landing-hero {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 22px;
}

.landing-copy,
.landing-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.landing-title {
  margin: 0;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 0.96;
  max-width: 11ch;
}

.landing-text,
.landing-card p {
  color: var(--text-soft);
  line-height: 1.7;
}

.landing-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.landing-actions a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar {
  padding: 24px 16px;
  color: #f2f7f4;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  box-shadow: 0 12px 28px rgba(255, 135, 92, 0.3);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 10px;
  background: rgba(9, 44, 46, 0.95);
  border-radius: 999px;
  transform: rotate(24deg);
}

.brand-mark::before {
  top: 10px;
  width: 18px;
  height: 6px;
}

.brand-mark::after {
  top: 18px;
  width: 15px;
  height: 5px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 18px;
}

.brand-copy span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav::before {
  content: "Module";
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
  padding: 0 12px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.nav-item.active {
  color: #ffd3c3;
}

.nav-icon {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: currentColor;
  flex: 0 0 auto;
}

.content-wrap {
  padding: 18px 18px 18px 0;
}

.content-panel {
  min-height: calc(100vh - 36px);
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.topbar,
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.topbar-title,
.section-header h2,
.question-list-header h2 {
  margin: 0;
  color: var(--text-dark);
}

.topbar-title {
  font-size: 22px;
  line-height: 1.1;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.section-header {
  padding: 18px;
  background: rgba(255, 255, 255, 0.62);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.section-header p,
.question-list-header p,
.hero-copy,
.saved-talk-meta {
  margin: 6px 0 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.module-subnav,
.saved-talk-actions,
.answer-row,
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace {
  position: relative;
  flex: 1;
  min-height: 520px;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  overflow: hidden;
}

.workspace-view,
.placeholder-view {
  width: 100%;
  height: 100%;
}

.placeholder-view {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  color: var(--text-soft);
  font-size: 22px;
  font-weight: 700;
}

.center-actions {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.hero-card {
  width: min(680px, 100%);
  padding: 32px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 225, 215, 0.6), rgba(255, 255, 255, 0.92)),
    var(--card);
  border: 1px solid rgba(255, 135, 92, 0.2);
}

.dashboard-page .sidebar {
  padding: 22px 16px;
  align-items: center;
  gap: 18px;
}

.dashboard-page .brand {
  height: 66px;
  width: 100%;
  max-width: 180px;
  justify-content: center;
  margin-bottom: 4px;
}

.dashboard-page .brand-mark {
  width: 34px;
  height: 34px;
  box-shadow: 0 8px 18px rgba(255, 135, 92, 0.3);
}

.dashboard-page .brand-mark::before {
  width: 16px;
  height: 6px;
  left: 9px;
  top: 9px;
  transform: rotate(22deg);
}

.dashboard-page .brand-mark::after {
  width: 14px;
  height: 5px;
  left: 11px;
  top: 17px;
  transform: rotate(22deg);
}

.dashboard-page .nav {
  width: 100%;
  margin-top: 10px;
}

.dashboard-page .nav-item {
  padding: 13px 12px;
  white-space: nowrap;
  line-height: 1.2;
  transition: 0.2s ease;
}

.dashboard-page .nav-item:hover,
.dashboard-page .nav-item.active {
  transform: none;
  border-color: rgba(255, 255, 255, 0.1);
}

.dashboard-page .nav-item.active {
  color: var(--accent);
}

.dashboard-page .content-wrap {
  height: 100%;
}

.dashboard-page .topbar {
  min-height: 42px;
}

.dashboard-page .topbar-actions {
  margin-left: auto;
}

.dashboard-page .module-subnav {
  justify-content: flex-end;
}

.dashboard-page .subnav-tab,
.dashboard-page .small-action,
.dashboard-page .answer-btn {
  font-size: 14px;
}

.dashboard-page .subnav-tab,
.dashboard-page .small-action {
  height: 42px;
  border: 1px solid #dce2dd;
  background: #ffffff;
}

.dashboard-page .small-action.primary {
  background: var(--accent);
  color: #ffffff;
  border-color: transparent;
}

.dashboard-page .main-btn {
  min-width: 320px;
  padding: 18px 24px;
  font-size: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.dashboard-page .main-btn.secondary {
  background: #eef2ef;
  color: var(--text-dark);
}

.dashboard-page .main-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
}

.dashboard-page .hero-card {
  display: contents;
}

.dashboard-page .section-header,
.dashboard-page .child-header,
.dashboard-page .load-header,
.dashboard-page .preview-header,
.dashboard-page .evaluation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  background: #f7f8f5;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.dashboard-page .child-header h2,
.dashboard-page .load-header h2,
.dashboard-page .preview-header h2,
.dashboard-page .evaluation-header h2 {
  margin: 0 0 6px;
  font-size: 24px;
  color: var(--text-dark);
}

.dashboard-page .child-header p,
.dashboard-page .load-header p,
.dashboard-page .preview-header p,
.dashboard-page .evaluation-header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-soft);
}

.dashboard-page .child-card {
  background: #ffffff;
  padding: 18px;
}

.dashboard-page .child-card-value {
  font-size: 18px;
  font-weight: 700;
}

.dashboard-page .saved-talk-card {
  background: #fcfcfb;
  border-radius: 16px;
  border: 1px solid #e3e7e3;
}

.dashboard-page .saved-talk-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

.dashboard-page .empty-state,
.dashboard-page .placeholder-panel {
  padding: 24px;
  border: 1px dashed #d8dfda;
  border-radius: 16px;
  background: #fafbf9;
  font-size: 15px;
}

.dashboard-page .placeholder-panel {
  flex: 1;
  min-height: 280px;
  font-size: 18px;
  font-weight: 700;
}

.dashboard-page .report-panel {
  width: min(760px, 100%);
  padding: 28px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 225, 215, 0.35), rgba(255, 255, 255, 0.96)),
    #ffffff;
  box-shadow: 0 14px 36px rgba(9, 44, 46, 0.08);
  text-align: left;
}

.dashboard-page .report-panel h2 {
  margin: 0 0 8px;
  color: var(--text-dark);
}

.dashboard-page .report-panel p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
  font-size: 15px;
  font-weight: 500;
}

.dashboard-page .report-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.dashboard-page .report-meta-card {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.dashboard-page .report-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-start;
}

.engine-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  text-align: left;
}

.engine-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.engine-stat,
.engine-area,
.preview-paragraphs {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.engine-stat,
.engine-area {
  padding: 16px;
}

.engine-stat-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.engine-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
}

.engine-areas {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.engine-area-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.engine-area h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.engine-area p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.engine-chip {
  align-self: flex-start;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.engine-chip.neutral {
  background: #eef2ef;
  color: #5f716f;
}

.engine-area-meta {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-soft);
}

.engine-area-summary {
  margin: 12px 0 0;
  color: var(--text-dark);
  line-height: 1.6;
}

.engine-actions {
  margin-top: 14px;
}

.engine-actions strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.engine-area-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text-dark);
  font-size: 14px;
  line-height: 1.5;
}

.engine-area-list li + li {
  margin-top: 6px;
}

.preview-paragraphs {
  padding: 20px;
}

.preview-paragraphs h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.preview-paragraphs p {
  margin: 0;
  color: var(--text-dark);
  line-height: 1.7;
}

.preview-paragraphs p + p {
  margin-top: 12px;
}

.dashboard-page .development-sidebar {
  background: #f7f8f5;
}

.dashboard-page .question-list {
  background: #ffffff;
}

.dashboard-page .question-list-header {
  padding: 4px 2px 8px 2px;
}

.dashboard-page .question-list-header h2 {
  font-size: 20px;
}

.dashboard-page .question-card {
  background: #fcfcfb;
  border: 1px solid #e6ebe7;
  border-radius: 16px;
}

.dashboard-page .answer-btn {
  border: 1px solid #d9e0db;
  background: #ffffff;
  transition: 0.2s ease;
}

.dashboard-page .answer-btn:hover {
  transform: translateY(-1px);
  border-color: #cfd7d1;
}

.dashboard-page .modal-overlay {
  background: transparent;
  backdrop-filter: none;
}

.dashboard-page .modal-card {
  width: min(560px, 100%);
  border-radius: 24px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.18);
}

.hero-card h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.05;
  max-width: 10ch;
}

.main-btn,
.subnav-tab,
.small-action,
.answer-btn,
.ghost-btn,
.submit-btn {
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.main-btn {
  min-width: 280px;
  min-height: 54px;
  padding: 0 18px;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.main-btn:hover,
.subnav-tab:hover,
.small-action:hover,
.answer-btn:hover,
.ghost-btn:hover,
.submit-btn:hover {
  transform: translateY(-1px);
}

.main-btn.primary,
.submit-btn {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(255, 135, 92, 0.24);
}

.main-btn.secondary,
.subnav-tab,
.small-action,
.answer-btn,
.ghost-btn {
  color: var(--text-dark);
  background: #ffffff;
  border: 1px solid var(--line);
}

.subnav-tab,
.small-action,
.answer-btn,
.ghost-btn,
.submit-btn {
  min-height: 42px;
  padding: 0 14px;
}

.subnav-tab.active,
.answer-btn.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: rgba(255, 135, 92, 0.38);
}

.child-shell,
.load-list-shell,
.preview-shell,
.evaluation-shell {
  display: none;
  flex-direction: column;
  gap: 18px;
  height: 100%;
}

.child-shell.active,
.load-list-shell.active,
.preview-shell.active,
.evaluation-shell.active {
  display: flex;
}

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

.child-card,
.saved-talk-card,
.question-card,
.question-list,
.development-sidebar,
.placeholder-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card-muted);
}

.child-card {
  padding: 18px;
}

.child-card-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.child-card-value {
  font-size: 20px;
}

.load-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}

.saved-talk-card {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fcfcfa;
}

.saved-talk-title {
  margin: 0;
  font-size: 18px;
}

.empty-state,
.placeholder-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding: 28px;
  text-align: center;
  color: var(--text-soft);
  line-height: 1.6;
}

.development-shell {
  display: none;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  height: 100%;
}

.development-shell.active {
  display: grid;
}

.development-sidebar,
.question-list {
  padding: 18px;
}

.section-title {
  margin: 0;
}

.area-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.area-tab {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text-dark);
  font-weight: 700;
  cursor: pointer;
}

.area-tab.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: rgba(255, 135, 92, 0.38);
}

.question-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
  background: #ffffff;
}

.question-list-header {
  padding: 2px 2px 8px;
}

.question-card {
  padding: 16px;
  background: #fcfcfa;
}

.question-title {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.4;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 40, 41, 0.24);
  backdrop-filter: blur(4px);
}

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

.modal-card {
  width: min(580px, 100%);
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(20, 56, 57, 0.06);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.modal-head,
.modal-body {
  padding-inline: 28px;
}

.modal-head {
  padding-top: 24px;
  padding-bottom: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-head h2 {
  margin: 0;
}

.modal-head p {
  margin: 6px 0 0;
  color: var(--text-soft);
}

.modal-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: #eef2ef;
  color: var(--text-dark);
  font-size: 22px;
}

.modal-body {
  padding-top: 8px;
  padding-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

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

.field.full {
  grid-column: 1 / -1;
}

.field span {
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid #d8dfda;
  background: #f8faf8;
  color: var(--text-dark);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 135, 92, 0.14);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 94px 1fr;
  }

  .brand-copy,
  .nav::before {
    display: none;
  }

  .nav-item {
    justify-content: center;
    font-size: 0;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
  }

  .development-shell.active {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .landing-hero {
    grid-template-columns: 1fr;
  }

  .content-wrap {
    padding: 10px;
  }

  .content-panel {
    min-height: auto;
    border-radius: 20px;
  }

  .workspace {
    min-height: 520px;
    padding: 16px;
  }

  .topbar,
  .section-header,
  .saved-talk-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .module-subnav,
  .topbar-actions,
  .hero-actions,
  .saved-talk-actions {
    width: 100%;
  }

  .main-btn {
    min-width: 100%;
  }

  .child-grid,
  .engine-summary,
  .form-grid {
    grid-template-columns: 1fr;
  }
}
