:root {
  --proto-soft: #f6f8fb;
  --proto-line: #e2e7ee;
  --proto-green: #138a48;
  --proto-amber: #9a5b00;
}

.prototype-screen { min-height: 64vh; }
.prototype-content { max-width: 1180px; margin: 0 auto; padding: 28px 24px 56px; }
.prototype-grid { display: grid; gap: 18px; }
.prototype-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prototype-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prototype-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.prototype-card { background: #fff; border: 1px solid var(--proto-line); border-radius: 16px; padding: 20px; box-shadow: 0 8px 24px rgba(14, 32, 54, .06); }
.prototype-card.soft { background: var(--proto-soft); box-shadow: none; }
.prototype-card h2, .prototype-card h3 { margin-top: 0; }
.prototype-lead { color: var(--muted); max-width: 760px; font-size: 1.05rem; }
.prototype-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.prototype-row.between { justify-content: space-between; }
.prototype-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.prototype-fields .wide { grid-column: 1 / -1; }
.prototype-note { border: 1px solid #d6e1ed; background: #eff4fa; color: var(--navy); padding: 13px 15px; border-radius: 10px; }
.prototype-note.success { border-color: #bfe4ce; background: #eaf7ef; color: #0b6c38; }
.prototype-note.warning { border-color: #f0d29a; background: #fff8e8; color: #6e4200; }
.prototype-error { color: #a20d27; font-weight: 700; min-height: 1.35em; margin: 6px 0 0; }
.prototype-table-wrap { overflow-x: auto; border: 1px solid var(--proto-line); border-radius: 12px; background: #fff; }
.prototype-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.prototype-table th { text-align: left; background: #f1f3f6; color: var(--navy); font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; padding: 12px; white-space: nowrap; }
.prototype-table td { padding: 12px; border-top: 1px solid var(--proto-line); vertical-align: middle; }
.prototype-table .numeric { text-align: right; white-space: nowrap; }
.prototype-table select, .prototype-table input { min-width: 82px; }
.prototype-status { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-size: .78rem; font-weight: 800; }
.prototype-status.pending { background: #fff3d8; color: #825100; }
.prototype-status.complete { background: #eaf7ef; color: #0b6c38; }
.prototype-status.low { background: #fff0f2; color: #a20d27; }
.prototype-kpi small { display: block; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.prototype-kpi strong { display: block; font-size: 2rem; margin-top: 4px; }
.prototype-product-line { display: grid; grid-template-columns: 100px 1fr auto; gap: 16px; align-items: center; }
.prototype-product-line img { width: 100px; border-radius: 10px; background: #faf8f5; }
.prototype-total { font-size: 1.35rem; font-weight: 900; }
.prototype-login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #f5f7fa; }
.prototype-login-brand { background: var(--navy); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.prototype-login-brand img { width: 220px; background: #fff; padding: 14px; border-radius: 12px; }
.prototype-login-brand h1 { color: #fff; max-width: 560px; font-size: clamp(2.6rem, 6vw, 5.2rem); }
.prototype-login-panel { display: grid; place-items: center; padding: 28px; }
.prototype-login-panel form { width: min(440px, 100%); }
.prototype-controls { position: fixed; z-index: 1000; left: 12px; bottom: 12px; width: min(310px, calc(100vw - 24px)); background: #fff; border: 2px solid #8c98a6; border-radius: 12px; box-shadow: 0 12px 34px rgba(12,27,45,.2); padding: 10px; font-size: .82rem; }
.prototype-controls summary { cursor: pointer; font-weight: 900; color: var(--navy); }
.prototype-controls-inner { display: grid; gap: 8px; margin-top: 8px; }
.prototype-controls select { width: 100%; }
.prototype-controls .button { min-height: 34px; padding: 6px 10px; font-size: .8rem; }
.prototype-role-banner { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d6e1ed; background: #eff4fa; border-radius: 999px; padding: 5px 10px; font-size: .75rem; font-weight: 800; }
.prototype-empty { text-align: center; padding: 42px 20px; }
.prototype-hidden { display: none !important; }
.prototype-admin-only { border-left: 4px solid var(--red); }
.prototype-checkout-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 24px; }
.prototype-checkout-steps span { background: #eef1f5; border-radius: 999px; padding: 7px 12px; font-weight: 800; font-size: .8rem; }
.prototype-checkout-steps .active { background: var(--navy); color: #fff; }

@media (max-width: 800px) {
  .prototype-content { padding: 20px 16px 72px; }
  .prototype-grid.two, .prototype-grid.three, .prototype-grid.four, .prototype-fields, .prototype-login { grid-template-columns: 1fr; }
  .prototype-login-brand { padding: 30px 24px; min-height: 300px; }
  .prototype-login-brand h1 { font-size: 2.5rem; }
  .prototype-product-line { grid-template-columns: 72px 1fr; }
  .prototype-product-line img { width: 72px; }
  .prototype-product-line > :last-child { grid-column: 1 / -1; }
  .prototype-table { min-width: 650px; }
}
