/* GBF Hazırlayıcı — sihirbaz arayüzü (K-22, K-28 Chemoris görünümü).
   Jetonlar ve font tanımları: tokens.css (yalnız var(--…); ham renk yok).
   Bu dosya /sds ve /profile'da da yüklenir: .btn, .card, .badge, .app-bar gibi genel sınıf
   adları korunur. Kurallar: design-system/chemoris/MASTER.md + pages/wizard.md. */

* { box-sizing: border-box; }
html { accent-color: var(--primary); font-size: 16px; -webkit-text-size-adjust: 100%; }
/* Sihirbazda daha sıkı tip ölçeği (her kademe ~1px küçük). Yalnız /app içeriği; ortak sol ray
   (.sh-rail, shell.css) tokens.css ölçeğinde kalır ki /sds ve /profile ile aynı görünsün. */
.app-bar, .app-shell, .wizard-nav, .toasts {
  --fs-xs: .71875rem; --fs-sm: .8125rem; --fs-base: .9375rem; --fs-md: 1.0625rem;
  --fs-lg: 1.125rem; --fs-xl: 1.375rem; --fs-note: .75rem;
  font-size: var(--fs-base);
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: var(--lh);
  padding-bottom: 96px;              /* yapışkan alt eylem çubuğu için yer */
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: var(--lh-tight); font-weight: 700; color: var(--text); letter-spacing: -.015em; }
h2 { font-size: var(--fs-xl); letter-spacing: -.02em; }
h3 { font-size: var(--fs-md); font-weight: 600; }
h4 { font-size: var(--fs-sm); font-weight: 600; }
p { margin: 0 0 .5rem; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
img, svg { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-size: .92em; }
.req { color: var(--danger); font-style: normal; font-weight: 700; }
.empty { color: var(--muted); font-size: var(--fs-sm); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100; padding: 10px 14px;
  background: var(--surface); color: var(--primary); border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
}
.skip-link:focus { left: 8px; top: 8px; outline: 2px solid var(--focus); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.05em; height: 1.05em; flex: none; vertical-align: -.16em; }
.ic-lg { width: 1.3em; height: 1.3em; }

/* ============================================================ üst çubuk */
.app-bar {
  position: sticky; top: 0; z-index: 30; height: var(--bar-h);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.app-bar-inner {
  max-width: var(--shell-maxw); margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 12px; padding: 0 24px; min-width: 0;
}
.brand-link { display: inline-flex; align-items: center; text-decoration: none; min-height: var(--tap); flex: none; }
.brand-link img { display: block; height: 28px; width: auto; }
.bar-sep { width: 1px; height: 24px; background: var(--border); flex: none; }
.bar-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.bar-app { font-weight: 600; font-size: var(--fs-sm); color: var(--text); white-space: nowrap; }
.bar-doc { font-size: var(--fs-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.save-ind { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.save-ind.on { color: var(--ok); }
.save-ind.err { color: var(--danger); }

/* ============================================================ kabuk + adım rayı */
.app-shell {
  max-width: var(--shell-maxw); margin: 0 auto; padding: 24px;
  display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); gap: 32px; align-items: start;
}
.rail { position: sticky; top: calc(var(--bar-h) + 24px); min-width: 0; }
.steps {
  list-style: none; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.steps .step { position: relative; min-width: 0; }
/* adımlar arası ilerleme çizgisi: rozet merkezinden bir sonraki rozete */
.steps .step:not(:last-child)::after {
  content: ""; position: absolute; left: 27px; top: 46px; bottom: -14px; width: 2px;
  background: var(--border); border-radius: 2px; transition: background-color .2s ease;
}
.steps .step.done::after { background: var(--primary); }
.step-btn {
  position: relative; z-index: 1; width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; background: transparent; border: 0; border-radius: var(--radius-sm);
  cursor: pointer; font: inherit; color: var(--text); text-align: left;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.step-btn:hover { background: var(--surface-2); }
.step-btn.active { background: var(--primary-soft); }
.step-btn.active .title { color: var(--primary); font-weight: 600; }
.step-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: var(--focus-ring); }
/* numara rozeti: bekleyen gri, tamamlanan primary dolu + tik, aktif primary halka */
.step-btn .num {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--surface); border: 2px solid var(--border-strong); color: var(--muted);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.step.done .step-btn .num { background: var(--primary); border-color: var(--primary); color: var(--on-navy-strong); }
.step-btn.active .num,
.step.done .step-btn.active .num {
  background: var(--surface); border-color: var(--primary); color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-tint);
}
.step-btn .num .ic { width: 16px; height: 16px; }
.step-txt { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.step-txt .title { font-size: var(--fs-sm); font-weight: 500; line-height: 1.3; }
.step-txt .status { font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: center; gap: 4px; }
.status-ok { color: var(--ok); }
.status-missing { color: var(--warn); }
.status-optional { color: var(--muted); }
.rail-note {
  margin: 12px 0 0; padding: 12px 14px; font-size: var(--fs-note); color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); line-height: 1.5;
}
.rail-note .ic { color: var(--primary); margin-right: 4px; }

/* ============================================================ adım başlığı */
main { min-width: 0; }
.step-head { margin: 0 0 20px; }
.eyebrow {
  margin: 0 0 6px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary);
}
.step-head h2 { margin: 0 0 8px; font-size: var(--fs-xl); }
.step-head h2:focus { outline: none; }
.step-head h2:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.step-desc { margin: 0; color: var(--text-2); font-size: var(--fs-base); max-width: 72ch; }

/* ============================================================ kart */
.panel { min-width: 0; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.card-head h3 { margin: 0; }
.card > h3 { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.card-note { margin: -8px 0 16px; font-size: var(--fs-sm); color: var(--text-2); max-width: 80ch; }
.inline-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-field { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); min-width: 0; }
.inline-field span { color: var(--text-2); font-weight: 500; white-space: nowrap; }
.inline-field select { width: auto; min-width: 190px; max-width: 100%; }

.block { padding: 20px 0; border-top: 1px solid var(--border); }
.block:first-of-type { border-top: 0; padding-top: 0; }
.block-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.block-head h4 { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.block-head .hint-txt, .block-head .muted { font-size: var(--fs-note); color: var(--muted); }

/* ============================================================ form alanları */
.grid { display: grid; gap: 20px 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
/* sihirbaz formları: ≥1024px iki sütun, altında tek sütun (pages/wizard.md) */
.panel .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel .span-3 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > span, .field > legend {
  font-size: var(--fs-sm); font-weight: 500; color: var(--text); padding: 0;
  display: flex; align-items: center; gap: 5px;
}
.field-help, .hint-txt { font-size: var(--fs-note); color: var(--muted); line-height: 1.45; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-row label {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--fs-sm);
  min-height: var(--tap); padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color .15s ease, background-color .15s ease;
}
.radio-row label:hover { border-color: var(--subtle); }
.radio-row label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 500; }
.radio-row label:has(input:focus-visible) { box-shadow: var(--focus-ring); border-color: var(--primary); }
.radio-row input { margin: 0; width: 16px; height: 16px; }

input[type="text"], input[type="date"], input[type="email"], input[type="number"], input:not([type]),
select, textarea {
  font: inherit; font-size: var(--fs-base); color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 10px 14px; width: 100%; min-width: 0; min-height: var(--tap);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--subtle); opacity: 1; }
select { padding-right: 32px; cursor: pointer; }
textarea { resize: vertical; line-height: 1.5; min-height: 80px; }
textarea.tall { min-height: 200px; font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.55; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--subtle); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: var(--focus-ring);
}
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm);
}
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
input.invalid { border-color: var(--danger); background: var(--danger-soft); }
input.invalid:focus { box-shadow: 0 0 0 4px var(--danger-soft); }
input[readonly] { background: var(--surface-2); }
.field-error { font-size: var(--fs-note); color: var(--danger); display: flex; align-items: center; gap: 4px; }

/* ============================================================ düğmeler */
.btn {
  font: inherit; font-size: var(--fs-sm); font-weight: 600; padding: 0 20px; min-height: var(--tap);
  border-radius: var(--radius-sm); cursor: pointer; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: var(--focus-ring); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-navy-strong); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-navy-strong); }
