@font-face {
  font-family: "STIHLText";
  src: url("/static/fonts/STIHLContrafaceText.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "STIHLText";
  src: url("/static/fonts/STIHLContrafaceTextDemi.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "STIHLText";
  src: url("/static/fonts/STIHLContrafaceText-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "STIHLDisplayTitling";
  src: url("/static/fonts/STIHLContrafaceDisplayTitling.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; }

:root {
  font-family: "STIHLText", Arial, sans-serif;
  color: #181818;
  background: #f4f5f6;
  /* Az oldal csak világos témát támogat; enélkül a böngésző natív
     sötét-mód stílusa (Windows sötét mód) szürkére színezi a form
     mezők (input/select/textarea) szövegét a saját CSS-ünk ellenére. */
  color-scheme: light;
}

body { margin: 0; background: #f4f5f6; }

button, input, textarea, select { font-family: "STIHLText", Arial, sans-serif; }
select { color: #181818; background: #fff; }

.shell { max-width: 1240px; margin: 0 auto; padding: 32px; }

.topbar {
  display: flex;
  background: #1f2327;
  color: #fff;
  margin: -32px -32px 24px;
  padding: 14px 32px;
  min-height: 82px;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}

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

h1 { margin-bottom: 0; font-family: "STIHLDisplayTitling", "STIHLText", Arial, sans-serif; font-size: 22px; letter-spacing: .35px; }
.brand { display:flex; align-items:center; gap:16px; min-width:0; }
.brand-logo { display:block; width:94px; height:auto; object-fit:contain; flex-shrink:0; }
.brand-copy { min-width:0; padding-left:16px; border-left:1px solid #656b70; }
.brand-version { display:block; margin-top:5px; color:#b9bec3; font-size:10px; letter-spacing:.45px; }
h2 { max-width: 760px; font-size: clamp(28px, 4vw, 48px); line-height: 1.05; }
h3 { margin-bottom: 18px; }

.eyebrow, .section-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #f36f21;
  margin-bottom: 8px;
}

.status-group { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.status, .badge {
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
}

.pending { background: #eceff1; color: #546e7a; }
.badge { background: #fff3e0; color: #f36f21; }

.panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 32px rgba(0,0,0,.04);
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 20px;
}

.lookup-form label { display: block; font-weight: 800; margin-bottom: 8px; }
.input-row { display: flex; gap: 10px; }
input {
  flex: 1;
  min-width: 0;
  border: 1px solid #ccd1d6;
  border-radius: 12px;
  padding: 14px 16px;
  outline: none;
  color: #181818;
  background: #fff;
}
input:focus { border-color: #f36f21; box-shadow: 0 0 0 3px rgba(230,81,0,.10); }

button {
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 800;
  cursor: pointer;
  background: #f36f21;
  color: #fff;
}
button:disabled { opacity: .45; cursor: not-allowed; }
button.secondary { background: #f1f3f4; color: #222; }

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

.wide { grid-column: 1 / -1; }

.segmented { display: flex; gap: 8px; flex-wrap: wrap; }
.segment { background: #f1f3f4; color: #555; }
.segment.active { background: #202124; color: #fff; }

.muted { color: #687076; }
.small { font-size: 13px; margin-bottom: 0; margin-top: 16px; }

.source-list { display: grid; gap: 10px; }
.source-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f0f1f2;
}
.source-list div:last-child { border-bottom: 0; }
.source-list strong { font-size: 12px; color: #6b7280; }

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.empty-state {
  padding: 32px;
  border: 1px dashed #cfd4d8;
  border-radius: 14px;
  color: #7b8388;
  text-align: center;
  background: #fafbfb;
}

.product-card {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 16px;
  padding: 18px;
  border-radius: 14px;
  background: #fafafa;
}
.product-card p { margin-bottom: 4px; font-size: 12px; }

.hidden { display: none; }

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}
.content-grid label { font-weight: 800; font-size: 13px; }
textarea {
  width: 100%;
  min-height: 120px;
  margin-top: 8px;
  border: 1px solid #d9dde1;
  border-radius: 12px;
  padding: 12px;
  resize: vertical;
  background: #fafafa;
  color: #181818;
}

@media (max-width: 820px) {
  .shell { padding: 18px; }
  .topbar, .hero { display: block; }
  .status-group { justify-content: flex-start; margin-top: 16px; }
  .lookup-form { margin-top: 24px; }
  .grid, .content-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .input-row { flex-direction: column; }
  .product-card { grid-template-columns: 1fr; }
}
.ok { background: #e8f5e9; color: #2e7d32; }

.ssc-result {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.result-block {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  background: #fafafa;
}

.result-block summary {
  cursor: pointer;
  font-weight: 700;
}

.compatibility-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compatibility-chip {
  display: grid;
  gap: 3px;
  min-width: 220px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #e4e6e8;
  border-radius: 12px;
  background: #fff;
}

.compatibility-chip strong {
  font-size: 14px;
}

.compatibility-chip span {
  color: #72777d;
  font-size: 11px;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 420px;
  overflow: auto;
  margin: 12px 0 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.user-menu span:not(#appUserAvatar) {
  color: #40484e;
}

.user-menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.login-page {
  position: fixed;
  inset: 0;
  z-index: 199999;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #eceeef;
  padding: 24px;
  overflow: auto;
}

.login-page.hidden {
  display: none;
}

.login-wrap {
  width: 100%;
  max-width: 520px;
}

.login-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #dfe2e5;
  box-shadow: 0 18px 50px rgba(0,0,0,.14);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #1f2327;
  color: #fff;
  padding: 22px 26px;
}

.login-brand img {
  width: 110px;
  height: auto;
}

.login-brand > div {
  padding-left: 18px;
  border-left: 1px solid #656b70;
}

.login-title {
  font-family: "STIHLDisplayTitling", "STIHLText", Arial, sans-serif;
  font-size: 24px;
  line-height: .96;
  letter-spacing: .5px;
}

.login-brand span {
  display: block;
  margin-top: 7px;
  color: #b9bec3;
  font-size: 10px;
  letter-spacing: .5px;
}

.login-body {
  padding: 28px;
}

.login-body h2 {
  font-size: 26px;
  margin-bottom: 10px;
}

.login-body p {
  color: #666d72;
  line-height: 1.5;
}

.google-login-button {
  display: block;
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #f36f21;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}

.login-note {
  margin-top: 14px;
  color: #7a8085;
  font-size: 12px;
  text-align: center;
}

.login-error {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff0ee;
  color: #9a2c20;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 820px) {
  .header-right {
    margin-top: 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .user-menu {
    justify-content: flex-start;
  }
}


/* SSC kapcsolatvédő */
.ssc-connection-guard {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(244, 245, 246, .96);
  backdrop-filter: blur(3px);
}

.ssc-connection-guard.hidden {
  display: none;
}

.ssc-connection-guard-card {
  width: min(560px, 100%);
  padding: 34px;
  border: 1px solid #d9dde1;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .12);
  text-align: center;
}

.ssc-connection-guard-card h2 {
  margin: 14px auto 10px;
  font-size: 28px;
}

.ssc-connection-guard-card p {
  margin-bottom: 0;
  color: #687076;
  line-height: 1.5;
}

.ssc-guard-spinner,
.ai-generate-spinner {
  display: inline-block;
  border-radius: 50%;
  border: 3px solid #d9dde1;
  border-top-color: #f36f21;
  animation: wsa-spin .8s linear infinite;
}

.ssc-guard-spinner {
  width: 34px;
  height: 34px;
}

.ai-generate-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.ai-generate-spinner.hidden {
  display: none;
}

.ai-generate-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

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