/*
 * БашСтат — commercial interface theme
 * Visual overrides only. Application behavior remains in app.css/app.js.
 */

:root {
  --topbar-height: 72px;
  --sidebar-width: 252px;
  --footer-height: 58px;
  --ink: #132238;
  --ink-strong: #09182c;
  --muted: #66758a;
  --muted-light: #8a97a8;
  --line: #dde4ec;
  --line-strong: #cdd7e2;
  --blue: #1859d6;
  --blue-dark: #1247ad;
  --blue-soft: #eaf1ff;
  --blue-faint: #f4f7ff;
  --cyan: #0c8fab;
  --green: #138563;
  --green-soft: #e7f7f1;
  --amber: #a85f05;
  --amber-soft: #fff4df;
  --red: #c63e4c;
  --red-soft: #fff0f2;
  --surface: #fff;
  --surface-muted: #f7f9fc;
  --canvas: #f1f4f8;
  --nav: #17384f;
  --nav-muted: #b4c5cf;
  --nav-line: rgba(223, 242, 245, .12);
  --shadow-xs: 0 1px 2px rgba(13, 31, 51, .04);
  --shadow-sm: 0 8px 24px rgba(13, 31, 51, .06);
  --shadow-md: 0 18px 44px rgba(13, 31, 51, .11);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

html.sidebar-collapsed {
  --sidebar-width: 82px;
}

* {
  scrollbar-color: #b7c2d0 transparent;
  scrollbar-width: thin;
}

html {
  background: var(--canvas);
}

body {
  background:
    radial-gradient(circle at 82% -10%, rgba(24, 89, 214, .07), transparent 25rem),
    var(--canvas);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.navbar-brand strong {
  color: var(--ink-strong);
  font-family: "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
  font-weight: 750;
  letter-spacing: -.035em;
}

/* Policies, recruitment and auditable consent */

.policy-consents {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.policy-consents .form-check {
  margin: 0;
}

.policy-consents a,
.feedback-consent a {
  font-weight: 700;
}

.upload-policy-consents {
  margin-top: 4px;
}

.legal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.legal-summary article {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.legal-summary i {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1rem;
}

.legal-summary strong,
.legal-summary span {
  display: block;
}

.legal-summary span {
  margin-top: 4px;
  color: var(--muted);
  font-size: .79rem;
  line-height: 1.5;
}

.legal-tabs {
  margin-bottom: 18px;
}

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

.legal-card {
  position: relative;
  min-height: 205px;
}

.legal-card h2 {
  margin: 16px 0 8px;
  font-size: 1.15rem;
}

.legal-card p,
.legal-prose p {
  color: var(--muted);
  line-height: 1.75;
}

.legal-card-icon,
.mission-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.1rem;
}

.legal-prose {
  max-width: 980px;
}

.legal-prose h2 {
  margin-bottom: 18px;
}

.legal-prose h3 {
  margin: 28px 0 10px;
  font-size: 1rem;
}

.legal-prose + .legal-prose,
.legal-grid + .legal-prose {
  margin-top: 16px;
}

.legal-warning {
  display: flex;
  gap: 15px;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid #f0d4a5;
  border-radius: var(--radius-md);
  background: var(--amber-soft);
}

.legal-warning > i {
  color: var(--amber);
  font-size: 1.25rem;
}

.legal-warning p {
  margin: 5px 0 0;
  color: #72501f;
}

.legal-steps {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.legal-steps li {
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.legal-steps li > span {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}

.legal-steps p {
  margin: 4px 0 0;
}

.mission-card .lead {
  color: var(--ink);
  font-weight: 600;
}

.mission-card .btn {
  margin-top: 8px;
}

.team-recruitment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin: 18px 0;
}

.team-recruitment h2 {
  margin: 4px 0 7px;
  font-size: 1.3rem;
}

.team-recruitment p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.team-recruitment-mark,
.account-work-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.3rem;
}

.account-work-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: flex-start;
}

.account-work-card h2 {
  margin: 5px 0 8px;
  font-size: 1.2rem;
}

.account-work-card p {
  max-width: 760px;
}

.account-rules-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-left: 12px;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
}

.application-type-badge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: .68rem;
  font-weight: 800;
}

.application-type-author {
  background: var(--green-soft);
  color: var(--green);
}

.app-footer a {
  color: inherit;
}

@media (max-width: 991px) {
  .legal-summary,
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .team-recruitment {
    grid-template-columns: auto 1fr;
  }

  .team-recruitment .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 575px) {
  .team-application-open-button span {
    display: none;
  }

  .team-recruitment,
  .account-work-card {
    grid-template-columns: 1fr;
  }

  .account-rules-link {
    display: flex;
    margin: 12px 0 0;
  }
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--blue-dark);
}

