:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --line: #e5e7eb;
  --text: #203143;
  --muted: #5a6a7e;
  --primary: #245a8f;
  --primary-dark: #1e4d79;
  --danger: #b83645;
  --shadow: 0 20px 50px rgba(24, 48, 84, 0.12);
  --radius: 22px;
  --font-family: "Inter", "Segoe UI", "Trebuchet MS", sans-serif;
  --content-shell-width: 1180px;
  --content-shell-gutter: 36px;
}

/* Shared content shell: desktop, iPad landscape, tablet, then mobile. */
@media (min-width: 901px) and (max-width: 1280px) {
  :root {
    --content-shell-width: 1060px;
    --content-shell-gutter: 96px;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  :root {
    --content-shell-width: 760px;
    --content-shell-gutter: 96px;
  }
}

@media (max-width: 600px) {
  :root {
    --content-shell-gutter: 28px;
  }
}

[data-theme="dark"] {
  --primary: #78a6ca;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family);
  color: var(--text);
  background: #fff;
}
body.login-page,
body.signup-page {
  background: #fff;
}

html:has(body.designs-page),
html:has(body.shared-page),
html:has(body.profile-page),
html:has(body.admin-page),
body.designs-page,
body.shared-page,
body.profile-page,
body.admin-page {
  background: #fff !important;
}

body.designs-page,
body.shared-page,
body.profile-page,
body.admin-page {
  --bg: #fff;
  --line: #e5e7eb;
  --panel: #fff;
  --panel-2: #fff;
  --surface-light: #fff;
  --hover-bg: #f6f6f6;
  --hover-bg-mid: #eeeeee;
  --shadow: none;
  --shadow-soft: none;
}

[data-theme="dark"] html:has(body.designs-page),
[data-theme="dark"] html:has(body.shared-page),
[data-theme="dark"] html:has(body.profile-page),
[data-theme="dark"] html:has(body.admin-page),
[data-theme="dark"] body.designs-page,
[data-theme="dark"] body.shared-page,
[data-theme="dark"] body.profile-page,
[data-theme="dark"] body.admin-page {
  background: #181816 !important;
}

[data-theme="dark"] body.designs-page,
[data-theme="dark"] body.shared-page,
[data-theme="dark"] body.profile-page,
[data-theme="dark"] body.admin-page {
  --line: rgba(129, 124, 112, 0.42);
  --panel: #24231f;
  --panel-2: #24231f;
  --surface-light: #2a2823;
  --hover-bg: #302e28;
  --hover-bg-mid: #38352e;
}

.saved-shell,
.shared-shell {
  width: min(var(--content-shell-width, 1180px), calc(100vw - var(--content-shell-gutter, 36px)));
  margin: 40px auto 0;
}

.saved-title,
.shared-title {
  margin: 0;
}

body.profile-page .account-card,
body.admin-page .account-card {
  box-shadow: none;
}

body.profile-page .account-card,
body.profile-page .panel,
body.profile-page .profile-stat,
body.profile-page .profile-empty,
body.profile-page .profile-publication,
body.admin-page .account-card,
body.admin-page .panel {
  background: #fff;
}

body.profile-page #profile-cli-active-title {
  margin-top: 24px;
}

body.admin-page .account-form.panel {
  margin-bottom: var(--page-section-gap);
}

body.admin-page .admin-feedback-panel {
  margin-bottom: var(--page-section-gap);
}

.admin-backup-panel {
  margin-top: var(--page-section-gap, 28px);
}

.admin-backup-panel .account-secondary-button {
  width: fit-content;
}

.admin-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: var(--page-section-gap);
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 9px 14px;
  cursor: pointer;
  font: 700 14px/1.2 var(--font-family);
}

.admin-tab:hover,
.admin-tab:focus-visible {
  color: var(--primary);
}

.admin-tab:focus-visible {
  outline: 3px solid var(--action-focus);
  outline-offset: 2px;
}

.admin-tab.is-active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.admin-tab > span {
  min-width: 22px;
  border-radius: 999px;
  background: var(--surface-light);
  color: var(--text-subtle);
  padding: 3px 7px;
  font-size: 11px;
  text-align: center;
}

.admin-tab-panel[hidden] {
  display: none !important;
}

.admin-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.admin-section-head h2 {
  margin-bottom: 5px;
}

.admin-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-feedback-total {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-light);
  color: var(--text-subtle);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}

.admin-statistics-period {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-light);
  color: var(--text-subtle);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}

.admin-statistics-panel > .admin-section-head {
  margin-bottom: 32px;
}

.admin-statistics-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 44px;
}

.admin-stat-card {
  min-width: 0;
  border-radius: 14px;
  background: var(--hover-bg);
  padding: 18px;
}

