:root {
  --bg: #f7f8f7;
  --surface: #ffffff;
  --surface-soft: #eef7f3;
  --ink: #17211d;
  --muted: #6b7671;
  --line: #dde6e1;
  --accent: #20c7a4;
  --accent-dark: #119179;
  --warning: #efaa22;
  --danger: #df4f54;
  --shadow: 0 20px 55px rgba(21, 45, 35, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
  max-width: 100%;
  overflow-wrap: break-word;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.panel-shell {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 42px);
}

.legal-page {
  min-height: 100vh;
  padding: 28px clamp(18px, 4vw, 60px) 64px;
}

.legal-card {
  width: min(920px, 100%);
  margin: 54px auto 0;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.legal-card h1 {
  max-width: 760px;
}

.legal-card h2 {
  margin: 28px 0 10px;
  font-size: 1.2rem;
}

.legal-card p {
  color: var(--muted);
  line-height: 1.75;
}

.login-screen {
  min-height: calc(100vh - 84px);
  display: grid;
  place-items: center;
}

.login-screen[hidden] {
  display: none !important;
}

.login-card {
  width: min(520px, 100%);
  display: grid;
  gap: 24px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 249, 245, 0.92)),
    var(--surface);
  box-shadow: var(--shadow);
  animation: card-enter 520ms ease both;
}

.login-card h1 {
  margin-bottom: 12px;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
}

.login-card .lead {
  margin: 0;
  text-align: left;
}

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

.login-form label {
  color: var(--ink);
  font-weight: 800;
}

