.af-cabinet {
  padding: 40px 0 80px;
  background: #f6f7f8;
}
.af-wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}
.af-top,
.af-actions,
.af-inline,
.af-tabs {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.af-top h2,
.af-form-card h3,
.af-detail h3 {
  margin: 0 0 6px;
}
.af-tabs {
  justify-content: flex-start;
  margin: 20px 0;
}
.af-tabs a {
  padding: 8px 14px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e1e1e1;
  text-decoration: none;
}
.af-tabs a.is-active {
  background: #111;
  color: #fff;
}
.af-map,
.af-form-card,
.af-detail,
.af-table-wrap,
.af-flash {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
}
.af-map {
  height: 420px;
  margin: 12px 0;
}
.af-map-block,
.af-form-card,
.af-detail {
  margin-top: 24px;
}
.af-form-card,
.af-detail {
  padding: 20px;
}
.af-table {
  width: 100%;
  border-collapse: collapse;
}
.af-table th,
.af-table td {
  border-bottom: 1px solid #e1e1e1;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}
.af-table tr.af-status-conflict td {
  background: #fff4f4;
}
.af-filters,
.af-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.af-form-card label,
.af-detail label,
.af-settings label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 14px;
}
.af-form-card input,
.af-form-card select,
.af-form-card textarea,
.af-filters input,
.af-filters select,
.af-detail textarea,
.af-settings input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px;
  background: #fff;
}
.af-types {
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0;
}
.af-types label {
  display: block;
  margin: 8px 0;
}
.af-suggest {
  border: 1px solid #e1e1e1;
  background: #fff;
  margin-top: -8px;
  margin-bottom: 12px;
}
.af-suggest button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px;
  border: 0;
  border-bottom: 1px solid #eee;
  background: #fff;
  cursor: pointer;
}
.af-suggest button:hover {
  background: #f6f7f8;
}
.af-note {
  color: #555;
  font-size: 14px;
}
.af-flash {
  padding: 12px 14px;
  margin-top: 16px;
}
.af-flash-ok {
  background: #f1fbf4;
  border-color: #b7e4c7;
}
.af-flash-error {
  background: #fff4f4;
  border-color: #f5c2c2;
}
.af-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f3f3f3;
}
.af-status-conflict {
  background: #ffd8d8;
}
.af-status-protected {
  background: #d8f5e2;
}
.af-dl {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 8px 12px;
}
.af-dl dt {
  color: #666;
}
.af-dl dd {
  margin: 0;
}
.af-notes {
  list-style: none;
  padding: 0;
}
.af-notes li {
  border-top: 1px solid #eee;
  padding: 10px 0;
}
.af-pager {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.af-pager a {
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #e1e1e1;
  text-decoration: none;
}
.af-pager a.is-active {
  background: #111;
  color: #fff;
}
.af-actions form,
.af-check {
  margin: 0;
}
.af-login {
  max-width: 420px;
  margin: 48px auto;
  padding: 32px 28px 28px;
}
.af-login h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
}
.af-login-lead {
  margin: 0 0 22px;
  color: #5c5c5c;
  font-size: 15px;
  line-height: 1.5;
}
.af-login form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.af-login label {
  margin: 0;
  font-weight: 600;
  color: #222;
}
.af-login input {
  height: 46px;
  border-radius: 8px;
  border-color: #d7d7d7;
  font-weight: 400;
}
.af-login-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 6px;
}
.af-cabinet .af-btn-block,
.af-cabinet .af-form-actions .btn,
.af-cabinet .af-btn-inline {
  width: auto;
  max-width: none;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.2;
}
.af-cabinet .af-btn-block {
  width: 100%;
  padding: 14px 18px;
}
.af-btn-link {
  background: transparent;
  border: 0;
  color: #e2000f;
  font-weight: 700;
  font-size: 15px;
  padding: 6px;
  cursor: pointer;
}
.af-btn-link:hover {
  color: #9e000a;
}
.af-grid .af-pass,
.af-grid .af-form-actions {
  grid-column: 1 / -1;
}
.af-pass {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
}
.af-pass label {
  flex: 0 1 360px;
  width: 360px;
  max-width: 100%;
  margin: 0;
}
.af-cabinet button.af-btn-inline {
  display: inline-block;
  flex: 0 0 auto;
  width: auto !important;
  max-width: none !important;
  padding: 11px 18px;
  white-space: nowrap;
}
.af-form-actions {
  margin-top: 4px;
}
.af-cabinet .af-form-actions .btn {
  padding: 12px 22px;
}
@media (max-width: 700px) {
  .af-dl {
    grid-template-columns: 1fr;
  }
  .af-map {
    height: 280px;
  }
  .af-pass label {
    width: 100%;
    flex-basis: 100%;
  }
  .af-login {
    margin: 16px auto;
    padding: 24px 18px;
  }
}
