:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #6a7683;
  --line: #dbe3ea;
  --soft: #f3f7f8;
  --surface: #ffffff;
  --blue: #0d6fd6;
  --blue-dark: #094f9b;
  --teal: #08a88a;
  --teal-dark: #087a68;
  --coral: #f06a4d;
  --sun: #f4b43f;
  --berry: #c84663;
  --green: #1c8d5a;
  --amber: #b36d00;
  --red: #b42318;
  --navy: #16283b;
  --shadow: 0 16px 38px rgba(30, 46, 64, 0.13);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(8, 168, 138, 0.08) 0%, rgba(244, 180, 63, 0.08) 42%, rgba(240, 106, 77, 0.08) 100%),
    #f6fafb;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #f8fbfc;
  border-right: 1px solid var(--line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand > div {
  width: 100%;
}

.brand-logo {
  display: block;
  width: min(360px, 100%);
  max-width: 100%;
  height: auto;
}

.app-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.app-credit img {
  width: 74px;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.lambda-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.lambda-mini span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.lambda-mini img {
  width: 100%;
  max-width: 105px;
  height: auto;
  display: block;
  border-radius: 8px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #17212b 0%, #0d6fd6 48%, #08a88a 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 5px #ffffff;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand span,
.muted,
.status-panel span,
.feature-list,
.security-stack small,
.geo-card span,
.scan-result span {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #344252;
  text-align: left;
}

.nav-item span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--teal-dark);
}

.nav-item.active,
.nav-item:hover {
  background: #eaf7f2;
  border-color: #bfe8dc;
  color: #075e50;
}

.nav-item[data-view="demo"] span {
  color: var(--coral);
}

.nav-item[data-view="resident"] span {
  color: var(--blue);
}

.nav-item[data-view="seller"] span {
  color: var(--sun);
}

.nav-item[data-view="visitor"] span {
  color: var(--teal);
}

.nav-item[data-view="security"] span {
  color: var(--berry);
}

.seller-only[hidden] {
  display: none !important;
}

.status-panel,
.panel,
.visitor-card,
.phone,
.door-stage {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(207, 219, 228, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.status-panel {
  padding: 16px;
  margin-top: auto;
  background: linear-gradient(135deg, #ffffff, #eefaf6);
  border-color: #c8eadf;
}

.status-panel strong,
.status-panel span {
  display: block;
}

.status-panel strong {
  margin: 4px 0;
}

main {
  padding: 26px;
  overflow: hidden;
}

.topbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar h1,
.door-copy h2,
.phone-screen h2,
.panel h2,
.visitor-card h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: 30px;
  line-height: 1.05;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--blue-dark);
  font-weight: 760;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(30, 46, 64, 0.08);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.demo-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(250px, 0.72fr) minmax(250px, 0.72fr);
  gap: 18px;
  align-items: stretch;
}

.offer-stack {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 14px;
  margin-bottom: 18px;
}

.offer-card {
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, #ffffff 0%, #fff8e8 100%);
  border: 1px solid rgba(207, 219, 228, 0.9);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(30, 46, 64, 0.1);
}

.offer-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #17212b, #f5a100);
}

.offer-card:nth-child(2)::before {
  background: linear-gradient(90deg, #17212b, #0eb2cb);
}

.offer-card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: 0;
}

.offer-card:nth-child(1) .eyebrow {
  color: #9d3a27;
}

.offer-card:nth-child(2) .eyebrow {
  color: var(--teal-dark);
}

.offer-list {
  margin: 0;
  padding-left: 20px;
  color: #344252;
  line-height: 1.5;
}

.plan-options {
  display: grid;
  gap: 10px;
}

.plan-option {
  min-height: 0;
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(207, 219, 228, 0.95);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 24px rgba(30, 46, 64, 0.08);
}

.plan-option strong,
.plan-option span {
  display: block;
}

.plan-option strong {
  color: #004f9f;
  font-size: 16px;
}

.plan-option span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.plan-option:hover {
  border-color: #0eb2cb;
}

.lambda-credit {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(207, 219, 228, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 33, 43, 0.98), rgba(14, 178, 203, 0.82)),
    #17212b;
  color: #fff;
  box-shadow: 0 14px 32px rgba(23, 33, 43, 0.18);
}

