: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: 126px;
  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: 154px;
  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: 96px;
}

.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;
}

body:not([data-view="demo"]) .topbar-actions {
  display: none;
}

.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: 154px;
}

.plate-lambda {
  color: #000000;
}

.door-visual {
  background: #223646;
}

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

/* PorterQR premium app refresh v24 */
:root {
  --ink: #121922;
  --muted: #65727f;
  --line: #d9e2e8;
  --soft: #f4f7f8;
  --surface: #ffffff;
  --cyan: #00bcd4;
  --cyan-dark: #008da0;
  --gold: #f5a100;
  --gold-soft: #fff5da;
  --ok: #15865a;
  --warn: #9d6100;
  --danger: #bc3b2a;
  --shadow: 0 14px 34px rgba(18, 25, 34, 0.12);
  --shadow-soft: 0 8px 22px rgba(18, 25, 34, 0.08);
}

html,
body {
  background: #e6edf1;
}

body {
  color: var(--ink);
}

.app-shell {
  width: min(100vw, 480px);
  background: #f7f9fa;
  box-shadow: 0 20px 70px rgba(18, 25, 34, 0.22);
}

.sidebar {
  padding: calc(12px + env(safe-area-inset-top)) 16px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.brand {
  min-height: 56px;
}

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

main {
  padding: 14px 16px calc(94px + env(safe-area-inset-bottom));
}

.topbar {
  min-height: 54px;
  margin: 0 -16px 14px;
  padding: 9px 16px;
  background: rgba(247, 249, 250, 0.94);
  border-bottom: 1px solid rgba(217, 226, 232, 0.78);
}

.topbar .eyebrow {
  margin: 0;
  color: #064d58;
  font-size: 11px;
}

.icon-button {
  width: 46px;
  height: 46px;
  border-color: #cdd8df;
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.icon-button:hover {
  border-color: var(--cyan);
}

.nav {
  width: min(100vw, 480px);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: #ffffff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 30px rgba(18, 25, 34, 0.1);
}

.nav-item {
  min-height: 58px;
  border-radius: 8px;
  color: #526170;
  font-weight: 800;
}

.nav-item span {
  width: 24px;
  height: 22px;
}

.nav-item.active,
.nav-item:hover {
  background: #e9fbfd;
  border-color: #bdeef5;
  color: #063f48;
}

.panel,
.visitor-card,
.phone,
.door-stage,
.offer-card,
.status-panel,
.automation-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  color: #075766;
  font-size: 11px;
  font-weight: 850;
}

.app-hero {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  border-left: 6px solid var(--cyan);
  border-bottom: 6px solid var(--gold);
  box-shadow: 0 16px 34px rgba(18, 25, 34, 0.2);
}

.app-hero h2 {
  margin: 0;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.02;
  letter-spacing: 0;
}

.app-hero p {
  margin: 0;
  color: #d8e3e8;
  font-size: 14px;
  line-height: 1.45;
}

.app-hero .eyebrow {
  margin: 0;
  color: #ffffff;
}

.hero-kicker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.18);
}

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

.hero-badges span,
.seller-metrics span,
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.hero-badges span,
.seller-metrics span {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.seller-metrics strong {
  margin-right: 4px;
  color: var(--gold);
}

.quick-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.mini-status {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.mini-status > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #e9fbfd;
  color: #007b8d;
  font-size: 13px;
  font-weight: 900;
}

.mini-status strong,
.mini-status small {
  display: block;
  min-width: 0;
}

.mini-status strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.1;
}

.mini-status small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.door-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px;
  background: #ffffff;
  border-color: #bdeef5;
}

.door-summary strong {
  margin: 2px 0 3px;
  font-size: 18px;
}

.door-summary span {
  font-size: 13px;
}

.status-chip {
  flex: 0 0 auto;
  background: #e9fbfd;
  border: 1px solid #bdeef5;
  color: #075766;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.smart-routing {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
  padding: 16px;
}