.btn-primary:active { background: var(--primary-press); border-color: var(--primary-press); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--text); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, var(--surface)); }
.btn-danger:hover { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 45%, var(--surface)); color: var(--danger); }
.btn-ghost.btn-danger { border-color: transparent; }
.btn-sm { padding: 0 12px; min-height: 36px; font-size: var(--fs-sm); }
.btn-lg { padding: 0 28px; min-height: 52px; font-size: var(--fs-base); }
.btn-icon { padding: 0; width: 36px; min-height: 36px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.spinner {
  width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================ rozet / çip (pill) */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 600; border: 1px solid transparent; white-space: nowrap; line-height: 1.5;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, var(--surface)); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, var(--surface)); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, var(--surface)); }
.badge-info { background: var(--info-soft); color: var(--primary); border-color: var(--primary-tint); }
.badge-muted { background: var(--surface-2); color: var(--muted); border-color: var(--border); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 32px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: var(--radius-pill);
  background: var(--primary-soft); color: var(--primary); font-size: var(--fs-xs);
  border: 1px solid var(--primary-tint); line-height: 1.4; max-width: 100%;
}
.chip .code { font-family: var(--mono); font-weight: 700; letter-spacing: -.02em; }
.chip .sub { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.chip.chip-plain { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.chip .x {
  border: 0; background: transparent; cursor: pointer; padding: 0; color: inherit;
  border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center;
  transition: background-color .15s ease;
}
.chip .x:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.chip-add { display: inline-flex; gap: 6px; align-items: center; max-width: 100%; }
.chip-add input, .chip-add select { width: 210px; min-height: 36px; padding: 6px 10px; font-size: var(--fs-sm); }

/* ============================================================ piktogramlar (sprite ve renkler değişmez) */
.pictos { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.picto { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 80px; position: relative; }
.ghs { width: 56px; height: 56px; display: block; }
.picto .lbl { font-size: var(--fs-xs); color: var(--text-2); text-align: center; line-height: 1.25; }
.picto .x {
  position: absolute; top: -6px; right: 0; border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: 50%; width: 24px; height: 24px; cursor: pointer; padding: 0; color: var(--text-2);
  display: grid; place-items: center; transition: background-color .15s ease, color .15s ease;
}
.picto .x:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.picto.sm { width: auto; }
.picto.sm .ghs { width: 34px; height: 34px; }

/* ============================================================ tablolar */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); background: var(--surface); }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; }
.tbl thead th {
  font-weight: 600; color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase;
  letter-spacing: .04em; background: var(--surface-2); position: sticky; top: 0; z-index: 2;
  border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle;
}
.tbl thead th .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color .15s ease; }
.tbl tbody tr:hover { background: var(--bg); }
.tbl input { min-height: 40px; padding: 8px 10px; font-size: var(--fs-sm); }
.tbl input.mono { font-family: var(--mono); font-size: var(--fs-sm); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.idx { color: var(--muted); font-variant-numeric: tabular-nums; width: 36px; vertical-align: middle; }
.tbl .row-msg { font-size: var(--fs-xs); color: var(--danger); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.tbl tr.not-found td { background: color-mix(in srgb, var(--danger-soft) 45%, var(--surface)); }
.tbl tr.not-found td.idx { box-shadow: inset 3px 0 0 var(--danger); }
.tbl tr.manual td.idx { box-shadow: inset 3px 0 0 var(--warn); }
.tbl tr.ok-row td.idx { box-shadow: inset 3px 0 0 var(--ok); }
.tbl tr.sub-row td { padding-top: 0; }
.comp-table.madde .col-range { display: none; }
.comp-table th, .comp-table td { padding: 10px 6px; }
.comp-table th:first-child, .comp-table td:first-child { padding-left: 12px; }
.comp-table td { vertical-align: middle; }
.comp-table .col-cas { min-width: 136px; }
.comp-table .col-pct { width: 84px; }
.comp-table .col-range { width: 110px; }
.comp-table .col-name { min-width: 160px; }
.comp-table .col-ec { min-width: 100px; }
.comp-table .col-h { min-width: 170px; }
.comp-table .col-src { min-width: 110px; }
.comp-table .col-act { width: 96px; white-space: nowrap; }
.comp-table .chip { padding: 3px 8px; }
.comp-table .chips { margin-top: 4px; }
.comp-table .row-act { display: flex; gap: 4px; align-items: center; }
.tbl.summary td { vertical-align: middle; }
.tbl.summary td:first-child { width: 44px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tbl.kv td:first-child { width: 42%; color: var(--text-2); }
.link-ic {
  color: var(--muted); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm);
  vertical-align: middle; transition: background-color .15s ease, color .15s ease;
}
.link-ic:hover { color: var(--primary); background: var(--primary-soft); }

/* toplam yüzde ölçeri */
.sum-line { display: flex; gap: 14px; align-items: center; margin-top: 16px; font-size: var(--fs-sm); flex-wrap: wrap; }
.meter { flex: 1 1 180px; max-width: 280px; height: 8px; background: var(--surface-2); border-radius: var(--radius-pill); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--primary); border-radius: var(--radius-pill); transition: width .25s ease; }
.meter.over > span { background: var(--warn); }
.sum-line .warn { color: var(--warn); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }

/* ============================================================ gerekçeler / açılır yardım */
details.reasons-box { margin-top: 12px; }
details.reasons-box > summary,
details.hint > summary {
  cursor: pointer; font-size: var(--fs-sm); color: var(--primary); font-weight: 500;
  list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 32px;
}
details > summary::-webkit-details-marker { display: none; }
details.reasons-box > summary::before,
details.hint > summary::before {
  content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease; margin-right: 2px;
}
details[open].reasons-box > summary::before,
details[open].hint > summary::before { transform: rotate(45deg); }
details.hint {
  background: var(--info-soft); border: 1px solid var(--primary-tint); border-radius: var(--radius-sm);
  padding: 6px 14px; margin: 0 0 16px;
}
details.hint .hint-body { font-size: var(--fs-sm); color: var(--text-2); margin: 4px 0 8px; line-height: 1.6; }
.reasons { list-style: none; margin: 8px 0 0; padding: 12px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.reasons li { color: var(--text-2); font-size: var(--fs-note); padding-left: 16px; position: relative; margin-bottom: 4px; line-height: 1.5; }
.reasons li:last-child { margin-bottom: 0; }
.reasons li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--subtle); }
.reasons .ref { color: var(--muted); }

