/* Festo Center at Power/mation — dual-brand design system
   Power/mation owns the frame (header, footer, commit actions).
   Festo owns the content workspace (BOM, cross-sell, product data).
   See design-package/03-dual-brand-system.md for the source rules. */

:root {
  /* Frame (Power/mation) */
  --pm-red: #CA1C27;
  --pm-red-hover: #212121;
  --pm-black: #212121;
  --pm-body: #616161;
  --pm-bg-section: #F7F7F7;
  --pm-border: #E5E8EB;
  --pm-footer-link: #BDBDBD;

  /* Content (Festo) */
  --festo-blue: #0091DC;
  --festo-blue-hover: #0587CB;
  --festo-blue-tint: #77C8FC;
  --festo-text: #333333;
  --festo-text-muted: #6B757D;
  --festo-text-faint: #8A949C;
  --festo-gray-btn: #D8DCE1;
  --festo-gray-btn-hover: #C7CDD4;
  --festo-bg: #F2F3F5;
  --festo-hairline: #E5E8EB;
  --festo-hairline-soft: #EEF1F3;
  --festo-charcoal: #263038;
  --festo-radius: 4px;

  /* Functional (shared) */
  --ok: #3F8964;
  --ok-bg: #E3F1EA;
  --warn: #FF9600;
  --warn-text: #B26A00;
  --warn-bg: #FFF6E9;
  --warn-bg-soft: #FFFBF3;
  --warn-border: #FFE1B0;
  --error: #D50000;
  --error-bg: #FDF2F2;
  --error-bg-chip: #FBE0E0;
  --new-bg: #E3F2FB;
  --new-fg: #0587CB;
  --review-bg: #FFF0D6;
  --review-fg: #B26A00;
  --quoted-bg: #E7EBEE;
  --quoted-fg: #4A5860;
  --sg-bg: #F0EAF7;
  --sg-fg: #6A4A8A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  color: var(--festo-text);
  background: #E7E9EB;
}

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

.page-shell {
  max-width: 1440px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
}

/* ---------- Power/mation frame: header ---------- */

.pm-header {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--festo-hairline);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 28px;
}

.pm-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pm-logo-mark {
  width: 22px;
  height: 22px;
  border: 2px solid var(--pm-black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pm-logo-mark::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pm-red);
}

.pm-wordmark {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
  color: var(--pm-black);
}

.pm-wordmark .slash { color: var(--pm-red); }

.pm-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pm-black);
  letter-spacing: .25px;
}

.pm-nav .accent { color: var(--pm-red); }

.pm-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.pm-shop-btn {
  height: 56px;
  background: var(--pm-red);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

/* ---------- Breadcrumb (slash motif) ---------- */

.pm-breadcrumb {
  height: 44px;
  background: var(--pm-bg-section);
  border-bottom: 1px solid var(--festo-hairline);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 10px;
  font-size: 13px;
  color: var(--pm-body);
}

.pm-breadcrumb .crumb { color: var(--pm-black); font-weight: 500; }
.pm-breadcrumb .slash { color: var(--pm-red); font-weight: 700; font-style: italic; }

/* ---------- Festo context band ---------- */

.festo-band {
  background: var(--festo-charcoal);
  padding: 26px 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

.festo-band-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.festo-band-title h1 {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.intake-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 3px;
  letter-spacing: .3px;
}

.intake-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--festo-blue-tint); }

.festo-band-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #A3B2BC;
  font-size: 13px;
  margin-top: 8px;
}