::selection {
  background: #cddcff;
  color: var(--ink-strong);
}

/* Shell */

.app-navbar {
  height: var(--topbar-height);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1px 0 rgba(13, 31, 51, .02);
  backdrop-filter: blur(18px);
}

.app-navbar .app-shell {
  width: 100%;
  max-width: none;
  padding-inline: 22px 28px;
}

.navbar-brand {
  width: calc(var(--sidebar-width) - 22px);
  margin-right: 28px;
  transition: width .24s ease, margin-right .24s ease;
}

.navbar-brand .brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(145deg, #347fa9, #275f89);
  box-shadow: 0 8px 18px rgba(39, 95, 137, .2);
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem;
}

.navbar-brand .brand-mark::after {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #88d5c3;
  content: "";
}

.navbar-brand strong {
  font-size: 1rem;
}

.navbar-brand small {
  margin-top: 1px;
  color: #7a8898;
  font-size: .63rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.app-sidebar {
  top: var(--topbar-height);
  bottom: 0;
  width: var(--sidebar-width);
  padding: 24px 16px 18px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, .04);
  background:
    radial-gradient(circle at 8% 3%, rgba(94, 177, 184, .2), transparent 18rem),
    linear-gradient(180deg, #204a61 0%, var(--nav) 56%, #143044 100%);
  box-shadow: 12px 0 32px rgba(13, 31, 51, .06);
  transition: width .24s ease, padding .24s ease;
}

.sidebar-nav {
  gap: 5px;
}

.sidebar-bottom {
  padding-top: 14px;
  border-top: 1px solid var(--nav-line);
}

.sidebar-toggle-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
  padding: 0 2px 14px;
  border-bottom: 1px solid var(--nav-line);
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(225, 244, 247, .14);
  border-radius: 8px;
  background: rgba(225, 244, 247, .065);
  color: #d4e2e8;
  font-family: "Inter", sans-serif;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.sidebar-toggle:hover {
  border-color: rgba(168, 224, 224, .3);
  background: rgba(225, 244, 247, .11);
  color: #fff;
}

.sidebar-toggle:focus-visible {
  outline: 2px solid #9edbd7;
  outline-offset: 2px;
}

.sidebar-expand-icon {
  display: none;
}

.sidebar-link {
  min-height: 48px;
  gap: 12px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--nav-muted);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.sidebar-link:hover {
  border-color: rgba(225, 244, 247, .11);
  background: rgba(225, 244, 247, .075);
  color: #fff;
  transform: none;
}

.sidebar-link.active {
  border-color: rgba(155, 218, 218, .24);
  background: linear-gradient(90deg, rgba(67, 151, 172, .36), rgba(67, 151, 172, .16));
  color: #fff;
  box-shadow: inset 3px 0 0 #79cfca;
}

.sidebar-icon {
  width: 31px;
  height: 31px;
  flex-basis: 31px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
  color: #a7b7cb;
  font-size: 1rem;
}

.sidebar-link.active .sidebar-icon {
  background: rgba(121, 207, 202, .17);
  color: #a6e3df;
}

.page-content {
  width: min(1240px, calc(100% - var(--sidebar-width) - 52px));
  min-height: calc(100vh - var(--topbar-height));
  margin-left: calc(var(--sidebar-width) + max(26px, (100vw - var(--sidebar-width) - 1240px) / 2));
  padding-block: 36px calc(var(--footer-height) + 38px);
  transition: width .24s ease, margin-left .24s ease;
}

.app-footer {
  left: var(--sidebar-width);
  min-height: var(--footer-height);
  padding: 15px 0;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  color: #7b8898;
  font-size: .74rem;
  backdrop-filter: blur(12px);
  transition: left .24s ease;
}

.app-footer .app-shell {
  width: min(1240px, calc(100% - 48px));
}

.guest-label,
.account-link {
  gap: 7px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: #54657a;
  font-size: .75rem;
  font-weight: 600;
}

.account-dot {
  box-shadow: 0 0 0 3px var(--green-soft);
}

html.sidebar-collapsed .navbar-brand {
  width: 52px;
  margin-right: 12px;
}

html.sidebar-collapsed .navbar-brand > span:last-child,
html.sidebar-collapsed .sidebar-label,
html.sidebar-collapsed .sidebar-toggle-label {
  display: none;
}

html.sidebar-collapsed .app-sidebar {
  padding-inline: 12px;
}

html.sidebar-collapsed .sidebar-toggle-row {
  justify-content: center;
}

html.sidebar-collapsed .sidebar-toggle {
  width: 40px;
  padding-inline: 0;
}

html.sidebar-collapsed .sidebar-collapse-icon {
  display: none;
}

html.sidebar-collapsed .sidebar-expand-icon {
  display: inline-block;
}

html.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding-inline: 6px;
}