.routing-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.route-card {
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafb;
  border-color: #dbe4ea;
}

.route-card .route-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: #075766;
  font-weight: 900;
}

.route-card strong {
  font-size: 14px;
}

.route-card span {
  margin-top: 3px;
  font-size: 12px;
}

.route-card em {
  grid-column: auto;
  grid-row: auto;
  padding: 6px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.resident-workspace,
.seller-workspace {
  gap: 12px;
}

.resident-form-panel,
.invite-panel,
.seller-panel,
.qr-panel {
  padding: 16px;
}

.form-grid {
  gap: 12px;
  margin-top: 14px;
}

label {
  gap: 6px;
  color: #334150;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  min-height: 48px;
  border-color: #d5e0e6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(18, 25, 34, 0.02);
}

input[readonly],
select:disabled {
  background: #f2f5f7;
  color: #53606c;
  opacity: 1;
}

input[type="hidden"] {
  display: none;
}

.toggle {
  border-radius: 8px;
  background: #f8fafb;
  border-color: #d9e2e8;
  color: #334150;
}

.primary,
.secondary,
.ghost {
  min-height: 48px;
  border-radius: 8px;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 188, 212, 0.2);
}

.primary:hover {
  background: var(--cyan-dark);
  border-color: var(--cyan-dark);
}

.secondary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  box-shadow: 0 10px 20px rgba(245, 161, 0, 0.18);
}

.ghost {
  background: #ffffff;
  border-color: #b7c5ce;
  color: var(--ink);
}

.primary:active,
.secondary:active,
.ghost:active,
.icon-button:active,
.nav-item:active {
  transform: translateY(1px);
}

.invite-list,
.alert-list,
.audit-log,
.security-stack {
  gap: 10px;
}

.invite-card,
.alert-card,
.audit-item,
.comm-card,
.empty-state {
  border-radius: 8px;
}

.alert-card {
  border-left: 5px solid var(--cyan);
  box-shadow: 0 8px 18px rgba(18, 25, 34, 0.06);
}

.route-hint {
  color: #007b8d !important;
}

.seller-hero {
  border-left-color: var(--gold);
  border-bottom-color: var(--cyan);
}

.seller-copy {
  margin: 10px 0 0;
  font-size: 14px;
}

.seller-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.seller-steps span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 6px;
  text-align: center;
  background: #f8fafb;
  border-color: #d9e2e8;
  font-size: 11px;
  line-height: 1.1;
}

.seller-steps strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0 auto;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-size: 12px;
}

.geo-tools {
  grid-template-columns: 1fr;
  gap: 9px;
  padding: 12px;
  background: #f8fafb;
  border-color: #bdeef5;
}

.geo-tools strong,
.geo-tools span {
  display: block;
}

.geo-tools strong {
  color: var(--ink);
  font-size: 14px;
}

.geo-tools span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.qr-panel {
  background: #ffffff;
}

.qr-preview {
  min-height: 232px;
  border: 1px solid #d9e2e8;
  background: #f8fafb;
}

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

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

.qr-actions .download-link,
.qr-actions button {
  min-width: 0;
  text-align: center;
}

.plate-preview {
  max-width: 316px;
  padding: 18px 16px;
  border: 2px solid #111111;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(18, 25, 34, 0.12);
}

.plate-porter-logo {
  width: 270px;
}

.plate-qr svg {
  max-width: 220px;
}

.qr-note {
  padding: 12px;
  border-radius: 8px;
  background: #f8fafb;
  border: 1px solid #d9e2e8;
}

.offer-card {
  background: #ffffff;
}

.offer-card::before,
.offer-card:nth-child(2)::before {
  background: var(--gold);
}

.plan-option {
  box-shadow: var(--shadow-soft);
}

.phone {
  background: #ffffff;
  border-color: var(--line);
}

.phone-screen {
  background: #f8fafb;
}

.locked-card,
.waiting-card {
  border-radius: 8px;
}

