:root {
  --ink: #17202a;
  --muted: #667085;
  --line: #e4e7ec;
  --paper: #ffffff;
  --canvas: #f4f6f8;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --success: #067647;
  --success-bg: #ecfdf3;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input, textarea, select { font: inherit; }

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px max(24px, calc((100vw - 1180px) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -0.03em; }
h2 { margin-bottom: 10px; font-size: clamp(1.35rem, 2.5vw, 1.8rem); letter-spacing: -0.025em; }
h3 { margin: 8px 0 4px; font-size: 1.25rem; }
.eyebrow { margin-bottom: 5px; color: var(--brand); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); line-height: 1.55; }

.page-shell { width: min(1180px, calc(100% - 40px)); margin: 36px auto 72px; }
.admin-navigation { display: flex; gap: 8px; padding: 6px; margin-bottom: 24px; background: #e9edf2; border-radius: 14px; }
.admin-navigation a { flex: 1; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 12px; border-radius: 10px; color: #475467; text-decoration: none; font-weight: 750; }
.admin-navigation a.selected { color: var(--brand); background: white; box-shadow: 0 2px 6px rgba(16,24,40,.07); }
.admin-navigation a span { padding: 2px 7px; background: #eef2f6; border-radius: 999px; font-size: .75rem; }
.inventory-create-manager, .business-create-manager { margin-top: 18px; }
.inventory-create-manager > summary, .business-create-manager > summary { width: fit-content; list-style: none; }
.inventory-create-manager > summary::-webkit-details-marker, .business-create-manager > summary::-webkit-details-marker { display: none; }
.business-create-manager .hero-grid { margin-top: 16px; }
.inventory-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.inventory-filters a { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: #475467; font-size: .82rem; text-decoration: none; }
.inventory-filters a.selected { color: #fff; background: var(--brand); border-color: var(--brand); }
.inventory-results { margin: 0 0 14px; color: var(--muted); font-size: .8rem; }
.inventory-pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; }
.inventory-pagination > span { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.inventory-mobile-facts { display: none; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(420px, 1.2fr);
  gap: 48px;
  padding: clamp(24px, 5vw, 44px);
  background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 35px rgba(16, 24, 40, .06);
}

.create-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wide { grid-column: 1 / -1; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.field.grow { flex: 1; }
label { color: #344054; font-size: .86rem; font-weight: 700; }
label span { color: var(--muted); font-weight: 500; }
input[type="text"], input[type="url"], input[type="password"], input[type="number"], input:not([type]), textarea, select {
  width: 100%; min-height: 44px; padding: 10px 13px;
  color: var(--ink); background: #fff; border: 1px solid #d0d5dd; border-radius: 10px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 76px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #667085 50%), linear-gradient(135deg, #667085 50%, transparent 50%); background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, textarea:focus, select:focus { border-color: #84adff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); outline: none; }
input[type="color"] { width: 100%; height: 44px; padding: 4px; border: 1px solid #d0d5dd; border-radius: 10px; background: white; cursor: pointer; }
input[type="file"] { width: 100%; min-height: 44px; padding: 8px; color: var(--muted); background: #fff; border: 1px solid #d0d5dd; border-radius: 10px; }
input[type="file"]::file-selector-button { margin-right: 9px; padding: 6px 10px; border: 0; border-radius: 7px; color: #344054; background: #eef2f6; font-weight: 700; cursor: pointer; }
.form-action { align-self: end; }

.button {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 16px; border: 1px solid transparent; border-radius: 10px;
  font-weight: 750; text-decoration: none; cursor: pointer; transition: .15s ease;
}
.button.primary { color: white; background: var(--brand); box-shadow: 0 5px 12px rgba(37, 99, 235, .18); }
.button.primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.button.secondary { color: #344054; background: #fff; border-color: #d0d5dd; }
.button.secondary:hover, .button.ghost:hover { background: #f9fafb; border-color: #98a2b3; }
.button.ghost { color: #475467; background: transparent; border-color: var(--line); }
.button.danger { color: var(--danger); background: #fff; border-color: #fda29b; }
.button.danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.button.compact { min-height: 36px; padding: 7px 11px; font-size: .82rem; }

.notice, .flash { margin-bottom: 20px; padding: 14px 17px; border-radius: 11px; line-height: 1.5; }
.notice { color: #175cd3; background: #eff8ff; border: 1px solid #b2ddff; }
.flash.success { color: var(--success); background: var(--success-bg); border: 1px solid #abefc6; }
.flash.error { color: var(--danger); background: var(--danger-bg); border: 1px solid #fecdca; }

.flash-stack {
  position: fixed;
  z-index: 1100;
  top: 22px;
  right: 22px;
  width: min(390px, calc(100vw - 32px));
  pointer-events: none;
}
.flash-stack:empty { display: none; }
.flash-stack .flash {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .16);
  pointer-events: auto;
  animation: flash-in .22s ease-out both;
}
.flash-stack .flash.is-leaving { animation: flash-out .22s ease-in both; }
.flash-close {
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  color: currentColor;
  background: transparent;
  font: inherit;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  opacity: .68;
}
.flash-close:hover { opacity: 1; }

.saving-overlay {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .24);
  backdrop-filter: blur(2px);
}
.saving-overlay[hidden] { display: none; }
.saving-dialog {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 19px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 20px 55px rgba(15, 23, 42, .2);
}
.saving-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #dbe4f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: saving-spin .7s linear infinite;
}
.is-saving { overflow: hidden; }

@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes flash-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes saving-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .flash-stack { top: 12px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .flash-stack .flash, .flash-stack .flash.is-leaving, .saving-spinner { animation-duration: 1ms; }
}

.list-header { display: flex; justify-content: space-between; align-items: end; margin: 46px 0 15px; }
.list-header h2 { margin-bottom: 0; }
.inventory-search { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-inline: 28px 14px; }
.inventory-search input { width: min(360px, 100%); }
.count { padding: 7px 11px; color: #344054; background: #e9edf2; border-radius: 999px; font-size: .82rem; font-weight: 750; }
.card-list { display: grid; gap: 16px; }
.redirect-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 6px 22px rgba(16, 24, 40, .04); }
.redirect-card.inactive { opacity: .72; }
.card-summary { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto 28px; align-items: center; gap: 18px; min-height: 112px; padding: 18px 22px; cursor: pointer; list-style: none; transition: background .15s ease; }
.card-summary::-webkit-details-marker, .links-heading::-webkit-details-marker, .manager-heading::-webkit-details-marker, .payment-public-heading::-webkit-details-marker, .wifi-public-heading::-webkit-details-marker { display: none; }
.card-summary:hover { background: #fafbfc; }
.card-summary:focus-visible, .links-heading:focus-visible { outline: 3px solid rgba(37,99,235,.24); outline-offset: -3px; }
.card-summary-qr, .card-summary-qr-space { width: 72px; height: 72px; display: block; }
.card-summary-qr { padding: 4px; background: white; border: 1px solid var(--line); border-radius: 10px; image-rendering: pixelated; }
.card-summary-qr-group { width: 72px; height: 72px; position: relative; display: block; }
.card-summary-qr-group img { width: 52px; height: 52px; position: absolute; padding: 3px; background: white; border: 1px solid var(--line); border-radius: 8px; image-rendering: pixelated; }
.card-summary-qr-group img:first-child { top: 0; left: 0; }
.card-summary-qr-group img:nth-child(2) { right: 0; bottom: 0; }
.card-summary-qr-group strong { min-width: 24px; height: 24px; position: absolute; right: -3px; top: -3px; z-index: 2; display: grid; place-items: center; padding: 0 6px; color: white; background: var(--brand); border: 2px solid white; border-radius: 999px; font-size: .7rem; }
.card-summary-copy { min-width: 0; }
.card-summary-copy h3 { margin: 6px 0 3px; }
.card-summary-copy .short-url { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.profile-assignment-state { margin: 0; color: var(--muted); font-size: .82rem; }
.disclosure-icon { display: grid; place-items: center; width: 28px; height: 28px; color: #667085; font-size: 1.35rem; font-weight: 800; transition: transform .18s ease; }
.redirect-card[open] > .card-summary .disclosure-icon { transform: rotate(180deg); }
.card-expanded { display: grid; grid-template-columns: 205px minmax(0, 1fr); border-top: 1px solid var(--line); }
.profile-qr-panel { display: flex; min-width: 0; min-height: 264px; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px; padding: 20px; background: #fafafa; border-right: 1px solid var(--line); text-align: center; }
.profile-qr-panel.empty { background: #fff; }
.profile-qr-panel img { width: 164px; height: 164px; padding: 7px; background: white; border: 1px solid var(--line); border-radius: 12px; image-rendering: pixelated; }
.profile-qr-panel strong { display: block; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; }
.profile-qr-panel > .button { width: 100%; max-width: 164px; justify-content: center; }
.profile-qr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; }
.profile-qr-grid a { min-width: 0; color: var(--ink); text-decoration: none; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .64rem; }
.profile-qr-grid a img { width: 74px; height: 74px; display: block; margin: 0 auto 4px; padding: 3px; border-radius: 7px; }
.profile-qr-grid a span { display: block; overflow: hidden; text-overflow: ellipsis; }
.profile-qr-item { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.profile-qr-item .button { width: 100%; padding: 7px 4px; font-size: .66rem; white-space: normal; }
.profile-qr-panel > small { color: var(--muted); font-size: .7rem; line-height: 1.4; }
.card-content { min-width: 0; padding: 24px; }
.business-nfc-access { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; }
.business-nfc-access > div { flex: 1 1 240px; min-width: 0; }
.business-nfc-access strong { display: block; margin-bottom: 7px; font-size: .85rem; }
.business-nfc-access .short-url { display: block; overflow-wrap: anywhere; }
.business-nfc-access p { margin: 7px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.status { display: inline-flex; padding: 3px 8px; color: #475467; background: #f2f4f7; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.status.active, .status-active { color: var(--success); background: var(--success-bg); }
.short-url { margin: 0; color: var(--brand); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .82rem; overflow-wrap: anywhere; }
.metric { min-width: 78px; text-align: right; }
.metric strong { display: block; font-size: 1.8rem; letter-spacing: -.04em; }
.metric span { color: var(--muted); font-size: .78rem; }
.metric-pair { display: flex; gap: 20px; }
.edit-form { display: flex; align-items: end; gap: 12px; padding-top: 20px; }
.edit-form > .field:first-of-type { width: min(210px, 30%); }

.switch-row { min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.switch-row input { position: absolute; opacity: 0; }
.switch { width: 38px; height: 22px; position: relative; background: #d0d5dd; border-radius: 999px; transition: .15s; }
.switch::after { content: ""; width: 16px; height: 16px; position: absolute; top: 3px; left: 3px; background: white; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .15s; }
.switch-row input:checked + .switch { background: var(--brand); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }

.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); background: white; border: 1px dashed #cbd0d8; border-radius: 18px; }
.empty-state h3 { color: var(--ink); }
.empty-icon { margin-bottom: 10px; font-size: 2.5rem; color: var(--brand); }
.compact-empty { padding: 32px 20px; }

.inventory-section { margin-top: 34px; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 28px rgba(16,24,40,.045); }
.inventory-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.inventory-title-row h2 { margin-bottom: 4px; }
.inventory-title-row .muted { margin-bottom: 0; }
.inventory-create-form { display: grid; grid-template-columns: 110px minmax(180px, 1fr) minmax(240px, 1.4fr) auto; align-items: end; gap: 12px; margin-top: 22px; padding: 18px; background: #f0f6ff; border: 1px dashed #9bbcff; border-radius: 13px; }
.inventory-global-search { margin: 18px 0 12px; }
.inventory-piece-list { display: grid; gap: 10px; }
.inventory-piece { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.inventory-piece-summary { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(220px, 1fr) auto 28px; align-items: center; gap: 16px; padding: 15px 17px; cursor: pointer; list-style: none; }
.inventory-piece-summary::-webkit-details-marker { display: none; }
.inventory-piece-summary:hover { background: #fafbfc; }
.inventory-piece[open] > .inventory-piece-summary { background: #f8fafc; border-bottom: 1px solid var(--line); }
.inventory-piece[open] > .inventory-piece-summary .disclosure-icon { transform: rotate(180deg); }
.inventory-assignment span, .inventory-assignment small { display: block; }
.inventory-assignment span { font-weight: 750; }
.inventory-assignment small { margin-top: 3px; color: var(--muted); }
.inventory-piece-metrics { display: flex; gap: 18px; color: var(--muted); font-size: .72rem; text-align: center; }
.inventory-piece-metrics strong { display: block; color: var(--ink); font-size: 1rem; }
.inventory-piece-body { display: grid; grid-template-columns: 185px minmax(0, 1fr); gap: 20px; padding: 20px; }
.inventory-piece-qr { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.inventory-piece-qr img { width: 132px; height: 132px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; image-rendering: pixelated; }
.inventory-piece-qr .physical-url { width: 100%; text-align: center; }
.inventory-piece-controls { min-width: 0; display: grid; gap: 13px; }
.inventory-edit-form { display: grid; grid-template-columns: minmax(170px, 1fr) 160px minmax(220px, 1.3fr) auto auto; align-items: end; gap: 11px; }
.assignment-form { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(180px, 1fr) auto; align-items: end; gap: 12px; padding: 14px; background: #f8fafc; border: 1px solid #e4e7ec; border-radius: 11px; }
.assignment-form p { margin: 0; align-self: center; }
.assignment-form p strong, .assignment-form p span { display: block; }
.assignment-form p span { margin-top: 4px; color: var(--muted); font-size: .78rem; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.assignment-history { padding: 10px 13px; background: #fcfcfd; border: 1px solid var(--line); border-radius: 10px; }
.assignment-history summary { cursor: pointer; color: #344054; font-size: .82rem; font-weight: 750; }
.assignment-history > div { display: grid; grid-template-columns: 1fr auto auto; gap: 15px; padding-top: 10px; color: var(--muted); font-size: .76rem; }
.assignment-history > div strong { color: var(--ink); }

.pending-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0%, #dbeafe, transparent 42%), var(--canvas); }
.pending-card { width: min(480px, 100%); padding: 48px 34px; text-align: center; background: white; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 24px 60px rgba(16,24,40,.1); }
.pending-card h1 { margin-bottom: 14px; font-size: 2rem; }
.pending-card > p:last-child { margin: 0; color: var(--muted); line-height: 1.6; }
.pending-mark { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 22px; color: white; background: var(--ink); border-radius: 20px; font-size: 1.45rem; font-weight: 900; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 15%, #dbeafe 0, transparent 35%), var(--canvas); }
.login-card { width: min(430px, 100%); padding: 40px; background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 60px rgba(16, 24, 40, .1); }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 24px; color: white; background: var(--ink); border-radius: 13px; font-weight: 900; letter-spacing: -.05em; }
.form-stack { display: grid; gap: 12px; margin-top: 28px; }

.profile-edit-form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 14px 12px; padding: 22px 0; }
.profile-name { grid-column: span 3; }
.profile-description-field { grid-column: span 5; }
.profile-theme { grid-column: span 2; }
.profile-edit-form .compact-color { width: auto; grid-column: span 1; }
.profile-edit-form .upload-field { grid-column: span 5; }
.profile-active { grid-column: span 2; }
.profile-save { grid-column: span 3; }
.links-manager, .physical-manager, .payment-manager, .wifi-manager { margin-top: 4px; border-top: 1px solid var(--line); }
.links-heading, .manager-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 19px 2px; cursor: pointer; list-style: none; }
.links-heading h4, .manager-heading h4 { margin: 0; font-size: 1rem; }
.links-heading .eyebrow, .manager-heading .eyebrow { margin-bottom: 3px; }
.links-summary-meta, .manager-summary-meta { display: flex; align-items: center; gap: 9px; }
.links-manager[open] > .links-heading { border-bottom: 1px solid #f0f1f3; }
.links-manager[open] > .links-heading .disclosure-icon { transform: rotate(180deg); }
.physical-manager[open] > .manager-heading { border-bottom: 1px solid #f0f1f3; }
.physical-manager[open] > .manager-heading .disclosure-icon { transform: rotate(180deg); }
.payment-manager[open] > .manager-heading { border-bottom: 1px solid #f0f1f3; }
.payment-manager[open] > .manager-heading .disclosure-icon { transform: rotate(180deg); }
.wifi-manager[open] > .manager-heading { border-bottom: 1px solid #f0f1f3; }
.wifi-manager[open] > .manager-heading .disclosure-icon { transform: rotate(180deg); }
.payment-content { padding: 16px 0 5px; }
.payment-edit-form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 13px 12px; margin-top: 15px; }
.payment-beneficiary, .payment-bank { grid-column: span 6; }
.payment-account, .payment-concept { grid-column: span 6; }
.payment-active { grid-column: span 6; }
.payment-save { grid-column: span 3; }
.payment-admin-note { margin: 16px 0 0; padding: 12px 14px; color: #475467; background: #fffaeb; border: 1px solid #fedf89; border-radius: 10px; font-size: .81rem; line-height: 1.5; }
.wifi-content { padding: 16px 0 5px; }
.wifi-edit-form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 13px 12px; margin-top: 15px; }
.wifi-ssid, .wifi-password { grid-column: span 6; }
.wifi-active { grid-column: span 6; }
.wifi-save { grid-column: span 3; }
.wifi-admin-note { margin: 16px 0 0; padding: 12px 14px; color: #175cd3; background: #eff8ff; border: 1px solid #b2ddff; border-radius: 10px; font-size: .81rem; line-height: 1.5; }
.links-content { padding-top: 3px; }
.physical-content { display: grid; gap: 12px; padding: 16px 0 4px; }
.physical-empty-note { margin: 2px 0 0; padding: 14px 16px; color: #475467; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 11px; font-size: .84rem; }
.physical-empty-note a { color: var(--brand); font-weight: 750; }
.manager-help { margin: 0 0 4px; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.physical-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 12px; padding: 17px; background: #fbfcfe; border: 1px solid #e4e7ec; border-radius: 13px; }
.physical-identity { grid-column: span 5; min-width: 0; align-self: stretch; }
.physical-code-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.physical-code-line > strong { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.05rem; letter-spacing: .02em; }
.legacy-badge { padding: 3px 7px; color: #6941c6; background: #f4f3ff; border-radius: 999px; font-size: .69rem; font-weight: 800; }
.status-inventory { color: #175cd3; background: #eff8ff; }
.status-paused { color: #b54708; background: #fffaeb; }
.status-retired { color: #475467; background: #eaecf0; }
.physical-url { display: block; margin-top: 7px; overflow: hidden; color: var(--brand); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.physical-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 7px; margin-top: 11px; }
.physical-location { grid-column: span 4; }
.physical-status { grid-column: span 3; }
.physical-notes { grid-column: span 5; }
.physical-nfc { grid-column: span 3; }
.physical-metrics { grid-column: span 2; display: flex; justify-content: center; gap: 14px; padding-bottom: 8px; color: var(--muted); font-size: .74rem; white-space: nowrap; }
.physical-metrics strong { display: block; color: var(--ink); font-size: 1rem; text-align: center; }
.physical-save { grid-column: span 2; }
.physical-create-row { display: grid; grid-template-columns: 110px minmax(160px, 1fr) 180px minmax(200px, 1.2fr) auto; align-items: end; gap: 12px; margin-top: 4px; padding: 18px; background: #f0f6ff; border: 1px dashed #9bbcff; border-radius: 13px; }
.link-edit-row, .link-create-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 10px 12px; padding: 18px 0; border-top: 1px solid #eaecf0; }
.link-edit-row + .link-edit-row { margin-top: 2px; }
.link-create-row { margin-top: 10px; padding: 18px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; }
.link-title { grid-column: span 3; }
.link-url { grid-column: span 5; }
.link-description { grid-column: span 4; }
.link-kind { grid-column: span 3; }
.link-stats { grid-column: span 1; min-width: 0; padding-bottom: 7px; text-align: center; }
.link-visible, .link-featured { grid-column: span 2; }
.link-save { grid-column: span 2; }
.link-delete { grid-column: span 2; }
.link-edit-row .link-kind { grid-column: span 3; }
.link-create-row .link-kind { grid-column: 5 / span 3; }
.link-create-row .link-featured { grid-column: span 2; }
.link-create-row .link-save { grid-column: span 3; }
.link-stats strong, .link-stats span { display: block; }
.link-stats span { color: var(--muted); font-size: .7rem; }

.profile-shell { --profile-accent: #2563eb; --profile-secondary: #0f172a; min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--profile-accent) 18%, white), transparent 38%), #f4f6f8; }
.profile-card { width: min(480px, 100%); overflow: hidden; padding: 34px 26px 24px; background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.7); border-radius: 26px; box-shadow: 0 24px 70px rgba(15,23,42,.13); text-align: center; }
.profile-card.has-cover { padding-top: 0; }
.profile-cover { height: 190px; margin: 0 -26px 0; background-position: center; background-size: cover; }
.profile-header { position: relative; }
.has-cover .profile-header { margin-top: -48px; }
.profile-mark { width: 76px; height: 76px; display: grid; place-items: center; margin: 0 auto 18px; color: white; background: var(--profile-accent); border-radius: 24px; box-shadow: 0 10px 25px color-mix(in srgb, var(--profile-accent) 28%, transparent); font-size: 2rem; font-weight: 900; }
.profile-avatar { width: 92px; height: 92px; display: block; margin: 0 auto 18px; object-fit: cover; background: white; border: 5px solid white; border-radius: 50%; box-shadow: 0 8px 24px rgba(15,23,42,.18); }
.has-cover .profile-mark { border: 5px solid white; }
.profile-card h1 { font-size: clamp(1.7rem, 6vw, 2.35rem); }
.profile-description { max-width: 38ch; margin: 10px auto 26px; color: var(--muted); line-height: 1.55; }
.profile-links { display: grid; gap: 12px; margin-top: 26px; }
.profile-socials { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.social-link { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--ink); border-radius: 50%; text-decoration: none; }
.social-link .link-icon { border-radius: 50%; }
.profile-link { display: flex; align-items: center; gap: 13px; min-height: 68px; padding: 12px 15px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 4px 12px rgba(15,23,42,.035); text-align: left; text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; }
.profile-link:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--profile-accent) 45%, white); box-shadow: 0 8px 20px rgba(15,23,42,.08); }
.profile-link.featured { color: white; background: var(--profile-secondary); border-color: var(--profile-secondary); }
.profile-link.featured .link-icon { color: var(--profile-secondary); background: white; }
.profile-link.featured .link-copy small, .profile-link.featured .link-arrow { color: rgba(255,255,255,.72); }
.link-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; color: white; background: var(--profile-accent); border-radius: 12px; }
.ui-icon { width: 23px; height: 23px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ui-icon .icon-fill { fill: currentColor; stroke: none; }
.social-link.kind-whatsapp .link-icon { background: #22a95b; }
.social-link.kind-instagram .link-icon { background: linear-gradient(140deg, #7158d9, #d82f81 56%, #f6a23a); }
.social-link.kind-facebook .link-icon { background: #1877f2; }
.social-link.kind-tiktok .link-icon { background: #111; }
.social-link.kind-maps .link-icon { background: #4299d4; }
.social-link.kind-website .link-icon { background: var(--profile-secondary); }
.link-copy { min-width: 0; flex: 1; }
.link-copy strong, .link-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-copy small { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.link-arrow { width: 24px; height: 24px; display: grid; place-items: center; color: var(--profile-accent); }
.link-arrow .ui-icon { width: 19px; height: 19px; }
.service-cta { display: none; }
.profile-empty { margin: 28px 0; padding: 18px; color: var(--muted); background: #f8fafc; border-radius: 12px; }
.payment-public { margin-top: 18px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 17px; text-align: left; box-shadow: 0 4px 12px rgba(15,23,42,.035); }
.payment-public-heading { display: grid; grid-template-columns: 44px minmax(0, 1fr) 24px; align-items: center; gap: 12px; min-height: 70px; padding: 12px 15px; cursor: pointer; list-style: none; }
.payment-public-heading:focus-visible { outline: 3px solid color-mix(in srgb, var(--profile-accent) 25%, transparent); outline-offset: -3px; }
.payment-public-heading > span:nth-child(2) { min-width: 0; }
.payment-public-heading strong, .payment-public-heading small { display: block; }
.payment-public-heading small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.payment-public-icon { width: 42px; height: 42px; display: grid; place-items: center; color: white; background: var(--profile-accent); border-radius: 12px; }
.payment-chevron { color: var(--profile-accent); font-size: 1.25rem; font-weight: 800; transition: transform .18s ease; }
.payment-public[open] .payment-chevron { transform: rotate(180deg); }
.payment-public-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.payment-data { display: grid; gap: 0; margin: 0; }
.payment-data > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-bottom: 1px solid #eef0f3; }
.payment-data dt { color: var(--muted); font-size: .75rem; font-weight: 700; }
.payment-data dd { min-width: 0; margin: 0; color: var(--ink); font-size: .86rem; font-weight: 750; overflow-wrap: anywhere; }
.payment-copy-row dd { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.payment-copy-row code { color: inherit; font: 750 .85rem ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .03em; }
.copy-button { flex: 0 0 auto; padding: 6px 9px; color: var(--profile-accent); background: color-mix(in srgb, var(--profile-accent) 8%, white); border: 1px solid color-mix(in srgb, var(--profile-accent) 28%, white); border-radius: 8px; font-size: .72rem; font-weight: 800; cursor: pointer; }
.payment-warning { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; padding: 11px 12px; color: #854a0e; background: #fffaeb; border-radius: 10px; font-size: .76rem; line-height: 1.45; }
.payment-warning > span { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; color: white; background: #b96a13; border-radius: 50%; font-weight: 900; }
.payment-updated { margin: 9px 2px 0; color: #98a2b3; font-size: .68rem; text-align: right; }
.wifi-public { margin-top: 18px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 17px; text-align: left; box-shadow: 0 4px 12px rgba(15,23,42,.035); }
.wifi-public-heading { display: grid; grid-template-columns: 44px minmax(0, 1fr) 24px; align-items: center; gap: 12px; min-height: 70px; padding: 12px 15px; cursor: pointer; list-style: none; }
.wifi-public-heading:focus-visible { outline: 3px solid color-mix(in srgb, var(--profile-accent) 25%, transparent); outline-offset: -3px; }
.wifi-public-heading > span:nth-child(2) { min-width: 0; }
.wifi-public-heading strong, .wifi-public-heading small { display: block; }
.wifi-public-heading small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.wifi-public-icon { width: 42px; height: 42px; display: grid; place-items: center; color: white; background: var(--profile-accent); border-radius: 12px; }
.wifi-chevron { color: var(--profile-accent); font-size: 1.25rem; font-weight: 800; transition: transform .18s ease; }
.wifi-public[open] .wifi-chevron { transform: rotate(180deg); }
.wifi-public-body { padding: 16px; border-top: 1px solid var(--line); }
.wifi-instruction { margin: 0 0 14px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.wifi-network { padding: 13px 14px; background: color-mix(in srgb, var(--profile-accent) 7%, white); border-radius: 11px; }
.wifi-network span, .wifi-password-public > label { display: block; margin-bottom: 5px; color: var(--muted); font-size: .72rem; font-weight: 750; }
.wifi-network strong { display: block; overflow-wrap: anywhere; font-size: 1rem; }
.wifi-password-public { margin-top: 14px; }
.wifi-password-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.wifi-password-controls input { min-width: 0; min-height: 43px; padding: 9px 11px; color: var(--ink); background: #fff; border: 1px solid #d0d5dd; border-radius: 10px; font: 750 .9rem ui-monospace, SFMono-Regular, Consolas, monospace; }
.wifi-show-button { min-width: 82px; padding: 8px 11px; color: var(--profile-accent); background: #fff; border: 1px solid color-mix(in srgb, var(--profile-accent) 35%, #d0d5dd); border-radius: 10px; font-size: .76rem; font-weight: 800; cursor: pointer; }
.wifi-copy-button { width: 100%; min-height: 42px; margin-top: 12px; color: white; background: var(--profile-accent); border: 0; border-radius: 11px; font-size: .83rem; font-weight: 800; cursor: pointer; }
.wifi-copy-button:hover { filter: brightness(.94); }
.profile-footer { margin-top: 28px; color: #98a2b3; font-size: .72rem; }

.theme-editorial { padding-block: 18px; background: linear-gradient(145deg, color-mix(in srgb, var(--profile-secondary) 94%, black), color-mix(in srgb, var(--profile-accent) 58%, #d8c19a)); }
.theme-editorial .profile-card { width: min(600px, 100%); padding: 38px 38px 27px; border-color: rgba(255,255,255,.26); border-radius: 32px; background: #fbf8f1; box-shadow: 0 28px 80px rgba(3,18,31,.25); }
.theme-editorial .profile-card.has-cover { padding-top: 0; }
.theme-editorial .profile-cover { height: 290px; margin-inline: -38px; border-radius: 0 0 50% 50% / 0 0 13% 13%; }
.theme-editorial .has-cover .profile-header { margin-top: -82px; }
.theme-editorial .profile-avatar { width: 158px; height: 158px; border: 8px solid #f4e4c6; background: var(--profile-secondary); box-shadow: 0 12px 32px rgba(3,18,31,.25); }
.theme-editorial .profile-mark { width: 142px; height: 142px; color: #f2ce91; background: var(--profile-secondary); border: 8px solid #f4e4c6; border-radius: 50%; box-shadow: 0 12px 32px rgba(3,18,31,.25); font-family: Georgia, "Times New Roman", serif; font-size: 3.3rem; font-weight: 500; }
.theme-editorial .profile-card h1 { color: var(--profile-secondary); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.4rem, 8vw, 3.7rem); font-weight: 500; letter-spacing: -.035em; }
.theme-editorial .profile-description { max-width: 46ch; margin: 10px auto 24px; color: color-mix(in srgb, var(--profile-secondary) 72%, white); font-size: 1.04rem; }
.theme-editorial .profile-socials { gap: 13px; margin: 25px 0 10px; }
.theme-editorial .social-link .link-icon,
.theme-editorial .social-link.kind-whatsapp .link-icon,
.theme-editorial .social-link.kind-instagram .link-icon,
.theme-editorial .social-link.kind-facebook .link-icon,
.theme-editorial .social-link.kind-tiktok .link-icon { width: 54px; height: 54px; color: var(--profile-secondary); background: #efe5d3; box-shadow: none; }
.theme-editorial .social-link .ui-icon { width: 26px; height: 26px; stroke-width: 1.9; }
.theme-editorial .social-link:hover .link-icon { color: #f5d195; background: var(--profile-secondary); transform: translateY(-2px); }
.theme-editorial .profile-links { gap: 14px; margin-top: 31px; }
.theme-editorial .profile-link,
.theme-editorial .profile-link.featured { min-height: 90px; padding: 17px 22px; color: #fff; background: var(--profile-secondary); border: 0; border-radius: 22px; box-shadow: 0 10px 23px rgba(3,18,31,.14); }
.theme-editorial .profile-link:nth-child(even),
.theme-editorial .profile-link.featured:nth-child(even) { color: var(--profile-secondary); background: linear-gradient(110deg, #e8d7ba, #d4bea0); }
.theme-editorial .profile-link:hover { border-color: transparent; box-shadow: 0 15px 30px rgba(3,18,31,.2); }
.theme-editorial .profile-link > .link-icon,
.theme-editorial .profile-link.featured > .link-icon { width: 52px; height: 52px; color: #f2c77e; background: transparent; border-radius: 0; }
.theme-editorial .profile-link:nth-child(even) > .link-icon { color: var(--profile-secondary); }
.theme-editorial .profile-link > .link-icon .ui-icon { width: 34px; height: 34px; stroke-width: 1.65; }
.theme-editorial .profile-link .link-copy strong { color: inherit; font-size: 1.12rem; font-weight: 700; }
.theme-editorial .profile-link .link-copy small,
.theme-editorial .profile-link.featured .link-copy small { margin-top: 5px; color: rgba(255,255,255,.68); font-size: .82rem; }
.theme-editorial .profile-link:nth-child(even) .link-copy small { color: color-mix(in srgb, var(--profile-secondary) 64%, white); }
.theme-editorial .profile-link .link-arrow { color: white; }
.theme-editorial .profile-link:nth-child(even) .link-arrow { color: var(--profile-secondary); }
.theme-editorial .payment-public { margin-top: 24px; background: #efe5d3; border: 0; border-radius: 21px; }
.theme-editorial .payment-public-icon { color: #f2c77e; background: var(--profile-secondary); }
.theme-editorial .payment-public-heading strong { color: var(--profile-secondary); font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; }
.theme-editorial .payment-public-body { border-color: rgba(15,23,42,.1); }
.theme-editorial .payment-data > div { border-color: rgba(15,23,42,.09); }
.theme-editorial .wifi-public { margin-top: 24px; background: #efe5d3; border: 0; border-radius: 21px; }
.theme-editorial .wifi-public-icon { color: #f2c77e; background: var(--profile-secondary); }
.theme-editorial .wifi-public-heading strong { color: var(--profile-secondary); font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; }
.theme-editorial .wifi-public-body { border-color: rgba(15,23,42,.1); }
.theme-editorial .wifi-copy-button { background: var(--profile-secondary); }
.theme-editorial .profile-footer { color: color-mix(in srgb, var(--profile-secondary) 42%, white); }
.theme-services { padding-block: 18px; background: linear-gradient(180deg, color-mix(in srgb, var(--profile-accent) 9%, white), #f7fbfc 45%, #eef6f8); }
.theme-services .profile-card { width: min(590px, 100%); padding: 34px 30px 25px; border-radius: 34px; background: rgba(255,255,255,.94); }
.theme-services .profile-card.has-cover { padding-top: 0; }
.theme-services .profile-cover { height: 245px; margin-inline: -30px; border-radius: 0 0 50% 50% / 0 0 16% 16%; }
.theme-services .has-cover .profile-header { margin-top: -69px; }
.theme-services .profile-avatar { width: 132px; height: 132px; border-width: 7px; }
.theme-services .profile-mark { width: 112px; height: 112px; border-radius: 50%; border-width: 7px; font-size: 2.7rem; }
.theme-services .profile-card h1 { color: var(--profile-secondary); font-size: clamp(2rem, 7vw, 2.7rem); }
.theme-services .profile-description { max-width: 44ch; margin-bottom: 22px; color: color-mix(in srgb, var(--profile-secondary) 76%, white); font-size: 1.02rem; }
.theme-services .profile-socials { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 12px; margin: 24px 0 10px; }
.theme-services .social-link { min-width: 0; border-radius: 14px; font-size: .73rem; font-weight: 750; }
.theme-services .social-link .link-icon { width: 64px; height: 64px; box-shadow: 0 9px 22px color-mix(in srgb, var(--profile-accent) 18%, transparent); transition: transform .16s ease, box-shadow .16s ease; }
.theme-services .social-link:hover .link-icon { transform: translateY(-3px); box-shadow: 0 13px 28px color-mix(in srgb, var(--profile-accent) 26%, transparent); }
.theme-services .social-link .ui-icon { width: 31px; height: 31px; stroke-width: 1.7; }
.theme-services .quick-label { width: 100%; overflow: hidden; color: var(--profile-secondary); text-overflow: ellipsis; white-space: nowrap; }
.theme-services .profile-links { gap: 18px; margin-top: 32px; }
.theme-services .profile-link,
.theme-services .profile-link.featured { min-height: 142px; display: grid; grid-template-columns: 88px minmax(0, 1fr) 26px; align-items: center; gap: 17px; padding: 18px; color: var(--profile-secondary); background: #fff; border: 1px solid color-mix(in srgb, var(--profile-accent) 14%, #e5e7eb); border-radius: 24px; box-shadow: 0 12px 32px rgba(30,72,94,.09); }
.theme-services .profile-link:hover { border-color: color-mix(in srgb, var(--profile-accent) 52%, white); box-shadow: 0 16px 38px rgba(30,72,94,.14); }
.theme-services .profile-link > .link-icon,
.theme-services .profile-link.featured > .link-icon { width: 88px; height: 88px; color: var(--profile-accent); background: color-mix(in srgb, var(--profile-accent) 10%, white); border-radius: 22px; }
.theme-services .profile-link > .link-icon .ui-icon { width: 45px; height: 45px; stroke-width: 1.55; }
.theme-services .profile-link .link-copy strong { color: var(--profile-secondary); font-size: 1.17rem; }
.theme-services .profile-link .link-copy small,
.theme-services .profile-link.featured .link-copy small { margin-top: 6px; color: color-mix(in srgb, var(--profile-secondary) 67%, white); font-size: .84rem; line-height: 1.4; white-space: normal; }
.theme-services .profile-link .link-arrow { color: var(--profile-secondary); }
.theme-services .service-cta { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; margin-top: 12px; padding: 7px 14px; color: white; background: linear-gradient(100deg, var(--profile-accent), color-mix(in srgb, var(--profile-accent) 68%, var(--profile-secondary))); border-radius: 999px; font-size: .78rem; font-weight: 800; }
.theme-services .payment-public { margin-top: 24px; border-color: color-mix(in srgb, var(--profile-accent) 20%, #e5e7eb); border-radius: 22px; box-shadow: 0 10px 26px rgba(30,72,94,.08); }
.theme-services .payment-public-heading { min-height: 82px; padding: 15px 18px; }
.theme-services .payment-public-icon { width: 50px; height: 50px; border-radius: 15px; }
.theme-services .wifi-public { margin-top: 24px; border-color: color-mix(in srgb, var(--profile-accent) 20%, #e5e7eb); border-radius: 22px; box-shadow: 0 10px 26px rgba(30,72,94,.08); }
.theme-services .wifi-public-heading { min-height: 82px; padding: 15px 18px; }
.theme-services .wifi-public-icon { width: 50px; height: 50px; border-radius: 15px; }
.theme-services .profile-footer { margin-top: 34px; }

@media (max-width: 850px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .card-summary { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; }
  .card-summary-qr, .card-summary-qr-space, .card-summary-qr-group { width: 60px; height: 60px; }
  .card-summary-qr-group img { width: 45px; height: 45px; }
  .card-summary .metric-pair { grid-column: 2; gap: 18px; }
  .card-summary > .disclosure-icon { grid-column: 3; grid-row: 1 / span 2; }
  .card-expanded { grid-template-columns: 1fr; }
  .profile-qr-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .edit-form { display: grid; grid-template-columns: 1fr 1fr; }
  .edit-form > .field:first-of-type { width: auto; }
  .edit-form .grow { grid-column: 1 / -1; }
  .profile-edit-form, .link-edit-row, .link-create-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-name, .profile-theme, .profile-edit-form .compact-color, .profile-edit-form .upload-field, .profile-active, .profile-save,
  .link-title, .link-kind, .link-stats, .link-visible, .link-featured, .link-save,
  .link-delete,
  .link-edit-row .link-kind, .link-create-row .link-kind, .link-create-row .link-featured, .link-create-row .link-save { grid-column: span 1; }
  .profile-description-field, .link-url, .link-description { grid-column: 1 / -1; }
  .payment-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-beneficiary, .payment-bank, .payment-account, .payment-concept, .payment-active, .payment-save { grid-column: span 1; }
  .wifi-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wifi-ssid, .wifi-password, .wifi-active, .wifi-save { grid-column: span 1; }
  .list-header { flex-wrap: wrap; }
  .inventory-search { order: 3; flex-basis: 100%; margin: 10px 0 0; justify-content: stretch; }
  .inventory-search input { width: 100%; }
  .physical-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .physical-identity, .physical-location, .physical-notes { grid-column: 1 / -1; }
  .physical-status, .physical-nfc, .physical-metrics, .physical-save { grid-column: span 1; }
  .physical-create-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .physical-create-notes { grid-column: 1 / -1; }
  .inventory-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-piece-summary { grid-template-columns: minmax(160px, 1fr) minmax(170px, 1fr) 28px; }
  .inventory-piece-metrics { grid-column: 1 / 3; justify-content: flex-start; }
  .inventory-piece-summary > .disclosure-icon { grid-column: 3; grid-row: 1 / 3; }
  .inventory-piece-body { grid-template-columns: 1fr; }
  .inventory-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-edit-notes { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .inventory-piece-summary { padding: 12px 14px; gap: 7px; }
  .inventory-piece-summary .inventory-assignment small, .inventory-piece-summary .inventory-piece-metrics { display: none; }
  .inventory-mobile-facts { display: grid; gap: 4px; color: var(--muted); font-size: .78rem; }
  .inventory-pagination .button { padding: 9px 10px; font-size: .8rem; }
  .topbar { align-items: flex-start; padding: 18px 20px; }
  .page-shell { width: min(100% - 24px, 1180px); margin-top: 20px; }
  .hero-grid { padding: 22px; }
  .create-form, .edit-form { grid-template-columns: 1fr; }
  .create-form .field, .create-form .wide, .edit-form .grow { grid-column: 1; }
  .card-content { padding: 20px; }
  .card-summary { min-height: 96px; padding: 14px; }
  .card-summary-copy .short-url { display: none; }
  .card-summary .metric strong { font-size: 1.3rem; }
  .card-summary .metric { min-width: 52px; text-align: left; }
  .metric { text-align: left; }
  .login-card { padding: 28px 22px; }
  .profile-edit-form, .link-edit-row, .link-create-row { grid-template-columns: 1fr; }
  .profile-name, .profile-description-field, .profile-theme, .profile-edit-form .compact-color, .profile-edit-form .upload-field, .profile-active, .profile-save,
  .link-title, .link-url, .link-description, .link-kind, .link-stats, .link-visible, .link-featured, .link-save,
  .link-delete,
  .link-edit-row .link-kind, .link-create-row .link-kind, .link-create-row .link-featured, .link-create-row .link-save { grid-column: 1; }
  .payment-edit-form { grid-template-columns: 1fr; }
  .payment-beneficiary, .payment-bank, .payment-account, .payment-concept, .payment-active, .payment-save { grid-column: 1; }
  .wifi-edit-form { grid-template-columns: 1fr; }
  .wifi-ssid, .wifi-password, .wifi-active, .wifi-save { grid-column: 1; }
  .payment-data > div { grid-template-columns: 1fr; gap: 5px; }
  .metric-pair { width: 100%; justify-content: flex-start; }
  .inventory-search { display: grid; grid-template-columns: 1fr auto; }
  .inventory-search input { grid-column: 1 / -1; }
  .physical-row, .physical-create-row { grid-template-columns: 1fr; }
  .physical-identity, .physical-location, .physical-status, .physical-notes, .physical-nfc, .physical-metrics, .physical-save, .physical-create-notes { grid-column: 1; }
  .physical-metrics { justify-content: flex-start; }
  .inventory-section { padding: 20px; }
  .inventory-create-form, .inventory-edit-form, .assignment-form { grid-template-columns: 1fr; }
  .inventory-notes, .inventory-edit-notes { grid-column: 1; }
  .inventory-piece-summary { grid-template-columns: minmax(0, 1fr) 28px; }
  .inventory-assignment, .inventory-piece-metrics { grid-column: 1; }
  .inventory-piece-summary > .disclosure-icon { grid-column: 2; grid-row: 1 / 4; }
  .inventory-section .inventory-piece-summary > .disclosure-icon { grid-row: 1 / span 2; }
  .assignment-history > div { grid-template-columns: 1fr; gap: 3px; }
  .theme-editorial { padding: 0; }
  .theme-editorial .profile-card { padding: 28px 20px 22px; border-radius: 0; }
  .theme-editorial .profile-card.has-cover { padding-top: 0; }
  .theme-editorial .profile-cover { height: 225px; margin-inline: -20px; }
  .theme-editorial .has-cover .profile-header { margin-top: -65px; }
  .theme-editorial .profile-avatar { width: 126px; height: 126px; border-width: 6px; }
  .theme-editorial .profile-mark { width: 118px; height: 118px; border-width: 6px; font-size: 2.7rem; }
  .theme-editorial .profile-card h1 { font-size: 2.65rem; }
  .theme-editorial .profile-socials { gap: 9px; }
  .theme-editorial .social-link .link-icon,
  .theme-editorial .social-link.kind-whatsapp .link-icon,
  .theme-editorial .social-link.kind-instagram .link-icon,
  .theme-editorial .social-link.kind-facebook .link-icon,
  .theme-editorial .social-link.kind-tiktok .link-icon { width: 48px; height: 48px; }
  .theme-editorial .profile-link,
  .theme-editorial .profile-link.featured { min-height: 82px; padding: 14px 16px; border-radius: 18px; }
  .theme-editorial .profile-link > .link-icon,
  .theme-editorial .profile-link.featured > .link-icon { width: 44px; height: 44px; }
  .theme-editorial .profile-link > .link-icon .ui-icon { width: 30px; height: 30px; }
  .theme-services { padding: 0; }
  .theme-services .profile-card { padding: 28px 20px 22px; border-radius: 0; }
  .theme-services .profile-card.has-cover { padding-top: 0; }
  .theme-services .profile-cover { height: 210px; margin-inline: -20px; }
  .theme-services .profile-socials { gap: 8px; }
  .theme-services .social-link .link-icon { width: 54px; height: 54px; }
  .theme-services .social-link .ui-icon { width: 27px; height: 27px; }
  .theme-services .profile-link,
  .theme-services .profile-link.featured { grid-template-columns: 68px minmax(0, 1fr) 20px; gap: 12px; min-height: 120px; padding: 14px; border-radius: 19px; }
  .theme-services .profile-link > .link-icon,
  .theme-services .profile-link.featured > .link-icon { width: 68px; height: 68px; border-radius: 17px; }
  .theme-services .profile-link > .link-icon .ui-icon { width: 35px; height: 35px; }
}