html.sidebar-collapsed .sidebar-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  font-size: 1.05rem;
}

/* Typography and headers */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  font-size: .64rem;
  font-weight: 750;
  letter-spacing: .14em;
}

.page-header,
.analysis-header,
.section-heading {
  margin: 0 0 24px;
}

.page-header {
  min-height: 86px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-header h1,
.analysis-header h1 {
  margin: 5px 0 0;
  font-size: clamp(1.8rem, 2.6vw, 2.5rem);
  line-height: 1.12;
}

.page-header p,
.analysis-header p,
.section-heading p {
  max-width: 760px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

/* Buttons and controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: .55rem .95rem;
  border-radius: 9px;
  font-size: .8rem;
  font-weight: 650;
  box-shadow: none;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  min-height: 34px;
  padding: .4rem .7rem;
  border-radius: 8px;
  font-size: .73rem;
}

.btn-primary {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 6px 14px rgba(24, 89, 214, .16);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  box-shadow: 0 8px 18px rgba(24, 89, 214, .2);
}

.btn-outline-primary {
  border-color: #b8ccef;
  background: #fff;
  color: var(--blue);
}

.btn-outline-primary:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.btn-outline-secondary,
.btn-light {
  border-color: var(--line);
  background: #fff;
  color: #536477;
}

.btn-light:hover,
.btn-outline-secondary:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
  color: var(--ink);
}

.btn-outline-danger {
  border-color: #efc6cb;
  background: #fff;
  color: var(--red);
}

.btn-outline-danger:hover {
  border-color: #e6aab2;
  background: var(--red-soft);
  color: #a82937;
}

.btn-outline-warning {
  border-color: #e8c98d;
  background: #fff;
  color: var(--amber);
}

.btn-outline-warning:hover {
  border-color: #dbb66d;
  background: var(--amber-soft);
  color: #78470d;
}

.btn-outline-success {
  border-color: #a8d8c8;
  background: #fff;
  color: var(--green);
}

.btn-outline-success:hover {
  border-color: #83c5ae;
  background: var(--green-soft);
  color: #0f6d51;
}

.btn-success {
  border-color: var(--green);
  background: var(--green);
}

.form-label {
  margin-bottom: 5px;
  color: #394b61;
  font-size: .75rem;
  font-weight: 650;
}

.form-control,
.form-select {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background-color: #fff;
  color: var(--ink);
  font-size: .82rem;
  box-shadow: inset 0 1px 2px rgba(13, 31, 51, .02);
}

.form-control::placeholder {
  color: #9aa6b4;
}

.form-control:hover,
.form-select:hover {
  border-color: #b4c1d0;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: #6d9aed;
  box-shadow: 0 0 0 3px rgba(24, 89, 214, .11);
}

textarea.form-control {
  line-height: 1.55;
}

.form-check-input {
  border-color: #b8c4d1;
}

.form-check-input:checked {
  border-color: var(--blue);
  background-color: var(--blue);
}

.form-check-label,
.form-text,
label small {
  color: var(--muted);
  font-size: .75rem;
}

/* Panels and cards */

.content-card,
.settings-card,
.table-card,
.chart-card,
.document-card,
.moderation-card,
.metric-grid article,
.author-profile-card,
.publication-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.content-card,
.settings-card {
  padding: 26px;
}

.content-card + .content-card {
  margin-top: 16px;
}

.content-card > p {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.75;
}

.content-card h2,
.settings-card h2 {
  font-size: 1.2rem;
}

.metric-grid {
  gap: 12px;
  margin: 22px 0;
}

.metric-grid article {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 20px;
}

.metric-grid article::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: #d8e5fb;
  content: "";
}

.metric-grid article:nth-child(2)::before {
  background: #b9e4df;
}

.metric-grid article:nth-child(3)::before {
  background: #f0d7ab;
}

.metric-grid span,
.metric-grid small {
  color: var(--muted);
  font-size: .69rem;
  font-weight: 600;
}

.metric-grid strong {
  margin: 9px 0 5px;
  color: var(--ink-strong);
  font-family: "Manrope", sans-serif;
  font-size: 1.8rem;
}

.metric-grid .accent-metric {
  border-color: #ead7b8;
  background: #fffaf2;
}

.status-badge,
.reliability-badge,
.language-pill,
.key-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.status-success,
.reliability-1 {
  background: var(--green-soft);
  color: var(--green);
}

.status-info,
.language-pill {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-neutral {
  background: #edf1f5;
  color: #617083;
}

.reliability-0 {
  background: var(--amber-soft);
  color: var(--amber);
}

/* Hero and document workspace */

.hero-panel {
  min-height: 330px;
  margin-bottom: 30px;
  padding: 42px;
  border: 1px solid #d5dfec;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(118deg, rgba(255, 255, 255, .98) 0%, rgba(245, 249, 255, .97) 64%, rgba(233, 241, 255, .98) 100%);
  box-shadow: var(--shadow-sm);
}

.hero-panel::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--blue), #4c8af2);
  content: "";
}