.customer-hero {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 18px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 33, 43, 0.96) 0%, rgba(14, 178, 203, 0.92) 58%, rgba(245, 161, 0, 0.9) 100%),
    #17212b;
  color: #fff;
  box-shadow: 0 18px 38px rgba(14, 178, 203, 0.24);
}

.customer-hero img {
  width: 162px;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(6, 18, 30, 0.16);
  object-fit: contain;
}

.customer-hero .eyebrow {
  color: #fff6dc;
}

.customer-hero h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.lambda-credit img {
  width: 150px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: contain;
}

.lambda-credit strong,
.lambda-credit span {
  display: block;
}

.lambda-credit strong {
  font-size: 16px;
}

.lambda-credit span {
  color: #d9efe8;
  font-size: 13px;
  line-height: 1.35;
  margin-top: 4px;
}

.door-stage {
  min-height: 610px;
  padding: 24px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  overflow: hidden;
}

.door-copy p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 54ch;
}

.door-visual {
  min-height: 430px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.44), transparent 28%, rgba(255, 255, 255, 0.24) 72%, transparent),
    linear-gradient(135deg, #375064, #223646 58%, #182735);
  display: grid;
  place-items: center;
  padding: 22px;
  border: 1px solid #ced9df;
}

.door-frame {
  position: relative;
  width: min(320px, 88%);
  height: 100%;
  min-height: 390px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.13), transparent 22%, rgba(0, 0, 0, 0.12) 70%, transparent),
    #5b4638;
  border: 12px solid #1b2b37;
  border-radius: 6px 6px 2px 2px;
  box-shadow: 0 32px 55px rgba(11, 22, 34, 0.35);
}

.door-number {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: #f5e6c8;
  font-size: 32px;
  font-weight: 800;
}

.door-handle {
  position: absolute;
  right: 34px;
  top: 48%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d0a44b;
  box-shadow: 12px 0 0 #b88735;
}

.qr-sticker {
  position: absolute;
  left: 34px;
  bottom: 48px;
  width: 132px;
  min-height: 158px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  color: var(--ink);
  display: grid;
  gap: 8px;
  box-shadow: 0 18px 34px rgba(4, 12, 20, 0.32);
}

.qr-sticker span:last-child {
  font-size: 13px;
  font-weight: 800;
}