@media (max-width: 360px) {
  main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .quick-status-grid {
    gap: 6px;
  }

  .mini-status {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .mini-status > span {
    width: 26px;
    height: 26px;
  }

  .route-card {
    grid-template-columns: 34px 1fr;
  }

  .route-card em {
    grid-column: 2;
    width: fit-content;
  }

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

/* Animated PorterQR app cover v33 */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #ffffff;
  color: #101923;
  transition: opacity 340ms var(--ease-out), visibility 340ms var(--ease-out);
}

.splash-screen.is-hiding {
  opacity: 0;
  visibility: hidden;
}

.splash-screen.is-hidden {
  display: none;
}

.splash-card {
  display: grid;
  justify-items: center;
  gap: 22px;
  width: min(440px, 100%);
  padding: 30px 14px;
  border-radius: 8px;
  animation: splash-card-in 1200ms var(--ease-out) both;
}

.splash-mark {
  display: grid;
  grid-template-columns: repeat(2, 44px);
  gap: 11px;
  padding: 13px;
  border: 5px solid #101923;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 22px 48px rgba(16, 25, 35, 0.14);
  overflow: visible;
  perspective: 260px;
}

.splash-mark span {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  opacity: 0;
  will-change: transform, opacity;
}

.splash-square-black {
  background: #101923;
  animation: splash-square-black-in 2100ms 240ms var(--ease-out) both,
    splash-square-breathe 2600ms 2800ms ease-in-out infinite;
}

.splash-square-cyan {
  background: #00bcd4;
  animation: splash-square-cyan-in 2100ms 520ms var(--ease-out) both,
    splash-square-breathe 2600ms 3020ms ease-in-out infinite;
}

.splash-square-gold {
  background: #f5a100;
  animation: splash-square-gold-in 2100ms 800ms var(--ease-out) both,
    splash-square-breathe 2600ms 3240ms ease-in-out infinite;
}

.splash-door {
  position: relative;
  z-index: 2;
  background: #00bcd4;
  border: 4px solid #101923;
  border-radius: 9px;
  overflow: visible;
  box-shadow: 0 0 0 0 rgba(0, 188, 212, 0);
  animation: splash-door-arrive 1850ms 980ms var(--ease-out) both,
    splash-door-glow 2200ms 2850ms ease-in-out infinite;
}

.splash-door::before {
  content: "";
  position: absolute;
  inset: 3px 5px 3px 3px;
  background: #ffffff;
  border: 3px solid #101923;
  border-radius: 4px;
  box-shadow: inset -10px 0 0 rgba(16, 25, 35, 0.08);
  transform-origin: left center;
  animation: splash-door-open 1850ms 2600ms cubic-bezier(0.18, 0.78, 0.24, 1) both;
}

.splash-door::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 20px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #101923;
  transform-origin: -15px center;
  animation: splash-door-knob 1850ms 2600ms cubic-bezier(0.18, 0.78, 0.24, 1) both;
}

.splash-logo {
  width: min(380px, 94vw);
  height: auto;
  display: block;
  animation: splash-logo-in 1800ms 900ms var(--ease-out) both;
}

.splash-line {
  width: min(300px, 78vw);
  height: 6px;
  border-radius: 999px;
  background: #00bcd4;
  transform-origin: left center;
  animation: splash-line-in 1500ms 2300ms var(--ease-out) both;
}

.splash-credit {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #65727f;
  font-size: 12px;
  animation: splash-credit-in 1300ms 3300ms var(--ease-out) both;
}

.splash-credit img {
  width: 124px;
  display: block;
}

body[data-tone="night"] .splash-screen {
  background: #0b141c;
}

body[data-tone="night"] .splash-card,
body[data-tone="night"] .splash-mark {
  background: #ffffff;
}

