:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d7dde5;
  --accent: #0b74d1;
  --accent-dark: #075ca7;
  --warn-bg: #fff4df;
  --warn: #8a4a00;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 28px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 16px rgba(23, 32, 51, .05);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topnav a {
  border-radius: 9px;
  padding: 8px 11px;
  transition: background-color .15s ease, color .15s ease;
}

.topnav a:hover {
  background: #edf6ff;
  color: var(--accent-dark);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #075ca7;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 3px 5px rgba(7, 92, 167, .18));
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.35px;
  line-height: .88;
}

.brand-wordmark span:last-child {
  color: #0b74d1;
}

main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px;
}

.login-screen {
  min-height: calc(100vh - 112px);
  display: grid;
  align-items: center;
  justify-content: center;
}

.login-screen .login-box {
  width: min(420px, calc(100vw - 36px));
}

.login-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: .04em;
}

.login-box h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

.login-box p {
  margin: 0 0 18px;
  color: var(--muted);
}

.page-head {
  margin-bottom: 26px;
}

.page-head h1 {
  margin: 8px 0 6px;
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: -.7px;
  line-height: 1.2;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 760px;
}

.back {
  display: inline-block;
  margin-bottom: 4px;
}

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

.catalog-grid-home {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog-card {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 178px;
  padding: 22px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(23, 32, 51, .035);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.catalog-card:hover {
  border-color: #9dcbf2;
  box-shadow: 0 14px 34px rgba(7, 92, 167, .11);
  transform: translateY(-3px);
  text-decoration: none;
}

.catalog-card h2 {
  margin: 20px 0 10px;
  font-size: 21px;
  letter-spacing: -.25px;
  line-height: 1.25;
}

.catalog-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.status {
  display: inline-block;
  padding: 3px 8px;
  background: #eef6ff;
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.catalog-product-card {
  min-height: 218px;
  display: flex;
  flex-direction: column;
}

.catalog-product-card::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -52px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 116, 209, .10), rgba(11, 116, 209, 0) 70%);
  pointer-events: none;
}

.catalog-product-card.is-building::after {
  background: radial-gradient(circle, rgba(85, 214, 194, .13), rgba(85, 214, 194, 0) 70%);
}

.catalog-card-top,
.catalog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-card-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: linear-gradient(145deg, #1687e8, #075ca7);
  border-radius: 12px;
  box-shadow: 0 7px 14px rgba(7, 92, 167, .18);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.2px;
}