.hero-panel::after {
  right: -80px;
  top: -130px;
  width: 330px;
  height: 330px;
  border: 65px solid rgba(24, 89, 214, .045);
  background: transparent;
}

.hero-panel h1 {
  max-width: 760px;
  margin: 10px 0 16px;
  font-size: clamp(2rem, 3.6vw, 3.35rem);
  line-height: 1.07;
}

.hero-panel h1 span {
  color: var(--blue);
}

.hero-panel p {
  color: #617087;
  font-size: .98rem;
}

.hero-stats {
  border: 1px solid rgba(196, 210, 228, .86);
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 12px 30px rgba(13, 31, 51, .06);
  backdrop-filter: blur(8px);
}

.hero-stats div {
  padding: 16px 0;
}

.hero-stats strong {
  font-family: "Manrope", sans-serif;
  font-size: 1.35rem;
}

.document-grid {
  gap: 12px;
}

.document-card {
  padding: 18px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.document-card:hover {
  border-color: #c5d2e0;
  box-shadow: var(--shadow-sm);
}

.file-icon {
  width: 46px;
  height: 50px;
  flex-basis: 46px;
  border-radius: 9px;
  background: #edf3fc;
  font-size: .62rem;
}

.document-card h3 {
  color: var(--ink-strong);
  font-size: .94rem;
}

.document-meta {
  color: var(--muted-light);
  font-size: .7rem;
}

.document-actions {
  border-color: #e8edf2;
}

.inline-notice {
  border: 1px solid #f1dfbd;
  background: #fffaef;
}

.upload-dropzone {
  min-height: 170px;
  border: 1.5px dashed #aebed0;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, .8), rgba(243, 247, 252, .8));
  color: var(--blue);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.upload-dropzone:hover {
  border-color: #729de9;
  background: var(--blue-faint);
  box-shadow: inset 0 0 0 3px rgba(24, 89, 214, .04);
}

.upload-dropzone strong {
  color: var(--ink);
  font-size: .84rem;
}

/* Tables, pagination and filters */

.table-card {
  overflow: hidden;
}

.table-responsive {
  border-radius: inherit;
}

.table {
  color: var(--ink);
  font-size: .79rem;
}

.table thead th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  color: #6d7b8c;
  font-size: .62rem;
  font-weight: 750;
  letter-spacing: .085em;
}

.table tbody td {
  padding: 13px 16px;
  border-color: #ebeff4;
  vertical-align: middle;
}

.table tbody tr {
  transition: background .14s ease;
}

.table tbody tr:hover {
  background: #fafcff;
}

.filter-bar,
.publication-filters {
  gap: 10px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.pagination-line {
  padding: 13px 16px;
  border-color: var(--line);
  background: #fbfcfe;
  font-size: .74rem;
}

.empty-table {
  padding: 50px 20px;
  color: var(--muted-light);
}

.empty-state {
  padding: 58px 24px;
  border: 1px dashed #c8d3df;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .75);
}

.empty-glyph {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.15rem;
}

.empty-state h2,
.empty-state h3 {
  margin-top: 14px;
  font-size: 1.05rem;
}

.empty-state p {
  max-width: 520px;
  margin-inline: auto;
  font-size: .8rem;
}

/* Tabs */

.section-tabs {
  width: 100%;
  gap: 2px;
  margin-bottom: 22px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #e9eef4;
}

.section-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 7px;
  color: #68778a;
  font-size: .74rem;
  font-weight: 650;
}

.section-tab:hover {
  background: rgba(255, 255, 255, .6);
}

.section-tab.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 2px 8px rgba(13, 31, 51, .08);
}

.section-tab i {
  font-size: .82rem;
}

/* Settings */

.settings-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.settings-card {
  padding: 0;
  overflow: hidden;
}

