:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --text: #1f2a25;
  --muted: #68746d;
  --line: #d8d0c3;
  --panel: #fffdf8;
  --accent: #2f6f62;
  --accent-strong: #1f5148;
  --warn: #a75d28;
  --sand: #fff7e8;
  --sage: #dce8dd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #f4f1ea 0%, #e9efe8 100%);
  color: var(--text);
  font-family: "PT Sans", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

a {
  color: inherit;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.88);
}

.brand {
  display: grid;
  gap: 1px;
  font-weight: 700;
  line-height: 1.08;
  text-decoration: none;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.current-user {
  display: grid;
  gap: 1px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.current-user strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

nav a,
.nav-link {
  color: var(--muted);
  text-decoration: none;
}

.nav-form {
  margin: 0;
}

.nav-link {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 45px rgba(31, 42, 37, 0.08);
}

.narrow {
  max-width: 560px;
}

.auth-shell {
  min-height: calc(100vh - 128px);
  display: grid;
  place-items: center;
  padding: 24px 0 48px;
}

.auth-card {
  width: min(520px, 100%);
  display: grid;
  gap: 20px;
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid rgba(216, 208, 195, 0.9);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(47, 111, 98, 0.12), transparent 34%),
    linear-gradient(145deg, #fffdf8 0%, #fff8eb 100%);
  box-shadow: 0 28px 70px rgba(31, 42, 37, 0.13);
}

.auth-intro {
  text-align: center;
}

.auth-intro h1 {
  margin-bottom: 10px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--accent-strong);
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-form button {
  width: 100%;
  min-height: 44px;
}

.auth-form .password-field {
  position: relative;
  display: block;
}

.auth-form .password-field input {
  width: 100%;
  padding-right: 38px;
}

.auth-form .password-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.auth-form .password-toggle:hover,
.auth-form .password-toggle.active {
  background: #eee9df;
  color: var(--text);
}

.auth-form .password-toggle svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.auth-safety-note {
  margin: -4px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.auth-restore {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.auth-restore h2 {
  margin-bottom: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  margin-bottom: 14px;
}

h2 {
  font-size: 18px;
  margin-bottom: 6px;
}

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

.actions,
.row-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.button,
button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  padding: 10px 16px;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  background: #e4e0d7;
  color: var(--text);
}

.button.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-weight: 600;
}

input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

input[type="hidden"] {
  min-height: 0;
  padding: 0;
}

input[type="file"] {
  padding: 8px;
  background: white;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: white;
}

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

.inline-form {
  display: flex;
  gap: 8px;
}

.inline-form input {
  width: 130px;
}

.table {
  display: grid;
  gap: 10px;
}

.row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.row-contract {
  border-color: #c8d8c1;
  background: #f7fbf3;
  box-shadow: inset 4px 0 0 #d5c06a;
}

.row-contract.status-dogovor_signed {
  border-color: #b8d4bd;
  background: #f3fbf4;
  box-shadow: inset 4px 0 0 #77ad7a;
}

.priority {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.priority strong {
  color: var(--accent-strong);
  font-size: 28px;
}

.statement p {
  margin-bottom: 4px;
}

.application-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.contract-list-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #d9e4d2;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}

.contract-list-number {
  color: var(--accent-strong);
  font-size: 19px;
  line-height: 1.2;
  font-weight: 800;
}

.contract-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  border-radius: 999px;
  padding: 5px 12px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
}

.contract-state-pill.status-dogovor_created,
.contract-state-pill.payment-waiting {
  border-color: #ead6a0;
  background: #fff6df;
  color: #6b4f16;
}

.contract-state-pill.status-dogovor_signed,
.contract-state-pill.payment-paid {
  border-color: #b7d7bd;
  background: #f0f7f1;
  color: #245c35;
}

.status-pill,
.contract-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
}

.status-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.status-pill {
  background: #fff1d8;
  color: #7b4b00;
}

.status-dogovor_created {
  background: #fff1d8;
  color: #7b4b00;
}

.status-dogovor_signed {
  background: #dceee2;
  color: #235d34;
}

.status-cancel_requested {
  background: #fff1d8;
  color: #7b4b00;
}

.contract-chip {
  background: #eef5ef;
  color: var(--accent-strong);
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.summary {
  display: grid;
  gap: 4px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.summary p {
  margin-bottom: 4px;
}

.compact-summary {
  margin-bottom: 14px;
}

.notice {
  padding: 16px;
  border-left: 4px solid var(--accent);
  background: #eef5ef;
  border-radius: 6px;
}

.notice.warn {
  border-left-color: var(--warn);
  background: #fff4e8;
}

.notice.success {
  border-left-color: #2f7d52;
  background: #edf7f1;
}

.notice.danger {
  border-left-color: #b54234;
  background: #fff0ee;
  color: #5b211c;
}

.notice.danger strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.notice.danger p {
  margin-bottom: 6px;
}

.notice.danger p:last-child {
  margin-bottom: 0;
}

.attention-box {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
}

.attention-box h2 {
  margin-bottom: 0;
}

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

.attention-item {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: #fff1d8;
}

.attention-ok {
  background: #dceee2;
}

.document-filter-panel {
  display: grid;
  gap: 0;
  margin-top: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
}

.filter-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
}

.filter-label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-tabs a {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid #d4caba;
  border-radius: 10px;
  background: white;
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(68, 48, 25, 0.06);
}

.filter-tabs a:hover,
.filter-tabs a:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(106, 122, 74, 0.16);
}

.filter-tabs a.active {
  border-color: #a9b18f;
  background: #f3f6ed;
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(106, 122, 74, 0.16);
}

.filter-tabs a.active::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.filter-tabs span {
  font-weight: 700;
}

.filter-tabs small {
  color: var(--muted);
}

.upload-context {
  margin-bottom: 18px;
}

.upload-note {
  max-width: 720px;
  margin: -6px 0 18px;
  color: var(--accent-strong);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.soft-separator {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

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

.zayav-form {
  max-width: 620px;
}

.check {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}

.check input {
  min-height: auto;
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

.power-attorney-box {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff9ee;
}

.power-attorney-box[hidden] {
  display: none;
}

.power-attorney-box p {
  margin: 0;
}

.power-attorney-box .wide-row {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  font-weight: 700;
}

.power-attorney-box .wide-row > span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.power-attorney-box input,
.power-attorney-box textarea {
  width: 100%;
  font-weight: 400;
}

.power-attorney-box textarea {
  min-height: 74px;
}

.dadata-field {
  position: relative;
}

.suggestions {
  display: grid;
  position: absolute;
  z-index: 20;
  right: 0;
  left: 0;
  top: calc(100% + 4px);
  overflow: hidden;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: 0 16px 35px rgba(31, 42, 37, 0.16);
}

.suggestions[hidden] {
  display: none;
}

.suggestions:empty {
  display: none;
}

.suggestion-item {
  width: 100%;
  border-radius: 0;
  background: white;
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.suggestion-item:hover {
  background: #edf4ed;
}

.upload-form {
  margin-top: 20px;
  max-width: 720px;
}

.documents-panel {
  margin-top: 18px;
}

.embedded-documents {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.embedded-documents h2 {
  margin-bottom: 0;
}

.documents-list {
  display: grid;
  gap: 10px;
}

.document-item,
.customer-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.document-item p {
  margin-bottom: 4px;
}

.document-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  align-content: start;
  gap: 8px;
  min-width: 210px;
}

.document-actions time {
  flex-basis: 100%;
  text-align: right;
}

.document-actions .button {
  white-space: nowrap;
}

.customers-list {
  display: grid;
  gap: 10px;
}

.customer-item p {
  margin-bottom: 4px;
}

.dev-id-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 12px;
}

.dev-id-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--sand);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.dev-id-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(31, 42, 37, 0.08);
}

.dev-id-pill {
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  text-decoration: none;
}

.dev-id-pill span {
  color: var(--muted);
  font-size: 13px;
}

.dev-id-pill em {
  grid-column: 1 / -1;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dev-password-form {
  display: flex;
  border-left: 1px solid var(--line);
}

.dev-password-button {
  height: 100%;
  min-width: 74px;
  border-radius: 0;
  padding: 10px 11px;
  background: #ece5d8;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.dev-password-button:hover {
  background: #dfeade;
}

.dev-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: clamp(26px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 0%, rgba(47, 111, 98, 0.18), transparent 30%),
    linear-gradient(135deg, #fffdf8 0%, #edf4ed 100%);
  box-shadow: 0 22px 55px rgba(31, 42, 37, 0.1);
}

.dev-hero h1 {
  margin-bottom: 8px;
}

.dev-hero p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
}

.dev-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dev-panel {
  border-radius: 22px;
}

.dev-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.dev-toolbar h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.dev-quick-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.dev-quick-form span {
  display: flex;
  gap: 8px;
}

.dev-quick-form input {
  width: 130px;
}

.customer-form {
  max-width: 900px;
}

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

.form-grid > * {
  min-width: 0;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

textarea {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  resize: vertical;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.data-grid div,
.change-item {
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.data-grid .wide {
  grid-column: 1 / -1;
}

.data-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.data-grid strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
  word-break: break-word;
}

.data-grid div.payment-paid {
  border-color: #b7d7bd;
  border-left: 4px solid #5c9468;
  background: #f0f7f1;
}

.data-grid div.payment-paid strong {
  color: #245c35;
}

.me-actions {
  margin-top: 20px;
}

.changes-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.change-item p {
  margin-bottom: 0;
}

.contract-card {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7fbf3;
}

.comment-card {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf0;
}

.comment-card h2 {
  margin-bottom: 0;
}

.comment-form {
  max-width: 760px;
}

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

.comment-item {
  display: grid;
  gap: 4px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.comment-item p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.support-message-list {
  display: grid;
  gap: 8px;
}

.support-message {
  width: min(820px, 100%);
  max-width: 100%;
}

.support-message.from-admin {
  border-left: 4px solid #2f7d52;
  background: #edf7f1;
}

.support-message.from-applicant {
  border-left: 4px solid #b57921;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
}

.support-compact-page {
  display: grid;
  gap: 12px;
  min-height: calc(100vh - 128px);
}

.compact-head {
  margin-bottom: 0;
}

.compact-head h1 {
  margin-bottom: 2px;
}

.support-chat-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 0;
  height: min(680px, calc(100vh - 260px));
  overflow: hidden;
}

.support-inbox-shell {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

.support-topic-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  max-height: min(680px, calc(100vh - 260px));
  overflow-y: auto;
  padding-right: 4px;
}

.support-topic {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #d6cabc;
  border-radius: 10px;
  background: #fffdf8;
  color: inherit;
  text-decoration: none;
}

.support-topic strong {
  padding-right: 26px;
  line-height: 1.25;
}

.support-topic-scope {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.25;
}

.support-topic.active {
  border-left-color: var(--accent);
  background: #f6fbf4;
}

.support-topic.has-unread {
  border-left-color: #b57921;
  background: #fff8e9;
}

.support-topic .unread-dot {
  position: absolute;
  top: 8px;
  right: 8px;
}

.support-inbox-shell .support-chat-shell {
  height: min(720px, calc(100vh - 245px));
}

.support-chat {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 0;
  max-height: calc(100vh - 96px);
  overflow: hidden;
}

.support-message-list {
  min-height: 180px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 8px 4px 0;
}

.support-message-list.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 14px;
  overflow: hidden;
  border: 1px dashed #d9cdbd;
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 20%, rgba(181, 121, 33, 0.08), transparent 32%),
    linear-gradient(135deg, #fffdf8 0%, #f7f3ea 100%);
}

.support-empty-state {
  display: grid;
  grid-template-columns: auto minmax(0, 480px);
  gap: 16px;
  align-items: start;
  color: var(--text);
}

.support-empty-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #2f5f45;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.support-empty-state h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.support-empty-state p {
  margin: 0 0 8px;
  line-height: 1.45;
}

.support-live-status {
  justify-self: start;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eee7db;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.support-live-status.ok {
  background: #edf7f1;
  color: var(--accent-strong);
}

.support-live-status.warn {
  background: #fff1d6;
  color: #7b4d12;
}

.support-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
  align-items: end;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.support-compose textarea {
  min-height: 76px;
  resize: vertical;
}

.support-compose-actions {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  height: 76px;
}

.support-compose-actions .support-file-button,
.support-compose-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
  padding-inline: 8px;
  line-height: 1;
}

.support-compose-actions .support-file-button {
  max-width: none;
  font-size: 0.86rem;
}

.support-file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  max-width: 230px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
  color: var(--accent-strong);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.support-file-button.has-file {
  border-color: var(--accent);
  background: #f6fbf4;
}

.support-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.support-form-help {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.support-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.support-attachment {
  display: grid;
  width: 132px;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
  color: inherit;
  text-decoration: none;
}

.support-attachment img {
  width: 100%;
  height: 82px;
  object-fit: cover;
  border-radius: 7px;
  background: #f3eadb;
}

.support-attachment span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-empty {
  padding: 12px;
}

.support-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px auto;
  gap: 8px;
  margin-bottom: 6px;
}

.support-queue {
  display: grid;
  gap: 7px;
}

.support-ticket {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) auto minmax(220px, 1.4fr);
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #bbb1a2;
  border-radius: 8px;
  background: #fffdfa;
  color: inherit;
  text-decoration: none;
}

.support-ticket:hover {
  border-left-color: var(--accent);
  box-shadow: 0 10px 24px rgba(43, 32, 20, 0.08);
}

.support-ticket.has-unread {
  border-left-color: #b57921;
  background: #fff8e9;
}

.support-ticket p {
  margin: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-ticket-main {
  display: grid;
  gap: 2px;
}

.support-ticket-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  background: #eee7db;
  font-weight: 700;
}

.badge {
  background: #fff0cf;
  color: #744b00;
}

.support-admin-grid {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.support-context,
.support-dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fffdfa;
}

.support-context dl {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 6px 10px;
  font-size: 14px;
}

.support-context dt {
  color: var(--muted);
}

.support-context dd {
  margin: 0;
}

.support-status-form {
  margin-top: 16px;
}

.page:has(.admin-chat-page) {
  width: min(1480px, calc(100% - 28px));
}

.admin-chat-page {
  display: grid;
  gap: 14px;
}

.admin-chat-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.admin-chat-head h1 {
  margin-bottom: 4px;
}

.admin-chat-head p {
  margin-bottom: 0;
}

.admin-chat-head > div {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.admin-chat-current {
  color: var(--accent-strong);
  font-size: 18px;
}

.admin-chat-shell {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(420px, 1fr) minmax(260px, 320px);
  gap: 12px;
  align-items: stretch;
  min-height: calc(100vh - 190px);
}

.admin-chat-list,
.admin-chat-dialog,
.admin-chat-context {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 16px 38px rgba(31, 42, 37, 0.07);
}

.admin-chat-list {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.admin-chat-filters {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fffaf0;
}

.admin-chip-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.admin-chip-row button,
.admin-status-inline button {
  border: 1px solid var(--line);
  background: #eee7db;
  color: var(--text);
  padding: 7px 8px;
  font-size: 13px;
  font-weight: 700;
}

.admin-chip-row button.active,
.admin-status-inline button.active {
  border-color: rgba(47, 111, 98, 0.35);
  background: var(--sage);
  color: var(--accent-strong);
}

.admin-conversation-scroll,
.admin-message-scroll {
  min-height: 0;
  overflow: auto;
}

.admin-conversation-scroll {
  padding: 8px;
}

.admin-conversation {
  display: grid;
  gap: 5px;
  margin-bottom: 7px;
  padding: 10px;
  border: 1px solid transparent;
  border-left: 4px solid #d6cabc;
  border-radius: 12px;
  background: #fffdf8;
  color: inherit;
  text-decoration: none;
}

.admin-conversation:hover,
.admin-conversation.active {
  border-color: rgba(47, 111, 98, 0.35);
  border-left-color: var(--accent);
  background: #f6fbf4;
}

.admin-conversation.has-unread {
  border-left-color: #b57921;
  background: #fff8e9;
}

.admin-conversation-top,
.admin-conversation-foot,
.admin-dialog-head,
.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.admin-conversation-top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-conversation p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-conversation-foot {
  font-size: 12px;
}

.unread-dot {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #b57921;
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.admin-chat-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.admin-dialog-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fffaf0;
}

.admin-dialog-head h2 {
  margin-bottom: 2px;
}

.admin-dialog-head p {
  margin-bottom: 0;
}

.admin-status-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.admin-message-scroll {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
}

.admin-message {
  width: min(820px, 100%);
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #b57921;
  border-radius: 12px;
  background: #fffdfa;
}

.admin-message.mine {
  border-left-color: var(--accent);
  background: #edf7f1;
}

.admin-message p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.admin-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fffaf0;
}

.admin-reply-form-top {
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.admin-reply-form textarea {
  min-height: 76px;
}

.admin-reply-actions {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  height: 76px;
}

.admin-reply-actions .support-file-button,
.admin-reply-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
  padding-inline: 8px;
  line-height: 1;
}

.admin-reply-actions .support-file-button {
  max-width: none;
  font-size: 0.86rem;
}

.admin-chat-context {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  overflow: auto;
}

.admin-chat-context h2 {
  margin-bottom: 0;
}

.context-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf0;
}

.context-card h3 {
  margin: 0;
  color: var(--accent-strong);
  font-size: 15px;
}

.context-card p {
  margin-bottom: 0;
}

.admin-chat-context dl,
.context-card dl {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 7px 10px;
  margin: 0;
  font-size: 14px;
}

.admin-chat-context dt,
.context-card dt {
  color: var(--muted);
}

.admin-chat-context dd,
.context-card dd {
  min-width: 0;
  margin: 0;
  word-break: break-word;
}

.admin-context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.admin-zayav-page {
  display: grid;
  gap: 16px;
}

.admin-zayav-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.admin-zayav-list {
  display: grid;
  gap: 8px;
}

.admin-rate-page {
  display: grid;
  gap: 16px;
}

.admin-rate-actions {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-rate-reset {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
}

.admin-rate-list {
  display: grid;
  gap: 8px;
}

.admin-rate-rules {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
}

.admin-rate-rules h2 {
  margin: 0;
}

.admin-rate-rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

.admin-rate-rule-list article {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf5e9;
}

.admin-rate-rule-list strong {
  font-size: 0.92rem;
}

.admin-rate-rule-list span {
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-rate-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn);
  border-radius: 12px;
  background: #fffdf8;
}

.admin-rate-card strong {
  word-break: break-word;
}

.admin-rate-card p {
  margin: 3px 0 0;
}

.admin-rate-card span {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
}

.admin-zayav-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) minmax(150px, 0.8fr) minmax(190px, 1fr) 90px;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: #fffdf8;
}