.admin-stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-subtle);
  font-size: 13px;
  font-weight: 750;
}

.admin-stat-card-head i {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--primary);
  font-size: 15px;
}

.admin-stat-card > strong {
  display: block;
  margin-top: 12px;
  color: var(--text-strong);
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1;
}

.admin-stat-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.admin-stat-card p b {
  color: var(--primary);
}

.admin-statistics-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
}

.admin-statistics-block,
.admin-statistics-ranking {
  border-top: 1px solid var(--line);
  padding: 28px 2px 0;
}

.admin-statistics-block h3,
.admin-statistics-ranking h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 16px;
}

.admin-stat-progress-list {
  display: grid;
  gap: 19px;
  margin-top: 20px;
}

.admin-stat-progress-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
}

.admin-stat-progress-row > div:first-child {
  display: flex;
  grid-column: 1 / -1;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-subtle);
  font-size: 13px;
}

.admin-stat-progress-row strong {
  color: var(--text-strong);
  font-size: 13px;
}

.admin-stat-progress-row strong small {
  color: var(--muted);
  font-weight: 600;
}

.admin-stat-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-light);
}

.admin-stat-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #7f74d9);
}

.admin-stat-progress-row > small {
  min-width: 36px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}

.admin-statistics-ranking {
  margin-top: 48px;
}

.admin-statistics-ranking-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.admin-statistics-ranking-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-statistics-ranking-head > span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--surface-light);
  color: var(--text-subtle);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}

.admin-statistics-top-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-statistics-top-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px 4px;
  border-top: 1px solid var(--line);
}

.admin-statistics-rank {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.admin-statistics-creator {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-statistics-creator strong,
.admin-statistics-creator small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-statistics-creator strong {
  color: var(--text-strong);
  font-size: 13px;
}

.admin-statistics-creator small {
  color: var(--muted);
  font-size: 11px;
}

.admin-statistics-design-count {
  color: var(--text-strong);
  font-size: 15px;
  white-space: nowrap;
}

.admin-statistics-design-count small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.admin-statistics-empty {
  margin: 0;
  color: var(--muted);
}

.admin-feedback-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.admin-feedback-stat {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 9px;
  min-height: 64px;
  border: 1px solid currentColor;
  border-radius: 14px;
  padding: 13px 15px;
}

.admin-feedback-stat i {
  font-size: 23px;
}

.admin-feedback-stat strong {
  color: currentColor;
  font-size: 22px;
}

.admin-feedback-stat span {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 700;
}

.admin-feedback-stat-positive {
  background: #eaf7f0;
  color: #25734c;
}

.admin-feedback-stat-neutral {
  background: #fff6df;
  color: #9a6514;
}

.admin-feedback-stat-negative {
  background: #fdecee;
  color: #a53742;
}

.admin-feedback-empty {
  margin: 0;
  color: var(--muted);
}

.admin-account-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin: 20px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-light);
}

.admin-account-filters label {
  display: grid;
  gap: 6px;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 700;
}

.admin-account-filters input,
.admin-account-filters select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text-strong);
  padding: 8px 10px;
  font: 500 13px/1.3 var(--font-family);
}

.admin-filter-field {
  position: relative;
  display: block;
}

.admin-filter-field i {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.admin-filter-field input {
  padding-left: 34px;
}

.admin-filter-result {
  min-width: 112px;
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.admin-accounts-table tbody tr.is-even-visible,
.admin-feedback-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--primary) 4%, transparent);
}

.admin-accounts-table tbody tr:hover,
.admin-feedback-table tbody tr:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.admin-feedback-table {
  min-width: 840px;
}

.admin-feedback-table th:first-child {
  width: 150px;
}

.admin-feedback-table th:nth-child(2) {
  width: 42%;
}

.admin-feedback-table th:last-child,
.admin-feedback-actions {
  width: 52px;
  text-align: center;
}

.admin-feedback-delete-form {
  margin: 0;
}

.admin-feedback-actions .btn-icon-danger {
  border-radius: 10px;
}

.admin-feedback-actions .btn-icon-danger:focus-visible {
  outline: 3px solid var(--action-focus);
  outline-offset: 2px;
}