.settings-card.content-card {
  padding: 26px;
}

.settings-section {
  grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr);
  gap: 42px;
  padding: 26px;
  border-color: var(--line);
}

.settings-section h2,
.genres-card h2 {
  font-size: 1.05rem;
}

.settings-section p,
.genres-card p {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.65;
}

.settings-footer {
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  background: #fafbfd;
}

.genres-card,
.author-admin-card {
  padding: 24px;
}

.genre-list > div {
  border-color: #e8edf2;
}

.bulk-toolbar {
  border-color: var(--line);
  background: #f8fafc;
}

.application-card,
.moderation-card,
.feedback-admin-card {
  padding: 22px;
}

.application-purpose,
.text-preview {
  border: 1px solid #e5eaf0;
  background: #f7f9fb;
}

.delivery-statuses span {
  border-radius: 7px;
  background: #edf2f7;
}

.language-summary {
  gap: 8px;
  margin-top: 16px;
}

.language-summary > div {
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid #e5eaf0;
  border-radius: 9px;
  background: #f8fafc;
}

.language-summary strong {
  color: var(--ink-strong);
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem;
}

.system-label {
  border-radius: 5px;
  background: var(--blue-soft);
}

.author-settings-grid article {
  border-color: var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.author-settings-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.author-settings-content {
  min-width: 0;
}

.author-settings-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.author-settings-title h3 {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .63rem;
  font-weight: 750;
}

.status-pill.status-active {
  background: #e7f5ee;
  color: #277457;
}

.status-pill.status-hidden {
  background: #eef1f4;
  color: #687786;
}

.author-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.author-settings-actions form {
  margin: 0;
}

.authors-admin-layout {
  grid-template-columns: minmax(0, 760px);
}

.publication-only-card {
  overflow: hidden;
}

.author-settings-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 72px;
  overflow: hidden;
  border: 1px solid #cbd9df;
  border-radius: 11px;
  background: linear-gradient(145deg, #e7f1f3, #dbe9ed);
  color: #2c667a;
  font-family: "Manrope", sans-serif;
  font-size: .88rem;
  font-weight: 800;
}

.author-settings-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.author-photo-editor {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8fafc;
}

.author-edit-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-width: 1120px;
  margin-block: 16px;
}

.author-edit-dialog .modal-content > form {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  min-height: 0;
}

.author-edit-dialog .modal-header,
.author-edit-dialog .modal-footer {
  flex: 0 0 auto;
}

.author-edit-dialog .modal-body {
  min-height: 0;
  overflow-y: auto;
}

.author-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  padding: 18px 22px;
}

.author-edit-grid > .form-label {
  margin: 0;
}

.author-edit-grid .author-field-full {
  grid-column: 1 / -1;
}

.author-edit-grid .author-photo-editor {
  min-height: 124px;
}

.author-edit-grid textarea {
  min-height: 92px;
  resize: vertical;
}

.author-edit-grid > .form-check {
  align-self: center;
  margin: 2px 0 0;
}

.modal-form-grid,
.publication-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  padding: 22px 24px;
}

.modal-form-grid > .form-label,
.publication-form-grid > .form-label {
  margin: 0;
}

.modal-field-wide,
.publication-field-wide {
  grid-column: 1 / -1;
}

.publication-edit-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-width: 1040px;
  margin-block: 16px;
}

.publication-edit-dialog .modal-content > form {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
}

.publication-edit-dialog .modal-body {
  overflow-y: auto;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef2f5;
  color: #536575;
  font-size: .66rem;
  font-weight: 750;
  white-space: nowrap;
}

.role-superadmin {
  background: #ede8f8;
  color: #644a91;
}

.role-admin {
  background: #e7f0f5;
  color: #2d6479;
}

.role-author {
  background: #e8f5ef;
  color: #2d7359;
}

/* Charts and analysis */

.chart-grid {
  gap: 14px;
}

.chart-card {
  min-height: 390px;
  padding: 24px;
}

.chart-card h2 {
  font-size: 1rem;
}

.breadcrumb-line {
  color: var(--muted);
  font-size: .74rem;
}

.progress-page {
  max-width: 700px;
  border-color: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.progress-orbit {
  border-color: #dce7f8;
  border-top-color: var(--blue);
}

/* About and informational pages */

.about-hero {
  max-width: 920px;
  padding: 18px 0 28px;
}

.about-hero h1 {
  margin: 7px 0 10px;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
}

.about-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1rem;
}

.about-grid {
  gap: 12px;
}

.about-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.about-grid strong {
  color: var(--blue);
  font-family: "Manrope", sans-serif;
  font-size: 1.75rem;
}

