/* ═══════════════════════════════════════════════════════════════
   SFD Label Compliance EU — stylesheet
   Paleta: czysty biel + głęboki błękit SFD + cyjan akcent
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Brand */
  --sfd-blue:        #0057B8;
  --sfd-blue-deep:   #003D82;
  --sfd-blue-dark:   #00295A;
  --sfd-blue-600:    #0066D4;
  --sfd-blue-500:    #1E80E8;
  --sfd-cyan:        #00AEEF;
  --sfd-cyan-light:  #E8F5FD;

  /* Neutrals */
  --bg:              #F6F9FC;
  --surface:         #FFFFFF;
  --surface-alt:     #F1F5FA;
  --border:          #E2E8F0;
  --border-strong:   #CBD5E1;
  --text:            #0F172A;
  --text-muted:      #64748B;
  --text-soft:       #94A3B8;

  /* Semantic */
  --red:             #DC2626;
  --red-bg:          #FEF2F2;
  --amber:           #D97706;
  --amber-bg:        #FFFBEB;
  --yellow:          #CA8A04;
  --green:           #059669;
  --green-bg:        #ECFDF5;

  /* Radii & shadows */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04);
  --shadow:    0 1px 3px rgba(15,23,42,.06), 0 4px 12px rgba(15,23,42,.04);
  --shadow-lg: 0 4px 10px rgba(15,23,42,.06), 0 16px 40px rgba(15,23,42,.08);
  --shadow-blue: 0 8px 24px rgba(0,87,184,.25);

  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--sfd-blue); text-decoration: none; }
a:hover { color: var(--sfd-blue-deep); }

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

code, .mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}

.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sfd-blue) 0%, var(--sfd-blue-deep) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-blue);
}

.brand-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand-eu {
  color: var(--sfd-blue);
  font-weight: 800;
  margin-left: 2px;
}

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

.country-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-muted);
  height: 38px;
  transition: all 0.2s var(--ease);
}
.country-picker:hover { border-color: var(--sfd-blue); color: var(--sfd-blue); }
.country-picker select {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  outline: none;
  cursor: pointer;
  padding: 0 20px 0 0;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:focus-visible {
  outline: 3px solid rgba(0, 87, 184, 0.25);
  outline-offset: 1px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, var(--sfd-blue-600) 0%, var(--sfd-blue) 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.15);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--sfd-blue) 0%, var(--sfd-blue-deep) 100%);
  box-shadow: var(--shadow-blue);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-alt);
  color: var(--sfd-blue);
  border-color: var(--border-strong);
}

.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: var(--r-sm); height: 36px; }
.btn-block { width: 100%; padding: 14px 18px; font-size: 14px; }

.btn-link {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 0;
}
.btn-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   ALERT
   ═══════════════════════════════════════════════════════════════ */

.alert {
  padding: 14px 0;
  font-size: 14px;
}
.alert-warning {
  background: var(--amber-bg);
  border-bottom: 1px solid #FDE68A;
  color: #78350F;
}
.alert code {
  background: rgba(0,0,0,.08);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */

.hero {
  padding: 48px 0 28px;
  background:
    radial-gradient(900px 400px at 10% 0%, rgba(0,87,184,.06) 0%, transparent 60%),
    radial-gradient(700px 350px at 95% 0%, rgba(0,174,239,.05) 0%, transparent 60%),
    var(--bg);
}

.hero-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--sfd-blue);
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 14px;
  color: var(--text);
}

.hero-lead {
  font-size: 15px;
  max-width: 760px;
  color: var(--text-muted);
  margin: 0 0 22px;
  line-height: 1.6;
}

.reg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sfd-blue-deep);
  cursor: help;
  transition: all 0.15s var(--ease);
}
.chip:hover {
  background: var(--sfd-cyan-light);
  border-color: var(--sfd-blue);
}

/* ═══════════════════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════════════════ */

.tabs {
  display: flex;
  gap: 4px;
  padding: 20px 24px 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.tab {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s var(--ease);
  position: relative;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  color: var(--sfd-blue);
  border-bottom-color: var(--sfd-blue);
  font-weight: 600;
}
.tab-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 500;
}
.tab.is-active .tab-num { color: var(--sfd-blue); }