@keyframes splash-card-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splash-logo-in {
  from {
    opacity: 0.62;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splash-line-in {
  from {
    opacity: 0.2;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes splash-credit-in {
  from {
    opacity: 0.34;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splash-square-black-in {
  0% {
    opacity: 0;
    transform: translate(-110px, -92px) rotate(-18deg) scale(0.64);
  }
  72% {
    opacity: 1;
    transform: translate(2px, 1px) rotate(2deg) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
}

@keyframes splash-square-cyan-in {
  0% {
    opacity: 0;
    transform: translate(110px, -98px) rotate(18deg) scale(0.64);
  }
  72% {
    opacity: 1;
    transform: translate(-2px, 1px) rotate(-2deg) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
}

@keyframes splash-square-gold-in {
  0% {
    opacity: 0;
    transform: translate(-106px, 96px) rotate(16deg) scale(0.64);
  }
  72% {
    opacity: 1;
    transform: translate(2px, -1px) rotate(-2deg) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
}

@keyframes splash-door-arrive {
  0% {
    opacity: 0;
    transform: translate(108px, 96px) rotate(-14deg) scale(0.64);
  }
  72% {
    opacity: 1;
    transform: translate(-2px, -1px) rotate(1deg) scale(1.26);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1.18);
  }
}

@keyframes splash-door-open {
  0%,
  30% {
    transform: rotate(0deg) skewY(0deg) translate(0, 0);
    box-shadow: inset -10px 0 0 rgba(16, 25, 35, 0.08);
  }
  76%,
  100% {
    transform: rotate(-62deg) skewY(-9deg) translate(16px, 5px) scaleX(0.72);
    box-shadow: 16px 9px 18px rgba(16, 25, 35, 0.27);
  }
}

@keyframes splash-door-knob {
  0%,
  30% {
    opacity: 1;
    transform: rotate(0deg) translateX(0);
  }
  76%,
  100% {
    opacity: 0.8;
    transform: rotate(-62deg) translate(-18px, 14px);
  }
}

@keyframes splash-door-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 188, 212, 0);
  }
  48% {
    box-shadow: 0 0 0 8px rgba(0, 188, 212, 0.18);
  }
}

@keyframes splash-square-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-2px) scale(1.04);
  }
}

/* Modern UX system v28 */
:root {
  color-scheme: light dark;
  --motion-fast: 160ms;
  --motion-medium: 260ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --touch-target: 48px;
  --shadow-soft: 0 14px 34px rgba(23, 33, 43, 0.1);
  --shadow-lifted: 0 22px 48px rgba(23, 33, 43, 0.16);
  --surface-strong: #ffffff;
}

body {
  transition: background-color var(--motion-medium) var(--ease-out), color var(--motion-medium) var(--ease-out);
}

body[data-tone="night"] {
  --ink: #f4f8fa;
  --muted: #aebdc7;
  --line: #2b3a45;
  --soft: #15222d;
  --surface: #101923;
  --surface-strong: #172431;
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.28);
  --shadow-lifted: 0 24px 52px rgba(0, 0, 0, 0.36);
  background: #0b141c;
}

body[data-tone="night"] .app-shell,
body[data-tone="night"] main {
  background: #0f1922;
}

body[data-tone="night"] .sidebar,
body[data-tone="night"] .topbar,
body[data-tone="night"] .panel,
body[data-tone="night"] .visitor-card,
body[data-tone="night"] .phone,
body[data-tone="night"] .door-stage,
body[data-tone="night"] .offer-card,
body[data-tone="night"] .status-panel,
body[data-tone="night"] .mini-status,
body[data-tone="night"] .route-card,
body[data-tone="night"] .invite-card,
body[data-tone="night"] .alert-card,
body[data-tone="night"] .audit-item,
body[data-tone="night"] .comm-card,
body[data-tone="night"] .empty-state,
body[data-tone="night"] .geo-tools {
  background: var(--surface-strong);
  color: var(--ink);
  border-color: var(--line);
}

body[data-tone="night"] input,
body[data-tone="night"] select,
body[data-tone="night"] textarea {
  background: #0c151d;
  color: var(--ink);
  border-color: #3a4a56;
}

body[data-tone="night"] label,
body[data-tone="night"] .seller-copy,
body[data-tone="night"] .feature-list,
body[data-tone="night"] .qr-note {
  color: #c4d2dc;
}

body[data-tone="night"] .ghost,
body[data-tone="night"] .download-link.ghost {
  background: #0c151d;
  color: var(--ink);
  border-color: #5b6c78;
}

body[data-tone="night"] .brand {
  background: #ffffff;
  border-radius: 8px;
  padding: 6px;
}

body[data-tone="night"] .eyebrow {
  color: #20cfe3;
}

body[data-tone="night"] .app-hero,
body[data-tone="night"] .offer-card-main {
  background: #101923;
  color: #ffffff;
}

body[data-tone="night"] .app-hero h2,
body[data-tone="night"] .app-hero p,
body[data-tone="night"] .app-hero .eyebrow,
body[data-tone="night"] .offer-card-main h2,
body[data-tone="night"] .offer-card-main li {
  color: #ffffff;
}

body[data-tone="night"] .hero-badges span,
body[data-tone="night"] .seller-metrics span,
body[data-tone="night"] .seller-steps span {
  background: #0c151d;
  color: #f4f8fa;
  border-color: #3a4a56;
}

body[data-tone="night"] .seller-steps strong {
  background: #f4f8fa;
  color: #0b141c;
}

.app-shell {
  box-shadow: var(--shadow-soft);
}

.view.active {
  animation: view-enter var(--motion-medium) var(--ease-out);
}

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-hero,
.offer-card-main {
  box-shadow: var(--shadow-lifted);
}

.app-hero h2,
.offer-card-main h2 {
  max-width: 10ch;
  font-size: 38px;
  line-height: 0.98;
  letter-spacing: 0;
}

.seller-hero h2 {
  max-width: 11ch;
}

.app-hero p,
.offer-card-main li {
  color: #d9e3e8;
}

.quick-status-grid,
.plan-options,
.seller-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-status,
.plan-option,
.route-card,
.alert-card,
.invite-card,
.audit-item,
.comm-card,
.geo-card,
.scan-result {
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-fast) var(--ease-out),
    border-color var(--motion-fast) var(--ease-out),
    background-color var(--motion-fast) var(--ease-out);
}