.alphabet-box {
  border: 1px solid #d4e2fb;
  background: var(--blue-faint);
}

.developers-grid {
  gap: 12px;
}

.developer-card {
  padding: 22px;
  border-color: var(--line);
  border-radius: var(--radius-md);
  background: #f9fbfd;
}

.developer-monogram {
  border-radius: 10px;
  background: linear-gradient(145deg, #3a89ac, #296583);
  box-shadow: 0 7px 16px rgba(41, 101, 131, .16);
}

/* Authors */

.team-intro {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
  padding-block: 24px;
  background:
    radial-gradient(circle at 95% 10%, rgba(73, 157, 155, .1), transparent 18rem),
    #fff;
}

.team-intro-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 16px;
  background: linear-gradient(145deg, #e5f2f2, #d8e9ee);
  color: #286a78;
  font-size: 1.35rem;
}

.team-intro h2 {
  margin: 4px 0 5px;
  font-size: 1.15rem;
}

.team-intro p {
  max-width: 850px;
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.6;
}

.team-profile-grid {
  gap: 18px;
}

/* Help */

.help-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.help-tabs .section-tab {
  border: 1px solid var(--line);
  background: #fff;
}

.help-tabs .section-tab.active {
  border-color: #bdd5dd;
  background: #eaf4f5;
  color: #28687a;
}

.help-tab-content {
  min-height: 420px;
}

.help-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.help-step-card {
  position: relative;
  min-height: 220px;
  padding: 25px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.help-step-card > span {
  position: absolute;
  top: 13px;
  right: 18px;
  color: #dce7eb;
  font-family: "Manrope", sans-serif;
  font-size: 2rem;
  font-weight: 800;
}

.help-step-card > i {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  border-radius: 13px;
  background: #e9f3f4;
  color: #2d6f7d;
  font-size: 1.1rem;
}

.help-step-card h2 {
  font-size: 1rem;
}

.help-step-card p {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.65;
}

.help-role-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .65fr);
  gap: 16px;
}

.help-checklist {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: help-item;
}

.help-checklist li {
  position: relative;
  padding: 14px 16px 14px 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f9fbfc;
  color: #536477;
  font-size: .81rem;
  line-height: 1.55;
  counter-increment: help-item;
}

.help-checklist li::before {
  content: counter(help-item);
  position: absolute;
  top: 13px;
  left: 15px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dfeef0;
  color: #2c6b78;
  font-size: .65rem;
  font-weight: 800;
}

.help-permission-card {
  align-self: start;
  padding: 26px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 211, 196, .17), transparent 12rem),
    linear-gradient(155deg, #2f7181, #28586e);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.help-permission-card.user {
  background:
    radial-gradient(circle at 100% 0%, rgba(147, 193, 228, .2), transparent 12rem),
    linear-gradient(155deg, #406b91, #345570);
}

.help-permission-card > i {
  font-size: 1.55rem;
}

.help-permission-card h3 {
  margin: 18px 0 8px;
  color: #fff;
  font-size: 1.05rem;
}

.help-permission-card p {
  color: rgba(255, 255, 255, .78);
  font-size: .78rem;
  line-height: 1.6;
}

.help-access-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.help-access-list span {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  font-size: .65rem;
  font-weight: 700;
}

.help-method-stack {
  display: grid;
  gap: 16px;
}

.about-purpose-card {
  max-width: 900px;
}

.author-profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.author-profile-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 230px;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.author-identity-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  background:
    radial-gradient(circle at 96% 0%, rgba(148, 218, 211, .22), transparent 13rem),
    linear-gradient(155deg, #347b91, #23536d);
  color: #fff;
}

.author-identity-panel .developer-monogram {
  width: 112px;
  height: 112px;
  flex-basis: 112px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .14);
  box-shadow: none;
  font-size: 1.55rem;
}

.author-portrait-shell {
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
  width: 156px;
  height: 180px;
}

.author-portrait-fallback {
  position: relative;
  z-index: 1;
}

.author-number {
  color: #d0e5e7;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.author-portrait {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 156px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 16px;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 14px 28px rgba(17, 54, 70, .22);
}

/* Author feedback */

.feedback-modal-dialog {
  width: min(1080px, calc(100vw - 32px));
  max-width: 1080px;
}

.feedback-modal-content {
  overflow: hidden;
}

.feedback-modal-header {
  align-items: flex-start;
  padding: 22px 26px;
  border-color: var(--line);
  background: #fff;
}

.feedback-modal-heading {
  display: flex;
  align-items: center;
  gap: 15px;
}