.login-assurance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.login-assurance span {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(17, 145, 121, 0.16);
  border-radius: 8px;
  padding: 8px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.panel-page {
  background:
    linear-gradient(rgba(17, 145, 121, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 145, 121, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
}

.hero {
  min-height: 80vh;
  padding: 0 clamp(18px, 4vw, 60px) 44px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 249, 245, 0.92)),
    radial-gradient(circle at var(--orb-x) var(--orb-y), rgba(32, 199, 164, 0.2), transparent 34%),
    radial-gradient(circle at 20% 80%, rgba(17, 145, 121, 0.07), transparent 30%);
  border-bottom: 1px solid var(--line);
  animation: hero-drift 14s ease-in-out infinite;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px clamp(18px, 4vw, 60px);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid rgba(221, 230, 225, 0.7);
  box-shadow: 0 2px 14px rgba(21, 45, 35, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
  animation: fade-up 520ms ease both;
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(32, 199, 164, 0.16);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(221, 230, 225, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  animation: fade-up 520ms ease 80ms both;
}

.nav-links button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-links button:hover {
  color: var(--ink);
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.nav-panel-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(32, 199, 164, 0.32);
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(238, 252, 246, 0.8);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
  animation: fade-up 520ms ease 160ms both;
}

.nav-panel-link:hover {
  background: var(--surface-soft);
  border-color: rgba(32, 199, 164, 0.55);
  transform: translateY(-1px);
}

.ghost-button,
.secondary-button,
.primary-button,
.submit-button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  cursor: pointer;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

/* hover ışıltı sweep */
.primary-button::before,
.submit-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 620ms ease;
}

.primary-button:hover::before,
.submit-button:hover::before {
  transform: translateX(120%);
}

.primary-button:hover,
.submit-button:hover {
  box-shadow: 0 18px 38px rgba(32, 199, 164, 0.36);
}

.ghost-button {
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
}

.ghost-button:hover,
.secondary-button:hover,
.primary-button:hover,
.submit-button:hover {
  transform: translateY(-1px);
}

.hero-grid {
  max-width: 1180px;
  min-height: calc(80vh - 90px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-copy {
  max-width: 840px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow,
.section-heading span {
  display: block;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  animation: fade-up 520ms ease 80ms both;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(2.45rem, 4.4vw, 4.25rem);
  line-height: 1.01;
  letter-spacing: 0;
  animation: fade-up 620ms ease 150ms both;
}

.lead {
  max-width: 640px;
  margin-right: auto;
  margin-left: auto;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  line-height: 1.72;
  animation: fade-up 620ms ease 230ms both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  animation: fade-up 620ms ease 310ms both;
}

.primary-button,
.submit-button {
  padding: 0 22px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 30px rgba(32, 199, 164, 0.28);
}

.assessment-wizard {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.wizard-progress span {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 0.9rem;
  font-weight: 850;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.wizard-progress span.active {
  color: var(--accent-dark);
  border-color: rgba(32, 199, 164, 0.42);
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.assessment-step {
  display: none;
  animation: card-enter 360ms ease both;
}

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

.assessment-step.assessment-layout.active {
  display: grid;
}

.assessment-step .body-panel,
.assessment-step .form-panel {
  width: min(960px, 100%);
  margin: 0 auto;
}

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.wizard-actions.split {
  justify-content: space-between;
}

.wizard-actions .primary-button,
.wizard-actions .submit-button,
.wizard-actions .secondary-action {
  width: auto;
  min-width: 128px;
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.9rem;
}

.how-section {
  padding: 0 clamp(18px, 4vw, 60px);
  scroll-margin-top: 98px;
}

.value-cards {
  max-width: 1180px;
  margin: -42px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  animation: fade-up 620ms ease 380ms both;
}

.value-cards article {
  min-height: 142px;
  padding: 18px;
  border: 1px solid rgba(221, 230, 225, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 38px rgba(21, 45, 35, 0.06);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.value-cards article:hover {
  border-color: rgba(32, 199, 164, 0.28);
  box-shadow: 0 20px 45px rgba(21, 45, 35, 0.08);
  transform: translateY(-2px);
}

.value-cards span {
  display: block;
  margin-bottom: 14px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.value-cards strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.value-cards p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.about-section {
  padding: 58px clamp(18px, 4vw, 60px) 18px;
  background: linear-gradient(180deg, #fff 0%, rgba(247, 248, 247, 0.9) 100%);
}

.about-card {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(221, 230, 225, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  animation: card-enter 560ms ease both;
}

.about-media {
  display: grid;
  place-items: center;
  min-height: 230px;
  border: 1px solid rgba(221, 230, 225, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(rgba(17, 145, 121, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 145, 121, 0.035) 1px, transparent 1px),
    #fff;
  background-size: 28px 28px;
  overflow: hidden;
}

.about-media img {
  width: min(92%, 560px);
  height: auto;
  display: block;
}

.about-copy h2 {
  margin: 10px 0 16px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.06;
}

.about-copy p:not(.eyebrow) {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.primary-button:active,
.submit-button:active,
.choice-chip:active,
.panel-filters button:active,
.status-actions button:active {
  transform: translateY(0) scale(0.98);
}

.assessment-section,
.therapist-panel {
  padding: 48px clamp(18px, 4vw, 60px) 68px;
}

.section-heading {
  max-width: 780px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-heading.compact {
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 10px 0 10px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-heading p {
  color: var(--muted);
  line-height: 1.7;
}

.assessment-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(min(420px, 100%), 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 22px;
}

.body-panel,
.form-panel,
.therapist-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: card-enter 560ms ease both;
}

.body-panel,
.form-panel {
  padding: clamp(18px, 3vw, 28px);
  min-height: min(760px, calc(100vh - 150px));
  scroll-margin-top: 72px;
}

.body-panel {
  position: sticky;
  top: 24px;
  align-self: stretch;
}

.form-panel {
  position: relative;
  display: grid;
  align-content: start;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  min-height: 100%;
  max-height: none;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 253, 252, 0.98)),
    var(--surface);
}

.form-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(17, 145, 121, 0.08);
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.form-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 8px 8px 0 0;
  transform-origin: left;
  transition: width 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.form-panel-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.form-panel-head h2 {
  margin: 4px 0 0;
  font-size: clamp(1.35rem, 2vw, 1.68rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.form-panel-head p {
  max-width: 520px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.form-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(17, 145, 121, 0.12);
  border-radius: 10px;
  background: rgba(248, 252, 250, 0.86);
}

.form-stepper span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-align: center;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.form-stepper span.active {
  color: var(--accent-dark);
  background: #fff;
  box-shadow: 0 8px 18px rgba(21, 45, 35, 0.06);
}

.risk-preview {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-width: 106px;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  text-align: center;
  transition: border-color 300ms ease, background 300ms ease;
}

.risk-preview-label {
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.risk-preview strong {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
  color: var(--muted);
  transition: color 300ms ease;
}

.risk-preview span:last-child {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  transition: color 300ms ease;
}

.risk-preview[data-band="low"] {
  border-color: rgba(32, 199, 164, 0.32);
  background: rgba(238, 252, 246, 0.9);
}
.risk-preview[data-band="low"] strong { color: var(--accent-dark); }
.risk-preview[data-band="low"] span:last-child { color: var(--accent-dark); }

.risk-preview[data-band="medium"] {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(254, 252, 232, 0.9);
}
.risk-preview[data-band="medium"] strong { color: #b45309; }
.risk-preview[data-band="medium"] span:last-child { color: #92400e; }

.risk-preview[data-band="high"] {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(254, 242, 242, 0.9);
}
.risk-preview[data-band="high"] strong { color: #dc2626; }
.risk-preview[data-band="high"] span:last-child { color: #991b1b; }

.panel-kicker {
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-status {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  min-height: 28px;
  border: 1px solid rgba(32, 199, 164, 0.24);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--accent-dark);
  background: rgba(238, 247, 243, 0.86);
  font-size: 0.74rem;
  font-weight: 800;
}

.simple-step-title {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 10px;
  margin-bottom: 0;
}

.simple-step-title > span {
  min-width: 28px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--surface-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.simple-step-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.simple-step-title p {
  max-width: 440px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.42;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title {
  align-items: flex-start;
}

.section-title.inline {
  margin-bottom: 2px;
}

.section-title > div {
  display: grid;
  gap: 5px;
}

.section-number {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--accent-dark);
  background: var(--surface-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.panel-title h3 {
  margin-bottom: 4px;
}

.panel-title p {
  max-width: 260px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

@property --orb-x {
  syntax: "<percentage>";
  initial-value: 70%;
  inherits: false;
}
@property --orb-y {
  syntax: "<percentage>";
  initial-value: 35%;
  inherits: false;
}

@keyframes hero-drift {
  0%, 100% { --orb-x: 70%; --orb-y: 35%; }
  25%       { --orb-x: 64%; --orb-y: 44%; }
  50%       { --orb-x: 56%; --orb-y: 38%; }
  75%       { --orb-x: 62%; --orb-y: 27%; }
}

@keyframes bar-scale-in {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes zone-card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panel-soft-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes success-pop {
  0% { transform: scale(0.86); opacity: 0; }
  70% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.detail-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(17, 145, 121, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  min-height: 0;
  overflow: visible;
}

.form-step {
  display: none;
  animation: card-enter 240ms ease both;
}

.form-step.active {
  display: grid;
  gap: 10px;
  animation: panel-soft-in 260ms ease both;
}

.compact-detail {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(17, 145, 121, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.clinical-choice {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
}

.clinical-choice > span,
.clinical-note > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
}

.choice-chip,
.panel-filters button,
.status-actions button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.choice-chip.active,
.panel-filters button.active,
.status-actions button.active {
  color: var(--accent-dark);
  border-color: rgba(32, 199, 164, 0.48);
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px rgba(32, 199, 164, 0.08);
}

.redflag-group .choice-chip {
  border-color: rgba(245, 158, 11, 0.26);
  color: #92400e;
  background: rgba(255, 253, 235, 0.9);
}

.redflag-group .choice-chip:hover {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(254, 249, 217, 0.9);
}

.redflag-group .choice-chip.active {
  color: #78350f;
  border-color: rgba(245, 158, 11, 0.58);
  background: rgba(253, 230, 138, 0.42);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.14);
}

.clinical-summary {
  display: grid;
  gap: 18px;
  margin-top: 0;
}

.clinical-compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.clinical-compact-grid .clinical-choice:last-child {
  grid-column: 1 / -1;
}

.clinical-note {
  display: grid;
  gap: 11px;
}

.clinical-note textarea {
  margin-top: 0;
  min-height: 84px;
}

.contact-section {
  display: grid;
  gap: 14px;
  margin-top: 0;
}

.section-card {
  padding: 12px;
  border: 1px solid rgba(17, 145, 121, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

.simple-clinical {
  border-color: rgba(17, 145, 121, 0.1);
}

.compact-title {
  margin-bottom: 0;
}

.compact-title h3 {
  font-size: 1rem;
}

.compact-title p {
  max-width: 360px;
  margin: 0;
}

.field-group label,
.question-block span,
.contact-grid label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-weight: 800;
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 70px;
  align-items: center;
  gap: 14px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    hsl(var(--ih, 155), 62%, 42%) var(--ip, 50%),
    rgba(17, 145, 121, 0.1) var(--ip, 50%)
  );
  cursor: pointer;
  outline: none;
  transition: background 180ms ease;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(17, 145, 121, 0.1);
}

input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: hsl(var(--ih, 155), 62%, 42%);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid hsl(var(--ih, 155), 62%, 42%);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition: border-color 180ms ease, transform 130ms ease, box-shadow 130ms ease;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid hsl(var(--ih, 155), 62%, 42%);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition: border-color 180ms ease;
}

input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus-visible::-webkit-slider-thumb {
  transform: scale(1.22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

output {
  padding: 9px 10px;
  text-align: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-weight: 800;
}

.segmented,
.symptom-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.segmented button,
.symptom-grid label {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.segmented button {
  padding: 0 14px;
}

.segmented button.active,
.symptom-grid label:has(input:checked) {
  color: var(--accent-dark);
  border-color: rgba(32, 199, 164, 0.55);
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.symptom-grid label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.symptom-grid input {
  accent-color: var(--accent);
}

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

.contact-grid label {
  margin-bottom: 0;
  font-size: 0.78rem;
  line-height: 1.25;
}

.contact-grid input,
.contact-grid select {
  min-height: 38px;
  margin-top: 6px;
  padding: 7px 10px;
  font-size: 0.88rem;
}

.contact-grid label:last-child {
  grid-column: 1 / -1;
}

.appointment-request {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid rgba(17, 145, 121, 0.14);
  border-radius: 8px;
  background: rgba(239, 249, 245, 0.74);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.appointment-request input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.kvkk-box {
  display: grid;
  gap: 7px;
  grid-column: 1 / -1;
  padding: 10px;
  border: 1px solid rgba(17, 145, 121, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.kvkk-consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.kvkk-consent input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.kvkk-box details {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.kvkk-box summary {
  width: fit-content;
  color: var(--accent-dark);
  cursor: pointer;
  font-weight: 850;
}

.kvkk-box p {
  margin: 10px 0 0;
}

.kvkk-link {
  width: fit-content;
  min-height: 30px;
  border: 1px solid rgba(17, 145, 121, 0.2);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--accent-dark);
  background: #fff;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 850;
}

.kvkk-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
}

.kvkk-modal[hidden] {
  display: none !important;
}

.kvkk-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 29, 0.42);
  backdrop-filter: blur(5px);
}

.kvkk-modal-card {
  position: relative;
  width: min(680px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: grid;
  gap: 14px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(32, 199, 164, 0.22);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(21, 45, 35, 0.18);
  animation: card-enter 260ms ease both;
}

.kvkk-modal-card h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

/* Grid kartta float çalışmaz; kapat butonunu sağ üste sabitle ve metnin üstünde net dursun */
.kvkk-modal-card .drawer-close {
  justify-self: end;
  box-shadow: 0 2px 10px rgba(21, 45, 35, 0.12);
}

.kvkk-text {
  display: grid;
  gap: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.kvkk-text p {
  margin: 0;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
textarea,
select {
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border 160ms ease, box-shadow 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(32, 199, 164, 0.78);
  box-shadow: 0 0 0 4px rgba(32, 199, 164, 0.13);
}

/* Eksik/hatalı alan — odaklanınca bile kırmızı kalır */
input.field-error,
select.field-error,
textarea.field-error,
input.field-error:focus,
select.field-error:focus,
textarea.field-error:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(223, 79, 84, 0.18);
}

/* ── Belge yükleme (form) ── */
.doc-upload {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.doc-upload-title {
  font-weight: 800;
  color: var(--ink);
  font-size: 0.92rem;
}

.doc-upload-title em {
  font-style: normal;
  font-weight: 600;
  color: var(--muted);
}

.doc-upload-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.doc-upload-button {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 40px;
  padding: 0 16px;
  border: 1px dashed rgba(17, 145, 121, 0.4);
  border-radius: 999px;
  color: var(--accent-dark);
  background: #fff;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
}

.doc-upload-button:hover {
  border-style: solid;
  background: var(--surface-soft);
}

.doc-list {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.doc-badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.doc-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 600;
}

.doc-size {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.76rem;
}

.doc-remove {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.doc-remove:hover {
  color: var(--danger);
  background: rgba(223, 79, 84, 0.08);
}

/* ── Belgeler (panel detay) ── */
.drawer-docs {
  display: grid;
  gap: 8px;
}

.drawer-doc {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.drawer-doc:hover {
  border-color: rgba(32, 199, 164, 0.5);
  background: var(--surface-soft);
}

.drawer-doc .doc-name {
  font-size: 0.88rem;
}

.submit-button {
  width: min(240px, 100%);
  justify-self: center;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  text-align: center;
}

.trust-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(17, 145, 121, 0.12);
}

.trust-band span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(17, 145, 121, 0.14);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--accent-dark);
  background: rgba(239, 249, 245, 0.78);
  font-size: 0.76rem;
  font-weight: 850;
}

.medical-disclaimer {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 10px;
  color: #7c4a03;
  background: rgba(255, 251, 235, 0.86);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.55;
  text-align: center;
}

.success-result {
  width: min(720px, 100%);
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(32, 199, 164, 0.28);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  animation: card-enter 420ms ease both;
}

.success-result[hidden] {
  display: none;
}

.success-mark {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 44%, #fff 44%, #fff 57%, transparent 57%),
    var(--accent);
  box-shadow: 0 12px 24px rgba(32, 199, 164, 0.26);
}

.success-result strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.success-result p {
  margin-bottom: 4px;
  color: var(--muted);
}

.success-result small {
  color: var(--accent-dark);
  font-weight: 800;
}

.therapist-panel {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 70px;
  padding: 0;
  overflow: hidden;
}

body.panel-page .therapist-panel {
  width: min(1320px, 100%);
}

body:not(.panel-open) .therapist-panel {
  display: none !important;
}

body.panel-page .therapist-panel:not([hidden]) {
  display: block !important;
}

.therapist-panel[hidden] {
  display: none !important;
}

.panel-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 30px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 247, 243, 0.72));
}

.panel-dashboard {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100vh - 84px);
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #fbfcfb;
}

.dashboard-sidebar nav {
  display: grid;
  gap: 8px;
}

.dashboard-sidebar nav button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  border: 0;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 850;
  text-align: left;
}

.dashboard-sidebar nav button.active {
  color: var(--accent-dark);
  background: var(--surface-soft);
}

.dashboard-sidebar p {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.dashboard-main {
  min-width: 0;
}

.panel-hero span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-hero h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.04;
}

.panel-hero p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.panel-account {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.panel-account > strong,
.panel-hero > strong {
  align-self: flex-start;
  padding: 9px 12px;
  border: 1px solid rgba(17, 145, 121, 0.16);
  border-radius: 999px;
  color: var(--accent-dark);
  background: #fff;
  font-size: 0.86rem;
}

.panel-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 20px 30px;
  border-bottom: 1px solid var(--line);
}

.panel-stats article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.panel-stats span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.panel-stats strong {
  font-size: 2rem;
  line-height: 1;
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 30px;
  border-bottom: 1px solid var(--line);
}

.panel-toolbar strong {
  font-size: 2rem;
}

.panel-toolbar span {
  color: var(--muted);
}

.dashboard-actions,
.panel-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-search,
.panel-sort {
  min-height: 38px;
  margin: 0;
  border-radius: 999px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 750;
}

.panel-search {
  width: min(260px, 100%);
}

.panel-sort {
  width: min(220px, 100%);
}

.ghost-button.danger {
  color: var(--danger);
}

#exportApplications {
  color: var(--accent-dark);
}

.settings-panel,
.insight-panel {
  margin: 20px 30px 30px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(21, 45, 35, 0.05);
}

.settings-panel[hidden],
.insight-panel[hidden] {
  display: none !important;
}

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

.insight-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.insight-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 2rem;
}

.insight-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-weight: 900;
}

.insight-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.risk-bar-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  display: grid;
  gap: 10px;
}

.risk-bar-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.risk-bar-top strong {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
}

.risk-bar-top span {
  font-weight: 700;
  color: var(--muted);
}

.risk-bar-track {
  height: 6px;
  background: rgba(17, 145, 121, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.risk-bar-fill {
  height: 100%;
  border-radius: 999px;
  transform-origin: left;
  animation: bar-scale-in 700ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.risk-bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.risk-bar-meta p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

.risk-bar-meta span {
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 900;
  color: var(--muted);
}

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

.settings-form label {
  color: var(--ink);
  font-weight: 800;
}

.settings-form .submit-button {
  grid-column: 1 / -1;
  justify-self: start;
}

/* ── KVKK merkezi ── */
.kvkk-panel {
  display: grid;
  gap: 18px;
  padding: 20px 30px 30px;
}

.kvkk-block {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfb;
}

.kvkk-block h4 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink);
}

.kvkk-block-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.kvkk-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

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

.kvkk-doc {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.kvkk-doc strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.kvkk-doc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.kvkk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.kvkk-table th,
.kvkk-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.kvkk-table th {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fbfcfb;
}

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

.consent-yes {
  color: var(--accent-dark);
  font-weight: 900;
}

.consent-no {
  color: var(--danger);
  font-weight: 900;
}

.kvkk-empty {
  text-align: center;
  color: var(--muted);
  padding: 20px;
}

@media (max-width: 620px) {
  .kvkk-panel {
    padding: 16px;
  }
  .kvkk-doc-grid {
    grid-template-columns: 1fr;
  }
  /* Rıza tablosu mobilde kart görünümüne dönüşsün (yatay scroll yerine) */
  .kvkk-table-wrap {
    border: 0;
    overflow: visible;
  }
  .kvkk-table thead {
    display: none;
  }
  .kvkk-table,
  .kvkk-table tbody,
  .kvkk-table tr,
  .kvkk-table td {
    display: block;
    width: 100%;
  }
  .kvkk-table tr {
    margin-bottom: 10px;
    padding: 4px 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
  }
  .kvkk-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
    white-space: normal;
  }
  .kvkk-table tr td:last-child {
    border-bottom: 0;
  }
  .kvkk-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 800;
    font-size: 0.78rem;
  }
}

.application-list {
  display: grid;
  gap: 12px;
  padding: 20px 30px 30px;
}

.application-card {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 16px 16px 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--risk-color, var(--line));
  border-radius: 8px;
  background: #fbfcfb;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  animation: zone-card-in 220ms ease both;
}

.application-card:hover {
  border-color: rgba(32, 199, 164, 0.24);
  box-shadow: 0 16px 35px rgba(21, 45, 35, 0.07);
  transform: translateY(-1px);
}

.risk-number {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-size: 1.8rem;
  font-weight: 900;
}

.application-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.application-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.lead-quality {
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(17, 145, 121, 0.18);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--accent-dark);
  background: rgba(32, 199, 164, 0.09);
  font-size: 0.78rem;
  font-weight: 900;
}

.lead-quality.hot {
  border-color: rgba(223, 79, 84, 0.28);
  color: #9d272d;
  background: rgba(223, 79, 84, 0.08);
}

.lead-quality.warm {
  border-color: rgba(239, 170, 34, 0.34);
  color: #8b5a08;
  background: rgba(239, 170, 34, 0.1);
}

.lead-quality.routine {
  border-color: rgba(32, 199, 164, 0.24);
}

.application-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.application-meta span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.application-detail-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.application-detail-grid p {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  margin: 0;
}

.application-detail-grid strong {
  color: var(--ink);
}

.application-detail-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.application-card p {
  margin-bottom: 7px;
  color: var(--muted);
  line-height: 1.45;
}

.action-recommendation {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.action-recommendation strong {
  color: var(--ink);
}

.action-recommendation span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.action-recommendation.urgent {
  border-color: rgba(223, 79, 84, 0.26);
  background: rgba(223, 79, 84, 0.06);
}

.action-recommendation.priority {
  border-color: rgba(239, 170, 34, 0.32);
  background: rgba(239, 170, 34, 0.08);
}

.action-recommendation.routine {
  border-color: rgba(32, 199, 164, 0.26);
  background: rgba(32, 199, 164, 0.07);
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.call-action,
.whatsapp-action,
.detail-action {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.card-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.painmap-card-preview {
  width: 132px;
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 8px;
  border: 1px solid rgba(17, 145, 121, 0.14);
  border-radius: 8px;
  background: #fff;
}

.painmap-card-preview.empty {
  min-height: 72px;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.painmap-card-preview svg {
  width: 76px;
  max-height: 104px;
}

.painmap-card-preview span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
}

.detail-action {
  justify-content: center;
  border: 1px solid rgba(17, 145, 121, 0.22);
  color: var(--accent-dark);
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.detail-action:hover {
  border-color: rgba(32, 199, 164, 0.46);
  box-shadow: 0 10px 22px rgba(21, 45, 35, 0.06);
  transform: translateY(-1px);
}

.call-action {
  min-width: 126px;
  justify-content: center;
  color: #fff;
  background: var(--ink);
}

.whatsapp-action {
  min-width: 126px;
  justify-content: center;
  color: #0f5132;
  background: rgba(37, 211, 102, 0.14);
  text-decoration: none;
}

.result-screen {
  min-height: 78vh;
  display: grid;
  place-items: center;
  padding: 76px clamp(18px, 4vw, 60px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 249, 245, 0.92)),
    linear-gradient(rgba(17, 145, 121, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 145, 121, 0.04) 1px, transparent 1px);
  background-size: auto, 30px 30px, 30px 30px;
}

.result-screen[hidden] {
  display: none !important;
}

.result-card {
  width: min(760px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(32, 199, 164, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  box-shadow: 0 26px 70px rgba(21, 45, 35, 0.1);
  animation: card-enter 520ms ease both;
}

.result-card h2 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
}

.result-card > p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.result-meta {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.result-summary {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.result-summary article {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(17, 145, 121, 0.14);
  border-radius: 8px;
  background: #fbfcfb;
  text-align: left;
}

.result-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-summary strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.result-next {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(32, 199, 164, 0.18);
  border-radius: 8px;
  background: rgba(239, 249, 245, 0.82);
  text-align: left;
}

.result-care-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.result-care-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid rgba(17, 145, 121, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 250, 0.88)),
    #fff;
  text-align: left;
}

.result-care-grid span {
  width: fit-content;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--accent-dark);
  background: var(--surface-soft);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.result-care-grid strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.result-care-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.58;
}

.result-next strong {
  color: var(--ink);
}

.result-next p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.result-actions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.result-primary-action,
.result-secondary-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 850;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.result-primary-action {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(32, 199, 164, 0.2);
}

.result-secondary-action {
  border: 1px solid rgba(17, 145, 121, 0.18);
  color: var(--accent-dark);
  background: #fff;
}

.result-primary-action:hover,
.result-secondary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(21, 45, 35, 0.08);
}

.result-meta span {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfb;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.45;
}

.secondary-action {
  min-height: 44px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.secondary-action:hover {
  border-color: rgba(32, 199, 164, 0.38);
  box-shadow: 0 12px 26px rgba(21, 45, 35, 0.07);
  transform: translateY(-1px);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.drawer[hidden] {
  display: none !important;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 29, 0.38);
  backdrop-filter: blur(4px);
  animation: fade-in 180ms ease both;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(560px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 28px;
  border-left: 1px solid var(--line);
  background: #fbfcfb;
  box-shadow: -24px 0 70px rgba(21, 45, 35, 0.16);
  animation: drawer-in 240ms ease both;
}

.drawer-close {
  position: sticky;
  top: 0;
  z-index: 1;
  float: right;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.drawer-close:hover {
  color: var(--ink);
  border-color: rgba(32, 199, 164, 0.36);
  transform: translateY(-1px);
}

.drawer-header {
  padding: 8px 44px 20px 0;
}

.drawer-header span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-header h2 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.05;
}

.drawer-header p,
.drawer-score p,
.drawer-section p,
.note-history p {
  color: var(--muted);
  line-height: 1.55;
}

.drawer-header small {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  border: 1px solid rgba(17, 145, 121, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--accent-dark);
  background: rgba(32, 199, 164, 0.08);
  font-weight: 900;
}

.drawer-score,
.drawer-section {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(21, 45, 35, 0.05);
}

.consent-line {
  padding: 9px 11px;
  border-radius: 8px;
}

.consent-line.ok {
  background: var(--surface-soft);
  color: var(--accent-dark);
}

.consent-line.warn {
  background: rgba(223, 79, 84, 0.1);
  color: #b3261e;
}

.drawer-score {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.score-arc {
  position: relative;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
}

.score-arc svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.arc-bg {
  fill: none;
  stroke: rgba(17, 145, 121, 0.1);
  stroke-width: 8;
}

.arc-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: arc-in 700ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes arc-in {
  from { stroke-dasharray: 0 213.6; }
}

.arc-score {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 950;
  color: var(--arc-color, var(--accent-dark));
}

.drawer-score > div strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.drawer-score p {
  margin: 2px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.drawer-section {
  padding: 18px;
}

.lead-quality-panel.hot {
  border-color: rgba(223, 79, 84, 0.24);
  background: rgba(223, 79, 84, 0.06);
}

.lead-quality-panel.warm {
  border-color: rgba(239, 170, 34, 0.28);
  background: rgba(239, 170, 34, 0.08);
}

.lead-quality-panel.routine {
  border-color: rgba(32, 199, 164, 0.22);
  background: rgba(32, 199, 164, 0.07);
}

.drawer-section h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.drawer-section textarea {
  min-height: 92px;
  background: #fff;
}

.action-panel > strong {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--accent-dark);
  background: var(--surface-soft);
  font-size: 0.9rem;
}

.score-breakdown {
  display: grid;
  gap: 10px;
}

.score-component {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.score-component strong,
.score-component span,
.score-component b {
  position: relative;
  z-index: 1;
}

.score-component strong {
  display: block;
  margin-bottom: 4px;
}

.score-component span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.score-component b {
  color: var(--accent-dark);
  font-size: 0.92rem;
}

.score-component i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--score-width);
  height: 3px;
  background: var(--accent);
}

.reason-list,
.drawer-zone-list,
.note-history {
  display: grid;
  gap: 8px;
}

.reason-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reason-list span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(17, 145, 121, 0.16);
  border-radius: 8px;
  color: var(--accent-dark);
  background: var(--surface-soft);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.35;
}

.drawer-zone-list article,
.note-history article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.drawer-zone-list strong,
.note-history strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.drawer-zone-list span {
  color: var(--muted);
  line-height: 1.45;
}

.drawer-note-button {
  width: 100%;
  margin: 10px 0 12px;
}

.note-history > p {
  margin: 0;
}

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

.timeline-list article {
  position: relative;
  padding: 12px 12px 12px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.timeline-list article::before {
  position: absolute;
  top: 16px;
  left: 8px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

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

.timeline-list span {
  margin: 4px 0 6px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

.timeline-list p {
  margin: 0;
}

body.drawer-open {
  overflow: hidden;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes drawer-in {
  from {
    transform: translateX(28px);
  }

  to {
    transform: translateX(0);
  }
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 150px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  margin-bottom: 7px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 108px;
  z-index: 80;
  max-width: min(360px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
  box-shadow: var(--shadow);
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .hero-grid {
    min-height: auto;
    padding-top: 64px;
  }

  .value-cards {
    margin-top: 24px;
    grid-template-columns: 1fr;
  }

  .about-card {
    grid-template-columns: 1fr;
  }

  .public-contact-card {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-brand,
  .footer-links,
  .footer-copy {
    justify-self: center;
  }

  .panel-stats,
  .result-summary,
  .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-dashboard {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-sidebar nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-actions {
    width: 100%;
  }

  .panel-search,
  .panel-sort {
    flex: 1 1 220px;
  }

  .application-card {
    grid-template-columns: 72px 1fr;
  }

  .application-detail-grid {
    grid-template-columns: 1fr;
  }

  .card-actions {
    grid-column: 1 / -1;
    justify-self: start;
    display: flex;
    flex-wrap: wrap;
  }

  .call-action,
  .whatsapp-action,
  .detail-action {
    min-width: 126px;
  }
}

@media (max-width: 620px) {
  .topbar,
  .panel-toolbar,
  .panel-title,
  .panel-hero,
  .panel-account {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    border-radius: 8px;
  }

  .nav-links button {
    flex: 1;
    padding: 0 8px;
    font-size: 0.82rem;
  }

  .hero-actions,
  .primary-button,
  .secondary-button,
  .submit-button {
    width: 100%;
  }

  h1 {
    font-size: clamp(2.35rem, 12vw, 3.4rem);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .public-contact {
    width: calc(100% - 28px);
  }

  .public-contact-card,
  .public-contact-brand {
    grid-template-columns: 1fr;
  }

  .public-contact-brand {
    justify-items: start;
  }

  .wizard-progress,
  .login-assurance,
  .dashboard-sidebar nav,
  .action-recommendation,
  .settings-form {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar nav button {
    justify-content: center;
    text-align: center;
  }

  .panel-search,
  .panel-sort {
    width: 100%;
  }

  .wizard-actions,
  .wizard-actions.split {
    flex-direction: column;
    gap: 9px;
  }

  .wizard-actions .primary-button,
  .wizard-actions .submit-button,
  .wizard-actions .secondary-action {
    width: 100%;
    min-width: 0;
  }

  .panel-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px;
  }

  .result-summary,
  .result-care-grid,
  .result-meta {
    grid-template-columns: 1fr;
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .panel-toolbar,
  .application-list,
  .panel-hero,
  .settings-panel,
  .insight-panel {
    padding-right: 16px;
    padding-left: 16px;
  }

  .settings-panel,
  .insight-panel {
    margin-right: 16px;
    margin-left: 16px;
  }

  .application-detail-grid p {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .clinical-choice,
  .clinical-choice:first-of-type,
  .clinical-choice:last-of-type {
    grid-column: 1 / -1;
  }

  .application-card {
    grid-template-columns: 1fr;
  }

  .risk-number {
    width: 56px;
    height: 56px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .result-meta,
  .reason-list {
    grid-template-columns: 1fr;
  }

  .drawer-panel {
    padding: 20px;
  }

  .drawer-score {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .assessment-layout {
    grid-template-columns: 1fr;
  }
  .body-panel,
  .form-panel {
    min-height: auto;
    max-height: none;
  }
  .body-panel {
    position: static;
  }
  .detail-panel {
    overflow: visible;
    max-height: none;
  }
  .kvkk-modal {
    padding: 12px;
  }
  .kvkk-modal-card {
    padding: 22px 18px;
    max-height: calc(100dvh - 24px);
  }
  .kvkk-modal-card h2 {
    font-size: clamp(1.4rem, 6vw, 1.8rem);
  }
}

/* ── Chat widget ──────────────────────────────────── */
.chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 201;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 0;
  background: var(--accent-dark);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 24px rgba(17, 145, 121, 0.38);
  transition: transform 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.chat-toggle:hover {
  transform: scale(1.07);
  box-shadow: 0 10px 30px rgba(17, 145, 121, 0.45);
}

.chat-toggle svg { transition: opacity 180ms ease, transform 180ms ease; }
.chat-close-icon { position: absolute; opacity: 0; transform: rotate(-45deg); }
.chat-toggle.open .chat-close-icon { opacity: 1; transform: rotate(0); }
.chat-toggle.open svg:first-of-type { opacity: 0; transform: rotate(45deg); }

.chat-panel[hidden] { display: none; }

.chat-panel {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 200;
  width: 360px;
  max-height: 520px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(21, 45, 35, 0.14);
  overflow: hidden;
  animation: card-enter 280ms ease both;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--accent-dark);
  color: #fff;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.chat-header-info strong {
  font-size: 0.92rem;
  font-weight: 800;
}

.chat-panel-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  opacity: 0.8;
  transition: opacity 160ms;
}
.chat-panel-close:hover { opacity: 1; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.chat-msg {
  max-width: 84%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  animation: fade-up 220ms ease both;
}

.chat-msg--user {
  align-self: flex-end;
  background: var(--accent-dark);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg--assistant {
  align-self: flex-start;
  background: var(--surface-soft);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.chat-msg--assistant.streaming::after {
  content: "▋";
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-input-row input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 160ms;
}

.chat-input-row input:focus {
  border-color: var(--accent);
}

.chat-input-row button {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 0;
  background: var(--accent-dark);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 160ms, transform 130ms;
  flex: 0 0 auto;
}

.chat-input-row button:hover { background: var(--accent); transform: scale(1.05); }
.chat-input-row button:disabled { opacity: 0.5; cursor: default; transform: none; }

@media (max-width: 520px) {
  .chat-toggle { bottom: 16px; right: 16px; }
  .chat-panel { bottom: 82px; right: 16px; width: calc(100vw - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* ── BodyChart (ağrı haritası) ──────────────────────── */
.bodychart {
  display: grid;
  gap: 12px;
}

.bodychart-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(17, 145, 121, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  width: fit-content;
}

.bc-tab {
  min-height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.bc-tab.active {
  background: var(--accent-dark);
  color: #fff;
}

.bodychart-figure {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 470px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 30%, rgba(32, 199, 164, 0.08), transparent 55%),
    linear-gradient(180deg, #fbfdfc, #f3f8f6);
}

.bc-svg {
  width: auto;
  height: 440px;
  max-width: 100%;
  cursor: crosshair;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  filter: drop-shadow(0 18px 30px rgba(21, 45, 35, 0.08));
}

.bc-marker {
  cursor: pointer;
}

.bc-marker.selected {
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.28));
}

.bodychart-hint {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

/* kontroller */
.painmap-controls {
  display: grid;
  gap: 12px;
}

.control-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* yeni işaret ayarı (tip + şiddet) — düz, çerçevesiz */
.painmap-new {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(17, 145, 121, 0.12);
  border-radius: 10px;
  background: #fff;
}

.painmap-new strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.painmap-new p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

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

.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.type-chip:hover {
  border-color: rgba(23, 33, 29, 0.24);
  color: var(--ink);
}

.type-chip.active {
  border-color: color-mix(in srgb, var(--c) 62%, #fff);
  background: color-mix(in srgb, var(--c) 9%, #fff);
  color: var(--ink);
}

.type-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  flex: 0 0 auto;
}

.vas-row {
  display: grid;
  grid-template-columns: auto 1fr 32px;
  align-items: center;
  gap: 12px;
}

.vas-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.vas-row input[type="range"] {
  flex: 1;
}

.vas-out {
  min-width: 32px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 800;
}

/* seçili işaret */
.painmap-selected {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(32, 199, 164, 0.2);
  border-radius: 10px;
  background: rgba(238, 247, 243, 0.8);
  animation: zone-card-in 200ms ease both;
}

.sel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
  font-size: 0.86rem;
}

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

.sel-head > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sel-del {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
}

.sel-del:hover {
  text-decoration: underline;
}

.sel-vas {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.sel-vas > span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 800;
}

.sel-vas input[type="range"] {
  width: 100%;
  min-width: 0;
}

.sel-vas b {
  width: 38px;
  min-width: 38px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}

.sel-note {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 0.86rem;
  background: #fff;
  outline: none;
  transition: border-color 150ms ease;
}

.sel-note:focus {
  border-color: var(--accent);
}

/* işaret listesi */
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.list-count {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 800;
}

.markers-list {
  display: grid;
  gap: 5px;
  max-height: 240px;
  overflow-y: auto;
}

.marker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background 150ms ease, border-color 150ms ease;
}

.marker-row:hover {
  border-color: rgba(23, 33, 29, 0.18);
}

.marker-row.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.marker-row-no {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
  flex: 0 0 auto;
}

.marker-row-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.marker-row-label {
  font-size: 0.86rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marker-row-meta {
  margin-left: auto;
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  flex: 0 0 auto;
}

.markers-empty {
  margin: 0;
  padding: 11px 12px;
  border: 1px dashed rgba(17, 145, 121, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
}

/* panel: salt-okunur ağrı haritası */
.painmap-readonly {
  display: grid;
  gap: 12px;
}

.painmap-figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.painmap-fig {
  width: 100%;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfc;
}

.painmap-fig svg {
  width: 100%;
  max-height: 220px;
  height: auto;
}

.painmap-fig figcaption {
  margin-top: 4px;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
}

.painmap-marker-list {
  display: grid;
  gap: 6px;
}

.painmap-marker-list .marker-row {
  cursor: default;
}

@media (max-width: 620px) {
  .bc-svg {
    height: 360px;
  }
  .bodychart-figure {
    min-height: 390px;
  }
}

/* ── Scroll-reveal ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease;
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── SSS (akordeon) ─────────────────────────────────── */
.faq-section {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 50px clamp(18px, 4vw, 60px) 8px;
}

.faq-head {
  text-align: center;
  margin-bottom: 26px;
}

.faq-head h2 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  letter-spacing: 0;
}

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

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.faq-item[open] {
  border-color: rgba(32, 199, 164, 0.4);
  box-shadow: 0 12px 28px rgba(21, 45, 35, 0.06);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 200ms ease, background 200ms ease, color 200ms ease;
}

.faq-item[open] summary::after {
  content: "−";
  background: var(--accent);
  color: #fff;
}

.faq-item p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
  line-height: 1.65;
}

.public-contact {
  width: min(1180px, calc(100% - 36px));
  margin: 44px auto 0;
}

.public-contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(17, 145, 121, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 249, 245, 0.9)),
    #fff;
  box-shadow: 0 24px 60px rgba(21, 45, 35, 0.08);
}

.public-contact-brand {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.public-contact-brand img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 34px rgba(32, 199, 164, 0.15);
}

.public-contact-brand h2 {
  margin: 6px 0 10px;
  color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.public-contact-brand p:not(.eyebrow) {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.public-contact-actions {
  display: grid;
  gap: 10px;
}

.public-contact-actions a {
  display: grid;
  gap: 5px;
  min-height: 76px;
  align-content: center;
  padding: 14px 16px;
  border: 1px solid rgba(17, 145, 121, 0.16);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.public-contact-actions a:hover {
  border-color: rgba(32, 199, 164, 0.42);
  box-shadow: 0 16px 30px rgba(21, 45, 35, 0.08);
  transform: translateY(-1px);
}

.public-contact-actions span {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.public-contact-actions strong {
  overflow-wrap: anywhere;
  font-size: clamp(0.96rem, 1.6vw, 1.12rem);
  line-height: 1.35;
}

/* ── UI polish: wizard + dashboard + footer ─────────── */
.assessment-layout {
  align-items: stretch;
}

.body-panel,
.form-panel {
  min-height: clamp(680px, calc(100vh - 138px), 860px);
}

.form-panel {
  border-radius: 14px;
  box-shadow: 0 22px 58px rgba(21, 45, 35, 0.08);
}

.form-progress-bar {
  height: 6px;
}

.form-stepper {
  border-radius: 999px;
  padding: 5px;
}

.form-stepper span {
  border-radius: 999px;
}

.wizard-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 145, 121, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.96));
  backdrop-filter: blur(10px);
}

.success-mark {
  animation: success-pop 420ms ease both;
}

.application-card {
  grid-template-columns: 72px minmax(0, 1fr) 156px;
  align-items: stretch;
  padding: 14px;
  border-left-width: 0;
  border-top: 4px solid var(--risk-color, var(--line));
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fbfcfb);
}

.risk-number {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  font-size: 1.45rem;
  align-self: start;
}

.application-heading {
  margin-bottom: 7px;
}

.application-meta {
  gap: 6px;
  margin-bottom: 10px;
}

.application-meta span,
.tag-row span {
  min-height: 25px;
  font-size: 0.76rem;
}

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

.application-detail-grid p {
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
}

.action-recommendation {
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
  padding: 9px 11px;
}

.status-actions {
  width: fit-content;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(17, 145, 121, 0.12);
  border-radius: 999px;
  background: rgba(248, 252, 250, 0.9);
}

.status-actions button {
  border: 0;
  min-height: 26px;
  padding: 0 10px;
  background: transparent;
}

.status-actions button.active {
  background: #fff;
  box-shadow: 0 8px 18px rgba(21, 45, 35, 0.06);
}

.card-actions {
  align-content: start;
  justify-items: stretch;
}

.detail-action,
.call-action,
.whatsapp-action {
  border-radius: 8px;
  min-height: 36px;
  text-decoration: none;
}

.site-footer {
  width: min(1180px, calc(100% - 36px));
  margin: 28px auto 0;
  padding: 26px 0 34px;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  align-items: center;
  gap: 24px;
  border-top: 1px solid rgba(17, 145, 121, 0.16);
  color: var(--muted);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 210px;
}

.footer-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(32, 199, 164, 0.12);
}

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

.footer-brand strong {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.2;
}

.footer-brand span {
  margin-top: 2px;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.site-footer p {
  margin: 0;
  max-width: 500px;
  justify-self: center;
  text-align: center;
  font-size: 0.84rem;
  line-height: 1.6;
}

.footer-copy {
  justify-self: end;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
}

.footer-links {
  display: grid;
  gap: 10px;
  justify-self: end;
}

.footer-link-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.footer-link-group {
  flex-wrap: wrap;
}

.footer-link-group a,
.footer-link-group button {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  text-decoration: none;
}

.footer-link-group a:hover,
.footer-link-group button:hover {
  color: var(--accent-dark);
  background: rgba(17, 145, 121, 0.07);
}

.footer-links a,
.footer-links button {
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.legal-return {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(17, 145, 121, 0.16);
  border-radius: 999px;
  padding: 0 15px 0 12px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.82);
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(21, 45, 35, 0.05);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.legal-return::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent 45%, #fff 46% 56%, transparent 57%),
    var(--accent-dark);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.legal-return:hover {
  border-color: rgba(17, 145, 121, 0.34);
  box-shadow: 0 16px 34px rgba(21, 45, 35, 0.08);
  transform: translateY(-1px);
}

.cookie-notice {
  position: fixed;
  right: 18px;
  bottom: 96px;
  z-index: 190;
  width: min(520px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(17, 145, 121, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(21, 45, 35, 0.16);
  backdrop-filter: blur(12px);
}

.cookie-notice[hidden] {
  display: none !important;
}

.cookie-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.cookie-notice a,
.cookie-notice button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 850;
  text-decoration: none;
}

.cookie-notice a {
  border: 1px solid rgba(17, 145, 121, 0.16);
  background: #fff;
}

.cookie-notice button {
  border: 0;
  color: #fff;
  background: var(--accent-dark);
  cursor: pointer;
}

/* ── Mobil düzeltmeler: temel kurallardan SONRA gelir ki override garanti olsun ── */
@media (max-width: 620px) {
  /* İletişim kartı: minmax(360px) kolonu mobilde ekranı taşırıyordu */
  .public-contact-card {
    grid-template-columns: 1fr;
  }
  .public-contact-actions a {
    min-width: 0;
  }

  /* Çerez bildirimi: formun ve "Devam Et" butonunun üstünü kapatmasın */
  .cookie-notice {
    left: 10px;
    right: 10px;
    bottom: 12px;
    width: auto;
    grid-template-columns: 1fr auto;
    gap: 8px 10px;
    padding: 11px 13px;
  }
  .cookie-notice p {
    grid-column: 1 / -1;
    font-size: 0.78rem;
  }

  /* Risk önizleme: başlığın yanında sıkışmasın, okunur bir durum satırı olsun */
  .form-panel-head {
    grid-template-columns: 1fr;
  }
  .risk-preview {
    justify-self: stretch;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    justify-items: start;
    align-items: center;
    text-align: left;
    min-height: 0;
    gap: 1px 12px;
    padding: 12px 14px;
  }
  .risk-preview-label {
    grid-area: 1 / 1 / 2 / 2;
    font-size: 0.66rem;
  }
  .risk-preview strong {
    grid-area: 1 / 2 / 3 / 3;
    font-size: 1.7rem;
  }
  .risk-preview span:last-child {
    grid-area: 2 / 1 / 3 / 2;
    font-size: 0.82rem;
  }

  /* Dokunma hedefleri: vücut sekmeleri, nav ve footer linkleri en az ~42px */
  .bc-tab {
    min-height: 42px;
    padding: 0 14px;
  }
  .nav-links button {
    min-height: 42px;
  }
  .footer-links a,
  .footer-links button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 6px;
  }

  /* Sohbet butonu telif satırını kapatmasın diye footer'a alt boşluk */
  .site-footer {
    padding-bottom: 88px;
  }

  /* Panel (klinik tarafı): filtre ve durum butonları dokunma için büyüsün */
  .panel-filters button,
  .status-actions button {
    min-height: 38px;
    padding: 0 14px;
  }
  .status-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ── Çok dar ekranlar (iPhone SE / ≤360px) ── */
@media (max-width: 360px) {
  /* Üst menü 5 öğeyle tek satıra sığmıyor; içeriğe göre sarsın, kesilmesin */
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  .nav-links button {
    flex: 0 0 auto;
    padding: 0 9px;
    font-size: 0.8rem;
  }
}

/* ── Yatay (landscape) telefon: 2 kolonlu değerlendirme ekranı sığmıyor ──
   Body chart 420px alınca form paneline yer kalmıyordu; ~820px altında tek kolona düş. */
@media (max-width: 820px) {
  .assessment-layout {
    grid-template-columns: 1fr;
  }
  .body-panel {
    position: static;
  }
  .body-panel,
  .form-panel {
    min-height: auto;
    max-height: none;
  }
  .detail-panel {
    overflow: visible;
    max-height: none;
  }
}

/* ── iOS zoom önleme: dokunmatik cihazlarda input <16px ise odaklanınca zoom yapar ── */
@media (pointer: coarse) {
  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="number"],
  input[type="search"],
  input[type="password"],
  textarea,
  select,
  .contact-grid input,
  .contact-grid select,
  .panel-search,
  .panel-sort {
    font-size: 16px;
  }
}

/* ── Çentikli telefonlar: sabit öğeler ana ekran çubuğunun/çentiğin altına girmesin ── */
@media (max-width: 620px) {
  .chat-toggle {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .cookie-notice {
    bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

.legal-shell {
  min-height: 100vh;
  padding: 24px clamp(18px, 4vw, 60px) 60px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 249, 245, 0.86)),
    #f7f8f7;
}

.legal-topbar {
  width: min(1040px, 100%);
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 22px;
}

.legal-card {
  width: min(1040px, 100%);
  display: grid;
  gap: 22px;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 52px);
  border: 1px solid rgba(17, 145, 121, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(21, 45, 35, 0.08);
}

.dc-list {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 14px 16px;
  list-style: none;
  border: 1px solid rgba(17, 145, 121, 0.16);
  border-radius: 10px;
  background: rgba(239, 249, 245, 0.5);
  overflow-wrap: anywhere;
}

.dc-list li {
  color: var(--ink);
}

.dc-list strong {
  color: var(--accent-dark);
}

.legal-card h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.02;
}

.legal-lead,
.legal-card section p,
.legal-card li {
  color: var(--muted);
  line-height: 1.75;
}

.legal-lead {
  max-width: 820px;
  margin: 0;
  font-size: 1.02rem;
}

.legal-card section {
  display: grid;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(17, 145, 121, 0.12);
}

.legal-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.18rem;
}

.legal-card p,
.legal-card ul {
  margin: 0;
}

.legal-card ul {
  padding-left: 20px;
}

.legal-card a {
  color: var(--accent-dark);
  font-weight: 800;
}

.legal-request-box,
.legal-copy-box {
  padding: 16px;
  border: 1px solid rgba(17, 145, 121, 0.14);
  border-radius: 10px;
  background: rgba(239, 249, 245, 0.76);
}

/* ── Drawer araç çubuğu (yazdır + kapat) ─────────────── */
.drawer-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 6px;
}

.drawer-toolbar .drawer-close {
  float: none;
  position: static;
}

.drawer-print {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.86rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .application-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .application-detail-grid {
    grid-template-columns: 1fr;
  }

  .card-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
  }

  .footer-links {
    justify-self: center;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-copy {
    justify-self: center;
  }

  .footer-link-group {
    justify-content: center;
  }
}

@media (max-width: 620px) {
  .application-card {
    grid-template-columns: 1fr;
  }

  .body-panel,
  .form-panel {
    min-height: auto;
  }

  .wizard-actions,
  .wizard-actions.split {
    position: static;
  }

  .footer-links {
    width: 100%;
  }

  .legal-return {
    min-height: 38px;
    padding-right: 13px;
    font-size: 0.92rem;
  }

  .cookie-notice {
    left: 14px;
    right: 14px;
    bottom: 84px;
    width: auto;
    grid-template-columns: 1fr;
  }

  .legal-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ── Yazdırma görünümü: yalnızca seçili başvuru ──────── */
@media print {
  body {
    background: #fff !important;
  }
  body > *:not(.drawer) {
    display: none !important;
  }
  .drawer[hidden] {
    display: none !important;
  }
  .drawer {
    position: static !important;
    display: block !important;
  }
  .drawer-backdrop {
    display: none !important;
  }
  .drawer-panel {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
    transform: none !important;
    overflow: visible !important;
    animation: none !important;
  }
  .drawer-toolbar,
  .drawer-note-button,
  [data-clinical-note] {
    display: none !important;
  }
  .drawer-section,
  .drawer-score {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #e2e8e5 !important;
  }
  .painmap-fig svg {
    max-height: 200px;
  }
  .arc-fill {
    animation: none !important;
  }
}
