:root {
  --bg: #0e1639;
  --bg-soft: #f5f7fc;
  --surface: #ffffff;
  --surface-alt: #eef3fb;
  --surface-brand: #dfe7f6;
  --border: #d7e0ee;
  --text: #1f2a44;
  --text-soft: #5f6f8d;
  --heading: #23355f;
  --primary: #3e6f97;
  --primary-strong: #2f567b;
  --accent: #c9d4e1;
  --shadow: 0 18px 44px rgba(31, 42, 68, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef2f8 0%, #f7f9fc 34%, #ffffff 100%);
}

.auth-shell {
  width: min(100%, 420px);
}

main:not(.landing-page),
form,
.auth-card {
  width: min(100%, 420px);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

main:not(.landing-page) {
  padding: 32px;
}

form,
.auth-card {
  padding: 28px;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  color: var(--heading);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h1,
h2 {
  font-size: clamp(1.8rem, 3vw, 2.85rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 18px;
  color: var(--text-soft);
  line-height: 1.68;
}

label {
  display: block;
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

input {
  width: 100%;
  display: block;
  margin: 0 0 14px;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfcff;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input::placeholder {
  color: #8a97ae;
}

input:focus {
  border-color: rgba(62, 111, 151, 0.65);
  box-shadow: 0 0 0 4px rgba(62, 111, 151, 0.14);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 0 20px;
  margin: 6px 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #ffffff;
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  box-shadow: 0 14px 30px rgba(47, 86, 123, 0.18);
}

button:hover,
.button:hover {
  transform: translateY(-2px);
}

button:active,
.button:active {
  transform: translateY(0);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 700;
}

.text-link:hover {
  color: var(--primary);
}


.table-action-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.table-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}

.table-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(31, 42, 68, 0.12);
}

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

.table-action-btn--edit {
  background: linear-gradient(135deg, #4f7ca6, #355f86);
  color: #ffffff;
}

.table-action-btn--open {
  background: linear-gradient(135deg, #4e9d8d, #347566);
  color: #ffffff;
}

.table-action-btn--download {
  background: linear-gradient(135deg, #8a73c9, #6450a2);
  color: #ffffff;
}

.table-action-btn--delete {
  background: linear-gradient(135deg, #d06b7f, #b24c62);
  color: #ffffff;
}


.documents-table--assets {
  table-layout: fixed;
}

.documents-table--assets th.asset-name-column,
.documents-table--assets td.asset-name-column {
  width: 26%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.documents-table--assets th.asset-items-column,
.documents-table--assets td.asset-items-column {
  width: 54%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.documents-table--assets th.asset-actions-column,
.documents-table--assets td.asset-actions-column {
  width: 20%;
  white-space: nowrap;
}

.documents-table--assets td.asset-actions-column {
  text-align: center;
}

.documents-table--assets td.asset-actions-column .table-action-group {
  align-items: stretch;
}

.documents-table--assets td.asset-actions-column .table-action-btn {
  width: 100%;
  min-width: 110px;
}


.asset-item-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.asset-item-stack__entry {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.asset-item-stack__name {
  color: var(--text);
  font-weight: 600;
}

.asset-item-stack__date {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.asset-item-stack__date.is-warning {
  color: #c17f14;
  font-weight: 700;
}

.asset-item-stack__date.is-danger {
  color: #b24c62;
  font-weight: 700;
}

.documents-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.notice {
  display: grid;
  gap: 6px;
  margin: 18px 0 0;
  padding: 14px 15px;
  border: 1px solid #bcdcc7;
  border-radius: 12px;
  background: #eff9f2;
  color: #2c6b44;
}

.success-state strong {
  color: #2c6b44;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.toast-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 10px;
}

.toast-success {
  border-color: #bcdcc7;
  color: #2c6b44;
}

.toast-success .toast-dot {
  background: #55b57a;
}

.toast-error {
  border-color: #ebc1cb;
  color: #9a4156;
}

.toast-error .toast-dot {
  background: #d96c86;
}

.page-with-nav {
  display: block;
  padding: 92px 16px 32px;
}

.page-card {
  width: min(100%, 420px);
  margin: 0 auto;
}

a:link {
  text-decoration: none;
}

/* visited link */
a:visited {
  text-decoration: none;
}

/* mouse over link */
a:hover {
  font-weight: bold;
  text-decoration: none;
}

/* selected link */
a:active {
  color: #0000db;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 30px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(215, 224, 238, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 26px rgba(31, 42, 68, 0.05);
}

.top-nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.top-nav__logout-form {
  display: inline-flex;
  width: auto;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.top-nav__links .nav-logout-button {
  width: auto;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  transform: none;
}

.top-nav__links a,
.top-nav__links .nav-logout-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  color: var(--heading);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.top-nav__links a:hover {
  background: var(--surface-alt);
  border-color: var(--border);
  color: var(--primary-strong);
}

.top-nav__brand {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.top-nav__logo {
  display: block;
  height: 44px;
  width: auto;
}

.auth-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 18px;
}

.auth-logo {
  display: block;
  max-width: 220px;
  width: 100%;
  height: auto;
}

.landing-body {
  display: block;
  padding: 0;
}

.landing-page {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 118px 0 56px;
}

.landing-nav__brand {
  gap: 16px;
  flex: 0 0 auto;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.landing-logo {
  max-width: 240px;
}

.nav-login-button {
  width: auto;
  min-width: 112px;
}

.hero-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 30px;
  align-items: stretch;
  margin-bottom: 36px;
  padding: 34px;
  background: linear-gradient(135deg, #eef3fb 0%, #f8fbff 100%);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 12px;
}

.hero-copy h1 {
  max-width: 12ch;
  margin-bottom: 14px;
}

.hero-lead {
  margin-bottom: 16px;
  font-size: 1.12rem;
  color: var(--heading);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}

.hero-actions .button {
  width: auto;
}

.hero-secondary {
  background: #ffffff;
  color: var(--primary-strong);
  border-color: var(--border);
  box-shadow: none;
}

.hero-visual {
  min-height: 360px;
  border-radius: 24px;
  overflow: hidden;
  background: #d9e4f2;
}

.hero-visual img,
.news-card__image img,
.software-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.news-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 36px;
}

.news-card,
.service-card,
.software-card,
.content-section,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.content-section,
.hero-banner {
  scroll-margin-top: 110px;
}

.news-card {
  overflow: hidden;
}

.news-card__image {
  height: 210px;
  background: var(--surface-brand);
}

.news-card__content {
  padding: 24px;
}

.news-card__date {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.news-card h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.content-section {
  padding: 34px;
  margin-bottom: 30px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 32px;
  align-items: start;
}

.split-copy {
  columns: 2;
  column-gap: 26px;
}

.split-copy p {
  break-inside: avoid;
}

.section-heading {
  margin-bottom: 22px;
}

.center-heading {
  text-align: center;
}

.section-intro {
  max-width: 720px;
  margin: 0 auto;
}

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

.service-card {
  padding: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
}

.service-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
}

.service-card li + li {
  margin-top: 10px;
}

.software-demo-button {
  width: auto;
  margin-top: 18px;
}

.software-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.7fr);
  gap: 22px;
}

.software-card {
  overflow: hidden;
}

.software-card__media {
  height: 220px;
  background: linear-gradient(180deg, #f1f5fb 0%, #dfe7f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
}

.software-card__media img {
  object-fit: contain;
}

.downloads-media {
  background: linear-gradient(180deg, #eef4fd 0%, #dfe9f7 100%);
}

.software-card__body {
  padding: 24px;
}

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

.feature-item {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-alt);
  border: 1px solid #dde6f3;
  color: var(--text);
  line-height: 1.58;
}

.download-list {
  margin: 0;
  padding-left: 20px;
}

.download-list li + li {
  margin-top: 14px;
}

.download-list li span {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 600;
}

.customers-section {
  overflow: hidden;
}

.customers-logo-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  align-items: stretch;
}

.customer-logo-card {
  flex: 0 1 calc((100% - 36px) / 3);
  min-width: 170px;
  min-height: 124px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
  box-shadow: 0 12px 26px rgba(31, 42, 68, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

a.customer-logo-card:hover {
  transform: translateY(-3px);
  border-color: rgba(62, 111, 151, 0.35);
  box-shadow: 0 18px 36px rgba(31, 42, 68, 0.1);
}

.customer-logo-card img {
  display: block;
  max-width: 100%;
  max-height: 76px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.customers-empty {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.customers-empty code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--heading);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 24px;
  align-items: stretch;
}

.contact-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-details {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.contact-item {
  display: grid;
  gap: 6px;
}

.contact-item span {
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-card {
  padding: 28px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef3fb 100%);
}

.contact-actions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.nav-logout-button {
  background: #fff4f6;
  border-color: #f5c2ce !important;
  color: #b35067 !important;
  box-shadow: none;
}

.nav-logout-button:hover {
  background: #ffe9ee !important;
  border-color: #eca8b8 !important;
}

@media (max-width: 980px) {
  .hero-banner,
  .news-strip,
  .split-section,
  .service-grid,
  .software-layout,
  .feature-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .split-copy {
    columns: 1;
  }

  .hero-copy h1 {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .top-nav {
    padding: 14px 16px;
    gap: 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav__links {
    justify-content: flex-start;
  }

  .landing-nav__brand {
    width: 100%;
    justify-content: flex-start;
  }

  .landing-page {
    width: min(100%, calc(100% - 20px));
    padding-top: 154px;
  }

  .hero-banner,
  .content-section,
  .contact-card,
  .news-card__content,
  .software-card__body,
  .service-card {
    padding: 22px;
  }

  .hero-visual,
  .news-card__image,
  .software-card__media {
    height: 220px;
  }

  .top-nav__logo {
    height: 38px;
  }
}


body.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-shell {
  margin: 0 auto;
}

textarea {
  width: 100%;
  display: block;
  margin: 0 0 14px;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfcff;
  color: var(--text);
  outline: none;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

textarea:focus {
  border-color: rgba(62, 111, 151, 0.65);
  box-shadow: 0 0 0 4px rgba(62, 111, 151, 0.14);
}

.split-copy-single {
  columns: 1;
}

.simple-card-grid {
  gap: 18px;
}

.simple-card {
  padding: 24px;
}

.simple-card p,
.simple-download-list {
  margin-bottom: 0;
}

.simple-download-list {
  padding-left: 20px;
}

.contact-form {
  width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.captcha-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.captcha-image {
  display: block;
  width: 100%;
  height: 50px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.contact-actions .button,
.contact-actions button {
  width: 100%;
}

@media (max-width: 760px) {
  body.auth-page {
    padding: 16px;
  }

  .captcha-row {
    grid-template-columns: 1fr;
  }
}

.documents-shell {
  width: min(100%, 1600px);
  max-width: 1600px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

main.documents-shell {
  width: min(100%, 1600px);
  max-width: 1600px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.documents-toast {
  margin: 0 auto 18px;
  max-width: 1400px;
}

.documents-grid {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.documents-panel {
  width: 100%;
  min-width: 0;
  padding: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.documents-panel__header,
.documents-files__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.documents-panel__action,
.documents-files__zip {
  width: auto;
  min-width: 180px;
  margin: 0;
  white-space: nowrap;
}

.documents-table-wrap {
  overflow: auto;
}

.documents-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

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

.documents-table th {
  color: var(--heading);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.documents-table tbody tr.is-active {
  background: #f4f8fd;
}

.documents-form {
  width: 100%;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.documents-form textarea,
.documents-form select {
  width: 100%;
  display: block;
  margin: 0 0 14px;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfcff;
  color: var(--text);
  outline: none;
}

.documents-form textarea:focus,
.documents-form select:focus {
  border-color: rgba(62, 111, 151, 0.65);
  box-shadow: 0 0 0 4px rgba(62, 111, 151, 0.14);
}

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

.documents-files {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.documents-form__grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.documents-comments {
  display: grid;
  gap: 14px;
}

.documents-comment {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfcff;
}

.documents-comment__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.documents-comment__meta strong {
  margin-right: auto;
}

@media (max-width: 1100px) {
  .documents-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 980px) {
  .documents-form__grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .documents-panel {
    padding: 22px;
  }

  .documents-panel__header,
  .documents-files__header,
  .documents-form__grid,
  .documents-form__grid--compact {
    grid-template-columns: 1fr;
    display: grid;
  }

  .documents-panel__action,
  .documents-files__zip {
    width: 100%;
  }

  .documents-table {
    min-width: 0;
  }
}


table {
  table-layout: auto;
}

table th,
table td {
  width: auto;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.documents-table th.documents-table__description,
.documents-table td.documents-table__description {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.documents-table th.documents-table__filename,
.documents-table td.documents-table__filename {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

input:disabled,
textarea:disabled,
select:disabled {
  background: #eef3fb;
  color: #5f6f8d;
  cursor: not-allowed;
}

.button-secondary {
  background: #eef3fb;
  border-color: var(--border);
  color: var(--heading);
  box-shadow: none;
}

.button-secondary:hover {
  background: #e4ebf6;
}

.table-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.table-tools__search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 320px;
}

.table-tools input,
.table-tools select {
  margin: 0;
}

.documents-table th.is-sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 28px;
}

.documents-table th.is-sortable::after {
  content: '↕';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--text-soft);
}

.documents-table th[data-sort-direction="asc"]::after {
  content: '↑';
}

.documents-table th[data-sort-direction="desc"]::after {
  content: '↓';
}

.documents-table__ref,
#documents-list-table th:first-child,
#documents-list-table td:first-child {
  width: 1%;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}


.status-badge {
  font-weight: 700;
}

.status-badge--active {
  color: #2c6b44;
}

.status-badge--closed {
  color: #2e63b8;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.table-pagination__info,
.table-pagination__label {
  color: var(--text-soft);
}

.table-pagination__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-pagination__button {
  width: auto;
  min-width: 110px;
  margin: 0;
}


.actions-due-cell--alert {
    color: #b42318;
    font-weight: 700;
}

.actions-due-cell--closed {
    color: #067647;
    font-weight: 700;
}

.actions-progress-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.actions-progress-field input[type="range"] {
    flex: 1 1 auto;
    min-width: 0;
}

.actions-progress-field__value {
    flex: 0 0 4.5rem;
    min-width: 4.5rem;
    white-space: nowrap;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 10px;
    background: #f8fafc;
    text-align: center;
    font-weight: 600;
    color: #0f172a;
}


.actions-progress-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.actions-progress-field input[type="range"] {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    transform: none;
    appearance: auto;
    -webkit-appearance: auto;
}

.actions-progress-field input[type="range"]:focus {
    border: 0;
    box-shadow: none;
}


.flash-banner {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-weight: 600;
}

.flash-banner--success {
  background: #ecfdf3;
  color: #067647;
  border: 1px solid #abefc6;
}

.flash-banner--error {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
}

.upload-validation-message {
  color: #b42318;
  margin-top: 6px;
  font-size: 0.9em;
  font-weight: 600;
}


img {
  max-width: 100%;
  height: auto;
}

.top-nav__toggle {
  display: none;
  width: auto;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 0 14px;
  box-shadow: none;
}

.top-nav__toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
}

.top-nav__group {
  display: contents;
}

@media (max-width: 760px) {
  html, body {
    overflow-x: hidden;
  }

  body {
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }

  main:not(.landing-page),
  form,
  .auth-card,
  .page-card {
    width: 100%;
  }

  .page-with-nav {
    padding: 88px 12px 20px;
  }

  .top-nav {
    align-items: stretch;
    gap: 10px;
  }

  .top-nav__group {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .top-nav__toggle {
    display: inline-flex;
    align-self: flex-end;
  }

  .top-nav__links,
  .top-nav__brand {
    width: 100%;
  }

  .top-nav__links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .top-nav.is-open .top-nav__links {
    display: flex;
  }

  .top-nav__links a,
  .top-nav__logout-form,
  .landing-nav__brand .button,
  .nav-login-button,
  .top-nav__links .nav-logout-button {
    width: 100%;
    justify-content: center;
  }

  .top-nav__brand {
    display: none;
  }

  .top-nav.is-open .top-nav__brand,
  .landing-nav .landing-nav__brand {
    display: flex;
    justify-content: stretch;
  }

  .landing-nav.is-open .landing-nav__brand {
    width: 100%;
  }

  .landing-page {
    width: min(100%, calc(100% - 16px));
    padding-top: 108px;
    padding-bottom: 28px;
  }

  .landing-logo,
  .top-nav__logo {
    max-width: 180px;
    height: auto;
    max-height: 38px;
  }

  .hero-banner,
  .content-section,
  .contact-card,
  .news-card__content,
  .software-card__body,
  .service-card,
  .documents-panel,
  main:not(.landing-page),
  form,
  .auth-card {
    padding: 18px;
  }

  .hero-banner {
    gap: 18px;
    border-radius: 22px;
  }

  .hero-actions,
  .form-footer,
  .documents-actions,
  .table-tools,
  .table-pagination,
  .table-pagination__controls,
  .documents-comment__meta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .button,
  .documents-actions .button,
  .documents-actions button,
  .table-pagination__button,
  .documents-panel__action,
  .documents-files__zip,
  .form-footer .text-link {
    width: 100%;
  }

  .hero-visual,
  .news-card__image,
  .software-card__media {
    min-height: 180px;
    height: auto;
  }

  .feature-grid,
  .service-grid,
  .customers-logo-grid,
  .software-layout,
  .contact-section,
  .split-section,
  .documents-grid,
  .documents-form__grid,
  .documents-form__grid--compact {
    grid-template-columns: 1fr;
  }

  .customer-logo-card {
    flex-basis: 100%;
  }

  .contact-section,
  .software-layout,
  .documents-grid {
    gap: 16px;
  }

  .table-tools__search {
    flex-basis: auto;
  }

  .documents-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding-bottom: 4px;
  }

  .documents-table {
    min-width: 640px;
  }

  table th,
  table td {
    white-space: normal;
  }

  .documents-table__ref,
  #documents-list-table th:first-child,
  #documents-list-table td:first-child {
    white-space: nowrap;
  }

  .table-action-group {
    min-width: 118px;
  }

  .actions-progress-field {
    grid-template-columns: 1fr;
  }

  .actions-progress-field__value {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 768px) {
    .nav-login-button {
        display: none !important;
    }
}

/* Account 2FA */
.account-2fa-shell {
  padding-top: 32px;
  padding-bottom: 48px;
}

.account-2fa-section {
  margin: 0 auto;
  max-width: 1180px;
}

.account-2fa-header {
  align-items: flex-start;
  gap: 18px;
}

.account-2fa-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-top: 20px;
}

.account-2fa-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  padding: 22px;
  border: 1px solid rgba(31, 42, 68, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 40px rgba(31, 42, 68, 0.08);
}

.account-2fa-card.is-active {
  border-color: rgba(62, 111, 151, 0.42);
  box-shadow: 0 18px 48px rgba(62, 111, 151, 0.16);
}

.account-2fa-card h3 {
  margin: 0;
}

.account-2fa-card p {
  margin: 0;
  color: var(--text-soft);
}

.account-2fa-card form {
  margin-top: auto;
}

.account-2fa-card--setup form {
  margin-top: 0;
}

.account-2fa-qr {
  display: block;
  width: min(240px, 100%);
  height: auto;
  margin: 0 auto;
  border-radius: 16px;
  border: 1px solid rgba(31, 42, 68, 0.08);
  background: #ffffff;
  padding: 10px;
}

.account-2fa-secret {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(31, 42, 68, 0.04);
  word-break: break-all;
}

.account-2fa-secret code {
  font-family: Consolas, Monaco, monospace;
  font-size: 0.92rem;
}

.account-2fa-confirm-form {
  display: grid;
  gap: 10px;
}

.auth-card--secondary {
  margin-top: 18px;
}

.auth-card--secondary h2 {
  margin: 0;
}

.top-nav__admin {
  position: relative;
}

.top-nav__admin-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--heading);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.top-nav__admin-toggle::-webkit-details-marker {
  display: none;
}

.top-nav__admin-toggle:hover,
.top-nav__admin[open] > summary,
.top-nav__admin.is-active > summary,
.top-nav__admin-links a[aria-current="page"] {
  background: var(--surface-alt);
  border-color: var(--border);
  color: var(--primary-strong);
}

.top-nav__admin-toggle:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.top-nav__admin[open] > summary span {
  transform: rotate(180deg);
}

.top-nav__admin-links {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.top-nav__admin-links a {
  width: 100%;
  justify-content: flex-start;
  border-radius: 10px;
}

main.admin-tests {
  display: grid;
  gap: 24px;
  max-width: 1050px;
}

.admin-tests > header p,
.admin-tests .documents-panel__header p,
.admin-tests__empty {
  margin-bottom: 0;
}

.admin-tests .documents-panel h2 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.admin-tests__recipient {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-alt);
  overflow-wrap: anywhere;
}

.admin-tests__metadata {
  margin: 14px 0;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.admin-tests__output {
  max-height: 460px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  border-radius: 14px;
  background: var(--bg);
  color: #e4ecfc;
  font: 0.84rem/1.8 Consolas, Monaco, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-tests__line--success {
  color: #9be9b5;
}

.admin-tests__line--error {
  color: #ffb7c3;
}

.admin-tests .flash-banner--info {
  background: var(--surface-alt);
  color: var(--heading);
  border: 1px solid var(--border);
}

.admin-tests button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.admin-tests form[aria-busy="true"] button:disabled {
  cursor: wait;
}

@media (max-width: 760px) {
  .top-nav__admin {
    width: 100%;
  }

  .top-nav__admin-links {
    position: static;
    min-width: 0;
    margin: 6px 0;
    box-shadow: none;
  }

  .top-nav__admin-links a {
    justify-content: center;
  }

  .admin-tests .documents-panel__action {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 1080px) {
  .account-2fa-grid {
    grid-template-columns: 1fr;
  }
}
