/* «Ссылки на доступ» (25.11.2026, admin-invites.js): the form of a new link, the link to send, the numbers and the list */
.invites-root { display: grid; gap: 16px }
.invites-root > .panel + .panel { margin-top: 0 }
.invites-root [hidden] { display: none !important }

/* the form */
.invite-create .form-row, .invite-create .invite-hint, .invite-setup, .invite-result { max-width: 1100px }
.invite-create .form-row + .invite-hint { margin-top: 6px }
.invite-create .invite-hint + .form-row, .invite-create .form-row + .form-row { margin-top: 14px }
.invite-create .invite-field { flex: 1 1 220px }
.invite-create .invite-days-field { flex: 0 1 140px; min-width: 120px }
.invite-create .invite-amount-field { flex: 0 1 180px; min-width: 150px }
/* 01.12.2026: the sum in $ or ₽ - a small switch beside its title */
.invite-amount-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 1.35em }
.invite-cur { display: inline-flex; flex: none; gap: 2px; padding: 1px; border: 1px solid var(--line); border-radius: 7px }
.invite-cur button { min-width: 24px; height: 19px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 600 12px/1 var(--f-body); cursor: pointer }
.invite-cur button.active { background: var(--accent); color: var(--on-accent) }
.invite-cur button:disabled { opacity: .4; cursor: default }
.invite-create .invite-comment-field { flex: 1 1 100% }
.invite-create .form-row select, .invite-create .form-row input { width: 100% }
.invite-hint { margin: 0; font-size: 13px; line-height: 1.45 }
.invite-hint:empty { display: none }
.invite-hint .text-link { padding: 0; border: 0; background: none; color: var(--accent-text); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px }
.invite-setup { margin: 16px 0 }
/* 01.12.2026: «Клиент оплачивает по ссылке» right under «С настройкой под ключ», its roubles in grey below */
/* 01.12.2026: «Оплата» first - «По ссылке» / «Уже оплатил», its hint under it */
.invite-pay-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; max-width: 1100px }
.invite-pay-title { font-weight: 600; font-size: 14px }
.invite-pay-mode .seg-filter { padding: 3px }.invite-pay-mode .seg { height: 32px; padding: 0 14px }
.invite-create .invite-pay-hint { margin: 8px 0 14px }
/* «Сотрудники»: «Видит в CRM» is hidden by [hidden], which `.form-row label` (display: grid) overrode - the CRM field showed
   for every role */
.employee-form [hidden] { display: none !important }
/* 25.11.2026: what «РОП» can, under the role select */
.employee-role-hint { margin: 8px 0 0; font-size: 13px; line-height: 1.45 }

/* the new link: big enough to see, copied by its button (never opened from here) */
.invite-result { display: grid; gap: 12px }
.invite-result-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px }
.invite-result-head .muted { font-size: 13px }
.invite-copy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.invite-copy-row .table-action { flex: none; min-height: 36px }
.invite-url { font: 600 15px/1.4 var(--f-mono); word-break: break-all; user-select: all }
.invite-result-note { margin: 0; font-size: 12px }
.table-action.is-copied { border-color: var(--signal); color: var(--signal) }

/* the list's tools and numbers */
.invite-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px }
.invite-issuer { min-width: 200px }
.invites-summary .invite-summary-total td { font-weight: 600 }
.invite-summary-note { margin: 6px 0 18px }

/* the links; on a phone (600 px and less) both tables are the admin's cards «column - value» (admin.css, admin-spend.js) */
.invite-state { color: var(--muted) }
.invite-state.is-off { color: var(--faint) }
.invite-state .log-client { font-size: inherit }
.invites-table .cell-note { margin-top: 2px }
@media (min-width: 601px) {
  .admin-table.invites-summary { min-width: 560px }
  .invites-summary .invite-summary-total td { border-top: 1px solid var(--line-strong) }
  .invites-table td.inv-who, .invites-table td.inv-state { white-space: normal; min-width: 160px; max-width: 320px }
  .invites-table td.inv-plan { white-space: normal; min-width: 140px }
  .invites-table td.inv-actions { text-align: right; white-space: nowrap }
  .invites-table td.inv-actions .table-action + .table-action { margin-left: 6px }
}

@media (max-width: 760px) {
  .invite-tools { width: 100% }
  .invite-tools .seg-filter { width: 100% }
  .invite-issuer { flex: 1 1 100%; min-width: 0 }
  .invite-copy-row { flex-direction: column; align-items: stretch }
  .invite-copy-row .table-action { min-height: 40px }
}
@media (max-width: 600px) {
  .invite-create .form-row label { flex: 1 1 100%; min-width: 0 }
  /* the card's title is «№ 12»; the buttons in a row of their own, wide enough for a finger */
  .admin-table.invites-table:not(.clients-table) td.inv-id::before { display: inline; float: none; content: "№ "; margin: 0; color: inherit; font: inherit; letter-spacing: 0; text-transform: none; white-space: pre }
  .admin-table.invites-table:not(.clients-table) td.inv-actions { display: flex; gap: 8px; padding-top: 8px }
  .admin-table.invites-table:not(.clients-table) td.inv-actions:empty { display: none }
  .admin-table.invites-table:not(.clients-table) td.inv-actions .table-action { flex: 1; min-height: 40px }
}