.catalog-product-card.is-building .catalog-card-icon {
  color: #075ca7;
  background: linear-gradient(145deg, #e9fbf7, #b8eee4);
  box-shadow: 0 7px 14px rgba(44, 161, 141, .12);
}

.catalog-product-card.is-building .status {
  color: #287567;
  background: #eaf9f5;
}

.catalog-card-footer {
  margin-top: auto;
  padding-top: 4px;
}

.catalog-product-card .meta {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.catalog-card-arrow {
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  transition: transform .18s ease;
}

.catalog-product-card:hover .catalog-card-arrow {
  transform: translateX(4px);
}

.search {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.search input {
  width: min(560px, 100%);
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.search select {
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.ru-monitor-filters input[type="search"] {
  flex: 1 1 360px;
  width: auto;
}

.ru-monitor-filters select {
  flex: 0 0 auto;
  min-width: 176px;
}

.znvls-monitor-filters input[type="search"] {
  flex: 1 1 360px;
  width: auto;
}

.znvls-monitor-filters select {
  flex: 0 0 auto;
  min-width: 176px;
}

.znvls-monitor-table {
  min-width: 1080px;
  table-layout: fixed;
}

.znvls-monitor-table th:nth-child(1),
.znvls-monitor-table td:nth-child(1) {
  width: 30%;
}

.znvls-monitor-table th:nth-child(2),
.znvls-monitor-table td:nth-child(2) {
  width: 13%;
}

.znvls-monitor-table th:nth-child(3),
.znvls-monitor-table td:nth-child(3) {
  width: 17%;
}

.znvls-monitor-table th:nth-child(4),
.znvls-monitor-table td:nth-child(4),
.znvls-monitor-table th:nth-child(5),
.znvls-monitor-table td:nth-child(5) {
  width: 10%;
}

.znvls-monitor-table th:nth-child(6),
.znvls-monitor-table td:nth-child(6),
.znvls-monitor-table th:nth-child(7),
.znvls-monitor-table td:nth-child(7) {
  width: 10%;
  white-space: nowrap;
}

.monitor-placeholder {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding: 20px 22px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(11, 116, 209, .06), rgba(85, 214, 194, .08)),
    var(--panel);
  border: 1px dashed #a8c9e6;
  border-radius: 14px;
}

.monitor-placeholder-icon {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--accent-dark);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(7, 92, 167, .09);
  font-size: 22px;
  font-weight: 800;
}

.monitor-placeholder h2 {
  margin: 0 0 3px;
  font-size: 18px;
}

.monitor-placeholder p {
  margin: 0;
  color: var(--muted);
}

button {
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

.table-wrap {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.patents-table {
  min-width: 980px;
  table-layout: fixed;
}

.patents-table th:nth-child(1),
.patents-table td:nth-child(1) {
  width: 36%;
}

.patents-table th:nth-child(2),
.patents-table td:nth-child(2) {
  width: 16%;
}

.patents-table th:nth-child(3),
.patents-table td:nth-child(3) {
  width: 12%;
  white-space: nowrap;
}

.patents-table th:nth-child(4),
.patents-table td:nth-child(4) {
  width: 8%;
  white-space: nowrap;
}

.patents-table th:nth-child(5),
.patents-table td:nth-child(5) {
  width: 28%;
}

.patent-comment summary {
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}

.patent-comment div {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.registration-certificates-table {
  min-width: 1560px;
  table-layout: fixed;
}

.registration-certificates-table th:nth-child(1),
.registration-certificates-table td:nth-child(1) {
  width: 17%;
}

.registration-certificates-table th:nth-child(2),
.registration-certificates-table td:nth-child(2) {
  width: 14%;
}

.registration-certificates-table th:nth-child(3),
.registration-certificates-table td:nth-child(3) {
  width: 15%;
}

.registration-certificates-table th:nth-child(4),
.registration-certificates-table td:nth-child(4) {
  width: 11%;
}

.registration-certificates-table th:nth-child(5),
.registration-certificates-table td:nth-child(5) {
  width: 14%;
  white-space: nowrap;
}

.registration-certificates-table th:nth-child(6),
.registration-certificates-table td:nth-child(6) {
  width: 8%;
  white-space: nowrap;
}

.registration-certificates-table th:nth-child(7),
.registration-certificates-table td:nth-child(7) {
  width: 7%;
  text-align: center;
}

.registration-certificates-table th:nth-child(8),
.registration-certificates-table td:nth-child(8) {
  width: 6%;
  text-align: center;
}

.registration-certificates-table th:nth-child(9),
.registration-certificates-table td:nth-child(9) {
  width: 8%;
}

.registration-certificates-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.registration-certificates-table tbody tr:hover td {
  background: #f1f7fd;
}

.registration-certificates-table th,
.registration-certificates-table td {
  padding: 13px 16px;
  line-height: 1.35;
  overflow-wrap: normal;
}

.registration-certificates-table td {
  vertical-align: top;
}

.registration-certificates-table .certificate-name {
  display: block;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.registration-certificates-table .certificate-mnn {
  color: #344054;
  overflow-wrap: anywhere;
}

.registration-certificates-table .certificate-number,
.registration-certificates-table .certificate-date {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.registration-certificates-table .certificate-holder {
  color: var(--muted);
  font-size: 13px;
}

.production-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.production-badge.is-active {
  color: #087443;
  background: #e9f8f1;
}

.production-badge.is-inactive {
  color: #667085;
  background: #eef2f6;
}

.znvls-form select {
  width: 64px;
  height: 30px;
  padding: 0 24px 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.ozon-registration-schedule-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.ozon-registration-schedule-table thead th {
  padding-top: 12px;
  padding-bottom: 12px;
  color: #173a5e;
  background: linear-gradient(180deg, #f0f6fc 0%, #e5eff9 100%);
  border-bottom: 2px solid #bfd3e7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .015em;
  white-space: normal;
}

.ozon-registration-schedule-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.ozon-registration-schedule-table tbody tr:hover {
  background: #f2f7fc;
}

.ozon-registration-schedule-table th:nth-child(1),
.ozon-registration-schedule-table td:nth-child(1) {
  width: 24%;
}

.ozon-registration-schedule-table th:nth-child(2),
.ozon-registration-schedule-table td:nth-child(2) {
  width: 7%;
}

.ozon-registration-schedule-table th:nth-child(3),
.ozon-registration-schedule-table td:nth-child(3) {
  width: 16%;
}

.ozon-registration-schedule-table th:nth-child(4),
.ozon-registration-schedule-table td:nth-child(4) {
  width: 14%;
}

.ozon-registration-schedule-table th:nth-child(5),
.ozon-registration-schedule-table td:nth-child(5) {
  width: 18%;
}

.ozon-registration-schedule-table th:nth-child(6),
.ozon-registration-schedule-table td:nth-child(6) {
  width: 9%;
  white-space: nowrap;
}

.ozon-registration-schedule-table th:nth-child(7),
.ozon-registration-schedule-table td:nth-child(7),
.ozon-registration-schedule-table th:nth-child(8),
.ozon-registration-schedule-table td:nth-child(8) {
  width: 6%;
  text-align: center;
}

.ozon-registration-schedule-table td:nth-child(7) select,
.ozon-registration-schedule-table td:nth-child(8) select {
  width: 100%;
  min-width: 0;
}

.schedule-specs {
  display: grid;
  gap: 4px;
}

.schedule-product {
  display: grid;
  gap: 4px;
}

.schedule-product strong {
  font-weight: 600;
}

.schedule-product span {
  color: var(--muted);
  font-size: 12px;
}

.schedule-specs div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
}

.schedule-specs span {
  color: var(--muted);
  font-size: 12px;
}

.schedule-stage {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

.registration-schedule summary {
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}

.schedule-plan {
  display: grid;
  gap: 8px;
}

.schedule-exit-date {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.schedule-exit-date span {
  color: var(--muted);
  font-size: 12px;
}

.schedule-exit-date strong {
  font-weight: 600;
  white-space: nowrap;
}

.schedule-sales-date {
  color: #0f4778;
  font-weight: 700;
  white-space: nowrap;
}

.registration-schedule ol {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.registration-schedule li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}

.registration-schedule li span {
  color: var(--muted);
}

.registration-schedule li strong {
  white-space: nowrap;
  font-weight: 600;
}

.eec-table {
  min-width: 980px;
  table-layout: fixed;
}

.eec-table th:nth-child(1),
.eec-table td:nth-child(1) {
  width: 36%;
}

.eec-table th:nth-child(2),
.eec-table td:nth-child(2),
.eec-table th:nth-child(4),
.eec-table td:nth-child(4) {
  width: 13%;
}

.eec-table th:nth-child(3),
.eec-table td:nth-child(3) {
  width: 18%;
}

.eec-table th:nth-child(5),
.eec-table td:nth-child(5) {
  width: 9%;
}

.eec-table th:nth-child(6),
.eec-table td:nth-child(6) {
  width: 11%;
}

th,
td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #eef2f6;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

td {
  background: #fff;
  overflow-wrap: anywhere;
  word-break: normal;
}

.nowrap {
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

.empty-state,
.login-box,
.subscription-box {
  max-width: 640px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.login-box form {
  display: grid;
  gap: 14px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.login-register-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  color: var(--accent);
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.login-register-button:hover {
  color: #fff;
  background: var(--accent);
}

.login-box .login-register-note {
  margin: 10px 0 0;
  font-size: 14px;
  text-align: center;
}

.subscription-account-note {
  margin: 10px 0 0;
  font-size: 14px;
}

.subscription-box {
  margin-top: 16px;
}

.subscription-box form {
  display: flex;
  gap: 10px;
}

.login-box input,
.subscription-box input {
  display: block;
  width: 100%;
  height: 38px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.account-profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.account-avatar {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #1488e7, #0865bc);
  border-radius: 16px;
  font-size: 20px;
  font-weight: 800;
}

.account-profile-main {
  flex: 1;
  min-width: 0;
}

.account-profile-main h2,
.account-profile-main p,
.account-subscription-group h3,
.account-subscription-group p,
.account-coming-soon h2,
.account-coming-soon p {
  margin-top: 0;
}

.account-profile-main h2 { margin-bottom: 4px; }
.account-profile-main p { margin-bottom: 10px; color: var(--muted); }

.account-badges,
.account-subscription-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.account-badge.success { color: #087443; background: #e7f8ef; }
.account-badge.warning { color: #9a5b00; background: #fff3d9; }
.account-badge.neutral { color: #315d88; background: #eaf3fc; }

.account-resend-form { margin-left: auto; }
.account-resend-form button { white-space: nowrap; }

.account-subscriptions { margin-bottom: 18px; }
.account-section-heading { margin-bottom: 18px; }
.account-section-heading h2 { margin-bottom: 6px; }

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

.account-subscription-group {
  display: flex;
  min-height: 170px;
  padding: 18px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfe;
}

.account-subscription-group h3 { margin-bottom: 8px; }
.account-subscription-group p { line-height: 1.45; }
.account-subscription-actions .monitor-subscription-form { margin: 0; }

.account-certificate-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.subscription-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.subscription-row form { flex: 0 0 auto; }
.account-empty { margin: 0; padding: 16px; color: var(--muted); background: #f8fafc; border-radius: 8px; }
.account-coming-soon { margin-bottom: 24px; background: linear-gradient(135deg, #fff, #f4f9fe); }
.account-coming-soon .account-badge { margin-bottom: 12px; }

@media (max-width: 760px) {
  .account-profile-card { align-items: flex-start; flex-wrap: wrap; }
  .account-resend-form { width: 100%; margin-left: 76px; }
  .account-subscription-grid { grid-template-columns: 1fr; }
  .subscription-row { align-items: flex-start; flex-direction: column; }
}

.alert {
  padding: 12px 14px;
  margin: 0 0 14px;
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid #f3d19b;
  border-radius: 6px;
}

.success {
  padding: 12px 14px;
  margin: 0 0 14px;
  color: #065f46;
  background: #e9f8f1;
  border: 1px solid #a8e2c6;
  border-radius: 6px;
}

.notice {
  padding: 10px 12px;
  color: #065f46;
  background: #e9f8f1;
  border: 1px solid #a8e2c6;
  border-radius: 6px;
}

.admin-panel {
  margin-bottom: 18px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.mail-project-create {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.4fr) auto auto;
  gap: 12px;
  align-items: center;
}

.mail-project-create input,
.mail-projects-table input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

.mail-projects-table th,
.mail-projects-table td {
  padding: 10px 14px;
  vertical-align: middle;
  line-height: 1.25;
}

.mail-projects-shell {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgb(42 70 100 / 6%);
}

.mail-projects-table {
  width: 100%;
  table-layout: fixed;
  border: 0;
}

.mail-projects-table thead th {
  padding-top: 12px;
  padding-bottom: 12px;
  color: #41566d;
  background: #f5f8fb;
  border-bottom: 1px solid #d8e2ec;
  font-size: 13px;
  letter-spacing: .01em;
}

.mail-projects-table input:not([type="checkbox"]) {
  height: 36px;
  padding: 6px 9px;
  background: #f9fbfd;
  border-color: #d5e0ea;
}

.mail-projects-table button {
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}

.mail-projects-table tbody tr {
  height: auto;
  transition: background-color .15s ease;
}

.mail-projects-table tbody tr:hover {
  background: #f8fbff;
}

.mail-projects-table tbody tr.is-inactive {
  background: #f7f8fa;
  opacity: .68;
}

.mail-projects-table td:nth-child(2) input {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.mail-project-origin {
  display: inline-flex;
  padding: 5px 9px;
  color: #50667c;
  background: #eef4fa;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.mail-project-link {
  display: block;
  overflow: hidden;
  color: #075fb7;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-project-link:hover {
  color: #004b95;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mail-project-link.is-disabled {
  color: var(--text);
}

.mail-drive-link {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: #245b91;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-drive-link span {
  color: #f1b400;
  font-size: 17px;
  transform: rotate(90deg);
}

.mail-alias-button {
  color: #075fb7;
  background: #edf6ff;
  border-color: transparent;
}

.mail-save-button {
  width: 100%;
  color: #075fb7;
  background: #fff;
  border: 1px solid #bdd6ee;
}

.mail-save-button:hover {
  color: #fff;
  background: #0878d1;
  border-color: #0878d1;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  white-space: nowrap;
}

.mail-projects-table th:nth-child(1) {
  width: 28%;
}

.mail-projects-table th:nth-child(2) {
  width: 18%;
}

.mail-projects-table th:nth-child(3) {
  width: 13%;
}

.mail-projects-table th:nth-child(4) {
  width: 15%;
}

.mail-projects-table th:nth-child(5) {
  width: 10%;
}

.mail-projects-table th:nth-child(6) {
  width: 8%;
}

.mail-projects-table th:nth-child(7) {
  width: 8%;
}

.mail-projects-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px 180px auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mail-robot-nav {
  display: flex;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  background: #eaf1f7;
  border-radius: 10px;
}

.mail-robot-nav a {
  padding: 8px 13px;
  color: #466079;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
}

.mail-robot-nav a.is-active {
  color: #075fb7;
  background: #fff;
  box-shadow: 0 1px 4px rgb(34 72 110 / 12%);
}

.mail-rules-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px auto auto;
  gap: 10px;
  align-items: center;
  margin: 16px 0 10px;
}

.mail-rule-add {
  margin-bottom: 14px;
}

.mail-rule-add summary {
  color: #075fb7;
  font-weight: 700;
  cursor: pointer;
}

.mail-rule-add form {
  display: grid;
  grid-template-columns: 110px minmax(180px, 1fr) minmax(260px, 2fr);
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.mail-rule-add label,
.mail-rule-card label {
  display: grid;
  gap: 5px;
  color: #526b83;
  font-size: 13px;
}

.mail-rule-add input,
.mail-rule-add select,
.mail-rule-add textarea,
.mail-rule-card input,
.mail-rule-card select,
.mail-rule-card textarea {
  width: 100%;
  min-width: 0;
}

.mail-rules-list {
  display: grid;
  gap: 8px;
}

.mail-processing-current {
  padding: 0;
  overflow: hidden;
}

.mail-processing-current summary {
  cursor: pointer;
  padding: 16px 18px;
  font-size: 18px;
  color: #0d2742;
  background: #f7fbff;
}

.mail-processing-current > p,
.mail-processing-current > ol {
  margin-left: 18px;
  margin-right: 22px;
}

.mail-processing-current > ol {
  margin-top: 10px;
  margin-bottom: 20px;
  padding-left: 24px;
}

.mail-processing-current li {
  margin: 7px 0;
  line-height: 1.42;
}

.mail-rule-card {
  display: grid;
  gap: 10px;
  align-items: end;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.mail-processing-rule {
  grid-template-columns: 90px minmax(180px, 0.8fr) minmax(320px, 2fr)
    minmax(180px, 0.8fr) 90px 110px;
}

.mail-filter-rule {
  grid-template-columns: 82px 150px minmax(210px, 1.3fr) 160px
    minmax(180px, 1fr) 170px minmax(180px, 1fr) 85px 105px;
}

.mail-rule-active {
  display: flex !important;
  align-items: center;
  gap: 7px !important;
  min-height: 42px;
}

.mail-rule-active input {
  width: auto;
}

@media (max-width: 1200px) {
  .mail-processing-rule,
  .mail-filter-rule,
  .mail-rule-add form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mail-rule-instructions,
  .mail-rule-value,
  .mail-rule-comment {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .mail-rules-toolbar,
  .mail-processing-rule,
  .mail-filter-rule,
  .mail-rule-add form {
    grid-template-columns: 1fr;
  }

  .mail-rule-instructions,
  .mail-rule-value,
  .mail-rule-comment {
    grid-column: auto;
  }
}

.mail-task-summary {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.mail-task-summary span {
  padding: 8px 12px;
  color: #466079;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
}

.mail-tasks-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.mail-task-count {
  margin: 0 0 12px;
}

.mail-task-list {
  display: grid;
  gap: 7px;
}

.mail-task-card {
  display: grid;
  grid-template-columns: 38px 118px minmax(260px, 1fr) 105px 105px;
  align-items: center;
  min-height: 54px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.mail-task-card:hover {
  border-color: #a9c7df;
}

.mail-task-card:focus-visible {
  outline: 2px solid #1683d8;
  outline-offset: 2px;
}

.mail-task-bulk-bar {
  position: sticky;
  top: 8px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgb(15 42 68 / 8%);
}

.mail-task-bulk-all,
.mail-task-bulk-selector {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  cursor: pointer;
}

.mail-task-bulk-selector {
  justify-content: center;
  padding-right: 8px;
  color: #52677d;
  border-right: 1px solid var(--line);
  font-size: 12px;
}

.mail-task-bulk-progress {
  flex: 1 1 280px;
  color: #52677d;
  font-size: 14px;
}

.mail-task-bulk-progress.is-running { color: #075fb7; }
.mail-task-bulk-progress.is-success { color: #067647; font-weight: 700; }
.mail-task-bulk-progress.is-error { color: #b42318; font-weight: 700; }

.mail-task-card.is-overdue {
  border-color: #efb1b1;
}

.mail-task-card.is-closed {
  background: #f8fafc;
}

.mail-task-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 10px 2px;
  color: #52677d;
  font-size: 13px;
}

.mail-task-date strong {
  color: var(--text);
  font-size: 15px;
}

.mail-task-date small {
  color: #b42318;
  font-weight: 700;
}

.mail-task-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 14px;
  border-left: 1px solid var(--line);
}

.mail-task-assignee {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 54px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #075fb7;
  background: #eaf4ff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mail-task-assignee.is-mine {
  color: #067647;
  background: #e8f8f0;
}

.mail-task-assignee.is-pavel {
  color: #6941c6;
  background: #f1ecff;
}

.mail-task-assignee.is-unknown {
  color: #667085;
  background: #edf0f3;
}

.mail-task-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mail-task-heading h3,
.mail-task-main p {
  margin: 0;
}

.mail-task-heading h3 {
  font-size: 17px;
}

.mail-task-main > p {
  overflow: hidden;
  margin: 0;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-task-text-compact.is-truncated {
  border-radius: 4px;
  cursor: help;
  outline-offset: 3px;
}

.mail-task-text-compact.is-truncated:focus-visible {
  outline: 2px solid #1683d8;
}

.mail-task-text-tooltip {
  position: fixed;
  z-index: 1000;
  display: none;
  max-width: calc(100vw - 24px);
  max-height: min(45vh, 320px);
  overflow: auto;
  padding: 10px 12px;
  color: #fff;
  background: #102f4c;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgb(15 42 68 / 24%);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  pointer-events: none;
}

.mail-task-text-tooltip.is-visible {
  display: block;
}

.mail-task-status,
.mail-task-tags span {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.mail-task-status {
  color: #075fb7;
  background: #eaf4ff;
  white-space: nowrap;
}

.mail-task-status.status-closed {
  color: #667085;
  background: #edf0f3;
}

.mail-task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.mail-task-tags span {
  color: #52677d;
  background: #f0f4f8;
}

.mail-task-details {
  margin: 0;
  padding: 0 0 0 12px;
  border-left: 1px solid var(--line);
}

.mail-task-details.is-open {
  grid-column: 1 / -1;
  width: 100%;
  padding: 10px 4px 14px;
  border-top: 1px solid var(--line);
  border-left: 0;
}

.mail-task-manual-action {
  display: flex;
  justify-content: center;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.mail-task-close {
  margin: 0;
}

.mail-task-close button {
  min-height: 34px;
  padding: 6px 13px;
  color: #b42318;
  background: #fff4f2;
  border: 1px solid #f5b7af;
}

.mail-task-closed-label {
  color: #667085;
  font-size: 13px;
}

.mail-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  color: #52677d;
  font-size: 13px;
}

.mail-task-details h4 {
  margin: 14px 0 7px;
}

.mail-task-history {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mail-task-history li {
  display: grid;
  grid-template-columns: 135px 1fr;
  gap: 12px;
  font-size: 13px;
}

.mail-task-history time {
  color: #667085;
}

.mail-task-review {
  margin-top: 12px;
  padding: 10px 12px;
  color: #8a4b00;
  background: #fff5df;
  border-radius: 8px;
}

.mail-task-review ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.mail-review-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.mail-review-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.mail-review-card > header,
.mail-review-card > header > div,
.mail-review-meta,
.mail-review-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mail-review-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.status-pill.is-warning {
  color: #8a4b00;
  background: #fff1cc;
}

.mail-decision-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.mail-decision-step {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #d8e2ed;
  border-radius: 11px;
  background: #f8fafc;
}

.mail-decision-step.is-escalation {
  border-color: #b9d9f4;
  background: #eef7ff;
}

.mail-decision-step.is-vadim {
  border-color: #b7e2cd;
  background: #f0faf5;
}

.mail-decision-step.is-empty {
  color: #667085;
  background: #f7f7f8;
}

.mail-decision-step h4,
.mail-decision-step p {
  margin: 0;
}

.mail-decision-step h4 {
  margin-bottom: 7px;
  font-size: 15px;
}

.mail-decision-step p + p {
  margin-top: 5px;
}

.mail-review-letter {
  margin: 12px 0;
  padding: 11px 13px;
  border-left: 3px solid #8ebfe8;
  border-radius: 8px;
  background: #f5f9fd;
}

.mail-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 26px;
}

.mail-pipeline-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.mail-pipeline-card.is-final {
  border-color: #b7e2cd;
  background: #f3fbf7;
}

.mail-pipeline-card .eyebrow {
  color: #0878d1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mail-pipeline-card h3 {
  margin: 8px 0;
  font-size: 17px;
}

.mail-pipeline-card p {
  margin: 0 0 9px;
}

.mail-review-card > header {
  justify-content: space-between;
  color: #526b83;
}

.mail-review-card h3 {
  margin: 14px 0 10px;
  font-size: 18px;
}

.mail-review-confidence {
  padding: 6px 10px;
  border-radius: 999px;
  color: #0067b8;
  background: #eaf4ff;
  font-size: 14px;
}

.mail-review-meta {
  flex-wrap: wrap;
  color: #526b83;
  font-size: 14px;
}

.mail-review-evidence {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f9fc;
}

.mail-review-evidence p {
  margin: 4px 0;
}

.mail-review-actions {
  align-items: stretch;
  justify-content: space-between;
}

.mail-review-actions form {
  display: flex;
  gap: 8px;
  flex: 1;
}

.mail-review-actions input,
.mail-review-actions select {
  min-width: 0;
  flex: 1;
}

.mail-review-reject {
  flex: 1.6 !important;
}

@media (max-width: 900px) {
  .mail-review-actions,
  .mail-review-actions form {
    flex-direction: column;
  }

  .mail-decision-chain,
  .mail-pipeline-grid {
    grid-template-columns: 1fr;
  }
}

.manual-sales-date {
  border-color: #d97706 !important;
  background: #fff3cd !important;
  color: #7c2d12;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.12);
}

.tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin: 14px 0 24px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tabs a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #c8d6e5;
  border-radius: 10px;
  background: #fff;
  color: #075fbd;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}

.tabs a:hover {
  border-color: #75a9df;
  background: #edf6ff;
}

.tabs a.active {
  border-color: #0878d1;
  background: #0878d1;
  color: #fff;
  box-shadow: 0 4px 12px rgba(8, 120, 209, 0.2);
}


.mail-calendar-window {
  padding: 22px 24px;
  border-radius: 14px;
  box-shadow: 0 10px 34px rgb(42 70 100 / 8%);
}

.mail-calendar-window-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.mail-calendar-window-head h2,
.mail-calendar-window-head p {
  margin: 0;
}

.mail-calendar-window-head .eyebrow {
  margin-bottom: 5px;
  color: #0878d1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mail-calendar-form {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
}

.mail-calendar-form label {
  display: grid;
  gap: 7px;
  color: #52677d;
  font-size: 13px;
  font-weight: 700;
}

.mail-calendar-form input,
.mail-calendar-form textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid #cad8e5;
  border-radius: 9px;
  font: inherit;
  box-sizing: border-box;
}

.mail-calendar-description {
  grid-row: span 2;
}

.mail-calendar-form textarea {
  min-height: 150px;
  resize: vertical;
}

.mail-calendar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

@media (max-width: 980px) {
  .mail-projects-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .mail-projects-toolbar input[type="search"] {
    grid-column: 1 / -1;
  }

  .mail-calendar-form {
    grid-template-columns: 1fr;
  }

  .mail-tasks-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .mail-tasks-toolbar input[type="search"] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .mail-task-summary {
    flex-wrap: wrap;
  }

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

  .mail-task-date {
    flex-direction: row;
    align-items: baseline;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

.mail-alias-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgb(15 23 42 / 28%);
}

.mail-alias-dialog::backdrop {
  background: rgb(15 23 42 / 42%);
}

.mail-alias-dialog-head,
.mail-alias-add {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
}

.mail-alias-dialog-head {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.mail-alias-dialog-head h3,
.mail-alias-dialog-head p {
  margin: 0;
}

.mail-alias-dialog-head p {
  margin-top: 4px;
  color: var(--muted);
}

.mail-alias-list {
  max-height: 420px;
  margin: 0;
  padding: 8px 18px;
  overflow: auto;
  list-style: none;
}

.mail-alias-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.mail-alias-row span {
  display: grid;
  gap: 2px;
}

.mail-alias-row small {
  color: var(--muted);
}

.mail-alias-row.is-inactive {
  opacity: .55;
}

.mail-alias-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  border-top: 1px solid var(--line);
}

@media (max-width: 800px) {
  .mail-project-create {
    grid-template-columns: 1fr;
  }
}

.sku-upload-panel,
.sku-current-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.sku-upload-panel h2,
.sku-upload-panel p,
.sku-current-head h2,
.sku-current-head p {
  margin: 0;
}

.sku-upload-panel p,
.sku-current-head p {
  margin-top: 6px;
  color: var(--muted);
}

.sku-upload-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.sku-upload-form input[type="file"] {
  max-width: 290px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.sku-search {
  margin-top: 18px;
}

.sku-catalog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.sku-catalog-heading h2,
.sku-catalog-heading p {
  margin: 0;
}

.sku-catalog-heading p {
  margin-top: 6px;
}

.sku-catalog-count {
  flex: 0 0 auto;
  padding: 7px 11px;
  color: #075ea8;
  background: #eaf4ff;
  border-radius: 999px;
  font-size: 13px;
}

.sku-bu-main-table {
  min-width: 1200px;
  table-layout: fixed;
}

.sku-bu-main-table th:nth-child(1),
.sku-bu-main-table td:nth-child(1) {
  width: 52px;
}

.sku-bu-main-table th:nth-child(2),
.sku-bu-main-table td:nth-child(2) {
  width: 90px;
}

.sku-bu-main-table th:nth-child(4),
.sku-bu-main-table td:nth-child(4) {
  width: 300px;
}

.sku-bu-main-table th:nth-child(5),
.sku-bu-main-table td:nth-child(5) {
  width: 240px;
}

.sku-bu-main-table th:nth-child(6),
.sku-bu-main-table td:nth-child(6) {
  width: 130px;
}

.sku-bu-main-table td {
  vertical-align: middle;
}

.sku-ru-number {
  font-variant-numeric: tabular-nums;
}

.sku-select-cell {
  text-align: center;
}

.sku-select-cell input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.sku-bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px 0 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sku-bulk-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.sku-bulk-toolbar button {
  margin-left: auto;
  white-space: nowrap;
}

.sku-bulk-toolbar button:disabled {
  color: #98a2b3;
  background: #f2f4f7;
  border-color: #e4e7ec;
  cursor: not-allowed;
}

.button-danger-light {
  color: #b42318;
  background: #fff1f0;
  border: 1px solid #fecdca;
}

.button-danger-light:hover {
  color: #fff;
  background: #b42318;
}

.sku-excluded-details {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.sku-excluded-details summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.sku-excluded-details > p {
  margin: 8px 0 12px;
}

.sku-excluded-table {
  min-width: 860px;
}

.sku-excluded-table th:first-child,
.sku-excluded-table td:first-child {
  width: 90px;
}

.sku-excluded-table th:last-child,
.sku-excluded-table td:last-child {
  width: 150px;
}

.znvls-table {
  min-width: 980px;
  table-layout: fixed;
}

.znvls-table th:first-child,
.znvls-table td:first-child {
  width: 43%;
  white-space: normal;
}

.znvls-table th:nth-child(2),
.znvls-table td:nth-child(2) {
  width: 12%;
}

.znvls-table th:nth-child(4),
.znvls-table td:nth-child(4),
.znvls-table th:nth-child(5),
.znvls-table td:nth-child(5) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.znvls-table th:nth-child(3),
.znvls-table td:nth-child(3) {
  width: 23%;
  white-space: nowrap;
}

.znvls-table th:nth-child(4),
.znvls-table td:nth-child(4) {
  width: 12%;
}

.znvls-table th:nth-child(5),
.znvls-table td:nth-child(5) {
  width: 10%;
}

.znvls-table tbody tr {
  height: 52px;
}

.znvls-table th,
.znvls-table td {
  padding: 10px 16px;
  line-height: 1.3;
  vertical-align: middle;
}

.znvls-table th {
  white-space: normal;
}

.sku-result-count {
  margin: -3px 0 12px;
  color: var(--muted);
}

.sku-table-wrap {
  max-height: 65vh;
}

.sku-bu-table {
  min-width: max(100%, calc(var(--sku-column-count) * 180px));
  table-layout: auto;
}

.sku-bu-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

.sku-bu-table td {
  max-width: 360px;
  min-width: 140px;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.sku-history-panel summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

.sku-history-panel details[open] summary {
  margin-bottom: 14px;
}

.sku-history-table {
  min-width: 780px;
}

.import-status {
  display: inline-flex;
  padding: 3px 8px;
  color: var(--muted);
  background: #eef2f6;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.import-status.is-current {
  color: #065f46;
  background: #e9f8f1;
}

.sku-review-panel > p {
  margin: -6px 0 14px;
}

.sku-review-table {
  min-width: 1180px;
  table-layout: auto;
}

.sku-review-table th:first-child,
.sku-review-table td:first-child {
  width: 90px;
}

.sku-review-table th:last-child,
.sku-review-table td:last-child {
  width: 420px;
}

.sku-ru-link-form {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto;
  gap: 8px;
}

.sku-ru-link-form select {
  min-width: 250px;
  height: 38px;
  padding: 0 34px 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.sku-review-ignore-form {
  margin-top: 8px;
}

.button-secondary {
  color: var(--accent-dark);
  background: #eef6ff;
}

.button-secondary:hover {
  color: #fff;
}

a[href$=".xlsx"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 11px 17px;
  border: 1px solid #0878cf;
  border-radius: 12px;
  color: #fff;
  background: #087ed8;
  box-shadow: 0 7px 16px rgba(8, 126, 216, 0.2);
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

a[href$=".xlsx"]::before {
  content: "↓";
  font-size: 1.15em;
  font-weight: 800;
}

a[href$=".xlsx"]:hover {
  color: #fff;
  background: #0668b5;
  border-color: #0668b5;
  transform: translateY(-1px);
}

.sku-ignored-details {
  margin-top: 16px;
}

.sku-ignored-details summary {
  margin-bottom: 12px;
  color: var(--accent);
  cursor: pointer;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) auto auto auto;
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.user-row:first-of-type {
  border-top: 0;
}

.user-row input[type="text"],
.user-row input[type="password"],
.user-row input:not([type]) {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  color: #334155;
}

.permission-list {
  grid-column: 1 / -2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.admin-table {
  min-width: 860px;
  table-layout: fixed;
}

.admin-table th {
  position: static;
  top: auto;
}

.admin-table th,
.admin-table td {
  padding: 9px 14px;
}

/* OTC planning workbench: keep the medicine visible while years/months scroll. */
.otc-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.otc-entry-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

.otc-entry-table th:first-child,
.otc-entry-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 330px;
  min-width: 330px;
  max-width: 330px;
  background: #fff;
  white-space: normal;
  line-height: 1.35;
}

.otc-entry-table th:first-child {
  z-index: 3;
  background: #edf3fa;
}

.otc-entry-table th:not(:first-child),
.otc-entry-table td:not(:first-child) {
  min-width: 96px;
  white-space: nowrap;
}

.otc-entry-table input[type="number"] {
  width: 88px;
  min-width: 88px;
}

.otc-packs-grid-wrap {
  width: 100%;
  margin-top: 14px;
  overflow-x: visible;
}

.otc-years-grid {
  width: 100%;
  table-layout: fixed;
}

.otc-years-grid .otc-year-row td {
  padding: 3px 3px 8px;
  border-bottom: 1px solid #d9e2ec;
  text-align: center;
  vertical-align: top;
}

.otc-years-grid .otc-year-row td.pack-cell-allowed { background: #e2f0d9; }
.otc-years-grid .otc-year-row td.pack-cell-blocked { background: #fce8e6; }

.otc-years-grid .otc-year-row span {
  display: block;
  margin-bottom: 2px;
  color: #60738a;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.otc-years-grid .otc-year-row input[type="number"],
.otc-years-grid .otc-year-row .otc-year-packs {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 3px;
  font-size: 12px;
  text-align: right;
}

.otc-years-grid .otc-year-row .otc-year-growth {
  margin-top: 3px;
  color: #526176;
  background: #f8fbff;
}

.otc-years-grid .otc-year-row small {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.otc-years-grid .otc-year-row strong {
  display: block;
  padding-top: 9px;
  font-size: 12px;
  white-space: nowrap;
}

.new-plan-distribution {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 8px;
}

.new-plan-distribution label span {
  display: block;
  margin-bottom: 3px;
  color: #60738a;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.new-plan-distribution input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  text-align: right;
}

.new-plan-distribution button {
  grid-column: 1 / -1;
  justify-self: end;
}

.otc-years-grid input[readonly] {
  color: #526176;
  background: rgba(255,255,255,.62);
}

.otc-packs-grid {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.otc-packs-grid .otc-product-row th {
  padding: 8px 12px 5px;
  border-top: 1px solid #d9e2ec;
  background: #f6f9fc;
  color: #17365d;
  text-align: left;
  font-size: 14px;
  line-height: 1.25;
}

.otc-product-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.otc-product-heading > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otc-row-save {
  flex: 0 0 auto;
  min-height: 0;
  margin: -3px 0;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.2;
}

.otc-packs-grid .otc-month-row td {
  padding: 3px 3px 8px;
  border-bottom: 1px solid #d9e2ec;
  background: #fff;
  text-align: center;
}

.otc-packs-grid .otc-month-row td.pack-cell-allowed,
.otc-entry-table td.pack-cell-allowed {
  background: #e2f0d9;
}

.otc-packs-grid .otc-month-row td.pack-cell-blocked,
.otc-entry-table td.pack-cell-blocked {
  background: #fce8e6;
}

.pack-cell-blocked input[type="number"],
.pack-cell-blocked .pack-number-input {
  border-color: #dc8a82;
  background: #fff7f6;
}

.pack-cell-allowed input[type="number"],
.pack-cell-allowed .pack-number-input {
  border-color: #8fbd79;
  background: #f8fff5;
}

.otc-packs-grid .otc-month-row span {
  display: block;
  margin-bottom: 2px;
  color: #60738a;
  font-size: 11px;
  font-weight: 700;
}

.otc-packs-grid .otc-month-row input[type="number"],
.otc-packs-grid .otc-month-row .pack-number-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 4px 5px;
  font-size: 14px;
  text-align: right;
}

.otc-packs-grid .otc-total-cell strong {
  display: block;
  padding: 6px 4px;
  color: #17365d;
  font-size: 14px;
}

@media (max-width: 900px) {
  .otc-packs-grid .otc-month-row td {
    padding-left: 2px;
    padding-right: 2px;
  }
  .otc-packs-grid .otc-month-row input[type="number"],
  .otc-packs-grid .otc-month-row .pack-number-input {
    padding-left: 2px;
    padding-right: 2px;
  }
}

.update-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.update-control h2,
.update-control p {
  margin: 0;
}

.update-control p {
  margin-top: 8px;
}

.updates-table th:nth-child(1),
.updates-table td:nth-child(1) {
  width: 150px;
}

.updates-table td:last-child {
  overflow-wrap: anywhere;
}

.ru-bu-actions-table {
  min-width: 1180px;
  table-layout: auto;
}

.ru-bu-link-form {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.ru-bu-link-form select {
  width: 100%;
  min-width: 320px;
}

.ru-bu-link-form button {
  white-space: nowrap;
}

.ru-bu-ignore-form label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  cursor: pointer;
}

.reference-actions-table {
  min-width: 1240px;
  table-layout: auto;
}

.reference-link-form,
.reference-add-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.reference-add-form {
  margin-top: 8px;
}

.reference-link-form input,
.reference-add-form input {
  width: 100%;
  min-width: 260px;
}

.reference-link-form button,
.reference-add-form button {
  white-space: nowrap;
}

.update-details {
  margin-top: 14px;
}

.update-details summary {
  color: var(--accent);
  cursor: pointer;
}

.update-details[open] summary {
  margin-bottom: 12px;
}

.dosage-form-table {
  min-width: 1250px;
  table-layout: fixed;
}

.dosage-form-table th:nth-child(1),
.dosage-form-table td:nth-child(1) {
  width: 8%;
  white-space: nowrap;
}

.dosage-form-table th:nth-child(2),
.dosage-form-table td:nth-child(2) {
  width: 17%;
}

.dosage-form-table th:nth-child(3),
.dosage-form-table td:nth-child(3) {
  width: 27%;
}

.dosage-form-table th:nth-child(4),
.dosage-form-table td:nth-child(4) {
  width: 11%;
}

.dosage-form-table th:nth-child(5),
.dosage-form-table td:nth-child(5) {
  width: 9%;
}

.dosage-form-table th:nth-child(6),
.dosage-form-table td:nth-child(6) {
  width: 18%;
}

.dosage-form-table th:nth-child(7),
.dosage-form-table td:nth-child(7) {
  width: 10%;
  text-align: center;
  white-space: nowrap;
}

.ru-search select {
  height: 40px;
  padding: 0 34px 0 12px;
  color: #334155;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.eaeu-registration-table {
  width: 100%;
  min-width: 1180px;
}

.eaeu-registration-table th,
.eaeu-registration-table td {
  box-sizing: border-box;
}

.eaeu-registration-table th:nth-child(1) { width: 190px; }
.eaeu-registration-table th:nth-child(2) { width: 165px; }
.eaeu-registration-table th:nth-child(3) { width: 175px; }
.eaeu-registration-table th:nth-child(4) { width: 255px; }
.eaeu-registration-table th:nth-child(5) { width: 135px; }
.eaeu-registration-table th:nth-child(6) { width: 270px; }

.eaeu-registration-table th:nth-child(6),
.eaeu-registration-table td:nth-child(6) {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.eaeu-registration-table tr.grls-unlinked td {
  background: #fff3cd;
}

.eaeu-registration-table tr.grls-unlinked:hover td {
  background: #ffe8a1;
}

.grls-link {
  margin-top: 4px;
  color: #5f728a;
  font-size: 12px;
  white-space: normal;
}

.grls-link-missing {
  color: #9a6700;
  font-weight: 700;
}

.ru-form + .ru-form {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.ru-form strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
}

.row-status {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
}

.status-ready {
  color: #065f46;
  background: #dff6ea;
}

.status-review {
  color: #92400e;
  background: #fff1d6;
}

@media (max-width: 880px) {
  main {
    padding: 18px;
  }

  .topbar {
    padding: 0 18px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-wordmark {
    font-size: 16px;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .search {
    align-items: stretch;
    flex-direction: column;
  }

  .subscription-box form {
    align-items: stretch;
    flex-direction: column;
  }

  .search input,
  .search button,
  .ru-search select {
    width: 100%;
  }

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

  .update-control {
    align-items: stretch;
    flex-direction: column;
  }

  .sku-upload-panel,
  .sku-current-head,
  .sku-upload-form {
    align-items: stretch;
    flex-direction: column;
  }

  .sku-upload-form input[type="file"] {
    max-width: none;
  }

  .permission-list {
    grid-column: auto;
  }
}
.mail-robot-sections {
  margin-bottom: 24px;
}

.idea-import-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.idea-create-panel {
  display: grid;
  gap: 18px;
}

.idea-create-panel h2,
.idea-create-panel p {
  margin-top: 0;
}

.idea-create-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.idea-create-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.idea-create-form input,
.idea-create-form select,
.idea-create-form textarea {
  width: 100%;
  min-width: 0;
}

.idea-create-form textarea {
  resize: vertical;
}

.idea-create-form button {
  min-height: 46px;
}

.idea-field-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.idea-autocomplete {
  position: relative;
  display: block;
  min-width: 0;
}

.idea-autocomplete-results {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 310px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(18, 45, 72, 0.18);
}

.idea-autocomplete-results[hidden] {
  display: none;
}

.idea-create-form .idea-autocomplete-results button {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 400;
}

.idea-create-form .idea-autocomplete-results button:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.idea-autocomplete-empty {
  display: block;
  padding: 9px 10px;
  color: var(--muted);
}

.idea-add-mnn-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(12, 34, 56, 0.24);
}

.idea-add-mnn-dialog::backdrop {
  background: rgba(15, 35, 55, 0.38);
}

.idea-add-mnn-dialog form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.idea-add-mnn-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.idea-add-mnn-dialog h2 {
  margin: 0;
}

.idea-add-mnn-dialog label {
  display: grid;
  gap: 6px;
}

.idea-setup-form {
  display: grid;
  gap: 8px;
}

@media (max-width: 980px) {
  .idea-create-form {
    grid-template-columns: 1fr;
  }
}

.idea-import-panel h2,
.idea-import-panel p {
  margin-top: 0;
}

.ideas-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.ideas-table th,
.ideas-table td {
  vertical-align: top;
}

.ideas-table th:nth-child(1) {
  width: 28%;
}

.ideas-table th:nth-child(2) {
  width: 8%;
}

.ideas-table th:nth-child(3) {
  width: 11%;
}

.ideas-table th:nth-child(4) {
  width: 14%;
}

.ideas-table th:nth-child(5) {
  width: 20%;
}

.ideas-table th:nth-child(6) {
  width: 8%;
}

.ideas-table th:nth-child(7) {
  width: 11%;
}

.ideas-table td:nth-child(7) form,
.ideas-table td:nth-child(7) button {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.ideas-table td:nth-child(7) button {
  padding-left: 8px;
  padding-right: 8px;
  white-space: nowrap;
}

.ideas-table .idea-priority-form {
  display: grid;
  gap: 6px;
  margin: 0;
}

.ideas-table .idea-priority-form select,
.ideas-table .idea-priority-form button {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.ideas-table .idea-priority-form button {
  padding: 9px 10px;
  white-space: nowrap;
}

.ideas-table .idea-waiting-status {
  max-width: 100%;
  line-height: 1.25;
}

.ideas-table .idea-details-row > td {
  padding-top: 3px;
  padding-bottom: 5px;
}

.ideas-table .idea-details-panel > summary {
  padding: 3px 0;
  font-size: .86rem;
}

.idea-stage-details {
  min-width: 620px;
  padding-top: 12px;
}

.idea-stage-details table {
  width: 100%;
  border-collapse: collapse;
}

.idea-stage-details th,
.idea-stage-details td {
  padding: 8px;
  border-bottom: 1px solid var(--border, #d6dee8);
  text-align: left;
}

.idea-stage.is-waiting td {
  background: #fff8db;
}

.idea-dependency-form {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.idea-stage-waves {
  display: grid;
  gap: 12px;
  margin: 10px 0 14px;
}

.idea-stage-wave {
  min-height: 76px;
  padding: 10px;
  background: #f8fafc;
  border: 1px dashed #b9c9d9;
  border-radius: 10px;
}

.idea-wave-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.idea-wave-head button {
  min-width: 32px;
  padding: 3px 8px;
}

.idea-stage-wave ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.idea-stage-wave ol:empty::before {
  content: "Перетащите процесс сюда";
  align-self: center;
  color: var(--muted);
  font-size: 13px;
}

.idea-stage-card {
  display: flex;
  flex: 1 1 210px;
  max-width: 320px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f5f9fd;
  border: 1px solid #cbd9e7;
  border-radius: 8px;
  cursor: grab;
  user-select: none;
}

.idea-stage-content {
  min-width: 0;
  flex: 1;
}

.idea-stage-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.idea-stage-title .idea-stage-remove {
  width: auto;
  min-width: 0;
  padding: 3px 7px;
  color: #a52222;
  background: #fff;
  border-color: #e7b8b8;
  font-size: 12px;
  white-space: nowrap;
}

.idea-stage-card.is-completed {
  background: #effaf3;
  border-color: #8fd0a6;
}

.idea-process-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.idea-process-dates label {
  color: var(--muted);
  font-size: 12px;
}

.idea-process-dates input {
  width: 100%;
  margin-top: 3px;
  padding: 5px 7px;
}

.idea-process-dates button {
  grid-column: 1 / -1;
  padding: 6px 9px;
}

.idea-stage-card.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.idea-stage-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.idea-stage-drag {
  color: #6f8296;
  font-weight: 700;
  letter-spacing: -3px;
}

.idea-source-stages {
  margin-top: 16px;
}

.admin-two-columns {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(600px, 1.6fr);
  gap: 20px;
  margin-top: 24px;
}

.idea-norms-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}

.idea-norms-table th:first-child,
.idea-norms-table td:first-child {
  width: 68%;
}

.idea-norms-table input[type="number"] {
  width: 100%;
  min-width: 72px;
  box-sizing: border-box;
}

@media (max-width: 1050px) {
  .idea-import-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-two-columns {
    grid-template-columns: 1fr;
  }
}
.mail-task-edit {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(180px, 0.8fr) minmax(320px, 2fr);
  gap: 14px;
  align-items: end;
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
}

.mail-task-edit label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.mail-task-edit input,
.mail-task-edit select,
.mail-task-edit textarea {
  width: 100%;
  box-sizing: border-box;
}

.mail-task-edit-text {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.mail-task-edit .mail-task-edit-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.mail-task-edit-toggle input {
  width: auto;
  margin: 0;
}

.mail-task-edit-actions {
  grid-column: 2;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.mail-task-create {
  margin: 0 0 16px;
}

.mail-task-create > summary {
  cursor: pointer;
}

.mail-task-create form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.mail-task-create label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.mail-task-create input,
.mail-task-create select,
.mail-task-create textarea {
  width: 100%;
  box-sizing: border-box;
}

.mail-task-create-text {
  grid-column: 1 / span 3;
}

.mail-task-create .mail-task-edit-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.mail-task-create .mail-task-edit-toggle input {
  width: auto;
}

.mail-task-calendar-link {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 900px) {
  .mail-task-edit {
    grid-template-columns: 1fr;
  }
  .mail-task-edit-text,
  .mail-task-edit-toggle,
  .mail-task-edit-actions {
    grid-column: 1;
    grid-row: auto;
  }
  .mail-task-create form {
    grid-template-columns: 1fr;
  }
  .mail-task-create-text {
    grid-column: 1;
  }
}
.documentation-rule {
  margin-bottom: 1.25rem;
}

.documentation-card {
  min-height: 210px;
}

.documentation-entry-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.documentation-entry-form textarea {
  grid-column: 1 / -1;
  min-height: 150px;
  resize: vertical;
}

.documentation-entry-form button {
  width: max-content;
}

.documentation-content-panel {
  margin-top: 18px;
}

.documentation-content-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.documentation-content {
  margin: 0;
  padding: 20px;
  max-height: 68vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: 15px/1.58 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .documentation-entry-form {
    grid-template-columns: 1fr;
  }

  .documentation-entry-form textarea {
    grid-column: auto;
  }
}

.passport-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.passport-toc,
.passport-document {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.passport-toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  padding: 18px;
}

.passport-toc h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.passport-toc nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.passport-toc a {
  color: var(--muted);
  line-height: 1.35;
  text-decoration: none;
}

.passport-toc a:hover {
  color: var(--primary);
}

.passport-toc-level-2 { padding-left: 10px; }
.passport-toc-level-3 { padding-left: 20px; font-size: 14px; }
.passport-toc-level-4 { padding-left: 30px; font-size: 14px; }

.passport-document {
  min-width: 0;
  padding: clamp(22px, 4vw, 44px);
  line-height: 1.6;
}

.passport-document h1,
.passport-document h2,
.passport-document h3,
.passport-document h4 {
  scroll-margin-top: 96px;
}

.passport-document h1 { margin-top: 0; }
.passport-document h2 { margin-top: 2em; }
.passport-document h3 { margin-top: 1.6em; }
.passport-document p,
.passport-document ul,
.passport-document ol { max-width: 92ch; }

.passport-document blockquote {
  margin: 18px 0;
  padding: 10px 16px;
  border-left: 4px solid #80bfff;
  background: #f5f9ff;
  color: var(--muted);
}

.passport-code {
  overflow: auto;
  padding: 16px;
  border-radius: 10px;
  background: #10233d;
  color: #edf6ff;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}

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

.passport-table {
  width: 100%;
  border-collapse: collapse;
}

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

.passport-table th { background: #eef4fa; }

@media (max-width: 900px) {
  .passport-layout { grid-template-columns: 1fr; }
  .passport-toc {
    position: static;
    max-height: none;
  }
}

/* Registration monitor — public reference layout */
.registration-monitor-head {
  margin-bottom: 20px;
}

.monitor-head-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.monitor-eyebrow {
  margin: 8px 0 5px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.monitor-counter {
  min-width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #eef7ff, #f8fbff);
  border: 1px solid #cfe5f8;
  border-radius: 12px;
  color: #41617f;
}

.monitor-counter strong {
  color: var(--accent-dark);
  font-size: 28px;
  letter-spacing: -.04em;
  line-height: 1;
}

.monitor-counter span {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.registration-monitor-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid #dbe3ec;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(23, 32, 51, .055);
}

.registration-monitor-filters {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 220px auto auto;
  align-items: end;
  gap: 12px;
  margin: 0;
  padding: 18px 20px;
  background: #fbfcfe;
  border-bottom: 1px solid #e3e8ef;
}

.monitor-search-control,
.monitor-filter-control {
  display: grid;
  gap: 6px;
}

.monitor-search-control > span,
.monitor-filter-control > span {
  color: #526174;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.registration-monitor-filters input,
.registration-monitor-filters select,
.registration-monitor-filters button {
  width: 100%;
  min-height: 42px;
  border-radius: 9px;
}

.registration-monitor-filters input,
.registration-monitor-filters select {
  background-color: #fff;
  border-color: #ccd6e2;
}

.registration-monitor-filters input:focus,
.registration-monitor-filters select:focus {
  border-color: #74afe1;
  box-shadow: 0 0 0 3px rgba(11, 116, 209, .10);
  outline: none;
}

.monitor-reset {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-weight: 700;
}

.monitor-table-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 20px 13px;
}

.monitor-table-caption > div {
  display: grid;
  gap: 2px;
}

.monitor-table-caption strong {
  font-size: 15px;
}

.monitor-table-caption span {
  color: var(--muted);
  font-size: 12px;
}

.monitor-result-badge {
  padding: 5px 9px;
  background: #f1f4f8;
  border-radius: 999px;
  color: #526174 !important;
  font-weight: 700;
}

.registration-monitor-table-wrap {
  border: 0;
  border-top: 1px solid #e3e8ef;
  border-radius: 0;
}

.registration-monitor-table {
  min-width: 1040px;
  table-layout: fixed;
}

.registration-monitor-table th {
  padding: 10px 14px;
  background: #f4f7fa;
  color: #506174;
  border-bottom-color: #d9e1ea;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.registration-monitor-table td {
  padding: 14px;
  border-bottom-color: #e5eaf0;
  vertical-align: middle;
}

.registration-monitor-table tbody tr {
  transition: background-color .15s ease;
}

.registration-monitor-table tbody tr:hover {
  background: #f8fbfe;
}

.registration-monitor-table th:nth-child(1) { width: 17%; }
.registration-monitor-table th:nth-child(2) { width: 16%; }
.registration-monitor-table th:nth-child(3) { width: 14%; }
.registration-monitor-table th:nth-child(4) { width: 17%; }
.registration-monitor-table th:nth-child(5) { width: 16%; }
.registration-monitor-table th:nth-child(6) { width: 13%; }
.registration-monitor-table th:nth-child(7) { width: 7%; }

.monitor-product {
  color: #172033;
  font-weight: 750;
  line-height: 1.35;
}

.monitor-mnn,
.monitor-form,
.monitor-specs {
  line-height: 1.4;
}

.monitor-form,
.monitor-specs {
  color: #344054;
}

.monitor-date {
  white-space: nowrap;
  color: #25364b;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.registration-monitor-table .schedule-stage {
  max-width: 100%;
  padding: 5px 9px;
  background: #eaf4ff;
  color: #075ca7;
  white-space: normal;
  line-height: 1.25;
}

.dispensing-badge {
  display: inline-flex;
  min-width: 45px;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
}

.dispensing-badge.is-rx {
  background: #fff0f0;
  border-color: #ffd2d2;
  color: #b42318;
}

.dispensing-badge.is-otc {
  background: #ecfdf3;
  border-color: #c5efd4;
  color: #087443;
}

.dispensing-badge.is-both {
  background: #fff7e6;
  border-color: #f6dfad;
  color: #946200;
}

.dispensing-badge.is-empty {
  background: #f2f4f7;
  border-color: #e1e5ea;
  color: #7a8696;
}

.monitor-empty {
  min-height: 150px;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
}

.monitor-empty strong { font-size: 15px; }
.monitor-empty span { color: var(--muted); }

@media (max-width: 820px) {
  .monitor-head-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .monitor-counter { min-width: 0; }

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

  .monitor-search-control { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .registration-monitor-filters { grid-template-columns: 1fr; }
  .monitor-search-control { grid-column: auto; }
  .monitor-table-caption { align-items: flex-start; }
}

/* Global visual system refresh — shared by all Pharm Support pages. */
:root {
  --bg: #f3f6fa;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #10233f;
  --muted: #66758a;
  --line: #d9e2ec;
  --line-soft: #e8eef5;
  --accent: #0878d1;
  --accent-dark: #0560aa;
  --accent-soft: #eaf4ff;
  --focus-ring: rgba(8, 120, 209, .18);
  --shadow-sm: 0 1px 2px rgba(16, 35, 63, .04), 0 4px 14px rgba(16, 35, 63, .035);
  --shadow-md: 0 12px 34px rgba(16, 35, 63, .08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(8, 120, 209, .055), transparent 28rem),
    linear-gradient(180deg, #f8fafc 0, var(--bg) 260px);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  min-height: 68px;
  background: rgba(255, 255, 255, .94);
  border-bottom-color: var(--line-soft);
  box-shadow: 0 1px 0 rgba(16, 35, 63, .03), 0 8px 24px rgba(16, 35, 63, .035);
  backdrop-filter: blur(14px);
}

main {
  width: min(100%, 1460px);
  padding: 34px 32px 54px;
}

.page-head {
  margin-bottom: 24px;
}

.page-head h1,
main > h1 {
  margin: 0 0 7px;
  color: #0d2342;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.page-head p,
main > h1 + p {
  color: var(--muted);
  font-size: 16px;
}

a {
  color: #0672ca;
  text-underline-offset: 2px;
}

a:hover { color: #064f8d; }

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border: 1px solid #cbd7e4;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  box-shadow: 0 1px 2px rgba(16, 35, 63, .025);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  min-height: 42px;
  padding: 8px 12px;
}

textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover { border-color: #aebfd1; }

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

input::placeholder,
textarea::placeholder { color: #8b98a9; }

button,
.button,
.btn {
  min-height: 42px;
  border-radius: 10px;
  padding: 9px 16px;
  font-weight: 750;
  box-shadow: 0 3px 8px rgba(8, 120, 209, .13);
  transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease;
}

button:hover,
.button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(8, 120, 209, .18);
}

button:active,
.button:active,
.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(8, 120, 209, .12);
}

button:focus-visible,
.button:focus-visible,
.btn:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

button:disabled,
.button.is-disabled,
.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.search {
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-sm);
}

.search input,
.search select {
  height: 42px;
  min-height: 42px;
  border-radius: 9px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f1f6fb;
  color: #29415f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .015em;
  vertical-align: middle;
}

td {
  padding: 12px 14px;
  border-bottom-color: var(--line-soft);
  vertical-align: middle;
}

tbody tr {
  transition: background-color .13s ease;
}

tbody tr:hover { background: #f8fbff; }
tbody tr:last-child td { border-bottom: 0; }

.catalog-grid { gap: 18px; }

.catalog-card {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.catalog-card:hover {
  transform: translateY(-2px);
  border-color: #c2d8ec;
  box-shadow: var(--shadow-md);
}

.admin-panel,
.empty-state,
.login-box,
.subscription-box {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.admin-panel { padding: 22px; }

.notice {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(16, 35, 63, .025);
}

.status,
.status-pill,
.schedule-stage {
  border-radius: 999px;
  font-weight: 750;
}

details > summary {
  border-radius: 8px;
  color: #0672ca;
  cursor: pointer;
  font-weight: 650;
}

details > summary:hover { color: #064f8d; }

.stage-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 2px 1px;
  overflow: visible;
}

.stage-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  flex: 0 0 auto;
  white-space: nowrap;
  color: #526176;
  background: #f8fbff;
  border: 1px solid #dce5ef;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}

.stage-filter-chip:hover {
  color: var(--accent-dark);
  border-color: #9fc9ee;
  background: #eef7ff;
  text-decoration: none;
  transform: translateY(-1px);
}

.stage-filter-chip.is-active {
  color: #075ca7;
  border-color: #67aee8;
  background: #e9f5ff;
  box-shadow: 0 0 0 2px rgba(11, 116, 209, .08);
}

.stage-filter-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #718096;
}

.stage-filter-chip span { opacity: .72; }
.stage-filter-chip.stage-completed i { background: #16a36a; }
.stage-filter-chip.stage-decision i { background: #4f6ee8; }
.stage-filter-chip.stage-technical_assignment i { background: #5577f6; }
.stage-filter-chip.stage-supply i { background: #8b5cf6; }
.stage-filter-chip.stage-incoming_control i { background: #c44fd8; }
.stage-filter-chip.stage-technology i { background: #ec4899; }
.stage-filter-chip.stage-fsp i { background: #f97316; }
.stage-filter-chip.stage-dossier i { background: #e5ad12; }
.stage-filter-chip.stage-be_ci i { background: #6bbd19; }
.stage-filter-chip.stage-pharma_expertise i { background: #148a6a; }

@media (max-width: 820px) {
  main { padding: 24px 18px 40px; }

  .topbar { min-height: 62px; }

  .search {
    align-items: stretch;
    flex-direction: column;
  }

  .search > * { width: 100%; }

  .table-wrap {
    margin-inline: -6px;
    border-radius: 12px;
  }
}

@media (max-width: 520px) {
  main { padding-inline: 12px; }

  .page-head h1,
  main > h1 { font-size: 30px; }

  th,
  td { padding: 10px 11px; }
}
.registration-report-table {
  width: 100%;
  table-layout: fixed;
}

.registration-report-table th:nth-child(1) { width: 13%; }
.registration-report-table th:nth-child(2) { width: 21%; }
.registration-report-table th:nth-child(3) { width: 18%; }
.registration-report-table th:nth-child(4) { width: 16%; }
.registration-report-table th:nth-child(5) { width: 4%; }
.registration-report-table th:nth-child(6) { width: 7%; }
.registration-report-table th:nth-child(7) { width: 7%; }
.registration-report-table th:nth-child(8) { width: 8%; }
.registration-report-table th:nth-child(9) { width: 6%; }

.registration-report-table th:nth-child(n+5),
.registration-report-table td:nth-child(n+5) {
  white-space: nowrap;
}

.registration-report-table th,
.registration-report-table td {
  overflow-wrap: anywhere;
}
.compact-table {
  width: 100%;
  table-layout: fixed;
}

.compact-table thead tr {
  height: 38px;
}

.compact-table tbody tr {
  height: 44px;
}

.compact-table th,
.compact-table td {
  vertical-align: middle;
  line-height: 1.22;
  padding: .28rem .45rem;
  overflow-wrap: anywhere;
}

.compact-table td {
  font-size: .875rem;
}

.compact-table th {
  white-space: nowrap;
  font-size: .72rem;
}

.report-exclusions {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.report-exclusions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-top: 1px solid var(--border);
}

.report-exclusions form { margin: 0; }

.report-manual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem 1rem;
  width: 100%;
  margin-bottom: .75rem;
}

.report-indicator-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(125px, .75fr) minmax(145px, .7fr);
  gap: .4rem;
}

.report-indicator-row > * { min-width: 0; width: 100%; }

.report-narrative {
  display: block;
  width: 100%;
  margin-top: 1rem;
}

.report-narrative textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  margin-top: .4rem;
  box-sizing: border-box;
}

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