@charset "UTF-8";

/* Design tokens and document defaults */
:root {
  --color-primary: #1087a3;
  --color-primary-dark: #0b6d84;
  --color-primary-soft: #e6f5f8;
  --color-danger: #d92d20;
  --color-warning: #b54708;
  --color-success: #16803c;
  --color-border: #d9dfe7;
  --color-border-soft: #e9edf2;
  --color-bg: #e7ebf0;
  --color-text: #263447;
  --color-muted: #697586;
  --color-white: #fff;
  --color-header: #081426;
  --color-sidebar: #071324;
  --color-sidebar-active: #123a63;
  --shadow-card: 0 3px 12px rgba(25, 39, 60, 0.07);
  --header-height: 56px;
  --sidebar-width: 220px;
}

* {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
  margin: 0;
}
body {
  min-width: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Inter', 'Yu Gothic UI', 'Yu Gothic', Meiryo, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}
a {
  color: var(--color-primary-dark);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Global header and primary navigation */
.header {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;
  left: 0;
  min-height: var(--header-height);
  padding: 0 22px;
  background: var(--color-header);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}
.header a {
  color: var(--color-white);
}
.header__brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.header__brand:hover {
  text-decoration: none;
}
.header__logo,
.login-card__logo {
  position: relative;
  width: 24px;
  height: 17px;
  flex: 0 0 auto;
  border: 2px solid #2bc4d4;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(43, 196, 212, 0.12);
}
.header__logo::before,
.login-card__logo::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #2bc4d4;
  content: '';
  transform: translate(-42%, -50%);
}
.header__account {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
}
.header__account-name {
  font-weight: 700;
}
.header__account a {
  color: #dce6f2;
}

.menu {
  position: fixed;
  z-index: 30;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  overflow-y: auto;
  background: var(--color-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.menu__list {
  margin: 0;
  padding: 12px 0 32px;
  list-style: none;
}
.menu__group-label {
  padding: 20px 20px 7px;
  color: #728199;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.menu__link {
  position: relative;
  min-height: 40px;
  padding: 9px 18px;
  border-left: 3px solid transparent;
  color: #e4ecf5;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
}
.menu__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-white);
  text-decoration: none;
}
.menu__link.is_current {
  background: var(--color-sidebar-active);
  border-left-color: #22bfd2;
  color: var(--color-white);
}
.menu__item-mark {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border: 1px solid #78a4c5;
  border-radius: 2px;
  transform: rotate(45deg);
}
.menu__link.is_current .menu__item-mark {
  border-color: #32d0df;
  background: #32d0df;
}

/* Shared page, card, form, table, and button primitives */
.page-main {
  width: auto;
  min-height: calc(100vh - 54px);
  margin-left: var(--sidebar-width);
  padding: calc(var(--header-height) + 18px) 22px 40px;
}
.page-title {
  margin-bottom: 12px;
}
.page-title h1 {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #344054;
  font-size: 17px;
  line-height: 1.4;
}
.page-title h1::before {
  content: '';
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border: 1px solid #32d0df;
  border-radius: 2px;
  background: #32d0df;
  transform: rotate(45deg);
}
.page-description {
  margin: -6px 0 14px 24px;
  color: var(--color-muted);
  font-size: 12px;
}
.card {
  margin-bottom: 14px;
  padding: 14px;
  background: var(--color-white);
  border: 1px solid rgba(206, 214, 224, 0.65);
  border-radius: 7px;
  box-shadow: var(--shadow-card);
}
.card__title {
  margin-bottom: 10px;
  color: #344054;
  font-size: 14px;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.card-heading .card__title {
  margin-bottom: 0;
}
.notice,
.alert,
.warning {
  margin-bottom: 16px;
  padding: 11px 14px;
  border: 1px solid;
  border-radius: 5px;
}
.notice {
  color: var(--color-success);
  border-color: #a9dfbd;
  background: #edf9f1;
}
.alert {
  color: var(--color-danger);
  border-color: #f2b8b5;
  background: #fff2f1;
}
.warning {
  color: var(--color-warning);
  border-color: #f1cf9b;
  background: #fff8eb;
}

.form-table,
.list-table {
  width: 100%;
  border-collapse: collapse;
}
.form-table th,
.form-table td {
  padding: 11px 10px;
  border: 0;
  border-bottom: 1px solid var(--color-border-soft);
  text-align: left;
  vertical-align: top;
}
.form-table th {
  width: 220px;
  color: #475467;
  font-weight: 700;
}
.form-table tr:last-child th,
.form-table tr:last-child td {
  border-bottom: 0;
}
.list-table {
  min-width: 820px;
}
.list-table th,
.list-table td {
  padding: 7px 9px;
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
}
.list-table th {
  background: #f7f9fb;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}
.list-table tbody tr:hover {
  background: #f7fbfc;
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
}

input[type='text'],
input[type='password'],
input[type='email'],
input[type='number'],
select,
textarea {
  max-width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  background: var(--color-white);
  border: 1px solid #c7ced8;
  border-radius: 4px;
  color: var(--color-text);
  font: inherit;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  outline: 2px solid rgba(16, 135, 163, 0.13);
  outline-offset: 0;
}
input[type='text'],
input[type='email'],
input[type='password'] {
  width: min(620px, 100%);
}
.form-table td > label + label {
  margin-left: 16px;
}
.required {
  margin-left: 3px;
  color: var(--color-danger);
  font-size: 12px;
}
.field-note {
  margin: 4px 0 0;
  color: var(--color-muted);
  font-size: 11px;
}
.button-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.button {
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid var(--color-primary);
  border-radius: 5px;
  background: var(--color-primary);
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}
.button:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
  text-decoration: none;
}
.button.is_secondary {
  border-color: #c7ced8;
  background: var(--color-white);
  color: #475467;
}
.button.is_secondary:hover {
  border-color: #98a2b3;
  background: #f7f9fb;
  color: #344054;
}
.button.is_danger {
  border-color: var(--color-danger);
  background: var(--color-danger);
  color: var(--color-white);
}
.button.is_danger:hover {
  border-color: #b42318;
  background: #b42318;
  color: var(--color-white);
}
.search-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 8px 10px;
}
.search-grid label {
  margin: 0;
  color: #475467;
  display: block;
  font-size: 11px;
  font-weight: 700;
}
.search-grid input,
.search-grid select,
.search-grid textarea {
  width: 100%;
  margin-top: 3px;
}
.search-grid .checkbox-field {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 19px;
}
.search-grid .checkbox-field input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}
.page-main form[method='get'] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: end;
}
.page-main form[method='get'] > .button-row {
  margin-top: 0;
  flex-wrap: nowrap;
}

