:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #dbe3ee;
  --text: #0f1f35;
  --muted: #66758a;
  --primary: #0f7c8a;
  --primary-dark: #0b5f6b;
  --sidebar: #10243f;
  --sidebar-soft: #183452;
  --danger: #b42318;
  --warning: #b45309;
  --ok: #15803d;
  --info: #2563eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  --sidebar-width: 248px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  color: #ffffff;
  background: var(--primary);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover {
  background: var(--primary-dark);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.secondary,
.button.secondary {
  color: var(--text);
  background: #e2e8f0;
}

button.secondary:hover,
.button.secondary:hover {
  background: #cbd5e1;
}

button.danger {
  background: var(--danger);
}

button.warning {
  background: var(--warning);
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.asset-header {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
  align-items: stretch;
  width: var(--sidebar-width);
  min-height: 100vh;
  padding: 18px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  background:
    radial-gradient(circle at top left, rgba(15, 124, 138, 0.42), transparent 34%),
    linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-soft) 100%);
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.12);
  overflow-y: auto;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}

.brand-link img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.brand-link span {
  display: grid;
}

.brand-link small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.asset-nav {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.asset-nav a {
  border-radius: 8px;
  padding: 11px 14px;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.asset-nav a.active,
.asset-nav a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #0f7c8a 0%, #0e6f78 100%);
  box-shadow: 0 10px 24px rgba(15, 124, 138, 0.28);
  transform: translateX(2px);
}

.auth-box {
  display: grid;
  gap: 8px;
  align-self: end;
  align-items: stretch;
  justify-content: stretch;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.user-chip {
  max-width: 100%;
  overflow: hidden;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-main {
  width: auto;
  min-height: 100vh;
  margin: 0 0 0 var(--sidebar-width);
  padding: 24px 28px 48px;
}

.notice-panel,
.panel,
.filter-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notice-panel {
  padding: 28px;
}

.notice-panel.warning {
  border-color: #fed7aa;
  color: #7c2d12;
  background: #fff7ed;
}

.role-panel {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 16px 18px;
  box-shadow: none;
}

.role-panel h2,
.role-panel p {
  margin: 0;
}

.role-panel p {
  margin-top: 4px;
}

.role-badge-row {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 52%;
}

.qr-guest-note {
  margin-bottom: 16px;
  padding: 16px 18px;
}

.qr-guest-note h2,
.qr-guest-note p {
  margin: 0;
}

.qr-guest-note p {
  margin-top: 4px;
  color: var(--muted);
}

.page-title-row,
.panel-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.page-title-row {
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.dashboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  justify-content: flex-end;
}

.dashboard-toolbar label {
  min-width: 190px;
}

.scope-caption {
  display: block;
  margin-top: 4px;
  max-width: 260px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: 28px;
}

h2 {
  margin-bottom: 10px;
  font-size: 20px;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary);
}

.stat-card strong {
  display: block;
  font-size: 24px;
}

.stat-card small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
}

.filter-panel:not(.lookup-panel) label:first-child {
  grid-column: span 2;
}

.lookup-panel {
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-panel {
  min-width: 0;
}

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

.action-tile-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.action-tile {
  display: grid;
  gap: 6px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.action-tile:hover {
  border-color: #2dd4bf;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.11);
  transform: translateY(-1px);
}

.action-tile span,
.action-tile small {
  color: var(--muted);
  font-weight: 700;
}

.action-tile strong {
  font-size: 28px;
  line-height: 1;
}

.dashboard-donut-wrap {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.dashboard-donut {
  display: grid;
  place-items: center;
  width: 150px;
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle, #ffffff 0 50%, transparent 51%),
    conic-gradient(
      #22c55e 0 var(--available),
      #2563eb var(--available) var(--in-use),
      #f97316 var(--in-use) var(--pending),
      #ef4444 var(--pending) var(--broken),
      #94a3b8 var(--broken) 360deg
    );
}

.dashboard-donut > div {
  display: grid;
  place-items: center;
}

.dashboard-donut strong {
  font-size: 28px;
  line-height: 1;
}

.dashboard-donut span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.legend-list,
.dashboard-list,
.bar-list {
  display: grid;
  gap: 9px;
}

.legend-list span {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #94a3b8;
}

.legend-dot.ok { background: #22c55e; }
.legend-dot.info { background: #2563eb; }
.legend-dot.warn { background: #f97316; }
.legend-dot.danger { background: #ef4444; }
.legend-dot.neutral { background: #94a3b8; }

.dashboard-list-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.dashboard-list-row > div:first-child {
  display: grid;
  min-width: 0;
}

.dashboard-list-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-row-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.compact-list {
  margin-top: 12px;
}

.repair-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.repair-summary-card {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.repair-summary-card strong {
  font-size: 22px;
}

.repair-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.metric-tile {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.metric-tile strong {
  font-size: 22px;
  line-height: 1.15;
}

.metric-tile span,
.metric-tile small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-row-label {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.bar-row-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f7c8a, #22c55e);
}

.text-link {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(380px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.asset-console-layout {
  display: grid;
  gap: 16px;
}

.check-layout {
  grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.8fr);
}

.panel {
  padding: 18px;
}

.asset-list-panel {
  padding: 0;
}

.asset-list-panel .panel-heading {
  padding: 16px 18px 0;
}

#assetListPager {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line);
}

.asset-list,
.admin-list {
  display: grid;
  gap: 10px;
}

.asset-row,
.admin-row,
.history-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.asset-row {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.asset-row:hover,
.asset-row.active {
  border-color: #2dd4bf;
  background: #f0fdfa;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.11);
  transform: translateY(-1px);
}

.asset-row-main,
.asset-table-identity {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.asset-table-identity {
  grid-template-columns: 54px minmax(0, 1fr);
}

.asset-row-copy {
  min-width: 0;
}

.asset-thumb-frame,
.asset-photo-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.asset-thumb-frame {
  width: 76px;
  height: 76px;
}

.asset-thumb-frame.compact {
  width: 54px;
  height: 54px;
}

.asset-thumb,
.asset-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-name-button {
  display: inline;
  min-height: 0;
  max-width: 100%;
  border-radius: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.asset-name-button:hover {
  color: var(--primary);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.asset-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.row-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.row-title {
  min-width: 0;
}

.row-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.meta-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.meta-item small {
  display: block;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-available {
  color: #14532d;
  background: #dcfce7;
}

.status-in_use,
.status-pending_checkout {
  color: #7c2d12;
  background: #ffedd5;
}

.status-reserved {
  color: #1e3a8a;
  background: #dbeafe;
}

.status-broken,
.status-repair,
.status-inactive,
.status-retired {
  color: #7f1d1d;
  background: #fee2e2;
}

.status-reported,
.status-pending,
.status-approved,
.status-accepted,
.status-in_repair,
.status-waiting_parts {
  color: #713f12;
  background: #fef3c7;
}

.status-fixed {
  color: #14532d;
  background: #dcfce7;
}

.status-rejected,
.status-cannot_repair,
.status-disposal_requested,
.status-canceled {
  color: #7f1d1d;
  background: #fee2e2;
}

.detail-panel {
  position: sticky;
  top: 92px;
}

.empty-state {
  display: grid;
  place-items: start;
  min-height: 180px;
  color: var(--muted);
}

.action-stack,
.stacked-form {
  display: grid;
  gap: 12px;
}

.guest-identity-box {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.guest-identity-box h4 {
  margin: 0;
  font-size: 15px;
}

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

.inline-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(100px, 0.5fr) auto;
  gap: 8px;
  align-items: end;
  margin: 12px 0;
}

.location-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.toggle-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.toggle-row label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  width: auto;
  font-weight: 400;
}

.toggle-row input {
  width: auto;
  min-height: auto;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lifecycle-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 12px;
  background: #fff7ed;
}

.lifecycle-panel p {
  margin-bottom: 0;
}

.divider {
  height: 1px;
  margin: 16px 0;
  background: var(--line);
}

.history-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.room-reservation-layout {
  grid-template-columns: minmax(340px, 0.72fr) minmax(520px, 1.28fr);
}

.room-asset-choices {
  margin-top: 8px;
}

.room-asset-section {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.room-asset-section.subtle {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.room-asset-section-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.room-asset-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.room-asset-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
}

.warning-text {
  color: #92400e;
}

.room-asset-choice-grid {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.room-asset-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  font-weight: 400;
}

.room-asset-choice input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
}

.room-asset-choice strong,
.room-asset-choice small {
  display: block;
}

.room-asset-choice small {
  color: var(--muted);
}

.room-asset-choice.disabled {
  opacity: 0.62;
}

.chip-list.compact {
  margin-bottom: 0;
}

.empty-state.compact {
  min-height: 76px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) minmax(420px, 1.15fr);
  gap: 16px;
  align-items: start;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  color: #334155;
  background: #e2e8f0;
}

.admin-tabs button.active {
  color: #ffffff;
  background: #172033;
}

.admin-tab-panel {
  display: grid;
  gap: 16px;
}

.action-panel .panel-heading {
  align-items: center;
}

.table-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.table-filter-grid:not(.two) label:first-child {
  grid-column: span 2;
}

.table-filter-grid.two {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.45fr);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: #43546a;
  background: #f8fafc;
  font-size: 13px;
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background 0.16s ease;
}

.data-table tbody tr:hover {
  background: #f8fbff;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table .table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.data-table .table-actions button,
.data-table .table-actions .button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.data-table textarea {
  min-width: 220px;
}

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
  color: var(--muted);
}

.pagination button {
  min-height: 34px;
  padding: 7px 11px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: #334155;
  background: var(--surface-soft);
  font-size: 13px;
}

.asset-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.5);
}

.asset-modal {
  width: min(760px, 100%);
  max-height: min(86vh, 780px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.asset-detail-modal {
  position: relative;
  width: min(1080px, 100%);
  padding: 0;
}

.qr-modal {
  width: min(560px, 100%);
}

.qr-modal-layout {
  display: grid;
  gap: 16px;
  justify-items: center;
}

.qr-card {
  display: grid;
  gap: 12px;
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  background: #ffffff;
}

.qr-card-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.qr-card-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.qr-card-brand strong,
.qr-card-info strong {
  display: block;
}

.qr-card-brand span,
.qr-card-info span,
.qr-card-url {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.qr-card-code img {
  width: min(260px, 100%);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qr-card-info {
  display: grid;
  gap: 3px;
}

.qr-card-url {
  overflow-wrap: anywhere;
}

.qr-modal-actions {
  width: 100%;
}

.detail-close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.asset-detail-content {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.asset-detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.asset-photo-frame.large {
  min-height: 240px;
  aspect-ratio: 4 / 3;
}

.asset-detail-summary {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding-right: 42px;
}

.asset-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.asset-summary-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: #334155;
  background: var(--surface-soft);
  font-size: 13px;
}

.asset-action-bar {
  margin-top: 2px;
}

.asset-live-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 10px 12px;
  color: #7c2d12;
  background: #fff7ed;
}

.asset-detail-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: var(--surface-soft);
}

.asset-detail-tabs button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 12px;
  color: #334155;
  background: transparent;
}

.asset-detail-tabs button:hover,
.asset-detail-tabs button.active {
  color: #ffffff;
  background: #172033;
}

.asset-tab-panel {
  display: none;
}

.asset-tab-panel.active {
  display: block;
}

.asset-notes {
  margin-top: 12px;
}

.asset-modal.narrow {
  width: min(560px, 100%);
}

.asset-modal-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.asset-modal-header h2 {
  margin: 0;
}

.icon-button {
  width: 40px;
  min-width: 40px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(420px, calc(100% - 36px));
  border-radius: 8px;
  padding: 12px 14px;
  color: #ffffff;
  background: #172033;
  box-shadow: var(--shadow);
}

.qr-url {
  overflow-wrap: anywhere;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px;
  color: #334155;
  background: var(--surface-soft);
  font-size: 13px;
}

@media (max-width: 980px) {
  .asset-header {
    position: sticky;
    inset: auto;
    width: auto;
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .asset-nav,
  .auth-box {
    justify-content: flex-start;
    overflow: auto;
  }

  .asset-nav {
    display: flex;
  }

  .auth-box {
    display: flex;
  }

  .asset-main {
    margin-left: 0;
  }

  .filter-panel,
  .split-layout,
  .check-layout,
  .dashboard-grid,
  .dashboard-donut-wrap,
  .admin-grid,
  .asset-detail-hero,
  .table-filter-grid,
  .table-filter-grid.two,
  .location-form-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel:not(.lookup-panel) label:first-child,
  .table-filter-grid:not(.two) label:first-child {
    grid-column: auto;
  }

  .action-panel-wide {
    grid-column: auto;
  }

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

  .dashboard-donut-wrap {
    justify-items: center;
  }

  .detail-panel {
    position: static;
  }

  .asset-detail-summary {
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .asset-main {
    width: min(100% - 18px, 1360px);
    margin: 0 auto;
    padding-top: 16px;
  }

  .asset-header {
    padding: 12px;
  }

  .page-title-row,
  .panel-heading,
  .role-panel,
  .row-top {
    display: grid;
  }

  .role-badge-row {
    justify-content: flex-start;
    max-width: none;
  }

  .dashboard-toolbar,
  .dashboard-list-row {
    display: grid;
    justify-content: stretch;
  }

  .dashboard-toolbar label {
    min-width: 0;
  }

  .action-tile-grid,
  .repair-summary-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-row-meta {
    justify-items: start;
    text-align: left;
  }

  .form-grid,
  .meta-grid,
  .inline-form,
  .form-actions,
  .pagination,
  .lookup-panel {
    grid-template-columns: 1fr;
  }

  .pagination {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .auth-box {
    flex-wrap: wrap;
  }

  .asset-row-main {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .asset-thumb-frame {
    width: 64px;
    height: 64px;
  }

  .asset-table-identity {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .asset-thumb-frame.compact {
    width: 48px;
    height: 48px;
  }

  .asset-modal-backdrop {
    padding: 10px;
  }

  .asset-detail-content {
    padding: 14px;
  }

  .asset-photo-frame.large {
    min-height: 190px;
  }
}