.festo-band-meta .sep { color: #41505A; }

.festo-wordmark {
  color: var(--festo-blue);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: .5px;
}

/* ---------- Footer ---------- */

.pm-footer {
  background: var(--pm-black);
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pm-footer-copy { color: var(--pm-footer-link); font-size: 12px; }
.pm-footer-links { display: flex; gap: 22px; font-size: 12px; color: var(--pm-footer-link); }

/* ---------- Buttons (three roles) ---------- */

.btn { font-family: inherit; border: none; cursor: pointer; }

.btn-commit {
  background: var(--pm-red);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 15px 0;
  letter-spacing: .3px;
  border-radius: 0;
}
.btn-commit:hover { background: var(--pm-red-hover); }

.btn-primary {
  background: var(--festo-blue);
  color: #fff;
  border-radius: var(--festo-radius);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
}
.btn-primary:hover { background: var(--festo-blue-hover); }

.btn-quiet {
  background: var(--festo-gray-btn);
  color: var(--festo-text);
  border-radius: var(--festo-radius);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
}
.btn-quiet:hover { background: var(--festo-gray-btn-hover); }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid #4A5860;
  border-radius: var(--festo-radius);
  font-size: 15px;
  font-weight: 500;
  padding: 15px 26px;
}

/* ---------- Workspace layout ---------- */

.review-body { display: flex; align-items: flex-start; }
.workspace { flex: 1; padding: 28px 32px; display: flex; flex-direction: column; gap: 28px; min-width: 0; }

.workspace-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.workspace-section-head h2 { font-size: 16px; font-weight: 700; color: var(--festo-text); margin: 0; }
.workspace-section-head .count { color: var(--festo-text-faint); font-weight: 400; }
.workspace-actions { display: flex; gap: 8px; }

/* ---------- BOM table (desktop) ---------- */

.bom-table {
  border: 1px solid var(--festo-hairline);
  border-radius: var(--festo-radius);
  overflow: hidden;
}

.bom-grid {
  display: grid;
  grid-template-columns: 34px 2.4fr 52px 48px 92px 92px 96px;
}

.bom-head {
  background: var(--festo-bg);
  border-bottom: 1px solid var(--festo-hairline);
  font-size: 11px;
  font-weight: 700;
  color: var(--festo-text-muted);
  letter-spacing: .4px;
  text-transform: uppercase;
}
.bom-head > div { padding: 11px 8px; }
.bom-head .num, .bom-head .r { text-align: right; }
.bom-head .lock { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }

.bom-row {
  border-bottom: 1px solid var(--festo-hairline-soft);
  border-left: 3px solid transparent;
  align-items: center;
  background: #fff;
}
.bom-row--sg { border-left-color: var(--festo-blue); }
.bom-row--warn { border-left-color: var(--warn); background: var(--warn-bg-soft); }
.bom-row--error { border-left-color: var(--error); background: var(--error-bg); }

.bom-row > div { padding: 12px 8px; font-size: 13px; }
.bom-row .n { color: var(--festo-text-faint); }
.bom-row .main { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; padding-bottom: 10px; }
.bom-row .code-line { display: flex; align-items: center; gap: 8px; }
.bom-row .code { font-weight: 500; font-family: 'Roboto Mono', ui-monospace, monospace; }
.bom-row .desc { font-size: 12px; color: var(--festo-text-muted); }
.bom-row .qty { text-align: right; }
.bom-row .uom { font-size: 12px; color: var(--festo-text-muted); }
.bom-row .num-r { text-align: right; }
.bom-row .sell { font-weight: 500; }
.bom-row--error .code { color: var(--error); }

.chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 2px 7px;
  border-radius: 3px;
}
.chip--sg { background: var(--new-bg); color: var(--new-fg); }
.chip--warn { background: var(--review-bg); color: var(--review-fg); }
.chip--error { background: var(--error-bg-chip); color: var(--error); }

.bom-legend {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--festo-text-muted);
  padding-left: 2px;
}
.bom-legend .swatch { display: inline-flex; align-items: center; gap: 6px; }
.bom-legend .swatch::before {
  content: '';
  width: 10px; height: 10px; border-radius: 2px;
}
.bom-legend .swatch--warn::before { background: var(--warn); }
.bom-legend .swatch--sg::before { background: var(--festo-blue); }

/* ---------- Cross-sell strip ---------- */

