/*
 * eshop.cz Market intelligence portal — the only stylesheet.
 * Light theme from the eshop.cz public palette. Every rule is scoped under
 * .portal-body and tokens live on .portal-body (never :root).
 */

.portal-body {
  --p-page: #f7f7f9;
  --p-surface: #ffffff;
  --p-fg: #242136;
  --p-muted: #686572;
  --p-faint: #767280;
  --p-line: #e3e2e7;
  --p-accent: #ff6b5e;
  --p-accent-hover: #f0645a;
  --p-accent-fg: #201d31;
  --p-link: #c83e32;
  --p-accent-tint: #fff3f1;
  --p-input-line: #d0d5dd;
  --p-error: #b42318;
  --p-radius: 12px;
  --p-radius-sm: 8px;
  --p-shadow: 0 1px 2px rgb(16 24 40 / .04), 0 1px 3px rgb(16 24 40 / .06);
  --p-focus: 0 0 0 3px rgb(255 107 94 / .35);
  --p-font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --p-font-heading: "Sora", "Geist", system-ui, sans-serif;

  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--p-page);
  color: var(--p-fg);
  color-scheme: light;
  font-family: var(--p-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.portal-body *,
.portal-body *::before,
.portal-body *::after {
  box-sizing: border-box;
}

/* Typography */
.portal-body h1,
.portal-body h2,
.portal-body h3 {
  font-family: var(--p-font-heading);
  color: var(--p-fg);
  margin: 0 0 12px;
  line-height: 1.25;
}

.portal-body h1 {
  font-size: clamp(28px, 3.2vw, 32px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.portal-body h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.portal-body h3 {
  font-size: 17px;
  font-weight: 500;
}

.portal-body p {
  margin: 0 0 12px;
}

.portal-body a {
  color: var(--p-link);
  text-decoration: none;
}

.portal-body a:hover {
  text-decoration: underline;
}

.portal-body a:focus-visible,
.portal-body button:focus-visible,
.portal-body summary:focus-visible,
.portal-body input:focus-visible {
  outline: none;
  box-shadow: var(--p-focus);
  border-radius: var(--p-radius-sm);
}

.portal-body .p-muted {
  color: var(--p-muted);
}

.portal-body .p-faint {
  color: var(--p-faint);
}

.portal-body .p-icon {
  flex: none;
  vertical-align: middle;
}

.portal-body .p-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */
.portal-body .portal-header {
  background: var(--p-surface);
  border-bottom: 1px solid var(--p-line);
}

.portal-body .portal-header__inner {
  max-width: 960px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.portal-body .portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--p-fg);
  text-decoration: none;
}

.portal-body .portal-brand:hover {
  text-decoration: none;
}

.portal-body .portal-wordmark {
  font-family: var(--p-font-heading);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.portal-body .portal-pill {
  padding: 2px 10px;
  border: 1px solid var(--p-line);
  border-radius: 999px;
  background: var(--p-page);
  color: var(--p-muted);
  font-size: 13px;
  font-weight: 500;
}

.portal-body .portal-account {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.portal-body .portal-account__merchant {
  color: var(--p-muted);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-body .portal-logout {
  margin: 0;
}

.portal-body .portal-textbutton {
  padding: 6px 4px;
  border: 0;
  background: none;
  color: var(--p-link);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.portal-body .portal-textbutton:hover {
  text-decoration: underline;
}

/* Main column */
.portal-body .portal-main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.portal-body .portal-main > * + * {
  margin-top: 24px;
}

/* Flash */
.portal-body .portal-alert,
.portal-body .portal-notice {
  padding: 12px 16px;
  border-radius: var(--p-radius-sm);
  font-size: 15px;
}

.portal-body .portal-alert {
  background: #fdecea;
  border: 1px solid #f6c7c1;
  color: var(--p-error);
}

.portal-body .portal-notice {
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  border-left: 4px solid var(--p-accent);
  color: var(--p-fg);
}

/* Footer */
.portal-body .portal-footer {
  border-top: 1px solid var(--p-line);
  background: var(--p-surface);
  color: var(--p-muted);
  font-size: 13px;
}

.portal-body .portal-footer__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

/* Cards */
.portal-body .p-card {
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow);
  padding: 28px;
}

.portal-body .p-card--flush {
  padding: 0;
  overflow: hidden;
}

.portal-body .p-section > h2 {
  margin-bottom: 16px;
}

.portal-body .p-caption {
  margin: 10px 0 0;
  color: var(--p-faint);
  font-size: 14px;
}

.portal-body .p-breadcrumb {
  margin: 0;
  font-size: 15px;
}

/* Hero */
.portal-body .p-hero {
  border-top: 4px solid var(--p-accent);
  padding: 32px;
}

.portal-body .p-eyebrow {
  margin: 0 0 10px;
  color: var(--p-muted);
  font-size: 14px;
  font-weight: 500;
}

.portal-body .p-lead {
  margin: 0;
  font-size: 17px;
  color: var(--p-fg);
}

.portal-body .p-hero .p-muted {
  margin: 0;
}

/* Stats */
.portal-body .p-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.portal-body .p-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 20px 24px;
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow);
}

.portal-body .p-stat__value {
  font-family: var(--p-font-heading);
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.portal-body .p-stat__label {
  color: var(--p-muted);
  font-size: 14px;
}

/* Findings */
.portal-body .p-findings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.portal-body .p-finding {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 24px;
}

.portal-body .p-finding__number {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--p-accent-tint);
  color: var(--p-link);
  font-family: var(--p-font-heading);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-body .p-finding__title {
  margin: 2px 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.portal-body .p-finding__body {
  margin: 0;
  color: var(--p-muted);
}

/* Actions */
.portal-body .p-actions {
  display: grid;
  gap: 12px;
}

.portal-body .p-action {
  padding: 20px 24px;
}

.portal-body .p-action__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.portal-body .p-action__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.portal-body .p-action__price {
  margin: 0 0 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.portal-body .p-action__reason,
.portal-body .p-action__next {
  margin: 0 0 6px;
}

.portal-body .p-action__uncertainty {
  margin: 0 0 8px;
  color: var(--p-faint);
  font-size: 14px;
}

.portal-body .p-action__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.portal-body .p-external--plain {
  color: var(--p-muted);
}

/* Chips */
.portal-body .p-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.portal-body .p-chip--lower {
  background: #fdecea;
  color: #b42318;
}

.portal-body .p-chip--raise {
  background: #e7f6ec;
  color: #1e7a3c;
}

.portal-body .p-chip--verify {
  background: #fff4e0;
  color: #9a5b00;
}

/* Tables */
.portal-body .p-table-wrap {
  overflow-x: auto;
}

.portal-body .p-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.portal-body .p-table th,
.portal-body .p-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--p-line);
  vertical-align: top;
}

.portal-body .p-table thead th {
  background: var(--p-page);
  color: var(--p-muted);
  font-size: 13px;
  font-weight: 500;
}

.portal-body .p-table tbody th {
  font-weight: 500;
}

.portal-body .p-table tbody tr:nth-child(even) {
  background: #fbfbfc;
}

.portal-body .p-table tbody tr:last-child th,
.portal-body .p-table tbody tr:last-child td {
  border-bottom: 0;
}

.portal-body .p-table .p-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.portal-body .p-nowrap {
  white-space: nowrap;
}

/* Details */
.portal-body .p-details summary {
  cursor: pointer;
  font-family: var(--p-font-heading);
  font-weight: 600;
  font-size: 17px;
}

.portal-body .p-notes {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--p-muted);
}

/* PDF */
.portal-body .p-pdf__frame {
  display: block;
  width: 100%;
  height: 70vh;
  border: 0;
}

.portal-body .p-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

/* Buttons */
.portal-body .p-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--p-accent);
  border-radius: var(--p-radius-sm);
  background: var(--p-accent);
  color: var(--p-accent-fg);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}

.portal-body .p-button:hover {
  background: var(--p-accent-hover);
  border-color: var(--p-accent-hover);
  text-decoration: none;
}

.portal-body .p-button:focus-visible {
  outline: none;
  box-shadow: var(--p-focus);
}

.portal-body .p-button--lg {
  height: 52px;
  padding: 0 28px;
  font-size: 16px;
}

.portal-body .p-button--block {
  width: 100%;
}

.portal-body .p-button--secondary {
  background: var(--p-surface);
  border-color: var(--p-input-line);
  color: var(--p-fg);
}

.portal-body .p-button--secondary:hover {
  background: var(--p-page);
  border-color: var(--p-input-line);
}

.portal-body .p-button--google {
  background: #ffffff;
  border-color: #dadce0;
  color: #3c4043;
  font-weight: 500;
}

.portal-body .p-button--google:hover {
  background: #f8f9fa;
  border-color: #d2e3fc;
}

.portal-body .p-google-form {
  margin: 0;
}

/* Locked placeholders (decorative only, never real data) */
.portal-body .p-locked-list {
  display: grid;
  gap: 12px;
}

.portal-body .p-locked {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 22px 24px;
  background: linear-gradient(180deg, #ffffff, #fbfbfc);
}

.portal-body .p-locked__bar {
  display: block;
  height: 10px;
  width: 78%;
  border-radius: 999px;
  background: var(--p-line);
}

.portal-body .p-locked__bar--title {
  width: 52%;
  height: 14px;
}

.portal-body .p-locked__bar--short {
  width: 40%;
}

.portal-body .p-locked__icon {
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  color: var(--p-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-body .p-hidden-summary {
  margin: 14px 0 0;
  color: var(--p-muted);
  font-weight: 500;
  text-align: center;
}

/* CTA band */
.portal-body .p-cta-band {
  padding: 32px;
  border-radius: var(--p-radius);
  background: var(--p-accent-tint);
  border: 1px solid #fbdcd7;
  text-align: center;
}

.portal-body .p-cta-band p {
  max-width: 560px;
  margin: 0 auto 20px;
  color: var(--p-fg);
}

.portal-body .p-cta-band .p-cta-band__secondary {
  margin: 14px auto 0;
  font-size: 15px;
}

/* Centered cards (forms, errors) */
.portal-body .p-form-card,
.portal-body .p-center-card {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.portal-body .p-center-card {
  text-align: center;
}

.portal-body .p-center-card h1 {
  font-size: 24px;
}

.portal-body .p-empty {
  text-align: center;
  padding: 40px 28px;
}

.portal-body .p-empty h1 {
  font-size: 24px;
}

.portal-body .p-subtitle {
  margin: -4px 0 20px;
  color: var(--p-muted);
}

.portal-body .p-benefits {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.portal-body .p-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-body .p-benefits .p-icon {
  color: #1e7a3c;
}

/* Forms */
.portal-body .p-form {
  display: grid;
  gap: 16px;
}

.portal-body .p-field {
  display: grid;
  gap: 6px;
}

.portal-body .p-field label {
  font-size: 14px;
  font-weight: 500;
}

.portal-body .p-field input {
  height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--p-input-line);
  border-radius: var(--p-radius-sm);
  background: #ffffff;
  color: var(--p-fg);
  font: inherit;
}

.portal-body .p-field input:focus,
.portal-body .p-field input:focus-visible {
  outline: none;
  border-color: var(--p-accent);
  box-shadow: var(--p-focus);
}

.portal-body .p-hint {
  color: var(--p-faint);
  font-size: 13px;
}

.portal-body .p-form-errors {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid #f6c7c1;
  border-radius: var(--p-radius-sm);
  background: #fdecea;
  color: var(--p-error);
  font-size: 14px;
}

.portal-body .p-form-errors ul {
  margin: 0;
  padding-left: 18px;
}

.portal-body .p-form-note {
  margin: 20px 0 0;
  color: var(--p-muted);
  font-size: 14px;
  text-align: center;
}

.portal-body .p-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--p-faint);
  font-size: 13px;
}

.portal-body .p-divider::before,
.portal-body .p-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--p-line);
}

/* Responsive */
@media (max-width: 640px) {
  .portal-body .portal-main {
    padding: 20px 16px 36px;
  }

  .portal-body .p-card,
  .portal-body .p-hero,
  .portal-body .p-cta-band {
    padding: 20px;
  }

  .portal-body .p-stats {
    grid-template-columns: 1fr;
  }

  .portal-body .p-button--lg {
    width: 100%;
  }

  .portal-body .portal-account__merchant {
    display: none;
  }

  .portal-body .p-locked__icon {
    right: 16px;
  }
}

/* Print */
@media print {
  .portal-body {
    background: #ffffff;
  }

  .portal-body .portal-account,
  .portal-body .p-button,
  .portal-body .p-button-row,
  .portal-body .p-cta-band,
  .portal-body .p-pdf,
  .portal-body .portal-notice {
    display: none;
  }

  .portal-body .p-card,
  .portal-body .p-stat {
    box-shadow: none;
    break-inside: avoid;
  }
}
