:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 16px; color: #222; background: #fff; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, p { margin: 0; }
a:focus-visible, button:focus-visible { outline: 2px solid #2673ba; outline-offset: 4px; }
.login-layout { min-height: 100svh; display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 320px; padding-bottom: 64px; }
.login-logo { display: block; background: #20252b; border-radius: 10px; margin-bottom: 24px; object-fit: contain; }
.login-card h1 { font-size: 28px; line-height: 1.25; letter-spacing: -.6px; font-weight: 600; }
.login-button { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 48px; margin-top: 32px; padding: 12px 16px; background: #222; color: #fff; border-radius: 6px; font-size: 15px; font-weight: 500; }
.login-button:hover { background: #3b3b3b; }
.yandex-mark { font-size: 22px; line-height: 1; font-weight: 600; }
.notice { margin-top: 24px; padding: 12px 14px; background: #fff3f1; border-left: 2px solid #b33b30; color: #8b2e26; font-size: 14px; line-height: 1.6; }
.workspace { display: flex; min-height: 100svh; }
.sidebar { width: 232px; flex-shrink: 0; display: flex; flex-direction: column; padding: 24px 12px 16px; border-right: 1px solid #e4e4e4; background: #f8f8f8; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 16px; font-weight: 600; }
.brand img { object-fit: contain; background: #242a30; border-radius: 6px; }
.sidebar nav { margin-top: 36px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 10px 12px; font-size: 14px; font-weight: 500; border-radius: 5px; }
.selected { background: #eaeaea; }
.nav-item:hover { background: #e2e2e2; }
.grid-icon { width: 17px; height: 17px; flex-shrink: 0; color: #626262; }
.account { margin-top: auto; padding: 20px 12px 0; }
.account-text strong, .account-text span { display: block; overflow-wrap: anywhere; }
.account-text strong { font-size: 14px; line-height: 1.5; font-weight: 500; }
.account-text span { margin-top: 3px; font-size: 12px; line-height: 1.5; color: #707070; }
.account form { margin-top: 10px; }
.logout { border: 0; background: none; color: #666; padding: 6px 0; cursor: pointer; font-size: 14px; }
.logout:hover { color: #111; text-decoration: underline; }
.main-content { flex: 1; min-width: 0; }
.page-header { min-height: 80px; display: flex; align-items: center; padding: 22px 36px; border-bottom: 1px solid #eaeaea; }
.page-header h1 { font-size: 20px; line-height: 1.5; font-weight: 600; letter-spacing: -.3px; }
.empty-state { padding: 40px 36px; color: #777; font-size: 14px; line-height: 1.6; }
@media (max-width: 640px) {
  .workspace { flex-direction: column; }
  .sidebar { width: 100%; padding: 16px; border-right: 0; border-bottom: 1px solid #ddd; }
  .brand { padding: 0; }
  .sidebar nav { margin-top: 20px; }
  .account { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 16px 0 0; border-top: 1px solid #e4e4e4; }
  .account form { margin: 0; }
  .logout { padding: 10px 0 10px 12px; }
  .page-header { min-height: 72px; padding: 20px 24px; }
  .empty-state { padding: 28px 24px; }
}

/* Account and access administration. */
h2 { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 600; }
.page-header { justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-body { padding: 28px 36px 48px; }
.narrow { max-width: 760px; }
.nav-section { margin: 26px 12px 10px; color: #777; font-size: 12px; }
.nav-item + .nav-item { margin-top: 3px; }
.muted, .field-help { color: #6a6a6a; font-size: 14px; line-height: 1.6; }
.text-link { color: #255f94; text-underline-offset: 3px; }
.text-link:hover { text-decoration: underline; }
.profile-fields { margin: 20px 0 0; }
.profile-fields > div { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 20px; padding: 17px 0; border-bottom: 1px solid #eee; font-size: 15px; line-height: 1.5; }
.profile-fields dt { color: #707070; }
.profile-fields dd { margin: 0; overflow-wrap: anywhere; }
.section-heading { margin: 32px 0 14px; }
.access-list { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.access-list li { padding: 9px 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border: 1px solid #222; border-radius: 5px; background: #222; color: white; padding: 9px 15px; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.button:hover { background: #3c3c3c; }
.button.secondary { border-color: #d8d8d8; background: white; color: #333; }
.button.secondary:hover { background: #f5f5f5; }
.button.danger { background: white; color: #a13329; border-color: #ddc4c0; }
input:not([type=checkbox]):not([type=hidden]), select { min-height: 42px; border: 1px solid #ccc; border-radius: 5px; padding: 9px 11px; background: #fff; color: #222; font: inherit; font-size: 15px; max-width: 100%; }
input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid #2673ba; outline-offset: 2px; }
input:disabled { color: #666; background: #f8f8f8; }
.search-form { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.search-form input { width: 300px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
th { color: #707070; font-size: 13px; font-weight: 500; padding: 12px 16px; border-bottom: 1px solid #dcdcdc; white-space: nowrap; }
td { padding: 18px 16px; border-bottom: 1px solid #eee; vertical-align: top; line-height: 1.5; }
th:first-child,td:first-child { padding-left: 0; }
th:last-child,td:last-child { padding-right: 0; }
.cell-detail { display: block; margin-top: 4px; font-size: 13px; color: #707070; }
.person-name { font-weight: 500; }
.nowrap { white-space: nowrap; }
.pagination { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 22px; font-size: 14px; }
.back-link { display: inline-block; font-size: 14px; color: #666; margin-bottom: 28px; }
.back-link:hover { color: #222; text-decoration: underline; }
.profile-email { margin-top: 5px; overflow-wrap: anywhere; }
.edit-form { margin-top: 24px; }
.edit-form > input:not([type=hidden]), .edit-form > select { display: block; width: 100%; max-width: 420px; }
.field-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
fieldset { margin: 30px 0 0; padding: 0; border: 0; }
legend { padding: 0; margin-bottom: 8px; font-size: 16px; font-weight: 600; }
.check-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; font-size: 15px; cursor: pointer; }
.check-row input { margin: 3px 0 0; width: 17px; height: 17px; flex-shrink: 0; accent-color: #333; }
.check-row strong { font-weight: 500; }
.check-row .field-help { display: block; margin-top: 4px; }
.check-row.compact { margin: 24px 0 8px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.success { padding: 12px 14px; margin: 0 0 24px; border-left: 2px solid #578368; background: #f0f5f1; font-size: 14px; }
.default-role { margin-top: 40px; }
.default-role > p { margin-top: 8px; }
.default-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.default-form select { min-width: 220px; }
.delete-role { margin-top: 48px; border-top: 1px solid #eee; padding-top: 20px; font-size: 14px; }
.delete-role summary { cursor: pointer; color: #8d3c32; }
.delete-role p { margin: 16px 0; }
.error-copy { line-height: 1.6; margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .page-body { padding: 24px 20px 40px; }
  .profile-fields > div { grid-template-columns: 80px minmax(0,1fr); gap: 12px; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-section { display: none; }
  .nav-item + .nav-item { margin: 0; }
  .search-form input { min-width: 0; flex: 1; }
  .search-form .text-link { width: 100%; }
  td, th { padding-right: 20px; }
}

.owner-notice { margin-top: 28px; font-size: 15px; line-height: 1.8; }

.audit-filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px 16px; margin-bottom: 26px; }
.audit-filters label { display: block; font-size: 13px; color: #555; margin-bottom: 7px; }
.audit-filters input, .audit-filters select { width: 100%; min-width: 0; }
.audit-filter-actions { grid-column: 1 / -1; display: flex; gap: 10px; }
.audit-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: #777; font-size: 13px; margin-bottom: 10px; }
.audit-table { min-width: 870px; }
.audit-table td { font-size: 13px; }
.audit-table .cell-detail { overflow-wrap: anywhere; }
.audit-detail { min-width: 220px; max-width: 480px; overflow-wrap: anywhere; }
.audit-result { white-space: nowrap; }
.audit-result.denied, .audit-result.error { color: #a0392f; }
@media(max-width:1050px) { .audit-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:420px) { .audit-filters { grid-template-columns: 1fr; gap: 14px; } }
.audit-result.audit-denied, .audit-result.audit-error { color: #a0392f; }
.audit-table td:nth-child(2) { min-width: 180px; }
.audit-table td:nth-child(3) { min-width: 130px; }
.sidebar { position: sticky; top: 0; height: 100svh; }
@media(max-width:640px) { .sidebar { position: static; height: auto; } }