.admin-zayav-card p {
  margin-bottom: 0;
}

.admin-zayav-title {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.admin-zayav-detail {
  display: grid;
  gap: 16px;
}

.admin-zayav-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(170px, 0.9fr) minmax(170px, 0.9fr);
  gap: 10px;
}

.admin-zayav-summary article {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, #fffdf8 0%, #f4ead7 100%);
}

.admin-zayav-summary span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-zayav-summary strong {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
}

.admin-zayav-summary p {
  margin: 4px 0 0;
  color: var(--muted);
}

.admin-zayav-summary .contract-state-pill {
  display: inline-flex;
  margin: 4px 0 0;
  color: inherit;
  font-size: 13px;
}

.admin-zayav-detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.6fr);
  gap: 14px;
  align-items: start;
}

.admin-zayav-side,
.admin-zayav-main {
  display: grid;
  gap: 12px;
}

.admin-zayav-side section,
.admin-zayav-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
}

.admin-zayav-side h2,
.admin-zayav-block h2 {
  margin-bottom: 10px;
}

.admin-zayav-side dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.admin-zayav-side dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-zayav-side dd {
  margin: -6px 0 0;
  word-break: break-word;
}

.admin-details-inline {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 7px;
  margin: 0;
}

.admin-details-inline dt {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.admin-details-inline dt::after {
  content: ":";
}

.admin-details-inline dd {
  margin: 0;
  min-width: 0;
  word-break: break-word;
}

@media (max-width: 760px) {
  .support-filters,
  .support-admin-grid,
  .support-ticket,
  .support-compose,
  .admin-chat-head,
  .admin-chat-shell,
  .admin-reply-form,
  .admin-rate-actions,
  .admin-rate-reset,
  .admin-rate-card,
  .admin-zayav-search,
  .admin-zayav-card,
  .admin-zayav-summary,
  .admin-zayav-detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-chat-shell {
    min-height: auto;
  }

  .support-chat-shell {
    height: min(620px, calc(100vh - 220px));
  }

  .support-inbox-shell {
    grid-template-columns: 1fr;
  }

  .support-topic-list {
    max-height: 180px;
  }

  .support-chat {
    max-height: calc(100vh - 72px);
  }

  .admin-message-scroll,
  .admin-conversation-scroll {
    max-height: none;
  }

  .support-message {
    max-width: 100%;
  }

  .admin-message {
    max-width: 100%;
  }

  .admin-reply-actions {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    height: auto;
  }

  .support-compose-actions {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    height: auto;
  }

  .support-message-list.is-empty {
    min-height: 260px;
    align-items: start;
  }

  .support-empty-state {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .support-empty-mark {
    width: 40px;
    height: 40px;
    font-size: 23px;
  }
}

.contract-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.contract-head h2,
.scan-upload h2,
.scan-list h2 {
  margin-bottom: 4px;
}

.contract-number {
  color: var(--accent-strong);
  font-size: 24px;
}

.contract-grid {
  margin-top: 0;
}

.contract-actions {
  padding-top: 4px;
}

.scan-upload {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.scan-list {
  display: grid;
  gap: 10px;
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #eee7db;
}

.generated-password {
  display: block;
  width: fit-content;
  margin-top: 10px;
  padding: 10px 14px;
  font-size: 22px;
  letter-spacing: 0.08em;
  color: #17251d;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.help-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
}

.help-card h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.help-card p {
  margin-bottom: 8px;
}

.help-card p:last-child {
  margin-bottom: 0;
}

.help-route {
  display: grid;
  gap: 12px;
}

.help-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.help-step h2 {
  margin-bottom: 6px;
  font-size: 18px;
}

.help-step p {
  margin-bottom: 7px;
}

.help-step p:last-child {
  margin-bottom: 0;
}

.application-help {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.application-help p {
  margin-bottom: 0;
}

.zayav-form {
  display: grid;
  gap: 12px;
}

.compact-help {
  margin-bottom: 0;
  font-size: 14px;
}

@media (max-width: 760px) {
  .topbar,
  .section-head,
  .row,
  .help-step,
  .document-item,
  .customer-item,
  .data-grid,
  .contract-head,
  .dev-hero,
  .dev-toolbar {
    display: grid;
  }

  .data-grid,
  .dev-toolbar {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    min-height: auto;
    place-items: stretch;
    padding-top: 8px;
  }

  .auth-card,
  .dev-hero,
  .dev-panel {
    border-radius: 18px;
  }

  .dev-hero-actions {
    justify-content: start;
  }

  .document-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .document-actions time {
    text-align: left;
  }

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

  .filter-tabs a {
    min-height: 42px;
    padding: 8px 10px;
  }

  .filter-tabs small {
    display: none;
  }

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

  .topbar {
    padding: 14px 16px;
  }

  nav {
    flex-wrap: wrap;
  }

  .topbar-right {
    display: grid;
    gap: 10px;
  }

  .current-user {
    text-align: left;
  }

  .row {
    grid-template-columns: 1fr;
  }
}
.payment-receipt-form {
  max-width: 760px;
  margin-top: 20px;
}

.payment-receipt-note {
  margin-top: 18px;
}

.payment-receipt-history {
  margin-top: 28px;
}

.payment-receipt-empty {
  margin-top: 18px;
}

.check-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(31, 111, 92, .13), transparent 34rem),
    linear-gradient(145deg, #f3f0e7 0%, #fbfaf5 58%, #e8efe9 100%);
}

.check-page {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.check-entry-card {
  width: min(560px, 100%);
  margin: 5vh auto 0;
}

.check-card,
.check-contract-card,
.check-intro {
  background: rgba(255, 253, 248, .96);
  border: 1px solid rgba(27, 64, 54, .12);
  border-radius: 24px 8px 24px 8px;
  box-shadow: 0 18px 50px rgba(35, 48, 42, .10);
  padding: 30px;
}

.check-brand {
  display: flex;
  flex-direction: column;
  color: var(--accent);
  margin-bottom: 28px;
}

.check-brand span { font-weight: 800; font-size: 1.15rem; }
.check-brand small { color: var(--muted); }
.check-email-form { margin-top: 24px; }
.check-security-note { margin-top: 20px; }

.check-header {
  min-height: 78px;
  padding: 14px max(20px, calc((100vw - 1040px) / 2));
  background: rgba(255, 253, 248, .94);
  border-bottom: 1px solid rgba(27, 64, 54, .12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.check-header .check-brand { margin: 0; }
.check-user { display: flex; align-items: center; gap: 18px; }
.check-contract-page { padding-top: 28px; }
.check-intro { margin-bottom: 20px; }
.check-intro h1 { margin: 0 0 7px; font-size: 1.55rem; }
.check-intro p { margin: 0; color: #526159; max-width: 720px; font-size: .94rem; }
.check-intro .notice { margin-top: 18px; }
.check-contract-list { display: grid; gap: 18px; }
.check-contract-card { overflow: hidden; }
.check-contract-card.is-paid { border-left: 5px solid #5c9271; background: #f5faf5; }
.check-contract-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.check-contract-identity { min-width: 0; }
.check-contract-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.check-contract-head h2 {
  margin: 0;
  color: #173f34;
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.check-contract-head .contract-state-pill { flex: 0 0 auto; }
.check-program {
  display: grid;
  gap: 5px;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid #d7e5dc;
  border-radius: 14px 5px 14px 5px;
  background: #f2f7f3;
}
.check-program span { color: #65736c; font-size: .82rem; font-weight: 700; }
.check-program strong { color: #263d35; font-size: .92rem; line-height: 1.35; }
.check-payment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 18px;
}
.check-payment-summary div { display: grid; gap: 2px; }
.check-payment-summary span { color: var(--muted); font-size: .8rem; }
.check-payment-summary strong { color: #263d35; }
.check-upload-section {
  display: grid;
  grid-template-columns: minmax(170px, .7fr) minmax(320px, 1.3fr);
  gap: 24px;
  align-items: start;
  margin: 24px -30px -30px;
  padding: 22px 30px 26px;
  border-top: 1px solid #dfe7df;
  background: rgba(244, 241, 230, .62);
}
.check-upload-copy h3 { margin: 0 0 5px; font-size: 1.05rem; }
.check-upload-copy p { margin: 0; color: var(--muted); font-size: .9rem; }
.check-upload-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 0;
  max-width: none;
}
.check-file-field { min-width: 0; }
.check-file-field input[type="file"] {
  width: 100%;
  min-width: 0;
  padding: 8px;
  border: 1px solid #cdd9d1;
  border-radius: 8px;
  background: #fff;
}
.check-upload-form button { white-space: nowrap; }
.check-receipts { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.check-receipts h3 { margin: 0 0 6px; font-size: 1rem; }
.check-receipt-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 0; }
.check-receipt-row + .check-receipt-row { border-top: 1px solid rgba(34, 67, 56, .1); }
.check-receipt-file { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.check-receipt-file strong { overflow-wrap: anywhere; }

@media (max-width: 680px) {
  .check-page { width: min(100% - 16px, 1040px); padding: 14px 0 28px; }
  .check-card, .check-contract-card, .check-intro { padding: 18px; border-radius: 17px 5px 17px 5px; }
  .check-header { min-height: 0; padding: 12px 14px; align-items: flex-start; }
  .check-header .check-brand span { font-size: .92rem; }
  .check-header .check-brand small { font-size: .75rem; }
  .check-user { align-items: flex-end; gap: 5px; font-size: .82rem; text-align: right; }
  .check-user strong { max-width: 140px; }
  .check-user .button { min-height: 34px; padding: 6px 11px; }
  .check-intro h1 { font-size: 1.3rem; }
  .check-intro p { font-size: .9rem; }
  .check-contract-list { gap: 12px; }
  .check-contract-head, .check-receipt-row { align-items: stretch; flex-direction: column; }
  .check-contract-head { gap: 12px; }
  .check-contract-head .contract-state-pill { align-self: flex-start; }
  .check-program { margin-top: 16px; padding: 14px; }
  .check-payment-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .check-upload-section {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 20px -18px -18px;
    padding: 18px;
  }
  .check-upload-form { grid-template-columns: 1fr; }
  .check-upload-form button { width: 100%; }
  .check-receipt-row { gap: 10px; }
  .check-receipt-row .actions { justify-content: flex-start; }
  .check-receipt-row .button { min-height: 36px; }
}

@media (max-width: 420px) {
  .check-header { flex-direction: column; gap: 9px; }
  .check-user { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
  .check-user strong { max-width: calc(100% - 80px); }
  .check-payment-summary { grid-template-columns: 1fr; }
}
.nowrap {
  white-space: nowrap;
}