/* ═══════════════════════════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.main { padding: 32px 24px 60px; }

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 28px;
}

@media (max-width: 960px) {
  .panel-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   SIDE CARD (sterowanie)
   ═══════════════════════════════════════════════════════════════ */

.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (max-width: 960px) {
  .side-card { position: static; }
}

.side-head { padding-bottom: 4px; }
.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--sfd-blue);
  font-weight: 600;
  margin-bottom: 6px;
}
.side-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.side-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.side-group { display: flex; flex-direction: column; gap: 8px; }
.side-group-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.value-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  background: var(--sfd-cyan-light);
  color: var(--sfd-blue-deep);
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: none;
  letter-spacing: 0;
}

/* inputs */
textarea, input[type="text"], input[type="url"], input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: all 0.15s var(--ease);
  line-height: 1.5;
}
textarea { resize: vertical; min-height: 120px; font-size: 13.5px; }
textarea:focus, input:focus {
  border-color: var(--sfd-blue);
  box-shadow: 0 0 0 3px rgba(0,87,184,.1);
}
input::placeholder, textarea::placeholder { color: var(--text-soft); }

.note {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 12px;
  background: var(--sfd-cyan-light);
  border-left: 3px solid var(--sfd-cyan);
  border-radius: 4px;
  margin-top: 8px;
}

/* drop zone */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r);
  background: var(--surface-alt);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  color: var(--text-muted);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--sfd-blue);
  background: var(--sfd-cyan-light);
  color: var(--sfd-blue-deep);
}
.drop-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.drop-empty svg { color: var(--sfd-blue); }
.drop-title { font-weight: 600; font-size: 14px; color: var(--text); }
.drop-hint { font-size: 12px; font-family: 'JetBrains Mono', monospace; color: var(--text-muted); }
.drop-preview { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.drop-preview img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: var(--r-sm);
  background: #fff;
  border: 1px solid var(--border);
}
.drop-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* segmented control */
.seg {
  display: inline-flex;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 3px;
  width: 100%;
}
.seg-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.seg-btn.is-active {
  background: var(--surface);
  color: var(--sfd-blue);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* chips / tone buttons */
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-chip, .tone-btn {
  padding: 7px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.mini-chip { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.mini-chip:hover, .tone-btn:hover {
  border-color: var(--sfd-blue);
  color: var(--sfd-blue);
}
.mini-chip.is-active, .tone-btn.is-active {
  background: var(--sfd-blue);
  color: #fff;
  border-color: var(--sfd-blue);
  font-weight: 600;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.grid-2 .tone-btn { text-align: center; }

/* range slider */
.range { width: 100%; accent-color: var(--sfd-blue); height: 4px; }

/* source selector */
.source-opts { display: flex; flex-direction: column; gap: 6px; }
.source-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.source-opt:hover:not(:disabled) { border-color: var(--sfd-blue); background: var(--sfd-cyan-light); }
.source-opt:disabled { opacity: 0.4; cursor: not-allowed; }
.source-opt.is-active {
  border-color: var(--sfd-blue);
  background: var(--sfd-cyan-light);
}
.source-opt .check { color: var(--sfd-blue); opacity: 0; }
.source-opt.is-active .check { opacity: 1; }
.source-title { font-size: 14px; font-weight: 600; color: var(--text); }
.source-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
}

/* side info */
.side-info {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  font-size: 13px;
}
.side-info summary {
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.side-info summary:hover { color: var(--sfd-blue); }
.side-info ul { margin: 12px 0 0; padding: 0 0 0 18px; color: var(--text-muted); }
.side-info li { margin-bottom: 5px; }

/* inline error */
.inline-error {
  padding: 10px 14px;
  background: var(--red-bg);
  border-left: 3px solid var(--red);
  border-radius: var(--r-sm);
  color: var(--red);
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════
   RESULT AREA
   ═══════════════════════════════════════════════════════════════ */

.result-area { min-height: 400px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 32px;
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  min-height: 400px;
}
.empty-icon {
  width: 72px;
  height: 72px;
  background: var(--sfd-cyan-light);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sfd-blue);
  margin-bottom: 16px;
}
.empty-state h3 { margin: 0 0 8px; font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.empty-state p { margin: 0; color: var(--text-muted); max-width: 440px; font-size: 14px; }

/* loader */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  gap: 16px;
  min-height: 400px;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(0,87,184,.15);
  border-top-color: var(--sfd-blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--sfd-blue);
  font-weight: 600;
}
.loader-sub { color: var(--text-muted); font-size: 14px; max-width: 400px; text-align: center; }

/* ═══════════════════════════════════════════════════════════════
   REPORT PRESENTATION
   ═══════════════════════════════════════════════════════════════ */

.report { display: flex; flex-direction: column; gap: 20px; animation: fadeIn 0.35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.report-hero {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FBFF 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 30px;
  display: grid;
  grid-template-columns: 1fr minmax(220px, auto);
  gap: 28px;
  position: relative;
  overflow: hidden;
}
.report-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 100% 0%, rgba(0,174,239,.06) 0%, transparent 50%);
  pointer-events: none;
}
@media (max-width: 680px) {
  .report-hero { grid-template-columns: 1fr; }
}

.report-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--sfd-blue);
  font-weight: 600;
  margin-bottom: 6px;
}
.report-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 10px; }
.report-summary { color: var(--text-muted); font-size: 14px; margin: 0 0 14px; line-height: 1.6; }
.report-verdict {
  background: var(--sfd-cyan-light);
  border-left: 3px solid var(--sfd-blue);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  margin-top: 12px;
}
.report-verdict strong { color: var(--sfd-blue-deep); }