.admin-feedback-table code {
  display: inline-block;
  max-width: 240px;
  overflow: hidden;
  color: var(--text-subtle);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-feedback-comment {
  min-width: 260px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-feedback-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.admin-feedback-badge-positive {
  background: #eaf7f0;
  color: #25734c;
}

.admin-feedback-badge-neutral {
  background: #fff6df;
  color: #9a6514;
}

.admin-feedback-badge-negative {
  background: #fdecee;
  color: #a53742;
}

body.admin-page .inline-grid > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-nav-page {
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-breadcrumb {
  width: min(var(--content-shell-width), calc(100vw - var(--content-shell-gutter)));
  margin: 40px auto 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
body.login-page .site-breadcrumb,
body.signup-page .site-breadcrumb,
body.setup-page .site-breadcrumb {
  width: min(480px, calc(100vw - 36px));
}
body.login-page .site-breadcrumb {
  width: min(1040px, calc(100vw - var(--content-shell-gutter)));
  font-size: 15px;
  font-weight: 650;
}
body.about-page .site-breadcrumb {
  width: min(760px, calc(100vw - var(--content-shell-gutter)));
}
.site-breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}
.site-breadcrumb-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}
.site-breadcrumb a:hover,
.site-breadcrumb a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-breadcrumb [aria-current="page"] {
  color: var(--text);
}
.site-breadcrumb-separator {
  color: #8b9aad;
}
.site-nav-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.site-nav-brand-link:hover .site-nav-brand-mark,
.site-nav-brand-link:focus-visible .site-nav-brand-mark {
  transform: none;
}
.nav-account-btn-active {
  background: rgba(255, 255, 255, 0.18);
  color: #f8fbff;
  border-color: rgba(255, 255, 255, 0.3);
}
.account-menu-link.nav-account-btn-active {
  background: #eef4ff;
  color: var(--primary);
}
.account-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}
.account-shell.with-nav {
  min-height: auto;
  padding-top: 24px;
}
body.login-page .account-shell.with-nav {
  flex: 1 1 auto;
  min-height: 0;
}
.login-account-shell {
  width: 100%;
  padding: 28px 18px 64px;
}
.login-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 45%) minmax(0, 55%);
  align-items: stretch;
  gap: 0;
  width: min(1040px, calc(100vw - var(--content-shell-gutter)));
  margin: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}
.login-layout .account-card {
  position: relative;
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 48px;
  background: transparent;
  box-shadow: none;
}
.login-layout .account-card > h1 {
  font-size: clamp(34px, 3vw, 40px);
  line-height: 1.08;
}
.login-layout .account-card > .account-copy {
  font-size: 15px;
}
.login-layout .account-card::before {
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 18%, var(--line) 82%, transparent);
  content: "";
}
.login-intro {
  display: flex;
  max-width: none;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
}
html body.login-page .login-intro h2 {
  margin: 0;
  color: var(--heading-ink);
  font-family: var(--font-family);
  font-size: clamp(28px, 3.1vw, 40px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.login-intro-copy {
  max-width: 450px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}
.login-benefits {
  display: grid;
  gap: 13px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.login-benefits li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 750;
}
.login-benefits i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(83, 105, 130, 0.1);
  color: #536982;
  font-size: 15px;
}
.login-learning-rhythm {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.35fr 0.7fr 1fr 0.9fr;
  gap: 7px;
  width: min(100%, 430px);
  height: 6px;
  margin-top: 32px;
}
.login-learning-rhythm span {
  border-radius: 999px;
}
.login-learning-rhythm span:nth-child(1) { background: var(--read); }
.login-learning-rhythm span:nth-child(2) { background: var(--investigate); }
.login-learning-rhythm span:nth-child(3) { background: var(--practice); }
.login-learning-rhythm span:nth-child(4) { background: var(--produce); }
.login-learning-rhythm span:nth-child(5) { background: var(--discuss); }
.login-learning-rhythm span:nth-child(6) { background: var(--collaborate); }
body.login-page .site-footer-copy-stack {
  align-items: center;
  text-align: center;
}
body.login-page .site-footer-links {
  justify-content: center;
}
.about-card {
  position: relative;
  overflow: hidden;
  transform: translateY(-20px);
}
.about-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--read) 0 16.66%,
    var(--investigate) 16.66% 33.33%,
    var(--practice) 33.33% 50%,
    var(--produce) 50% 66.66%,
    var(--discuss) 66.66% 83.33%,
    var(--collaborate) 83.33% 100%
  );
  content: "";
}
@media (max-width: 600px) {
  .about-card {
    transform: none;
  }
}
.site-nav-page + .saved-shell,
.site-nav-page + .shared-shell {
  margin-top: 40px;
}
.site-breadcrumb + .saved-shell,
.site-breadcrumb + .shared-shell {
  margin-top: 40px;
}
.profile-shell {
  display: block;
  width: min(var(--content-shell-width), calc(100vw - var(--content-shell-gutter)));
  max-width: none;
  margin: 0 auto;
  padding-right: 0;
  padding-left: 0;
}
.account-card {
  width: min(100%, 480px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--card-padding, 32px);
}
.account-card.wide {
  width: 100%;
}
.account-kicker {
  margin: 0 0 10px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
}
h1, h2 {
  margin: 0 0 10px;
}
.title-with-icon {
  display: flex;
  /* La ligne de base garde les glyphes Font Awesome alignés avec le titre. */
  align-items: baseline;
  gap: 10px;
}
.title-with-icon i {
  display: inline-block;
  flex: 0 0 1.25em;
  width: 1.25em;
  color: inherit;
  font-size: 0.82em;
  line-height: 1;
  text-align: center;
}
.account-copy {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: var(--content-leading, 1.72);
}
.account-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.account-form label,
.field label {
  font-weight: 700;
  font-size: 14px;
}
.account-form input,
.account-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}
/* Chrome impose une couleur de fond aux champs autoremplis. Une ombre interne
   blanche la recouvre pour que les identifiants enregistrés aient exactement
   le même aspect que les champs saisis manuellement. */