.qr-grid {
  display: block;
  width: 108px;
  height: 108px;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px 18px, #111 18px 28px, transparent 28px 36px, #111 36px 44px, transparent 44px 58px, #111 58px 68px, transparent 68px 80px, #111 80px 92px, transparent 92px),
    linear-gradient(#111 10px, transparent 10px 18px, #111 18px 28px, transparent 28px 36px, #111 36px 44px, transparent 44px 58px, #111 58px 68px, transparent 68px 80px, #111 80px 92px, transparent 92px),
    #fff;
  background-blend-mode: multiply;
  border: 8px solid #fff;
  box-shadow: inset 0 0 0 4px #111;
}

.phone {
  min-height: 610px;
  padding: 12px;
  background: #17212b;
  border-color: #0c151f;
  box-shadow: 0 18px 45px rgba(8, 18, 29, 0.2);
}

.phone-bar {
  height: 42px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: #dce8ef;
  font-size: 13px;
  padding: 0 8px;
}

.phone-bar span:last-child {
  text-align: right;
}

.phone-screen {
  min-height: 540px;
  border-radius: 8px;
  background: #f8fbfc;
  padding: 18px;
  overflow-y: auto;
}

.phone-screen h2 {
  font-size: 24px;
}

.primary,
.secondary,
.ghost {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 800;
}

.primary {
  background: linear-gradient(135deg, #17212b 0%, #0eb2cb 55%, #08a88a 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 178, 203, 0.24);
}

.primary:hover {
  background: linear-gradient(135deg, #0d1720 0%, #0d8fa3 55%, #087a68 100%);
}

.secondary {
  background: #fff2cf;
  border-color: #f5c86a;
  color: #704900;
}

.ghost {
  background: #fff;
  border-color: var(--line);
  color: #334252;
}

.full {
  width: 100%;
  margin-top: 18px;
}

.section-grid,
.visitor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 18px;
  align-items: start;
}

.panel,
.visitor-card {
  padding: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.form-grid.compact {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 7px;
  color: #344252;
  font-size: 14px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(13, 111, 214, 0.22);
  outline-offset: 2px;
}

textarea {
  resize: vertical;
  line-height: 1.35;
}

input:disabled,
input[readonly],
select:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

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

.toggle {
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 8px;
}

.toggle input,
.switch-row input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  accent-color: var(--blue);
}

.invite-list,
.alert-list,
.audit-log,
.security-stack {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.invite-card,
.alert-card,
.audit-item,
.comm-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 14px;
}

.invite-card strong,
.invite-card span,
.alert-card strong,
.alert-card span,
.audit-item strong,
.audit-item span {
  display: block;
}

.invite-card span,
.alert-card span,
.audit-item span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.alert-card {
  display: grid;
  gap: 12px;
}

.route-hint {
  color: #087a68 !important;
}

.alert-actions,
.visitor-actions,
.comm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alert-actions button,
.comm-actions button {
  flex: 1;
  min-width: 88px;
}

.visitor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e9f2fb;
  color: #084f93;
  border: 1px solid #c9e0f4;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.visitor-flow {
  margin-top: 18px;
}

.flow-step {
  display: grid;
  gap: 14px;
}

.scan-result,
.geo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 14px;
}

.scan-result {
  justify-content: flex-start;
}

.scan-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #17212b;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.geo-card.valid {
  border-color: rgba(28, 141, 90, 0.5);
  background: #ecf8f1;
}

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

.feature-list {
  margin: 16px 0 0;
  padding-left: 20px;
  line-height: 1.65;
}

.switch-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 14px;
}

.switch-row strong,
.switch-row small {
  display: block;
}

.empty-state {
  border: 1px dashed #c9d7e2;
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  background: #fff;
}

.locked-card,
.waiting-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid #f0c7be;
  background: #fff5f3;
  border-radius: 8px;
  padding: 14px;
}

.locked-card strong,
.locked-card span,
.waiting-card strong,
.waiting-card span {
  display: block;
}

.locked-card span,
.waiting-card span {
  color: #7a3329;
  font-size: 14px;
  margin-top: 6px;
}

.waiting-card {
  border-color: #bfe8dc;
  background: #f1fbf7;
}

.waiting-card span {
  color: #296758;
}

.waiting-card .wide,
.waiting-card .visitor-actions {
  grid-column: 1 / -1;
}

.waiting-card.success {
  border-color: rgba(28, 141, 90, 0.5);
  background: #ecf8f1;
}

.comm-card {
  background: #f7fbff;
  border-color: #cce1f5;
}

.door-message span {
  color: #344252;
  margin-top: 6px;
}

.qr-panel {
  display: grid;
  gap: 14px;
}

.automation-panel {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 33, 43, 0.08);
}

.automation-panel h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: 0;
}

.routing-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.route-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fa;
}

.route-card strong,
.route-card span {
  display: block;
}

.route-card span {
  color: var(--muted);
  font-size: 13px;
}

.route-card em {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  border-radius: 999px;
  padding: 5px 8px;
  background: #eaf7f2;
  color: #087a68;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.route-card.quiet em {
  background: #fff2cf;
  color: #704900;
}

.route-card.muted em {
  background: #e9f2fb;
  color: #084f93;
}