/* Material search and result toolbar */
.material-search-panel {
  padding: 0;
  overflow: hidden;
  border-color: rgba(175, 196, 211, 0.72);
  background: linear-gradient(145deg, #fff 0%, #f8fcfd 100%);
  box-shadow: 0 8px 24px rgba(31, 58, 76, 0.08);
}
.page-main .material-search-form {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  align-items: stretch;
}
.material-search-query,
.material-search-ratio {
  min-width: 0;
  color: #475467;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
}
.material-search-query textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
  border-color: #b9c9d3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.65;
}
.material-search-query textarea::placeholder {
  color: #98a2b3;
}
.material-search-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.material-search-ratio select {
  width: 100%;
  min-height: 40px;
  border-color: #b9c9d3;
  border-radius: 7px;
  background: #fff;
}
.material-search-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.material-search-submit {
  min-width: 112px;
  min-height: 40px;
  border-radius: 7px;
  box-shadow: 0 4px 10px rgba(16, 135, 163, 0.18);
}
.material-search-clear {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}
.material-kind-tabs {
  padding: 10px 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.material-kind-tab {
  padding: 6px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}
.material-kind-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}
.material-kind-tab.is_current {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}
.material-kind-upload {
  min-height: 32px;
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12px;
}
.asset-kind {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
}
.asset-kind.is_user_uploaded {
  background: #fdf3e7;
  color: var(--color-warning);
}
.upload-panel {
  max-width: 640px;
}
.upload-note {
  margin: 0 0 14px;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.7;
}
.upload-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.upload-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
}
.upload-field textarea {
  padding: 10px 12px;
  resize: vertical;
  border-color: #b9c9d3;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.65;
}
.upload-thumbnail-input {
  display: none;
}
.upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
}
.upload-preview img {
  width: 90px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #0b1220;
}
.upload-preview__meta {
  margin: 0;
  color: var(--color-muted);
  font-size: 12px;
}
.upload-status {
  margin: 0;
  min-height: 18px;
  color: var(--color-muted);
  font-size: 12px;
}
.upload-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.upload-cancel {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}
.result-toolbar {
  min-height: 36px;
  margin: 3px 0 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.result-toolbar h2 {
  margin: 0;
  color: #344054;
  font-size: 14px;
}
.result-toolbar .result-count {
  margin: 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.kpi-card {
  min-height: 120px;
  padding: 14px;
  background: var(--color-white);
  border: 1px solid rgba(206, 214, 224, 0.55);
  border-radius: 5px;
  box-shadow: var(--shadow-card);
}
.kpi-card__label {
  margin-bottom: 8px;
  color: #596579;
  font-size: 12px;
  font-weight: 700;
}
.kpi-card__value {
  margin-bottom: 10px;
  color: #3f4b5d;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}
.kpi-card__compare {
  margin-bottom: 0;
  color: #087b96;
  font-size: 12px;
}
/* Dashboard summaries */
.dashboard-section {
  margin-top: 18px;
}
.result-count {
  margin: 0 0 9px;
  color: var(--color-muted);
  font-weight: 700;
}

.status-badge {
  min-width: 34px;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef1f4;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}
.status-badge.is_active {
  background: #e8f7ef;
  color: #087a4b;
}
.status-badge.is_pending_index {
  background: #fff8e6;
  color: #8a5b00;
}
.status-badge.is_index_failed {
  background: #fff0ef;
  color: #b42318;
}
/* Material cards and pagination */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  align-items: start;
}
.asset-card {
  overflow: hidden;
  padding: 0;
}
.asset-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #07101d;
}
.asset-thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.asset-thumbnail span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  padding-left: 3px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: rgba(7, 16, 29, 0.7);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  transform: translate(-50%, -50%);
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.asset-thumbnail:hover span {
  background: rgba(16, 135, 163, 0.9);
  transform: translate(-50%, -50%) scale(1.06);
}
.asset-body {
  padding: 10px;
}
.asset-body h2 {
  margin: 9px 0 7px;
  color: #344054;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.asset-body p {
  line-height: 1.65;
}
.asset-quick-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.asset-duration,
.asset-score {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-size: 11px;
  font-weight: 700;
}
.asset-score {
  background: #f2f4f7;
  color: #596579;
}
.semantic-text {
  margin-bottom: 0;
  color: #475467;
  font-size: 11px;
  white-space: pre-wrap;
}
.badges,
.tags,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.badges > span:not(.status-badge),
.tags span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef5f7;
  color: #386477;
  font-size: 11px;
}
.tags {
  margin-top: 8px;
}
.asset-body dl {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 5px 8px;
  margin: 12px 0;
  color: var(--color-muted);
  font-size: 11px;
}
.asset-body dt,
.asset-body dd {
  margin: 0;
}
.asset-body dd {
  overflow-wrap: anywhere;
}
.actions {
  margin-top: 14px;
}
.actions form {
  margin: 0;
}
.empty-state {
  grid-column: 1 / -1;
  color: var(--color-muted);
  text-align: center;
}
.pagination {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 90px;
  align-items: center;
  gap: 12px;
}
.pagination__pages {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}
.pagination__page,
.pagination__move,
.pagination__gap {
  min-width: 34px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #d3dbe3;
  border-radius: 7px;
  background: #fff;
  color: #475467;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.pagination__page:hover,
.pagination__move:hover {
  border-color: #75adbc;
  background: #f3fafb;
  color: var(--color-primary-dark);
  text-decoration: none;
}
.pagination__page.is_current {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}
.pagination__move:last-child {
  justify-self: end;
}
.pagination__move.is_disabled {
  opacity: 0.42;
}
.pagination__gap {
  border-color: transparent;
  background: transparent;
}
/* Material preview drawer */
.preview-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(16, 24, 40, 0.52);
}
.preview-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 91;
  width: min(800px, 96vw);
  height: 100dvh;
  overflow: hidden;
  background: var(--color-white);
  box-shadow: -12px 0 30px rgba(16, 24, 40, 0.2);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 400px));
}
.preview-drawer__panel {
  min-width: 0;
  height: 100dvh;
  overflow-y: auto;
}
.preview-drawer__panel--video {
  background: #f4f6f8;
}
.preview-drawer__panel--details {
  border-left: 1px solid var(--color-border);
  background: var(--color-white);
}
.preview-drawer__header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 76px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-soft);
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.preview-drawer__header h2 {
  margin: 2px 0 0;
  color: #344054;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.preview-drawer__eyebrow {
  margin: 0;
  color: var(--color-primary-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.preview-drawer__close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid #d0d5dd;
  border-radius: 50%;
  color: #475467;
  display: grid;
  place-items: center;
  font-size: 25px;
  line-height: 1;
}
.preview-drawer__close--mobile {
  display: none;
}
.preview-drawer__close:hover {
  background: #f2f4f7;
  color: #344054;
  text-decoration: none;
}
.preview-drawer__body {
  padding: 20px;
}
.preview-drawer__video {
  min-height: calc(100dvh - 76px);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-drawer video {
  width: 100%;
  max-width: 360px;
  height: auto;
  max-height: calc(100dvh - 116px);
  margin: 0 auto;
  display: block;
  object-fit: contain;
  background: #07101d;
}
.preview-drawer__tags {
  margin: 14px 0;
}
.preview-drawer dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 7px 10px;
  margin-top: 18px;
  color: var(--color-muted);
  font-size: 12px;
}
.preview-drawer dt,
.preview-drawer dd {
  margin: 0;
}
.preview-drawer dd {
  overflow-wrap: anywhere;
}
.permission-table th:not(:first-child),
.permission-table td:not(:first-child) {
  width: 120px;
  text-align: center;
}
.permission-table input[type='checkbox'] {
  width: 18px;
  height: 18px;
}
/* Account management and login */
.account-form .button-row {
  justify-content: flex-end;
}

.footer {
  margin-left: var(--sidebar-width);
  padding: 16px 20px;
  border-top: 1px solid var(--color-border-soft);
  background: var(--color-white);
  color: var(--color-muted);
  font-size: 12px;
  text-align: center;
}

.login-page {
  min-height: 100vh;
  padding: 32px 16px;
  background: #e3e7ed;
  display: grid;
  place-items: center;
}
.login-card {
  width: min(400px, 100%);
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid rgba(202, 209, 218, 0.7);
  border-radius: 2px;
  box-shadow: 0 5px 15px rgba(26, 39, 56, 0.16);
}
.login-card__header {
  min-height: 68px;
  padding: 17px 22px;
  border-bottom: 1px solid var(--color-border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.login-card__header h1 {
  margin: 0;
  color: #344054;
  font-size: 17px;
}
.login-card__body {
  padding: 22px 20px 26px;
}
.login-fields {
  display: grid;
  gap: 18px;
}
.login-card input[type='text'],
.login-card input[type='password'] {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  background: #eaf2ff;
  border-color: #c9d5e6;
  font-size: 14px;
}
.login-card__actions {
  margin-top: 24px;
  justify-content: center;
}
.login-card__actions .button {
  min-width: 120px;
  min-height: 40px;
  font-size: 14px;
}

/* Responsive layout */
@media (min-width: 1600px) {
  .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1200px) and (min-width: 801px) {
  :root {
    --sidebar-width: 190px;
  }
  .page-main {
    padding-right: 20px;
    padding-left: 20px;
  }
  .search-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .header {
    position: static;
    min-height: var(--header-height);
    padding: 10px 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .header__account {
    width: 100%;
    gap: 12px;
    flex-wrap: wrap;
  }
  .menu {
    position: static;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .menu__list {
    width: max-content;
    min-width: 100%;
    padding: 0 8px;
    display: flex;
  }
  .menu__group-label {
    display: none;
  }
  .menu__link {
    min-height: 46px;
    padding: 10px 12px;
    border-left: 0;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }
  .menu__link.is_current {
    border-bottom-color: #22bfd2;
  }
  .page-main {
    min-height: auto;
    margin-left: 0;
    padding: 18px 12px 34px;
  }
  .page-description {
    margin-left: 0;
  }
  .form-table,
  .form-table tbody,
  .form-table tr,
  .form-table th,
  .form-table td {
    display: block;
    width: 100%;
  }
  .form-table tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-soft);
  }
  .form-table th,
  .form-table td {
    padding: 4px 0;
    border: 0;
  }
  .form-table td > label {
    display: block;
    margin: 5px 0;
  }
  .search-grid {
    grid-template-columns: 1fr;
  }
  .page-main form[method='get'] {
    display: block;
  }
  .page-main form[method='get'] > .button-row {
    margin-top: 10px;
    flex-wrap: wrap;
  }
  .page-main .material-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .preview-drawer {
    width: 100%;
  }
  .footer {
    margin-left: 0;
  }
}
@media (max-width: 680px) {
  .preview-drawer {
    overflow-y: auto;
    display: block;
  }
  .preview-drawer__panel {
    height: auto;
    overflow: visible;
  }
  .preview-drawer__panel--details {
    border-top: 1px solid var(--color-border);
    border-left: 0;
  }
  .preview-drawer__video {
    min-height: 0;
  }
  .preview-drawer video {
    max-height: 70dvh;
  }
  .preview-drawer__close--mobile {
    display: grid;
  }
}
@media (max-width: 480px) {
  .header__account-name {
    width: 100%;
  }
  .page-main {
    padding-right: 10px;
    padding-left: 10px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .kpi-card {
    min-height: 0;
  }
  .login-page {
    padding: 20px 12px;
  }
  .login-card__body {
    padding: 20px 16px 26px;
  }
  select {
    width: 100%;
  }
  .preview-drawer {
    width: 100%;
  }
  .preview-drawer__body {
    padding: 14px;
  }
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }
  .button {
    width: 100%;
  }
  .page-main .material-search-form {
    display: block;
    padding: 14px;
  }
  .material-search-actions {
    margin-top: 12px;
  }
  .material-search-buttons {
    justify-content: space-between;
  }
  .material-search-submit {
    width: auto;
  }
  .result-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .pagination {
    grid-template-columns: 1fr 1fr;
  }
  .pagination__pages {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .pagination__move {
    grid-row: 2;
  }
  .login-card__actions {
    align-items: center;
  }
  .login-card__actions .button {
    width: auto;
  }
  .card-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .asset-grid {
    grid-template-columns: 1fr;
  }
}