/* ============================================================ etiket önizlemesi */
.step3-cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .95fr); gap: 20px; align-items: start; }
.label-preview { position: sticky; top: calc(var(--bar-h) + 24px); min-width: 0; }
.label-sheet {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.label-sheet::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.label-sheet .lp-product { font-weight: 700; font-size: var(--fs-md); margin-bottom: 4px; overflow-wrap: anywhere; }
.label-sheet .lp-firm { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.label-sheet .lp-logo { max-height: 28px; max-width: 90px; object-fit: contain; flex: none; }
.label-sheet .lp-pictos {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; padding: 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.label-sheet .lp-pictos .ghs { width: 52px; height: 52px; }
.label-sheet .lp-signal {
  display: inline-block; font-weight: 800; font-size: var(--fs-md); letter-spacing: .06em;
  margin-bottom: 14px; padding: 2px 12px; border-radius: var(--radius-pill); border: 2px solid currentColor;
}
.label-sheet .lp-signal.tehlike { color: var(--danger); background: var(--danger-soft); }
.label-sheet .lp-signal.dikkat { color: var(--warn); background: var(--warn-soft); }
.label-sheet .lp-list { list-style: none; margin: 0 0 14px; padding: 0; font-size: var(--fs-note); color: var(--text); line-height: 1.5; }
.label-sheet .lp-list li { margin-bottom: 6px; display: flex; gap: 8px; align-items: flex-start; }
.label-sheet .lp-list .code {
  font-family: var(--mono); font-size: var(--fs-xs); font-weight: 700; color: var(--primary); flex: none;
  background: var(--primary-soft); border: 1px solid var(--primary-tint); border-radius: var(--radius-pill);
  padding: 0 8px; min-width: 52px; text-align: center; line-height: 1.6;
}
.label-sheet .lp-sec { font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.label-sheet hr { border: 0; border-top: 1px dashed var(--border-strong); margin: 14px 0; }
.label-note { font-size: var(--fs-note); color: var(--muted); margin-top: 10px; line-height: 1.5; }

/* ============================================================ bilgi kutuları */
.notice {
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: var(--fs-sm); margin: 0 0 16px;
  border: 1px solid transparent; display: flex; gap: 10px; align-items: flex-start; line-height: 1.5;
}
.notice .ic { margin-top: .15em; }
.notice-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, var(--surface)); }
.notice-info { background: var(--info-soft); color: var(--primary); border-color: var(--primary-tint); }
.notice-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, var(--surface)); }
.warn-list { margin: 8px 0 0; padding-left: 18px; font-size: var(--fs-sm); line-height: 1.55; }
.warn-list li { margin-bottom: 6px; }
.empty-state {
  text-align: center; padding: 32px 20px; color: var(--muted); font-size: var(--fs-sm);
  border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--bg);
}
.empty-state .ic { width: 28px; height: 28px; color: var(--subtle); display: block; margin: 0 auto 8px; }
.skeleton {
  display: inline-block; height: 12px; border-radius: 4px; min-width: 60px; width: 100%;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.progress-note { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); margin-top: 12px; }
