:root {
  --pc-primary: #EE2431;
  --pc-secondary: #000000;
  --pc-accent: #EE2431;
  --pc-red: var(--pc-accent);
  /* Error text stays red regardless of tenant theme (tenant accents can be gray). */
  --pc-error: #c81e1e;
  --pc-black: var(--pc-secondary);
  --pc-white: #ffffff;
  --pc-gray-50: #f5f5f5;
  --pc-gray-100: #ececec;
  --pc-gray-300: #c7c7c7;
  --pc-gray-600: #666666;
  --pc-gray-900: #1a1a1a;
  --pc-font: Inter, Arial, sans-serif;
  --pc-font-display: "League Spartan", "Arial Narrow", Arial, sans-serif;
  --pc-font-body: "futura-pt", Futura, "Century Gothic", "Trebuchet MS", Arial, sans-serif;
}

@font-face {
  font-family: "League Spartan";
  src: url("/assets/league-spartan-variable.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--pc-font-body);
  font-weight: 400;
  background: var(--pc-gray-50);
  color: var(--pc-gray-900);
}

.pc-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.pc-brand-bar {
  background: var(--pc-white);
  border-bottom: 1px solid var(--pc-gray-100);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.pc-brand-logo {
  width: 180px;
  max-width: 50vw;
  height: auto;
}

.pc-boot-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pc-boot-loader {
  text-align: center;
  width: min(100%, 360px);
}

.pc-boot-logo-slot {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.pc-boot-logo {
  width: 180px;
  max-width: 70vw;
  height: auto;
  max-height: 72px;
  object-fit: contain;
}

.pc-boot-logo-fallback {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--pc-secondary);
}

.pc-boot-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  border: 3px solid var(--pc-gray-100);
  border-top-color: var(--pc-primary);
  border-radius: 50%;
  animation: pc-boot-spin 0.9s linear infinite;
}

.pc-boot-message {
  margin: 0;
  color: var(--pc-gray-600);
  font-size: 14px;
}

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

@media (prefers-reduced-motion: reduce) {
  .pc-boot-spinner {
    animation: none;
    border-top-color: var(--pc-gray-300);
  }
}

.pc-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 24px;
  flex: 1;
}

.pc-guide {
  background: var(--pc-secondary);
  color: var(--pc-white);
  border-radius: 12px;
  padding: 20px;
  position: sticky;
  top: 24px;
  align-self: start;
}

.pc-guide h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.pc-guide-step {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  font-size: 14px;
  opacity: 0.75;
}

.pc-guide-step.is-current { opacity: 1; font-weight: 600; }
.pc-guide-step.is-complete::before { content: '✓ '; color: var(--pc-red); }

.pc-workspace {
  background: var(--pc-white);
  border-radius: 12px;
  border: 1px solid var(--pc-gray-100);
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

.pc-progress {
  height: 6px;
  background: var(--pc-gray-100);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}

.pc-progress > span {
  display: block;
  height: 100%;
  background: var(--pc-red);
  width: 0;
  transition: width 0.2s ease;
}

.pc-title { margin: 0 0 8px; font-size: 28px; }
.pc-subtitle { margin: 0 0 24px; color: var(--pc-gray-600); }

.pc-field { margin-bottom: 16px; }
.pc-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.pc-field input,
.pc-field select,
.pc-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--pc-gray-300);
  border-radius: 8px;
  font: inherit;
  background: var(--pc-white);
}
.pc-field input:focus,
.pc-field select:focus,
.pc-field textarea:focus {
  outline: 2px solid var(--pc-red);
  border-color: var(--pc-red);
}
.pc-field.has-error input,
.pc-field.has-error select,
.pc-field.has-error textarea { border-color: var(--pc-error); border-width: 2px; background: #fff4f4; }
.pc-field.has-error label { color: var(--pc-error); }
.pc-error { color: var(--pc-error); font-size: 14px; font-weight: 700; margin-top: 6px; }
.pc-error:not([hidden])::before { content: "\26A0\FE0F  "; }
.pc-status ul { margin: 8px 0 0; padding-left: 20px; }

.pc-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.pc-btn {
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font: inherit;
  cursor: pointer;
}
.pc-btn-primary { background: var(--pc-primary); color: var(--pc-white); }
.pc-btn-secondary { background: var(--pc-white); color: var(--pc-secondary); border: 1px solid var(--pc-gray-300); }
.pc-section-title { margin: 20px 0 10px; font-size: 16px; font-weight: 600; color: var(--pc-secondary); }
.pc-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pc-checkbox { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
@media (max-width: 700px) { .pc-grid-2 { grid-template-columns: 1fr; } }
.pc-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.pc-muted { color: var(--pc-gray-600); font-size: 14px; }
.pc-status { margin-top: 16px; padding: 12px; border-radius: 8px; background: var(--pc-gray-50); }
.pc-status.error { color: var(--pc-error); background: #fff4f4; border: 1px solid #f3c2c2; font-weight: 600; }

.pc-suggestions {
  border: 1px solid var(--pc-gray-100);
  border-radius: 8px;
  max-height: 220px;
  overflow: auto;
  margin-top: 8px;
}
.pc-suggestion {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--pc-gray-100);
}
.pc-suggestion:hover { background: var(--pc-gray-50); }

@media (max-width: 900px) {
  .pc-layout { grid-template-columns: 1fr; padding: 16px; }
  .pc-guide { position: static; }
  .pc-guide.collapsed .pc-guide-step:not(.is-current) { display: none; }
}

.pc-review { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 6px 16px; margin: 0 0 8px; }
.pc-review dt { color: var(--pc-secondary); font-weight: 600; font-size: 13px; }
.pc-review dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .pc-review { grid-template-columns: 1fr; gap: 2px; }
  .pc-review dd { margin-bottom: 8px; }
}

.pc-terminal { display: flex; justify-content: center; padding: 48px 16px; }
.pc-terminal-card { max-width: 560px; width: 100%; background: var(--pc-white); border-radius: 12px; padding: 32px; text-align: center; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.pc-terminal-card .pc-boot-spinner { margin: 0 auto 16px; }

h1, h2, .pc-title, .pc-guide h2 {
  font-family: var(--pc-font-display);
  font-weight: 700;
}
h3, .pc-section-title, .pc-guide-step, .pc-boot-logo-fallback {
  font-family: var(--pc-font-display);
  font-weight: 600;
}
.pc-field label,
.pc-review dt,
.pc-error,
.pc-status.error {
  font-family: var(--pc-font-body);
  font-weight: 700;
}
.pc-field input,
.pc-field select,
.pc-field textarea,
.pc-subtitle,
.pc-muted,
.pc-boot-message,
.pc-btn {
  font-family: var(--pc-font-body);
  font-weight: 400;
}
.pc-btn-primary {
  font-family: var(--pc-font-display);
  font-weight: 700;
}