.feedback-modal-heading h2 {
  margin: 3px 0 2px;
  font-size: 1.35rem;
}

.feedback-modal-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
}

.feedback-modal-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 13px;
  background: linear-gradient(145deg, #e4f2f1, #d9eaee);
  color: #286d7c;
  font-size: 1.15rem;
}

.feedback-modal-body {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.45fr);
  padding: 0;
}

.feedback-recipient-panel {
  padding: 28px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 0 100%, rgba(82, 162, 155, .1), transparent 15rem),
    #f6fafb;
}

.feedback-recipient-panel h3,
.feedback-form-heading h3 {
  margin: 6px 0 8px;
  color: var(--ink-strong);
  font-size: 1rem;
}

.feedback-recipient-panel > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: .79rem;
  line-height: 1.6;
}

.feedback-step {
  color: #2e7480;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.feedback-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
}

.feedback-field > span {
  color: #455669;
  font-size: .74rem;
  font-weight: 700;
}

.feedback-field .form-control,
.feedback-field .form-select {
  width: 100%;
  min-height: 44px;
  border-radius: 9px;
  background-color: #fff;
  font-size: .83rem;
}

.feedback-field textarea.form-control {
  min-height: 142px;
  resize: vertical;
}

.feedback-field small {
  color: var(--muted-light);
  font-size: .66rem;
}

.feedback-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #dce7e9;
  color: #627482;
  font-size: .72rem;
  line-height: 1.5;
}

.feedback-privacy-note i {
  color: #367a6a;
  font-size: 1rem;
}

.feedback-form-panel {
  padding: 28px 30px 24px;
}

.feedback-form-heading {
  margin-bottom: 20px;
}

.feedback-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 16px;
}

.feedback-field-wide {
  grid-column: 1 / -1;
}

.feedback-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 18px 0 0;
  color: #5c6e7e;
  font-size: .74rem;
  line-height: 1.45;
}

.feedback-modal-footer {
  justify-content: space-between;
  gap: 16px;
  padding: 16px 26px;
  border-color: var(--line);
  background: #fbfcfd;
}

.feedback-modal-footer > span {
  color: var(--muted);
  font-size: .7rem;
}

.feedback-modal-footer > div {
  display: flex;
  gap: 9px;
}

.author-profile-content {
  display: flex;
  flex-direction: column;
  padding: 26px 30px;
}

.author-profile-content h2 {
  margin: 0 0 5px;
  font-size: 1.32rem;
}

.author-academic-title {
  margin: 0;
  color: var(--blue);
  font-size: .76rem;
  font-weight: 650;
}

.author-profile-sections {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(200px, .8fr);
  gap: 28px;
  margin-top: 20px;
}

.author-profile-section {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.author-profile-sections > :only-child {
  grid-column: 1 / -1;
}

.author-profile-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted-light);
  font-size: .61rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.author-workplace,
.author-bio {
  margin: 0;
  color: #536477;
  font-size: .8rem;
  line-height: 1.6;
}

.author-profile-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
  padding-top: 20px;
}

.author-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto 0 0;
}

.author-links a,
.author-links span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfd;
  color: #52657a;
  font-size: .7rem;
  font-weight: 600;
  text-decoration: none;
}

.author-links a:hover {
  border-color: #b9cdee;
  background: var(--blue-soft);
  color: var(--blue);
}

.orcid-mark {
  width: 18px;
  height: 18px;
  font-size: .6rem;
}

/* Publications */

.publication-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px 150px auto auto;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.publication-filters .form-select {
  width: 100%;
}

.publication-list {
  gap: 12px;
}