.mini-status:active,
.plan-option:active,
.route-card:active,
.alert-card:active,
.qr-sticker:active {
  transform: scale(0.985);
}

button,
a.download-link,
.nav-item,
.icon-button,
.qr-sticker {
  min-height: var(--touch-target);
  touch-action: manipulation;
  transition:
    transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-fast) var(--ease-out),
    background-color var(--motion-fast) var(--ease-out),
    border-color var(--motion-fast) var(--ease-out);
}

.primary,
.secondary,
.ghost,
.download-link {
  border-radius: 8px;
  font-weight: 900;
}

.primary:active,
.secondary:active,
.ghost:active,
.download-link:active,
.icon-button:active,
.nav-item:active {
  transform: translateY(1px) scale(0.99);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #13b6c9;
  outline-offset: 3px;
}

.resident-alert-panel {
  border-left: 6px solid var(--cyan);
}

.status-adaptive > span {
  background: #eef7ff;
  color: #0d6fd6;
}

body[data-tone="night"] .status-adaptive > span {
  background: #19334a;
  color: #7bd5ff;
}

@media (min-width: 720px) {
  .app-hero h2,
  .offer-card-main h2 {
    font-size: 56px;
  }

  .quick-status-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .app-hero h2,
  .offer-card-main h2 {
    font-size: 64px;
  }
}

@media (hover: hover) {
  .mini-status:hover,
  .plan-option:hover,
  .route-card:hover,
  .alert-card:hover,
  .invite-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lifted);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .splash-screen {
    transition-duration: 80ms !important;
  }
}

@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;
  }
}
