:root {
  --ink: #203129;
  --muted: #78847c;
  --line: #e3e8e2;
  --green: #285a42;
  --soft: #edf3ed;
  --page: #f7f8f5;
  --red: #ad493c;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  font-size: 14px;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page);
}
[hidden] {
  display: none !important;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #a8c7b0;
  outline-offset: 3px;
}
a {
  color: var(--green);
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1.1px;
  font-weight: 650;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
  font-weight: 650;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.7px;
  color: var(--muted);
  margin-bottom: 13px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 16px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 13px;
  min-height: 40px;
  white-space: nowrap;
}
.primary {
  background: var(--green);
  color: #fff;
}
.primary:hover {
  background: #1f4935;
}
.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.secondary:hover {
  background: #f1f4ef;
}
.text-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
}
.text-button:hover {
  color: var(--green);
}
.icon-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 23px;
  width: 34px;
  height: 34px;
  border-radius: 7px;
}
.icon-button:hover {
  background: var(--soft);
}
input {
  border: 1px solid #d9e1d8;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  min-height: 42px;
  max-width: 100%;
}
label {
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}
input[type='checkbox'] {
  min-height: 0;
  accent-color: var(--green);
}
.layout {
  display: grid;
  grid-template-columns: 222px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 34px 22px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.7px;
  flex-wrap: wrap;
  color: var(--ink);
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  border-radius: 10px;
  width: 35px;
  height: 35px;
  letter-spacing: 0;
}
.brand-label {
  font-size: 10px;
  letter-spacing: 0.3px;
  color: var(--muted);
  font-weight: 500;
  flex-basis: 100%;
  padding-left: 44px;
  margin-top: -7px;
}
.nav-caption {
  font-size: 9px;
  letter-spacing: 1.6px;
  font-weight: 650;
  color: #9aa59d;
  margin: 48px 12px 14px;
}
nav {
  display: grid;
  gap: 5px;
}
nav a {
  padding: 12px;
  border-radius: 8px;
  color: #68766c;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 500;
}
nav a span {
  width: 19px;
  text-align: center;
  font-size: 19px;
}
nav a:hover {
  background: var(--page);
}
nav a[aria-current='page'] {
  color: var(--green);
  background: var(--soft);
  font-weight: 650;
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 20px 4px 0;
}
.sidebar-bottom strong {
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.main {
  padding: 46px 48px 70px;
  max-width: 1520px;
  width: 100%;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 34px;
}
.page-heading h1 {
  margin-bottom: 9px;
}
.page-heading .muted {
  font-size: 13px;
}
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
#search {
  width: 380px;
  max-width: 100%;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 0 12px;
  color: #849287;
  margin: 0;
}
.search-field input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 13px 0;
  font-size: 13px;
  outline: none;
}
.search-field:focus-within {
  box-shadow: 0 0 0 3px #e0eadd;
  border-color: #92ae9a;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filters button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #768279;
  font-size: 12px;
  font-weight: 550;
}
.filters button span {
  font-size: 10px;
  background: #e9eee7;
  border-radius: 5px;
  padding: 2px 5px;
  min-width: 18px;
}
.filters button:hover {
  background: #eef2eb;
}
.filters button[aria-pressed='true'] {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 1px 2px #20312908;
}
.filters button[aria-pressed='true'] span {
  background: var(--green);
  color: white;
}
.table-card,
.section-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  background: #fcfdfa;
  color: #879187;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  font-weight: 600;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 20px 22px;
  border-bottom: 1px solid #edf0ea;
  font-size: 12px;
  vertical-align: middle;
}
tbody tr:hover {
  background: #fafcf8;
}
td:last-child {
  text-align: right;
}
.person {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: #eaf0e7;
  color: #56704f;
  font-size: 12px;
  font-weight: 650;
}
.person strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.person .muted {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.user-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
}
.user-link:hover strong {
  color: var(--green);
  text-decoration: underline;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 5px;
  white-space: nowrap;
}
.badge:before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.trial {
  color: #93732f;
  background: #faf3e3;
}
.badge.paid {
  color: #3d7452;
  background: #eaf4eb;
}
.badge.expired {
  color: #8e7972;
  background: #f3eeeb;
}
.badge.blocked {
  color: #ad5046;
  background: #faedeb;
}
.until-date {
  font-weight: 500;
  white-space: nowrap;
}
.until-note {
  margin-top: 4px;
  font-size: 10px;
  color: #9aa398;
}
.until-note.soon {
  color: #aa7a28;
}
.row-action {
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;
  padding: 8px 11px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 550;
}
.row-action:hover {
  border-color: #96b49b;
  color: var(--green);
}
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 22px;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pagination button {
  min-height: 30px;
  padding: 5px 10px;
}
.table-note {
  font-size: 11px;
  color: #8b958d;
  margin-top: 18px;
  max-width: 680px;
  line-height: 1.7;
}
.empty {
  text-align: center;
  padding: 65px 22px;
  color: var(--muted);
}
.empty h2 {
  color: var(--ink);
  font-size: 17px;
  margin-bottom: 8px;
}
.empty-icon {
  font-size: 34px;
  margin-bottom: 12px;
}
.empty .button {
  margin-top: 20px;
}
.section-card {
  padding: 26px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.section-heading p {
  font-size: 12px;
  margin-top: 8px;
}
.team-list,
.audit-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.team-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.audit-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.audit-list p {
  font-size: 12px;
}
.audit-list strong {
  font-size: 13px;
  font-weight: 600;
}
.audit-list .audit-details {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.drawer {
  margin: 0 0 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  width: 500px;
  max-width: 100vw;
  border: 0;
  padding: 0;
  background: white;
  color: var(--ink);
  box-shadow: -10px 0 60px #152c2415;
}
.drawer::backdrop,
.modal::backdrop {
  background: #10251c45;
  backdrop-filter: blur(2px);
}
body:has(dialog[open]) {
  overflow: hidden;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 12px;
}
.drawer-head .eyebrow {
  margin: 0;
}
.user-heading {
  padding: 14px 28px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.avatar.large {
  width: 48px;
  height: 48px;
  font-size: 16px;
}
.user-heading h2 {
  font-size: 22px;
  overflow-wrap: anywhere;
}
.user-heading p {
  font-size: 12px;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.user-summary {
  padding: 0 28px 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.drawer-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
}
.drawer-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 14px 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}
.drawer-tabs button[aria-pressed='true'] {
  border-color: var(--green);
  color: var(--green);
}
.drawer-body {
  padding: 28px;
}
.drawer-body > label:not(:first-child) {
  margin-top: 26px;
}
.drawer-body #until {
  width: 100%;
}
.field-hint {
  font-size: 11px;
  color: #8b958d;
  line-height: 1.6;
  margin-top: 8px;
}
.quick-actions {
  display: flex;
  gap: 8px;
  margin: 14px 0 27px;
}
.quick-actions button {
  border: 1px solid var(--line);
  background: var(--page);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
}
.quick-actions button:hover {
  background: #e7eee3;
}
.limit-field {
  display: flex;
  gap: 13px;
  align-items: center;
}
.limit-field input {
  width: 92px;
}
.limit-field span {
  font-size: 12px;
}
.access-switch {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 25px;
  margin-top: 27px;
}
.access-switch label {
  margin: 0;
}
.access-switch input {
  appearance: none;
  border: 0;
  background: #dce4db;
  width: 38px;
  height: 22px;
  padding: 3px;
  flex: none;
  cursor: pointer;
  border-radius: 15px;
}
.access-switch input:before {
  content: '';
  display: block;
  background: white;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 1px 3px #0002;
  transition: transform 0.15s;
}
.access-switch input:checked {
  background: #ae5448;
}
.access-switch input:checked:before {
  transform: translateX(16px);
}
.drawer-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding: 18px 28px;
  background: white;
  position: sticky;
  bottom: 0;
}
.danger-outline {
  color: var(--red);
  background: white;
  border-color: #eacfc9;
  margin-top: 18px;
}
.danger-outline:hover {
  background: #fff4f1;
}
.device-card {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.device-card p {
  font-size: 11px;
  margin-top: 5px;
}
.device-card .row-action {
  margin-top: 12px;
}
.modal {
  border: 0;
  border-radius: 16px;
  padding: 30px;
  width: 460px;
  max-width: calc(100vw - 30px);
  color: var(--ink);
  box-shadow: 0 20px 80px #0002;
}
.modal h2 {
  margin-bottom: 10px;
}
.modal .section-heading {
  margin: 0;
}
.modal input {
  width: 100%;
}
.modal form {
  margin-top: 22px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid #47765b;
  background: #254f3b;
  color: white;
  padding: 13px 22px;
  border-radius: 10px;
  box-shadow: 0 6px 30px #19312520;
  z-index: 10;
  font-size: 13px;
  max-width: 90vw;
}
.error-banner,
.form-error {
  padding: 12px 15px;
  border: 1px solid #edcbc4;
  background: #fff3f0;
  color: #9d4438;
  border-radius: 8px;
  font-size: 12px;
  margin: 16px 0;
}
.boot {
  text-align: center;
  margin: 20vh auto;
  color: var(--muted);
}
.login {
  max-width: 460px;
  margin: 13vh auto;
  padding: 40px;
  text-align: center;
}
.login .brand-mark {
  width: 48px;
  height: 48px;
  margin-bottom: 30px;
}
.login h1 {
  line-height: 1.2;
  margin-bottom: 20px;
}
.login .primary {
  margin: 28px 0 20px;
  min-width: 220px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
#preview-banner {
  padding: 9px;
  text-align: center;
  background: #eee7d7;
  color: #806b3b;
  font-size: 11px;
}
@media (min-width: 1500px) {
  .main {
    padding-left: 70px;
    padding-right: 70px;
  }
}
@media (max-width: 1050px) {
  .layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 28px 14px;
  }
  .main {
    padding: 32px 24px;
  }
  td,
  th {
    padding-left: 15px;
    padding-right: 15px;
  }
  .person {
    min-width: 185px;
  }
  .row-action {
    white-space: nowrap;
  }
}
@media (max-width: 760px) {
  .layout {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand-label,
  .nav-caption,
  .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    gap: 6px;
    overflow: auto;
    margin-top: 18px;
  }
  nav a {
    white-space: nowrap;
    font-size: 12px;
    padding: 10px;
  }
  .main {
    padding: 28px 18px;
  }
  h1 {
    font-size: 28px;
  }
  .page-heading {
    margin-bottom: 26px;
    align-items: flex-start;
  }
  .page-heading .button {
    padding: 9px;
  }
  .page-heading .muted {
    max-width: 240px;
  }
  .list-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  #search {
    width: 100%;
  }
  .filters {
    gap: 3px;
  }
  .filters button {
    padding: 8px;
    font-size: 11px;
  }
  .table-footer {
    padding: 13px;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .section-card {
    padding: 20px;
  }
  .team-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
  .audit-list li {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .drawer-body,
  .user-heading,
  .drawer-head {
    padding-left: 22px;
    padding-right: 22px;
  }
  .drawer-footer {
    padding: 16px 22px;
  }
  .drawer-footer .button {
    flex: 1;
  }
  .user-heading h2 {
    font-size: 20px;
  }
  .modal {
    padding: 24px;
  }
  .table-note {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
.table-scroll {
  position: relative;
}
@media (max-width: 760px) {
  nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    gap: 4px;
  }
  nav a {
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    text-align: center;
    white-space: normal;
    font-size: 11px;
    padding: 9px 5px;
  }
  .sidebar-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding: 13px 0 0;
  }
  .sidebar-bottom > .small {
    display: none;
  }
  .sidebar-bottom strong {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sidebar-bottom button {
    flex: none;
  }
  .table-scroll {
    overflow: visible;
  }
  table,
  tbody {
    display: block;
  }
  thead {
    display: none;
  }
  tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 18px;
    gap: 14px 12px;
    border-bottom: 1px solid var(--line);
  }
  td {
    display: block;
    border: 0;
    padding: 0;
    min-width: 0;
  }
  td:first-child {
    grid-column: 1/-1;
  }
  .person {
    min-width: 0;
  }
  .person strong {
    font-size: 14px;
  }
  .person .muted {
    font-size: 12px;
  }
  td:nth-child(4) {
    color: var(--muted);
    font-size: 11px;
  }
  td:nth-child(4)::before {
    content: 'Компаний: ';
  }
  td:last-child {
    text-align: right;
  }
  .row-action {
    padding: 8px 11px;
  }
  .until-note {
    margin-top: 3px;
  }
  .until-date {
    text-align: right;
    font-size: 11px;
  }
  .until-note {
    text-align: right;
  }
}