.publication-card {
  grid-template-columns: 104px minmax(0, 1fr);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.publication-card:hover {
  border-color: #c1cfdf;
  box-shadow: var(--shadow-sm);
}

.publication-year {
  position: relative;
  background: #f3f7fd;
  color: var(--blue);
  font-family: "Manrope", sans-serif;
  font-size: 1.1rem;
}

.publication-year::after {
  position: absolute;
  top: 20px;
  right: 0;
  bottom: 20px;
  width: 1px;
  background: var(--line);
  content: "";
}

.publication-body {
  padding: 22px 24px;
}

.publication-meta span:first-child {
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
}

.publication-body h2 {
  max-width: 900px;
  margin: 10px 0 9px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.publication-citation,
.publication-body details p {
  max-width: 960px;
  font-size: .78rem;
}

.pdf-modal-content {
  border-radius: var(--radius-lg);
}

.upload-icon {
  margin-bottom: 8px;
  font-size: 1.8rem;
}

/* Modal and alerts */

.modal-backdrop.show {
  opacity: .54;
}

.modal-content {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 80px rgba(6, 18, 33, .25);
}

.modal-header {
  padding: 20px 22px;
  border-color: var(--line);
  background: #fbfcfe;
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  padding: 15px 22px;
  border-color: var(--line);
  background: #fbfcfe;
}

.alert {
  border-width: 1px;
  border-radius: 10px;
  font-size: .79rem;
}

.alert-success {
  border-color: #bfe6d8;
  background: var(--green-soft);
  color: #126d53;
}

.alert-info {
  border-color: #c5d8f8;
  background: var(--blue-soft);
  color: #174eaa;
}

.alert-warning {
  border-color: #eed8af;
  background: var(--amber-soft);
  color: #81501a;
}

.alert-danger {
  border-color: #efc6cb;
  background: var(--red-soft);
  color: #a42b38;
}

/* Auth */

.auth-card {
  max-width: 500px;
  margin-top: 62px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

/* Responsive */

@media (max-width: 1040px) {
  :root {
    --sidebar-width: 216px;
  }

  .settings-layout,
  .users-layout,
  .publication-admin-layout,
  .authors-admin-layout {
    grid-template-columns: 1fr;
  }

  .publication-filters {
    grid-template-columns: minmax(220px, 1fr) 190px 130px auto;
  }

  .publication-filters .btn-light {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar-width: 78px;
    --footer-height: 76px;
  }

  html.sidebar-collapsed {
    --sidebar-width: 78px;
  }

  .app-navbar .app-shell {
    padding-inline: 12px;
  }

  .navbar-brand {
    width: auto;
    margin-right: 0;
  }

  .navbar-brand > span:last-child {
    display: none;
  }

  .app-sidebar {
    padding: 18px 9px;
  }

  .sidebar-toggle-row {
    display: none;
  }

  .author-edit-dialog {
    width: calc(100vw - 18px);
    margin: 9px;
  }

  .author-edit-dialog .modal-content > form {
    max-height: calc(100vh - 18px);
  }

  .author-edit-grid {
    grid-template-columns: 1fr;
    padding: 17px;
  }

  .author-edit-grid .author-field-full {
    grid-column: auto;
  }

  .team-intro {
    align-items: flex-start;
  }

  .feedback-modal-dialog {
    width: calc(100vw - 18px);
    margin: 9px;
  }

  .feedback-modal-body {
    grid-template-columns: 1fr;
  }

  .feedback-recipient-panel {
    padding: 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feedback-form-panel {
    padding: 22px;
  }

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

  .feedback-field-wide {
    grid-column: auto;
  }

  .feedback-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-modal-footer > div {
    justify-content: flex-end;
  }

  .modal-form-grid,
  .publication-form-grid {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .modal-field-wide,
  .publication-field-wide {
    grid-column: auto;
  }

  .publication-edit-dialog {
    width: calc(100vw - 18px);
    margin: 9px;
  }

  .help-card-grid,
  .help-role-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-link {
    justify-content: center;
    padding: 7px;
  }

  .sidebar-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .page-content {
    width: calc(100% - var(--sidebar-width) - 24px);
    margin-left: calc(var(--sidebar-width) + 12px);
    padding-top: 24px;
  }

  .app-footer .app-shell {
    width: calc(100% - 22px);
  }

  .hero-panel {
    min-height: 0;
    padding: 30px 24px;
  }

  .author-profile-card {
    grid-template-columns: 1fr;
  }

  .author-identity-panel {
    min-height: 120px;
    padding: 20px;
  }

  .author-profile-sections {
    grid-template-columns: 1fr;
    gap: 14px;
  }

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

  .publication-filters > input {
    grid-column: 1 / -1;
  }

  .publication-filters .btn {
    width: 100%;
  }

  .settings-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 540px) {
  .application-open-button span {
    display: none;
  }

  .application-open-button {
    width: 36px;
    padding-inline: 0;
  }

  .page-header,
  .analysis-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-header {
    min-height: 0;
  }

  .page-header h1 {
    font-size: 1.7rem;
  }

  .hero-panel h1 {
    font-size: 2rem;
  }

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

  .publication-filters > * {
    grid-column: 1;
  }

  .publication-card {
    grid-template-columns: 1fr;
  }

  .publication-year {
    min-height: 44px;
  }

  .publication-year::after {
    right: 20px;
    bottom: 0;
    left: 20px;
    top: auto;
    width: auto;
    height: 1px;
  }

  .author-profile-content {
    padding: 22px;
  }

  .content-card {
    padding: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
