:root {
  --asset-r2-accent: #167f78;
  --asset-r2-accent-strong: #0f625d;
  --asset-r2-soft: #eaf7f5;
  --asset-r2-line: #dbe6e9;
  --asset-r2-ink: #17324d;
}

.assetFormSectionTitle,
.assetDialogSectionTitle {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 11px;
  margin: 4px 0 0;
  padding: 10px 0 8px;
  color: var(--asset-r2-ink);
  border-bottom: 1px solid #e4ecef;
}

.assetFormSectionTitle > span,
.assetDialogSectionTitle > span {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--asset-r2-accent-strong);
  font-size: .66rem;
  font-weight: 800;
  background: var(--asset-r2-soft);
  border: 1px solid #c9e5e1;
  border-radius: 9px;
}

.assetFormSectionTitle > div {
  display: grid;
  gap: 2px;
}

.assetFormSectionTitle strong,
.assetDialogSectionTitle strong {
  font-size: .78rem;
  font-weight: 800;
}

.assetFormSectionTitle small {
  color: #7a8998;
  font-size: .63rem;
}

.assetForm textarea,
.assetDialog textarea {
  width: 100%;
  min-height: 96px;
  padding: 11px 12px;
  color: #263a50;
  background: #fff;
  border: 1px solid #d7e1e8;
  border-radius: 9px;
  box-sizing: border-box;
  font: inherit;
  resize: vertical;
}

.assetsPage .assetDialog {
  width: min(1060px, calc(100vw - 32px));
  max-width: 1060px;
  max-height: calc(100vh - 32px);
}

.assetsPage .assetDialog .dialogBody {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: calc(100vh - 210px);
  overflow-y: auto;
}

.assetArchivedFilter {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 11px;
  color: #526078;
  background: #f8fafc;
  border: 1px solid #dce4ed;
  border-radius: 8px;
  font-size: .64rem;
  font-weight: 700;
}

.assetArchivedFilter input {
  width: 15px;
  height: 15px;
  accent-color: var(--asset-r2-accent);
}

.assetTable tr.is-archived td {
  color: #7d8998;
  background: #f7f8fa;
}

.assetArchivedBadge {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 7px;
  color: #626d7c;
  background: #e8ebef;
  border-radius: 999px;
  font-size: .52rem;
  font-weight: 800;
  text-transform: uppercase;
}

.assetsPage .clientActions button.lifecycle:hover {
  color: #9a5b12;
  background: #fff5e4;
  border-color: #efd7ad;
}

.assetDetailsDialog {
  width: min(980px, calc(100vw - 32px));
  max-width: 980px;
}

.assetDetailsContent {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-height: calc(100vh - 210px);
  padding: 18px;
  overflow-y: auto;
  background: #f5f8fa;
}

.assetDetailsSection {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--asset-r2-line);
  border-radius: 12px;
  box-shadow: 0 5px 16px rgba(27, 54, 76, .045);
}

.assetDetailsSection h4 {
  margin: 0 0 13px;
  color: var(--asset-r2-accent-strong);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

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

.assetDetailsSection > div > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.assetDetailsSection small {
  color: #7c8998;
  font-size: .59rem;
  font-weight: 700;
  text-transform: uppercase;
}

.assetDetailsSection strong {
  overflow-wrap: anywhere;
  color: #263b51;
  font-size: .72rem;
}

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

.assetDetailsNotes p {
  margin: 0;
  color: #52677a;
  font-size: .71rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.assetDetailsActions {
  flex-wrap: wrap;
}

.assetLifecycleDialog {
  width: min(560px, calc(100vw - 32px));
  max-width: 560px;
}

.assetLifecycleBody {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.assetLifecycleNotice {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  background: var(--asset-r2-soft);
  border: 1px solid #cee6e2;
  border-radius: 10px;
}

.assetLifecycleNotice strong { color: var(--asset-r2-ink); }
.assetLifecycleNotice span { color: #718395; font-size: .68rem; }
.assetLifecycleBody label { display: grid; gap: 7px; color: #40566a; font-size: .68rem; font-weight: 750; }

@media (max-width: 820px) {
  .assetsPage .assetDialog .dialogBody,
  .assetDetailsContent {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .assetsPage .assetDialog,
  .assetDetailsDialog,
  .assetLifecycleDialog {
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .assetsPage .assetDialog .dialogHeader,
  .assetDetailsDialog .dialogHeader,
  .assetLifecycleDialog .dialogHeader {
    position: sticky;
    z-index: 5;
    top: 0;
    background: rgba(255, 255, 255, .98);
  }

  .assetsPage .assetDialog .dialogBody,
  .assetDetailsContent {
    grid-template-columns: minmax(0, 1fr);
    max-height: none;
  }

  .assetDetailsSection > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .assetsPage .assetsTable {
    margin: 0 10px;
    overflow: visible;
    border: 0;
  }

  .assetsPage .assetTable {
    display: block;
    min-width: 0;
  }

  .assetsPage .assetTable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .assetsPage .assetTable tbody,
  .assetsPage .assetTable tr,
  .assetsPage .assetTable td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .assetsPage .assetTable tbody {
    display: grid;
    gap: 12px;
  }

  .assetsPage .assetTable tbody tr {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #dfe7ec;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(24, 53, 75, .055);
  }

  .assetsPage .assetTable td {
    display: grid;
    grid-template-columns: minmax(92px, .7fr) minmax(0, 1.3fr);
    align-items: center;
    min-height: 38px;
    height: auto;
    padding: 8px 2px;
    border-bottom: 1px solid #edf1f4;
    font-size: .68rem;
    text-align: right;
  }

  .assetsPage .assetTable td::before {
    content: attr(data-label);
    color: #83909e;
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-align: left;
    text-transform: uppercase;
  }

  .assetsPage .assetTable td:last-child {
    display: flex;
    justify-content: flex-end;
    padding-top: 11px;
    border-bottom: 0;
  }

  .assetsPage .assetTable td:last-child::before { content: none; }
  .assetsPage .assetTable .assetEmptyCell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    min-height: 260px;
    padding: 28px 18px !important;
    text-align: center;
  }

  .assetsPage .assetTable .assetEmptyCell::before {
    content: none;
  }

  .assetsPage .clientActions button { width: 36px; height: 36px; }
  .assetArchivedBadge { justify-self: end; margin-top: 4px; }
  .assetArchivedFilter { width: 100%; justify-content: center; box-sizing: border-box; }
}

@media (max-width: 420px) {
  .assetCreateActions,
  .assetDetailsActions,
  .assetLifecycleDialog .dialogFooter {
    display: grid;
    grid-template-columns: 1fr;
  }

  .assetCreateActions > button,
  .assetDetailsActions > button,
  .assetLifecycleDialog .dialogFooter > button {
    width: 100%;
  }
}