/* chips in hero */
.meta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.meta-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
}
.meta-chip-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-soft);
}

/* score */
.score-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  min-width: 220px;
}
.score-row { display: flex; justify-content: space-between; align-items: baseline; }
.score-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-soft);
  font-weight: 600;
}
.score-value {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.score-value small { font-size: 15px; font-weight: 500; color: var(--text-soft); }

.score-rating {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: -4px;
}

.score-explain {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  padding-top: 2px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

.score-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.score-fill { height: 100%; border-radius: 999px; transition: width 0.8s var(--ease); }

.score-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  text-align: center;
}
.score-stat .n { font-size: 18px; font-weight: 700; }
.score-stat .l {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-soft);
}

/* ── divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 4px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  font-weight: 600;
}

/* ── issue card ── */
.issue {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--r);
  padding: 16px 20px;
  transition: box-shadow 0.15s var(--ease);
}
.issue:hover { box-shadow: var(--shadow); }
.issue-critical { border-left-color: var(--red); }
.issue-major    { border-left-color: var(--amber); }
.issue-minor    { border-left-color: var(--yellow); }
.issue-info     { border-left-color: var(--sfd-blue); }
.issue-ok       { border-left-color: var(--green); }

.issue-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  line-height: 1.4;
}
.pill-critical { background: var(--red-bg);   color: var(--red); }
.pill-major    { background: var(--amber-bg); color: var(--amber); }
.pill-minor    { background: #FEFCE8;         color: var(--yellow); }
.pill-info     { background: var(--sfd-cyan-light); color: var(--sfd-blue-deep); }
.pill-ok       { background: var(--green-bg); color: var(--green); }

.reg-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--text-muted);
}

.issue-element {
  font-size: 12px;
  color: var(--text-soft);
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.issue-text { font-size: 14.5px; line-height: 1.55; margin: 0 0 8px; color: var(--text); }

.issue-citation {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.issue-rec {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px dashed var(--border);
  color: var(--sfd-blue-deep);
  font-size: 13.5px;
  line-height: 1.5;
}
.issue-rec svg { flex-shrink: 0; margin-top: 2px; color: var(--sfd-blue); }

/* ── panel ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #FCFDFE 0%, var(--surface) 100%);
}
.panel-head svg { color: var(--sfd-blue); }
.panel-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin: 0;
}
.panel-body { padding: 20px; }

.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid-2-col { grid-template-columns: 1fr; } }

/* ingredients list */
.ing-list { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.ing-list li {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--surface-alt);
}
.ing-list li:last-child { border-bottom: none; }
.ing-list .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-soft);
  min-width: 24px;
}