.status-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-sm); }
.status-list li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; min-width: 0; }

/* ============================================================ fizikokimya ızgarası */
.physchem { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.physchem label { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; align-items: center; font-size: var(--fs-sm); }
.physchem label span { color: var(--text); font-size: var(--fs-sm); font-weight: 500; }

/* ============================================================ indirme paneli */
.big-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.big-actions .spacer { flex: 1; }
.download-card { background: var(--primary-soft); border-color: var(--primary-tint); }
.download-hint { font-size: var(--fs-sm); color: var(--text-2); }

/* ============================================================ yapışkan alt eylem çubuğu */
.wizard-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(38, 69, 109, .06);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-inner {
  max-width: var(--shell-maxw); margin: 0 auto; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; padding: 12px 24px;
}
.nav-inner .btn { min-width: 132px; }
.nav-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.nav-mid .small { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nav-meter { display: flex; gap: 4px; }
.nav-meter span { width: 32px; height: 4px; border-radius: var(--radius-pill); background: var(--border); transition: background-color .2s ease; }
.nav-meter span.done { background: var(--primary-tint); }
.nav-meter span.current { background: var(--primary); }

/* ============================================================ toast */
.toasts { position: fixed; right: 20px; bottom: 92px; display: flex; flex-direction: column; gap: 10px; z-index: 50; max-width: 400px; }
.toast {
  background: var(--navy); color: var(--on-navy-strong); padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: flex-start;
  animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.toast.error { background: var(--danger); }
.toast.success { background: var(--ok); }
.toast.warn { background: var(--warn); }
.toast button {
  margin-left: auto; background: transparent; border: 0; color: inherit; cursor: pointer; padding: 0;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--radius-sm); flex: none;
}

/* ============================================================ firma logosu (adım 1) */
.logo-field { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.logo-label { font-size: var(--fs-sm); font-weight: 500; }
.logo-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.logo-drop {
  width: 220px; max-width: 100%; min-height: 92px; display: flex; align-items: center; justify-content: center; padding: 12px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--bg);
  color: var(--text-2); font-size: var(--fs-sm); text-align: center; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.logo-drop:hover, .logo-drop.dragover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.logo-drop:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.logo-drop.has-logo { border-style: solid; background: var(--surface); }
.logo-drop-txt { display: inline-flex; align-items: center; gap: 6px; }
.logo-preview { max-width: 100%; max-height: 64px; object-fit: contain; }
.logo-side { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; flex: 1 1 220px; }
.check-field { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-sm); cursor: pointer; min-height: var(--tap); }
.check-field input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; flex: none; }

/* ============================================================ duyarlı */
@media (max-width: 1100px) {
  .step3-cols { grid-template-columns: minmax(0, 1fr); }
  .label-preview { position: static; }
  .label-sheet { max-width: 560px; }
}
/* K-28: kabuk sol rayı (248px) her genişlikte var → sihirbaz adımları her zaman üstte yatay çubuk;
   bileşen tablosu içerik alanının tamamını kullanır. */
@media screen {
  .app-shell { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 16px; }
  .rail {
    position: sticky; top: var(--bar-h); z-index: 19; margin: -16px -16px 0; padding: 8px 16px;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .steps {
    flex-direction: row; gap: 16px; overflow-x: auto; scrollbar-width: none; padding: 4px;
    background: transparent; border: 0; box-shadow: none;
  }
  .steps::-webkit-scrollbar { display: none; }
  .steps .step { flex: 1 0 auto; }
  /* yatay ilerleme çizgisi: adım düğmeleri arasındaki boşlukta */
  .steps .step:not(:last-child)::after { left: auto; right: -14px; top: 50%; bottom: auto; width: 12px; height: 2px; }
  .step-btn { min-height: var(--tap); padding: 6px 10px 6px 6px; }
  .step-txt .title { white-space: nowrap; }
  .step-txt .status { display: none; }
  .rail-note { display: none; }
}
@media (min-width: 1081px) {
  .app-shell { padding: 16px 24px 32px; }
  .rail { margin: -16px -24px 0; padding: 8px 24px; }
  #step2-root .card { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 1080px) {
  .physchem { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
  .panel .grid-3, .panel .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .panel .span-2, .panel .span-3 { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { padding-bottom: 88px; }
  .app-bar-inner { padding: 0 16px; gap: 8px; }
  .bar-doc, .bar-sep { display: none; }
  .bar-title { flex-direction: column; align-items: flex-start; gap: 0; }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .span-2, .span-3 { grid-column: span 1; }
  .card { padding: 16px; }
  .card-head { margin-bottom: 16px; padding-bottom: 12px; }
  .step-head h2 { font-size: var(--fs-lg); }
  .step-desc { font-size: var(--fs-sm); }
  .step-txt { display: none; }
  .step-btn.active .step-txt { display: flex; }
  .steps { gap: 12px; }
  .steps .step { flex: 0 0 auto; }
  .steps .step:not(:last-child)::after { right: -11px; width: 10px; }
  .nav-inner { padding: 10px 16px; gap: 10px; }
  .nav-inner .btn { flex: 1 1 0; min-width: 0; }
  .nav-meter span { width: 16px; }
  .toasts { left: 16px; right: 16px; max-width: none; bottom: 84px; }
  .chip-add { flex-wrap: wrap; }
  .chip-add input, .chip-add select { width: 100%; min-width: 0; flex: 1 1 160px; }
  input, select, textarea, .btn, .btn-sm { min-height: var(--tap); }
  .btn-icon { width: var(--tap); }
  .inline-field { flex-wrap: wrap; }
  .inline-field select { min-width: 0; width: 100%; }
  .logo-drop { width: 100%; }
  .big-actions .btn-lg { width: 100%; }

  /* geniş tablolar → satır kartları */
  .table-wrap:has(.comp-table) { border: 0; overflow: visible; background: transparent; }
  .comp-table, .comp-table tbody, .comp-table tr, .comp-table td { display: block; width: 100%; }
  .comp-table thead { display: none; }
  .comp-table tr {
    border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px;
    padding: 12px 14px; background: var(--surface); box-shadow: var(--shadow);
  }
  .comp-table td { border: 0 !important; box-shadow: none !important; padding: 6px 0; display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 10px; }
  .comp-table td::before {
    content: attr(data-label); font-size: var(--fs-xs); font-weight: 600; color: var(--muted);
    text-transform: uppercase; letter-spacing: .03em;
  }
  .comp-table td.idx { font-weight: 700; color: var(--text); }
  .comp-table tr.not-found { border-left: 3px solid var(--danger); }
  .comp-table tr.manual { border-left: 3px solid var(--warn); }
  .comp-table tr.ok-row { border-left: 3px solid var(--ok); }
  .comp-table .col-act { justify-content: flex-start; }
  .tbl.summary th, .tbl.summary td { padding: 8px; }
  .tbl.kv td:first-child { width: 48%; }
  .physchem label { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
@media (max-width: 420px) {
  .nav-mid { display: none; }
  .bar-app { display: none; }   /* dar ekranda logo + kayıt durumu yeter (K-34) */
  .comp-table td { grid-template-columns: 88px minmax(0, 1fr); }
}

/* ============================================================ hareket (K-20 ile aynı dil) */
.panel { animation: cp-panel .22s cubic-bezier(.25, .46, .45, .94) both; }
@keyframes cp-panel { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* K-28: programatik odak alan başlıklar (tabindex=-1) çerçeve göstermez */
[tabindex="-1"]:focus { outline: none; box-shadow: none; }
/* Sol ray görünürken logo rayda; üst çubukta tekrar etmez */
@media (min-width: 900px) {
  .app-bar .brand-link, .app-bar .bar-sep { display: none; }
}

/* Dokunmatikte iOS, 16px altındaki alanlara odaklanınca sayfayı yakınlaştırır; sıkı ölçek masaüstüne özgü. */
@media (pointer: coarse) {
  .app-shell input, .app-shell select, .app-shell textarea { font-size: 16px; }
}

/* ---------- K-42: demo modu (/demo) ---------- */
.demo-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px;
  padding: 8px 16px; background: var(--primary); color: #fff; font-size: var(--fs-sm); text-align: center;
}
.demo-banner.hidden { display: none; }
.demo-banner-cta {
  color: var(--primary); background: #fff; border-radius: var(--radius-pill); padding: 4px 14px;
  font-weight: 600; text-decoration: none; white-space: nowrap;
}
.demo-banner-cta:hover { background: var(--primary-soft); }
.demo-banner-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.demo-company-note {
  display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px;
  background: var(--primary-soft); border-radius: var(--radius-sm); font-size: var(--fs-sm); color: var(--text);
}
.demo-company-note .ic { flex: none; margin-top: 2px; color: var(--primary); }
body.demo [data-bind^="company."]:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.demo-logo { padding: 12px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); display: inline-flex; background: var(--surface); }
.demo-logo img { display: block; height: 40px; width: auto; }

.demo-preview {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: rgba(18, 25, 38, .72); user-select: none; -webkit-user-select: none;
}
body.demo-preview-open { overflow: hidden; }
.demo-preview-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.demo-preview-bar .spacer { flex: 1; }
.demo-preview-scroll { flex: 1; overflow: auto; padding: 24px 16px 48px; -webkit-overflow-scrolling: touch; }
.demo-page {
  position: relative; max-width: 210mm; min-height: 297mm; margin: 0 auto; padding: 18mm 16mm;
  background: #fff; color: #111; box-shadow: 0 8px 32px rgba(0, 0, 0, .35); overflow: hidden;
  font-size: 13px; line-height: 1.45; overflow-wrap: anywhere;
}
.demo-page-body img { max-width: 100%; max-height: 72px; width: auto; height: auto; }
.demo-page-body table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.demo-page-body td, .demo-page-body th { border: 1px solid #c9ced6; padding: 4px 6px; vertical-align: top; }
.demo-page-body p { margin: 0 0 6px; }
.demo-page-body h1, .demo-page-body h2, .demo-page-body h3 { font-size: 15px; margin: 14px 0 6px; }
/* Filigran: içeriğin üstünde, tüm yükseklik boyunca tekrar eden eğik metin (caydırıcı; K-42) */
.demo-watermark {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='380' height='240'%3E%3Ctext x='190' y='130' text-anchor='middle' transform='rotate(-30 190 120)' font-family='Inter,Arial,sans-serif' font-size='26' font-weight='700' fill='rgb(192,52,52)' fill-opacity='0.2'%3E%C3%96RNEKT%C4%B0R %C2%B7 Chemoris Demo%3C/text%3E%3C/svg%3E");
  background-repeat: repeat; background-size: 380px 240px;
}
@media (max-width: 599.98px) {
  .demo-page { padding: 16px 12px; min-height: 0; font-size: 12px; }
  .demo-watermark { background-size: 280px 177px; }
  .demo-preview-bar .btn { flex: 1 1 auto; justify-content: center; }
  .demo-preview-bar .spacer { display: none; }
}
@media print {
  .demo-preview, body.demo #main, body.demo .demo-banner { display: none !important; }
}