.account-form input:-webkit-autofill,
.account-form input:-webkit-autofill:hover,
.account-form input:-webkit-autofill:focus,
.account-form input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 100px #fff inset;
  box-shadow: 0 0 0 100px #fff inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}

.account-form input:autofill {
  box-shadow: 0 0 0 100px #fff inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}
.account-form button,
.subtle-link {
  font: inherit;
}
.account-form-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  margin-top: -2px;
  padding: 4px 0;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.account-form-link:hover,
.account-form-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.account-form button {
  margin-top: 16px;
  border: 1px solid var(--action-primary-border);
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--action-primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-btn-primary);
}
.account-form button:hover,
.account-form button:focus-visible {
  background: var(--action-primary-hover);
}
.account-message {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 12px;
}
.account-message.success {
  background: #e8f6ed;
  color: #1d6b3f;
}
.account-message.error {
  background: #fdecee;
  color: #942938;
}
.account-footer {
  margin: 16px 0 0;
  color: var(--muted);
}
.account-privacy-notice {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.account-privacy-notice a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.account-footer a,
.subtle-link {
  color: var(--primary);
  text-decoration: none;
}
.account-signup-action {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  text-align: center;
}
.account-signup-action p {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}
.account-secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--action-secondary-border);
  border-radius: 12px;
  padding: 10px 16px;
  background: var(--action-secondary-bg);
  color: var(--action-secondary-text);
  font-weight: 800;
  text-decoration: none;
}
.account-secondary-button:hover,
.account-secondary-button:focus-visible {
  background: var(--action-secondary-hover);
  border-color: color-mix(in srgb, var(--action-primary) 45%, var(--action-secondary-border));
  color: var(--action-primary);
  text-decoration: none;
}
.account-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 28px;
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--page-section-gap, 28px);
  margin-bottom: var(--page-section-gap, 28px);
}
body.profile-page .account-topbar {
  margin-bottom: 0;
}
.panel {
  background: #f9fbfe;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: var(--card-padding, 28px);
}
.profile-productions {
  margin-bottom: var(--page-section-gap);
}
.profile-cli {
  margin-bottom: var(--page-section-gap);
}
.profile-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.profile-section-head .account-copy {
  margin-bottom: 0;
}
.profile-section-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
.profile-primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 50px;
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid var(--action-primary-border);
  background: var(--action-primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-btn-primary);
}
.profile-primary-link:hover,
.profile-primary-link:focus-visible {
  background: var(--action-primary-hover);
  color: #fff;
  text-decoration: none;
}
.profile-progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.profile-stat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.profile-stat-value {
  color: var(--primary);
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}
.profile-stat-label {
  color: var(--muted);
  font-weight: 700;
}
.profile-subtitle {
  margin: 0 0 10px;
  font-size: 16px;
}
.profile-empty {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: #fff;
}
.profile-publication-list {
  display: grid;
  gap: 16px;
}
.profile-publication {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.profile-publication-main {
  min-width: 0;
}
.profile-publication-main h4 {
  margin: 0 0 6px;
  font-size: 16px;
}
.profile-publication-main a {
  display: inline-block;
  max-width: 100%;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.profile-publication-main p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.profile-cli .profile-publication-main p {
  font-size: 11px;
}
.profile-cli .profile-publication-main p code {
  font-size: inherit;
}
body.profile-page #cli_token_name::placeholder {
  color: #8a8a8a;
  opacity: 1;
}
.profile-publication-actions {
  flex: 0 0 auto;
  margin: 0;
}
.btn-icon-danger {
  width: 36px;
  height: 36px;
  border: 1px solid #f2c3cb;
  border-radius: 50%;
  background: #fff6f7;
  color: var(--danger);
  font-size: 15px;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.btn-icon-danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.danger-panel {
  border-color: #f2c3cb;
}
.danger-button {
  background: linear-gradient(180deg, #d85867 0%, var(--danger) 100%) !important;
}
.inline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}
th {
  color: var(--muted);
  font-weight: 700;
}

[data-theme="dark"] body {
  color: #f1efe9;
  background: #181816;
}

[data-theme="dark"] .account-menu-link.nav-account-btn-active {
  background: rgba(106, 176, 255, 0.14);
  color: #8cc6ff;
}

[data-theme="dark"] .site-nav-actions .nav-account-btn-active {
  background: rgba(88, 166, 255, 0.1);
  color: #ffffff;
  border-color: rgba(88, 166, 255, 0.3);
}

[data-theme="dark"] .site-breadcrumb {
  color: #aeb8ca;
}

[data-theme="dark"] .site-breadcrumb a {
  color: #8cc6ff;
}

[data-theme="dark"] .site-breadcrumb [aria-current="page"] {
  color: #f1f5f9;
}

[data-theme="dark"] .site-breadcrumb-separator {
  color: #7d8798;
}

[data-theme="dark"] .account-card {
  background: linear-gradient(180deg, rgba(42, 40, 35, 0.96), rgba(32, 31, 28, 0.96));
  border-color: rgba(129, 124, 112, 0.42);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .account-kicker {
  color: #8cc6ff;
}

[data-theme="dark"] .account-form button {
  background: var(--action-primary);
}

[data-theme="dark"] .account-form button:hover,
[data-theme="dark"] .account-form button:focus-visible {
  background: var(--action-primary-hover);
}

[data-theme="dark"] .account-secondary-button:hover,
[data-theme="dark"] .account-secondary-button:focus-visible {
  background: var(--action-secondary-hover);
}

[data-theme="dark"] .account-signup-action p {
  color: #c7d2e5;
}

[data-theme="dark"] .login-layout {
  border-color: rgba(129, 124, 112, 0.42);
  background: linear-gradient(180deg, rgba(42, 40, 35, 0.98), rgba(32, 31, 28, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .login-layout .account-card {
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .login-layout .account-card::before {
  background: linear-gradient(to bottom, transparent, rgba(129, 124, 112, 0.42) 18%, rgba(129, 124, 112, 0.42) 82%, transparent);
}

[data-theme="dark"] body.login-page .login-intro h2 {
  color: #f1efe9;
}

[data-theme="dark"] .login-intro-copy {
  color: #c7d2e5;
}

[data-theme="dark"] .login-benefits li {
  color: #f1efe9;
}

[data-theme="dark"] .login-benefits i {
  background: rgba(199, 210, 229, 0.09);
  color: #aebccc;
}

[data-theme="dark"] .profile-primary-link {
  background: var(--action-primary);
  border-color: var(--action-primary-border);
  color: #fff;
}

[data-theme="dark"] .profile-primary-link:hover,
[data-theme="dark"] .profile-primary-link:focus-visible {
  background: var(--action-primary-hover);
}

[data-theme="dark"] .account-form label {
  color: #f3f6ff;
}

[data-theme="dark"] .title-with-icon i {
  color: inherit;
}

[data-theme="dark"] .account-copy,
[data-theme="dark"] .account-footer,
[data-theme="dark"] th {
  color: #c7d2e5;
}

[data-theme="dark"] .account-form input,
[data-theme="dark"] .account-form select {
  background: #201f1c;
  color: #f1efe9;
  border-color: rgba(129, 124, 112, 0.48);
}

[data-theme="dark"] .account-form input::placeholder {
  color: #8892aa;
}

/* Les champs remplis par le gestionnaire de mots de passe reçoivent du
   navigateur un fond bleu pâle imposé, qui ignore background-color : seule une
   ombre interne assez épaisse le recouvre. Sans ces règles, « Nom
   d'utilisateur » et « Mot de passe » restaient clairs au milieu d'un
   formulaire sombre.
   Deux blocs séparés et non une liste de sélecteurs : un navigateur qui ne
   connaît pas l'une des deux pseudo-classes invaliderait la règle entière. */
[data-theme="dark"] .account-form input:-webkit-autofill,
[data-theme="dark"] .account-form input:-webkit-autofill:hover,
[data-theme="dark"] .account-form input:-webkit-autofill:focus,
[data-theme="dark"] .account-form input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 100px #201f1c inset;
  box-shadow: 0 0 0 100px #201f1c inset;
  -webkit-text-fill-color: #f1efe9;
  caret-color: #f1efe9;
}

[data-theme="dark"] .account-form input:autofill {
  box-shadow: 0 0 0 100px #201f1c inset;
  -webkit-text-fill-color: #f1efe9;
  caret-color: #f1efe9;
}

[data-theme="dark"] .profile-stat,
[data-theme="dark"] .profile-empty,
[data-theme="dark"] .profile-publication {
  background: rgba(36, 35, 31, 0.82);
  border-color: rgba(129, 124, 112, 0.42);
}

[data-theme="dark"] .profile-stat-label,
[data-theme="dark"] .profile-empty,
[data-theme="dark"] .profile-publication-main p {
  color: #c7d2e5;
}

[data-theme="dark"] .profile-stat-value,
[data-theme="dark"] .profile-publication-main a {
  color: #8cc6ff;
}

[data-theme="dark"] .account-form select,
[data-theme="dark"] input[type="number"] {
  color-scheme: dark;
}

[data-theme="dark"] .account-message {
  border: 1px solid rgba(129, 124, 112, 0.42);
}

[data-theme="dark"] .account-message.success {
  background: rgba(36, 35, 31, 0.94);
  color: #f1efe9;
  border-color: rgba(106, 176, 255, 0.28);
}

[data-theme="dark"] .account-message.error {
  background: rgba(36, 35, 31, 0.94);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.24);
}

[data-theme="dark"] .btn-icon-danger {
  background: rgba(184, 54, 69, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}
[data-theme="dark"] .btn-icon-danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

@media (max-width: 760px) {
  .profile-section-head,
  .profile-publication {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-section-actions {
    justify-content: flex-start;
  }

  .profile-progress-row {
    align-items: stretch;
  }

  .profile-stat {
    display: flex;
  }
}

[data-theme="dark"] .panel {
  background: rgba(36, 35, 31, 0.82);
  border-color: rgba(129, 124, 112, 0.42);
}

[data-theme="dark"] .danger-panel {
  border-color: rgba(248, 113, 113, 0.28);
}

/* The light profile surfaces are scoped through body.profile-page above,
   so the dark overrides need the same scope to win the cascade.
   body.admin-page partage la même règle claire : ses surfaces doivent donc
   figurer ici aussi, faute de quoi la page d'administration affiche des
   cartes blanches sous un texte clair, illisible. */
[data-theme="dark"] body.profile-page .account-card,
[data-theme="dark"] body.admin-page .account-card {
  background: linear-gradient(180deg, rgba(42, 40, 35, 0.96), rgba(32, 31, 28, 0.96));
  border-color: rgba(129, 124, 112, 0.42);
}

[data-theme="dark"] body.profile-page .panel,
[data-theme="dark"] body.profile-page .profile-stat,
[data-theme="dark"] body.profile-page .profile-empty,
[data-theme="dark"] body.profile-page .profile-publication,
[data-theme="dark"] body.admin-page .panel {
  background: rgba(36, 35, 31, 0.82);
  border-color: rgba(129, 124, 112, 0.42);
}

/* White actions stay readable in both themes, including the scenario counter. */
body.profile-page .profile-productions .profile-primary-link,
body.profile-page .profile-productions .profile-stat {
  background: #fff;
  border-color: #e5e7eb;
  color: #5a6a7e;
  box-shadow: none;
  text-decoration: none;
  font-weight: 700;
}

body.profile-page .profile-productions .profile-stat-value {
  color: #245a8f;
}

body.profile-page .profile-productions .profile-stat-label {
  color: #5a6a7e;
}

body.profile-page .profile-productions .profile-primary-link:hover,
body.profile-page .profile-productions .profile-stat:hover {
  border-color: #5a6a7e;
}

body.profile-page .profile-productions .profile-primary-link:focus-visible,
body.profile-page .profile-productions .profile-stat:focus-visible {
  outline: 2px solid #5a6a7e;
  outline-offset: 3px;
}

/* Keep account deletion within a red-and-white palette in both themes. */
body.profile-page .account-form.danger-panel {
  --primary: #fff;
  --heading-ink: #fff;
  --text: #b83645;
  --focus: #fff;
  background: #b83645;
  border-color: #b83645;
  color: #fff;
  box-shadow: none;
}

body.profile-page .danger-panel .account-copy,
body.profile-page .danger-panel label {
  color: #fff;
}

body.profile-page .danger-panel input {
  --focus: #b83645;
  color: #b83645;
  background: #fff;
  border-color: #fff;
  caret-color: #b83645;
  color-scheme: light;
}

body.profile-page .danger-panel input:-webkit-autofill,
body.profile-page .danger-panel input:-webkit-autofill:hover,
body.profile-page .danger-panel input:-webkit-autofill:focus,
body.profile-page .danger-panel input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 100px #fff inset;
  box-shadow: 0 0 0 100px #fff inset;
  -webkit-text-fill-color: #b83645;
}

body.profile-page .danger-panel input:autofill {
  box-shadow: 0 0 0 100px #fff inset;
  -webkit-text-fill-color: #b83645;
}

body.profile-page .danger-panel .danger-button {
  background: #fff !important;
  border-color: #fff;
  color: #b83645;
  box-shadow: none;
}

body.profile-page .danger-panel .danger-button:hover,
body.profile-page .danger-panel .danger-button:focus-visible {
  background: #fff0f2 !important;
  border-color: #fff0f2;
}

body.profile-page .danger-panel .danger-button:focus-visible {
  outline-offset: 3px;
}

[data-theme="dark"] td {
  color: #f1efe9;
  border-bottom-color: rgba(129, 124, 112, 0.34);
}
@media (max-width: 720px) {
  .account-card {
    padding: 22px;
  }
  .account-topbar {
    flex-direction: column;
  }
  .account-shell.with-nav {
    padding-top: 18px;
  }
}

@media (max-width: 900px) {
  body.login-page .site-breadcrumb {
    width: min(480px, calc(100vw - 36px));
  }
  .login-account-shell {
    padding-top: 28px;
  }
  .login-layout {
    display: block;
    width: min(480px, calc(100vw - 36px));
  }
  .login-layout .account-card {
    padding: 28px;
  }
  .login-layout .account-card::before {
    display: none;
  }
  .login-intro {
    display: none;
  }
}

/* Models library */
body.models-page {
  background: #fff;
}

body.models-page a,
body.models-page a:hover,
body.models-page a:focus-visible {
  text-decoration: none;
}

.models-shell {
  width: min(var(--content-shell-width, 1180px), calc(100vw - var(--content-shell-gutter, 36px)));
  margin: 56px auto 112px;
}

.models-header {
  margin: 0 0 56px;
}

.models-kicker {
  margin: 0 0 8px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 800;
}

.models-title {
  margin: 0 0 8px;
}

.models-subtitle {
  width: 100%;
  max-width: none;
  margin: 0 0 28px;
  color: var(--muted);
  line-height: var(--content-leading, 1.72);
  font-size: 15px;
}

.models-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.models-stat {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-body);
}

.models-howto {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.03);
  padding: 30px 32px;
  margin: 0 0 68px;
}

html body .models-howto h2 {
  margin: 0 0 20px;
  font-size: 16px;
}

.models-howto ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
  line-height: 1.75;
  font-size: 14px;
}

.models-family {
  margin: 0 0 80px;
}

.models-family-head {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

html body .models-family-head h2 {
  margin: 0;
  font-size: 20px;
}

.models-family-icon {
  color: var(--primary);
  font-size: 18px;
}

.models-family-desc {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 14px;
  line-height: var(--content-leading, 1.72);
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 30px;
}

.model-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  background: #fff;
  padding: 30px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

html body .model-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.38;
}

.model-card-summary {
  margin: 0;
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.72;
}

.model-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.model-chip {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}

.model-outline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.model-outline-moment {
  font-size: 13px;
  line-height: 1.45;
}

.model-outline-title {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.model-outline-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.model-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 650;
  color: #111827;
  background: var(--act-color, #e5e7eb);
}

.model-act-read { --act-color: var(--read); }
.model-act-investigate { --act-color: var(--investigate); }
.model-act-practice { --act-color: var(--practice); }
.model-act-produce { --act-color: var(--produce); }
.model-act-discuss { --act-color: var(--discuss); }
.model-act-collaborate { --act-color: var(--collaborate); }
.model-act-undefined { --act-color: #d1d5db; }

.model-todo {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.72;
}

.model-todo strong {
  color: var(--text-body);
}

.model-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.model-card-actions .btn {
  width: 100%;
  min-height: 38px;
  padding: 8px 7px;
  font-size: 12px;
  gap: 7px;
}

.model-card-actions .btn-icon-inline {
  width: 14px;
  font-size: 11.5px;
}

body.model-library-preview-open {
  overflow: hidden;
}

#model-library-preview-backdrop {
  padding: 24px;
}

#model-library-preview-backdrop .model-library-preview-modal {
  width: min(840px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

.model-library-preview-actions {
  flex: 0 0 auto;
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.model-library-preview-actions .btn {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 12.5px;
}

[data-theme="dark"] body.models-page {
  background: #181816;
  color: #f1efe9;
  --bg: #181816;
  --panel: #24231f;
  --panel-2: #1d1d1a;
  --line: rgba(255, 255, 255, 0.18);
  --text: #f1efe9;
  --text-strong: #f7f4ed;
  --text-body: #d6d1c7;
  --text-subtle: #aaa59a;
  --muted: #aaa59a;
  --heading-ink: #8fc2e8;
  --surface-light: #2a2823;
  --hover-bg: rgba(255, 255, 255, 0.06);
  --hover-bg-mid: rgba(255, 255, 255, 0.10);
}

[data-theme="dark"] .model-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .models-howto {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .models-stat,
[data-theme="dark"] .model-chip {
  border-color: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] .models-subtitle {
  color: var(--text-body);
}

[data-theme="dark"] body.models-page #model-library-preview-backdrop .model-library-preview-modal {
  background: #181816;
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
}

[data-theme="dark"] body.models-page .import-model-preview-moment {
  background: #1f1f1c;
  border-color: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] body.models-page .import-model-preview-activity {
  background: #282722;
  border-color: rgba(255, 255, 255, 0.14);
  border-left-color: var(--activity-color, rgba(255, 255, 255, 0.28));
}

[data-theme="dark"] body.models-page .modal .import-model-preview-text > p,
[data-theme="dark"] body.models-page .import-model-preview-activity-header > strong {
  color: #e5e1d8;
}

[data-theme="dark"] body.models-page .import-model-preview-text > strong,
[data-theme="dark"] body.models-page .import-model-preview-activity-meta {
  color: #aaa59a;
}

[data-theme="dark"] body.models-page .import-model-preview-instructions {
  background: rgba(120, 166, 202, 0.09);
}

[data-theme="dark"] body.models-page .model-library-preview-actions {
  border-top-color: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] body.models-page .model-library-preview-actions .btn-light {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.28);
  color: #e5e1d8;
}

[data-theme="dark"] body.models-page .model-library-preview-actions .btn-light:hover,
[data-theme="dark"] body.models-page .model-library-preview-actions .btn-light:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
}

[data-theme="dark"] body.models-page .import-model-use-action.btn {
  background: rgba(120, 166, 202, 0.10);
  border-color: rgba(120, 166, 202, 0.48);
  color: #9fc5e2;
}

[data-theme="dark"] body.models-page .import-model-use-action.btn:hover,
[data-theme="dark"] body.models-page .import-model-use-action.btn:focus-visible {
  background: rgba(120, 166, 202, 0.18);
  border-color: rgba(159, 197, 226, 0.68);
  color: #c8e0f2;
}

@media (max-width: 720px) {
  .models-shell {
    margin-top: 36px;
    margin-bottom: 72px;
  }

  .models-header {
    margin-bottom: 36px;
  }

  .models-howto {
    margin-bottom: 48px;
    padding: 24px;
  }

  .models-family {
    margin-bottom: 56px;
  }

  .models-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .model-card {
    gap: 20px;
    padding: 24px;
  }

  #model-library-preview-backdrop {
    padding: 12px;
  }

  #model-library-preview-backdrop .model-library-preview-modal {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
  }
}

@media (max-width: 380px) {
  .model-card-actions .btn-icon-inline {
    display: none;
  }
}

[data-theme="dark"] .admin-feedback-stat-positive,
[data-theme="dark"] .admin-feedback-badge-positive {
  background: #203c2f;
  color: #83d4aa;
}

[data-theme="dark"] .admin-feedback-stat-neutral,
[data-theme="dark"] .admin-feedback-badge-neutral {
  background: #40351f;
  color: #efc36f;
}

[data-theme="dark"] .admin-feedback-stat-negative,
[data-theme="dark"] .admin-feedback-badge-negative {
  background: #43282b;
  color: #f3a1a8;
}

@media (max-width: 680px) {
  .admin-section-head {
    display: block;
  }

  .admin-feedback-total {
    display: inline-block;
    margin-top: 12px;
  }

  .admin-statistics-period {
    margin-top: 12px;
  }

  .admin-statistics-cards,
  .admin-statistics-details {
    grid-template-columns: 1fr;
  }

  .admin-statistics-cards {
    margin-bottom: 48px;
  }

  .admin-statistics-details {
    gap: 44px;
  }

  .admin-statistics-ranking-head {
    display: block;
  }

  .admin-statistics-ranking-head > span {
    display: inline-block;
    margin-top: 12px;
  }

  .admin-feedback-stats {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    overflow-x: auto;
  }

  .admin-tab {
    flex: 1 0 auto;
    justify-content: center;
  }

  .admin-account-filters {
    grid-template-columns: 1fr;
  }

  .admin-filter-result {
    margin: 0;
    text-align: left;
  }
}

@media (min-width: 681px) and (max-width: 1080px) {
  .admin-statistics-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-account-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-filter-result {
    margin: 0;
    text-align: left;
  }
}