/* chips */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
}
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-red   { background: var(--red-bg);   color: var(--red); }
.tag-blue  { background: var(--sfd-cyan-light); color: var(--sfd-blue-deep); }
.empty-text { color: var(--text-soft); font-style: italic; font-size: 13px; }

/* nutrition table */
.nutri-table { width: 100%; font-size: 13.5px; border-collapse: collapse; }
.nutri-table td { padding: 7px 0; border-bottom: 1px solid var(--surface-alt); }
.nutri-table td:first-child { color: var(--text-muted); }
.nutri-table td:last-child { text-align: right; font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.nutri-table tr:last-child td { border-bottom: none; }

.nutri-table-2col th {
  text-align: right;
  padding: 4px 0 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
}
.nutri-table-2col th:first-child { text-align: left; }
.nutri-table-2col td:not(:first-child) {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  padding-left: 12px;
}
.nutri-table-2col td:first-child { text-align: left; color: var(--text-muted); font-family: inherit; font-weight: normal; }

/* additives */
.addv { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--surface-alt); }
.addv:last-child { border-bottom: none; }
.addv .code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: var(--text);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.addv .name { flex: 1; font-size: 14px; }
.addv .fn { font-size: 12px; color: var(--text-muted); font-style: italic; }

/* claims */
.claim {
  padding: 10px 14px;
  border-left: 3px solid var(--border-strong);
  background: var(--surface-alt);
  border-radius: 4px;
  margin-bottom: 8px;
}
.claim-allowed { border-left-color: var(--green); background: var(--green-bg); }
.claim-prohibited, .claim-misleading { border-left-color: var(--red); background: var(--red-bg); }
.claim-requires_conditions { border-left-color: var(--amber); background: var(--amber-bg); }
.claim-text {
  font-style: italic;
  font-size: 14px;
  margin-bottom: 5px;
  font-weight: 500;
}
.claim-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.claim-comment { font-size: 13px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }

/* row list */
.row-list .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--surface-alt);
  font-size: 14px;
}
.row-list .row:last-child { border-bottom: none; }
.row-label { color: var(--text-muted); }
.row-val { display: inline-flex; gap: 6px; align-items: center; font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.row-val.yes { color: var(--green); }
.row-val.no  { color: var(--text-soft); }

/* problematic phrases */
.phrase {
  padding: 12px 14px;
  background: var(--red-bg);
  border-left: 3px solid var(--red);
  border-radius: 4px;
  margin-bottom: 8px;
}
.phrase-text { font-style: italic; font-size: 14px; margin-bottom: 6px; font-weight: 500; }
.phrase-why { font-size: 13px; margin-bottom: 4px; color: var(--text); }
.phrase-sugg { font-size: 13px; color: var(--green); }
.phrase-why strong, .phrase-sugg strong { font-weight: 600; }

/* bullet list */
.ul-list { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.ul-list li {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  line-height: 1.5;
}
.ul-list li::before { content: ''; flex-shrink: 0; }
.ul-list.chev li::before {
  content: '→';
  color: var(--sfd-blue);
  font-weight: 700;
}
.ul-list.dash li::before { content: '—'; color: var(--red); }

/* OCR details */
.ocr-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.ocr-details summary {
  padding: 12px 18px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
}
.ocr-details summary:hover { color: var(--sfd-blue); }
.ocr-details pre {
  padding: 0 18px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-muted);
  margin: 0;
}

/* ── description output ── */
.desc-output {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.desc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #FCFDFE, var(--surface));
}
.desc-head-left { display: flex; gap: 14px; align-items: center; }
.desc-head-tag {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sfd-blue);
  font-weight: 600;
}
.desc-head-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
}
.desc-body {
  padding: 28px 32px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}
.desc-notes {
  margin-top: 12px;
  padding: 14px 18px;
  background: var(--sfd-cyan-light);
  border-left: 3px solid var(--sfd-blue);
  border-radius: var(--r-sm);
  display: flex;
  gap: 10px;
  font-size: 13.5px;
}
.desc-notes-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sfd-blue);
  font-weight: 700;
  margin-bottom: 3px;
}

/* copy button */
.btn-copy {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  transition: all 0.15s var(--ease);
}
.btn-copy:hover { color: var(--sfd-blue); border-color: var(--sfd-blue); }
.btn-copy.is-copied { color: var(--green); border-color: var(--green); background: var(--green-bg); }