.cross-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.cross-card {
  border: 1px solid var(--festo-hairline);
  border-radius: var(--festo-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cross-card .shot {
  height: 88px;
  background: var(--festo-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--festo-hairline);
  font-family: 'Roboto Mono', ui-monospace, monospace;
  font-size: 10px;
  color: #A3B2BC;
}
.cross-card .body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cross-card .code { font-family: 'Roboto Mono', ui-monospace, monospace; font-size: 11px; font-weight: 500; }
.cross-card .name { font-size: 12px; font-weight: 500; }
.cross-card .why { font-size: 11px; color: var(--festo-text-muted); line-height: 1.4; flex: 1; }
.cross-card .btn-primary { margin-top: 4px; padding: 7px 0; text-align: center; width: 100%; }

/* ---------- Solutions Group panel ---------- */

.sg-panel {
  border: 1px solid var(--festo-hairline);
  border-left: 3px solid var(--festo-blue);
  border-radius: var(--festo-radius);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #F7FBFE;
}
.sg-icon {
  width: 34px; height: 34px;
  border-radius: var(--festo-radius);
  background: var(--festo-blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sg-icon::after { content: ''; width: 16px; height: 16px; border: 2px solid #fff; border-radius: 2px; }
.sg-text { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.sg-text .title { font-size: 14px; font-weight: 700; }
.sg-text .body { font-size: 13px; color: var(--festo-text-muted); line-height: 1.5; }
.sg-panel .btn-primary { align-self: center; padding: 10px 16px; white-space: nowrap; }

/* ---------- Totals rail ---------- */

.totals-rail {
  width: 312px;
  flex-shrink: 0;
  border-left: 1px solid var(--festo-hairline);
  background: var(--pm-bg-section);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: stretch;
}
.totals-rail .label { font-size: 12px; font-weight: 700; color: var(--festo-text-muted); letter-spacing: .5px; text-transform: uppercase; }
.totals-rail .line { display: flex; justify-content: space-between; font-size: 14px; }
.totals-rail .line.small { font-size: 13px; color: var(--festo-text-muted); }
.totals-rail .margin-val { font-weight: 700; color: var(--ok); }
.totals-rail .hr { height: 1px; background: var(--festo-hairline); }
.totals-rail .lock-label { display: inline-flex; align-items: center; gap: 5px; }
.totals-rail .warn-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--warn-text);
  background: var(--warn-bg); border: 1px solid var(--warn-border);
  border-radius: var(--festo-radius); padding: 8px 10px;
}
.totals-rail .warn-note::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex-shrink: 0; }
.totals-rail .fine-print { font-size: 11px; color: var(--festo-text-faint); line-height: 1.5; }

/* ---------- Dashboard ---------- */

.dash-toolbar { display: flex; align-items: flex-end; justify-content: space-between; }
.dash-title { font-size: 22px; font-weight: 700; color: var(--pm-black); margin: 0; }
.dash-subtitle { font-size: 13px; color: var(--pm-body); }
.dash-new-btn { padding: 12px 22px; font-size: 14px; }

.dash-filters { display: flex; gap: 10px; align-items: center; }
.filter-pills {
  display: flex; border: 1px solid var(--festo-hairline); border-radius: var(--festo-radius); overflow: hidden;
}
.filter-pills span {
  padding: 8px 14px; font-size: 13px; color: var(--festo-text);
  border-left: 1px solid var(--festo-hairline);
}
.filter-pills span:first-child { border-left: none; }
.filter-pills span.active { background: var(--festo-blue); color: #fff; font-weight: 500; }
.filter-dropdowns { margin-left: auto; display: flex; gap: 8px; }
.filter-dropdowns span {
  padding: 8px 14px; font-size: 13px; color: var(--pm-body);
  border: 1px solid var(--festo-hairline); border-radius: var(--festo-radius);
}

.dash-table { border: 1px solid var(--festo-hairline); border-radius: var(--festo-radius); overflow: hidden; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1.4fr 150px 90px 90px 70px 130px; }
.dash-head {
  background: var(--festo-bg); border-bottom: 1px solid var(--festo-hairline);
  font-size: 11px; font-weight: 700; color: var(--festo-text-muted); letter-spacing: .4px; text-transform: uppercase;
}
.dash-head > div { padding: 11px 8px; }
.dash-head .r { text-align: right; }
.dash-head .lock { display: flex; justify-content: flex-end; gap: 4px; }

.dash-row { border-bottom: 1px solid var(--festo-hairline-soft); align-items: center; cursor: pointer; background: #fff; }
.dash-row:hover { background: var(--pm-bg-section); }
.dash-row > div { padding: 14px 8px; font-size: 13px; }
.dash-row .cust { font-size: 14px; font-weight: 500; color: var(--festo-text); padding-left: 14px; }
.dash-row .proj { color: var(--festo-blue); }
.dash-row .intake { font-size: 12px; color: var(--festo-text-muted); display: flex; align-items: center; gap: 6px; }
.dash-row .intake .dot { width: 7px; height: 7px; border-radius: 50%; }
.dash-row .val { text-align: right; font-weight: 500; }
.dash-row .margin { text-align: right; color: var(--festo-text-muted); }
.dash-row .age { font-size: 12px; color: var(--festo-text-faint); }

.status { font-size: 11px; font-weight: 700; letter-spacing: .3px; padding: 4px 10px; border-radius: 3px; display: inline-block; }
.status--new { background: var(--new-bg); color: var(--new-fg); }
.status--review { background: var(--review-bg); color: var(--review-fg); }
.status--quoted { background: var(--quoted-bg); color: var(--quoted-fg); }
.status--ordered { background: var(--ok-bg); color: var(--ok); }
.status--awaiting-sg { background: var(--sg-bg); color: var(--sg-fg); }
.status--error { background: var(--error-bg-chip); color: var(--error); }

.dash-content { padding: 28px 32px; display: flex; flex-direction: column; gap: 22px; }

/* ---------- Landing page ---------- */

.landing-hero {
  background: var(--festo-charcoal);
  padding: 64px 72px;
  display: flex;
  align-items: center;
  gap: 56px;
  position: relative;
}
.landing-hero .copy { flex: 1; display: flex; flex-direction: column; gap: 22px; }
.landing-hero .eyebrow { color: var(--festo-blue-tint); font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.landing-hero h1 { color: #fff; font-size: 46px; font-weight: 900; line-height: 1.05; letter-spacing: -.5px; margin: 0; }
.landing-hero .sub { color: #A3B2BC; font-size: 17px; line-height: 1.6; max-width: 560px; }
.landing-hero .cta-row { display: flex; gap: 14px; margin-top: 8px; }
.landing-hero .cta-row .btn-commit { padding: 15px 28px; }
.landing-hero .shot {
  width: 440px; height: 300px; background: #1E272E; border: 1px solid #38444C;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-family: 'Roboto Mono', ui-monospace, monospace; font-size: 12px; color: #556069;
}
.landing-hero .festo-wordmark { position: absolute; top: 26px; right: 72px; }

.landing-hiw { padding: 56px 72px; display: flex; flex-direction: column; gap: 36px; }
.landing-hiw-head { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.landing-hiw-head h2 { font-size: 28px; font-weight: 700; color: var(--pm-black); margin: 0; }
.landing-hiw-head p { font-size: 15px; color: var(--pm-body); margin: 0; }

.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { border: 1px solid var(--festo-hairline); border-radius: var(--festo-radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.step-card .head { display: flex; align-items: center; gap: 12px; }
.step-card .num { font-size: 34px; font-weight: 900; color: var(--festo-blue); line-height: 1; }
.step-card .rule { width: 1px; height: 30px; background: var(--festo-hairline); }
.step-card .title { font-size: 18px; font-weight: 700; }
.step-card p { font-size: 14px; color: var(--pm-body); line-height: 1.6; margin: 0; }

.landing-cta-band {
  background: var(--pm-bg-section);
  border-top: 3px solid var(--pm-red);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-cta-band h3 { font-size: 20px; font-weight: 700; color: var(--pm-black); margin: 0; }
.landing-cta-band p { font-size: 14px; color: var(--pm-body); margin: 4px 0 0; }
.landing-cta-band .btn-commit { padding: 15px 28px; }

/* ---------- Responsive: mobile sales review ---------- */

.bom-mobile { display: none; }

@media (max-width: 900px) {
  .review-body { flex-direction: column; }
  .totals-rail { width: 100%; border-left: none; border-top: 1px solid var(--festo-hairline); position: sticky; bottom: 0; }
  .cross-grid { grid-template-columns: repeat(2, 1fr); }
  .pm-nav { display: none; }
  .landing-hero { flex-direction: column; padding: 40px 24px; }
  .landing-hero .shot { width: 100%; height: 220px; }
  .step-grid { grid-template-columns: 1fr; }
  .landing-cta-band { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 640px) {
  .bom-desktop { display: none; }
  .bom-mobile { display: flex; flex-direction: column; gap: 3px; }

  .bom-mobile .row {
    border-left: 3px solid transparent;
    padding: 11px 12px;
    border-bottom: 1px solid var(--festo-hairline-soft);
    display: flex; flex-direction: column; gap: 3px;
    background: #fff;
  }
  .bom-mobile .row--sg { border-left-color: var(--festo-blue); }
  .bom-mobile .row--warn { border-left-color: var(--warn); background: var(--warn-bg-soft); }
  .bom-mobile .row--error { border-left-color: var(--error); background: var(--error-bg); }
  .bom-mobile .code-line { display: flex; align-items: center; gap: 6px; }
  .bom-mobile .code { font-family: 'Roboto Mono', monospace; font-size: 11px; font-weight: 500; }
  .bom-mobile .row--error .code { color: var(--error); }
  .bom-mobile .meta { display: flex; justify-content: space-between; }
  .bom-mobile .meta .desc { font-size: 11px; color: var(--festo-text-muted); }
  .bom-mobile .meta .price { font-size: 12px; font-weight: 500; }
  .bom-mobile .row--warn .meta .price { color: var(--warn-text); }
  .bom-mobile .row--error .meta .price { color: var(--error); }
  .bom-mobile-table { border: 1px solid var(--festo-hairline); border-radius: var(--festo-radius); overflow: hidden; }

  .workspace { padding: 16px; gap: 16px; }
  .festo-band { padding: 18px 16px; }
  .festo-band-title h1 { font-size: 18px; }
  .pm-header { padding: 0 16px; }
  .pm-shop-btn { display: none; }
}