.resident-note,
.seller-panel {
  align-self: start;
}

.seller-brand-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 16px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.seller-brand-strip img {
  width: 104px;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.seller-brand-strip span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.seller-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.seller-steps {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.seller-steps span {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f3f7f8;
  border: 1px solid var(--line);
  font-weight: 750;
  color: #344252;
}

.geo-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid #c8eadf;
  border-radius: 8px;
  background: linear-gradient(135deg, #f2fbf8, #fff8e9);
}

.qr-preview,
.plate-qr {
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.qr-preview svg {
  width: min(100%, 240px);
  height: auto;
}

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

.download-link {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.plate-preview {
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
  border: 2px solid #000;
  border-radius: 8px;
  background: #fff;
  color: #000;
  padding: 18px;
  display: grid;
  gap: 12px;
  text-align: center;
  box-shadow: 0 16px 32px rgba(23, 33, 43, 0.12);
}

.plate-address,
.plate-code {
  display: block;
}

.plate-porter-logo {
  width: 260px;
  max-width: 100%;
  margin: 0 auto;
  display: block;
  object-fit: contain;
}

.plate-address {
  color: #000;
  font-size: 13px;
}

.plate-qr {
  padding: 8px;
  border: 0;
}

.plate-qr svg {
  width: 100%;
  max-width: 210px;
  height: auto;
}

.plate-call {
  font-size: 18px;
  color: #000;
}

.plate-code {
  font-size: 12px;
  color: #000;
}

.plate-creator {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.plate-creator span {
  color: #000;
  font-size: 12px;
  font-weight: 800;
}

.plate-creator img {
  width: 118px;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.plate-lambda {
  display: none;
  justify-content: center;
  color: #000;
  font-size: 12px;
  font-weight: 800;
}

.qr-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.comm-window {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.message {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.message.guest {
  background: #fff;
  border: 1px solid var(--line);
}

.message.resident {
  background: #dcf0ff;
  margin-left: auto;
}

.call-mode {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
}

.video-dot {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 44px 28px, #f0c6a8 0 11px, transparent 12px),
    radial-gradient(circle at 36px 55px, #244866 0 24px, transparent 25px),
    linear-gradient(135deg, #a9d9e8, #f1f5f7);
}

.audit-item {
  border-left: 4px solid var(--blue);
}

.audit-item.warning {
  border-left-color: var(--amber);
}

.audit-item.success {
  border-left-color: var(--green);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 44px));
  background: #17212b;
  color: #fff;
  border-radius: 8px;
  padding: 13px 15px;
  box-shadow: 0 18px 40px rgba(5, 15, 25, 0.22);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1180px) {
  .demo-grid {
    grid-template-columns: 1fr 1fr;
  }

  .offer-stack {
    grid-template-columns: 1fr;
  }

  .door-stage {
    grid-column: 1 / -1;
    min-height: 500px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-panel {
    margin-top: 0;
  }

  main {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
  }

  .demo-grid,
  .section-grid,
  .visitor-layout {
    grid-template-columns: 1fr;
  }

  .phone,
  .door-stage {
    min-height: auto;
  }

  .phone-screen {
    min-height: 420px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .unit-selector,
  .visitor-header,
  .scan-result,
  .geo-card,
  .switch-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .door-frame {
    width: 100%;
  }

  .qr-sticker {
    left: 20px;
    bottom: 34px;
  }
}

/* Mobile-only product mode */
html {
  background:
    linear-gradient(135deg, rgba(8, 168, 138, 0.18), rgba(244, 180, 63, 0.12)),
    #dbe5ea;
}

body {
  display: flex;
  justify-content: center;
  min-height: 100svh;
  padding: 0;
}

.app-shell {
  width: min(100vw, 430px);
  min-height: 100svh;
  display: block;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(241, 249, 247, 0.94)),
    #f7fafb;
  box-shadow: 0 18px 60px rgba(10, 24, 38, 0.24);
  position: relative;
  overflow-x: hidden;
}

.sidebar {
  position: static;
  height: auto;
  padding: calc(14px + env(safe-area-inset-top)) 14px 0;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 250, 245, 0.96));
  gap: 12px;
}

.brand {
  min-height: 48px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  box-shadow: inset 0 0 0 4px #ffffff;
}

.status-panel {
  margin: 0;
  padding: 12px;
  box-shadow: none;
}

.nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(100vw, 430px);
  transform: translateX(-50%);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 28px rgba(18, 34, 50, 0.12);
}

.nav-item {
  min-height: 56px;
  padding: 6px 2px;
  display: grid;
  place-items: center;
  gap: 3px;
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
}

body.seller-mode .nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.nav-item span {
  width: 22px;
  height: 22px;
  font-size: 17px;
}

main {
  padding: 14px 14px calc(92px + env(safe-area-inset-bottom));
  overflow: visible;
}

.app-credit {
  position: static;
  transform: none;
  margin: 18px auto 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 22px rgba(23, 33, 43, 0.08);
  font-size: 10px;
  opacity: 0.76;
}

.app-credit img {
  width: 58px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 58px;
  margin: 0 -14px 14px;
  padding: 10px 14px;
  background: rgba(247, 250, 251, 0.86);
  backdrop-filter: blur(14px);
}

.topbar h1 {
  font-size: 28px;
}

.topbar-actions {
  gap: 8px;
}

.icon-button {
  width: 48px;
  height: 48px;
  box-shadow: none;
}

.demo-grid,
.section-grid,
.visitor-layout,
.form-grid,
.form-grid.compact {
  grid-template-columns: 1fr;
}

.demo-grid,
.section-grid,
.visitor-layout {
  gap: 12px;
}

.offer-stack {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.offer-card {
  padding: 16px;
  box-shadow: 0 10px 24px rgba(30, 46, 64, 0.1);
}

.offer-card h2 {
  font-size: 19px;
}

.door-stage,
.panel,
.visitor-card,
.phone {
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(30, 46, 64, 0.1);
}

.door-stage {
  min-height: 0;
  padding: 16px;
}

.door-copy h2,
.panel h2,
.visitor-card h2,
.phone-screen h2 {
  font-size: 22px;
}

.door-copy p:last-child {
  font-size: 14px;
}

.door-visual {
  min-height: 360px;
  padding: 16px;
}

.door-frame {
  width: 100%;
  max-width: 300px;
  min-height: 330px;
}

.door-number {
  font-size: 28px;
}

.qr-sticker {
  left: 20px;
  bottom: 28px;
  width: 126px;
  min-height: 150px;
}

.qr-grid {
  width: 102px;
  height: 102px;
}

.phone {
  min-height: 0;
  padding: 0;
  background: transparent;
  border-color: rgba(207, 219, 228, 0.9);
}

.phone-bar {
  display: none;
}

.phone-screen {
  min-height: 0;
  border-radius: 8px;
  padding: 16px;
}

.panel,
.visitor-card {
  padding: 16px;
}

.visitor-card {
  min-height: calc(100svh - 260px);
}

.feature-list {
  font-size: 14px;
}

input,
select,
.primary,
.secondary,
.ghost {
  min-height: 50px;
  font-size: 16px;
}

.visitor-actions,
.alert-actions,
.comm-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.unit-selector,
.visitor-header,
.scan-result,
.geo-card,
.switch-row {
  grid-template-columns: 1fr;
  display: grid;
}

.scan-result {
  grid-template-columns: 44px 1fr;
}

.geo-card .secondary,
.visitor-actions .primary,
.visitor-actions .ghost {
  width: 100%;
}

.qr-actions {
  grid-template-columns: 1fr;
}

.geo-tools {
  grid-template-columns: 1fr;
}

.call-mode {
  grid-template-columns: 56px 1fr;
}

.video-dot {
  width: 56px;
  height: 56px;
}

.toast {
  left: 50%;
  right: auto;
  bottom: calc(82px + env(safe-area-inset-bottom));
  width: min(396px, calc(100vw - 28px));
  transform: translate(-50%, 20px);
}

.toast.show {
  transform: translate(-50%, 0);
}

@media (min-width: 431px) {
  body {
    padding: 20px 0;
  }

  .app-shell {
    min-height: calc(100svh - 40px);
    border-radius: 24px;
    border: 1px solid rgba(207, 219, 228, 0.95);
    overflow: hidden;
  }

  .nav {
    border-radius: 0 0 24px 24px;
  }
}

/* Flat Lambda Lab visual system */
html {
  background: #dfe7ea;
}

body {
  background: #dfe7ea;
}

.app-shell {
  background: #f7f9fa;
}

.sidebar,
.topbar {
  background: #ffffff;
}

.brand-mark {
  background: #17212b;
  box-shadow: inset 0 -6px 0 #f5a100;
}

.brand-logo {
  width: min(370px, 100%);
}

.status-panel {
  background: #ffffff;
  border-color: #0eb2cb;
  box-shadow: 0 10px 24px rgba(23, 33, 43, 0.08);
}

.panel,
.visitor-card,
.phone,
.door-stage,
.offer-card {
  background: #ffffff;
}

.lambda-credit,
.customer-hero {
  background: #17212b;
  border: 1px solid #17212b;
  border-left: 6px solid #0eb2cb;
  box-shadow: 0 16px 34px rgba(23, 33, 43, 0.2);
}

.lambda-mini img {
  max-width: 108px;
}

.lambda-credit img {
  width: 150px;
  max-width: 100%;
  object-fit: contain;
}

.customer-hero img {
  width: 170px;
  max-width: 100%;
  object-fit: contain;
}

.plate-brand img,
.plate-porter-logo {
  width: 264px;
  max-width: 100%;
  object-fit: contain;
}

.customer-hero {
  border-bottom: 6px solid #f5a100;
}

.offer-card::before {
  background: #f5a100;
}

.offer-card:nth-child(2)::before {
  background: #0eb2cb;
}

.primary {
  background: #0eb2cb;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(14, 178, 203, 0.24);
}

.primary:hover {
  background: #078fa4;
}

.secondary {
  background: #f5a100;
  border-color: #f5a100;
  color: #17212b;
  box-shadow: 0 8px 18px rgba(245, 161, 0, 0.18);
}

.ghost {
  background: #ffffff;
  border-color: #17212b;
  color: #17212b;
}

.geo-tools {
  background: #f7f9fa;
  border-color: #0eb2cb;
}

.plate-preview {
  background: #ffffff;
  border: 2px solid #000000;
  color: #000000;
  box-shadow: 0 16px 32px rgba(23, 33, 43, 0.14);
}

.plate-preview * {
  color: #000000;
}

.plate-creator img {
  width: 118px;
}

.plate-lambda {
  color: #000000;
}

.door-visual {
  background: #223646;
}

.door-frame {
  background: #5b4638;
}

@media print {
  @page {
    size: 90mm 130mm;
    margin: 8mm;
  }

  html,
  body {
    background: #fff;
    display: block;
    padding: 0;
    min-height: auto;
  }

  body * {
    visibility: hidden;
  }

  .plate-preview,
  .plate-preview * {
    visibility: visible;
  }

  .plate-preview {
    position: fixed;
    inset: 0;
    width: 74mm;
    max-width: none;
    min-height: 108mm;
    margin: auto;
    padding: 8mm;
    box-shadow: none;
    border: 1.4mm solid #000;
    background: #fff;
    color: #000;
    break-inside: avoid;
  }

  .plate-porter-logo {
    width: 58mm;
  }

  .plate-qr svg {
    max-width: 56mm;
  }

  .plate-call {
    font-size: 15pt;
  }
}