/* ═══════════════════════════════════════════════════════════════
   CLAIMS GENERATOR
   ═══════════════════════════════════════════════════════════════ */

.claims-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.claim-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}
.claim-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sfd-blue), var(--sfd-cyan));
}

.claim-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.claim-card-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--sfd-blue);
  font-weight: 600;
  margin-bottom: 4px;
}
.claim-card-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--text);
}

.claim-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-efsa {
  background: var(--green-bg);
  color: var(--green);
}
.badge-no-efsa {
  background: var(--amber-bg);
  color: var(--amber);
}

.btn-copy-all {
  margin-bottom: 14px;
  display: inline-flex;
}

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

.claim-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #FAFCFE 0%, #F5F9FD 100%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all 0.18s var(--ease);
  align-items: start;
}
.claim-item:hover {
  border-color: var(--sfd-blue);
  box-shadow: 0 4px 14px rgba(0,87,184,.08);
}

.claim-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--sfd-blue);
  background: var(--surface);
  border: 1px solid var(--sfd-blue);
  border-radius: 4px;
  padding: 3px 7px;
  line-height: 1;
  margin-top: 2px;
}

.claim-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.claim-big {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: var(--text);
  text-transform: uppercase;
}

.claim-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.claim-type {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.claim-type.ct-efsa_health   { background: #D1FAE5; color: #065F46; }
.claim-type.ct-quantity_form { background: #DBEAFE; color: #1E40AF; }
.claim-type.ct-synergy       { background: #EDE9FE; color: #5B21B6; }
.claim-type.ct-quality       { background: #FCE7F3; color: #9D174D; }
.claim-type.ct-marketing     { background: #FFF7E6; color: #92400E; }

.claim-basis {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  font-style: italic;
}

.claim-copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px;
  cursor: pointer;
  color: var(--text-soft);
  transition: all 0.15s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.claim-copy-btn:hover {
  color: var(--sfd-blue);
  border-color: var(--sfd-blue);
  background: var(--sfd-cyan-light);
}
.claim-copy-btn.is-copied {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-bg);
}

.claim-conditions,
.claim-note {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.5;
}
.claim-conditions {
  background: var(--amber-bg);
  color: #78350F;
  border-left: 3px solid var(--amber);
}
.claim-conditions svg { color: var(--amber); flex-shrink: 0; margin-top: 2px; }
.claim-note {
  background: var(--sfd-cyan-light);
  color: var(--sfd-blue-deep);
  border-left: 3px solid var(--sfd-blue);
}
.claim-note svg { color: var(--sfd-blue); flex-shrink: 0; margin-top: 2px; }

.claim-conditions-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--amber);
}

/* legend in side card */
.claims-legend { padding: 0; list-style: none; margin: 12px 0 0; }
.claims-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-muted);
}
.claims-legend strong { color: var(--text); margin-right: 4px; font-weight: 600; }

.claim-type-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.claim-type-dot.ct-efsa_health   { background: #10B981; }
.claim-type-dot.ct-quantity_form { background: #3B82F6; }
.claim-type-dot.ct-synergy       { background: #8B5CF6; }
.claim-type-dot.ct-quality       { background: #EC4899; }
.claim-type-dot.ct-marketing     { background: #F59E0B; }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

.app-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 20px 0;
  margin-top: 40px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-tag { font-family: 'JetBrains Mono', monospace; font-size: 11px; }

/* ═══════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════ */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease);
  z-index: 100;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════ */

.login-body {
  background:
    radial-gradient(800px 500px at 10% 10%, rgba(0,87,184,.08) 0%, transparent 60%),
    radial-gradient(600px 400px at 90% 90%, rgba(0,174,239,.06) 0%, transparent 60%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.login-shell { width: 100%; max-width: 400px; }
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}
.login-card .brand { margin-bottom: 28px; }
.login-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.login-sub { color: var(--text-muted); font-size: 14px; margin: 0 0 20px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.login-error {
  padding: 10px 14px;
  background: var(--red-bg);
  border-left: 3px solid var(--red);
  border-radius: var(--r-sm);
  color: var(--red);
  font-size: 13px;
}
.login-legal {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
}
