.auth-document,
.admin-document {
  background: #f5f5f5;
  color: #050505;
  scroll-behavior: smooth;
  scroll-snap-type: none;
  scrollbar-width: auto;
}

.auth-document::-webkit-scrollbar,
.admin-document::-webkit-scrollbar {
  display: block;
  width: 12px;
}

.auth-document::-webkit-scrollbar-thumb,
.admin-document::-webkit-scrollbar-thumb {
  border: 2px solid #f5f5f5;
  background: #050505;
}

.auth-page,
.admin-page {
  --bg: #f5f5f5;
  --ink: #050505;
  --muted: #555;
  min-height: 100vh;
  background: #f5f5f5;
  color: #050505;
  font-family: Arial, Helvetica, sans-serif;
}

.auth-page html,
.admin-page html {
  background: #f5f5f5;
}

.auth-main-new {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 38%, rgb(0 0 0 / 9%), transparent 34%),
    #f5f5f5;
}

.auth-back,
.admin-nav > a,
.admin-nav button,
.admin-nav nav a {
  color: rgb(5 5 5 / 72%);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.auth-back {
  position: fixed;
  top: 22px;
  left: 24px;
  z-index: 5;
  padding: 12px 10px;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 420px);
  gap: clamp(28px, 7vw, 120px);
  align-items: center;
  width: min(1020px, 100%);
}

.auth-panel p {
  margin: 0 0 18px;
  color: rgb(5 5 5 / 52%);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.auth-panel h1 {
  margin: 0;
  color: #050505;
  font-size: clamp(64px, 12vw, 176px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.78;
  text-transform: uppercase;
}

.auth-form-new {
  display: grid;
  gap: 16px;
  padding: 0;
}

.auth-form-new label,
.admin-field-new {
  display: grid;
  gap: 8px;
}

.auth-form-new span,
.admin-field-new span {
  color: rgb(5 5 5 / 46%);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-field-help {
  color: rgb(5 5 5 / 42%);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.auth-form-new input,
.admin-page input,
.admin-page textarea {
  width: 100%;
  border: 0;
  border-bottom: 2px solid rgb(5 5 5 / 24%);
  border-radius: 0;
  background: transparent;
  color: #050505;
  font: inherit;
  font-weight: 900;
  outline: 0;
}

.auth-form-new input {
  min-height: 54px;
  font-size: 28px;
}

.auth-form-new input:focus,
.admin-page input:focus,
.admin-page textarea:focus {
  border-color: #050505;
}

.auth-form-new button,
.admin-section-save,
.admin-add-button,
.admin-action-button,
.admin-file-control button {
  border: 2px solid #050505;
  background: #050505;
  color: #f5f5f5;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-form-new button {
  min-height: 58px;
}

.auth-form-new #login-status {
  min-height: 18px;
  margin: 4px 0;
  color: rgb(5 5 5 / 55%);
  font-size: 12px;
  font-weight: 900;
}

.admin-nav {
  position: fixed;
  top: 18px;
  right: 22px;
  left: 22px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  pointer-events: none;
}

.admin-nav > *,
.admin-nav nav a {
  pointer-events: auto;
}

.admin-nav nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 24px;
}

.admin-nav button {
  padding: 10px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.admin-page-main {
  background: #f5f5f5;
}

.admin-section {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(96px, 12vh, 132px) clamp(28px, 6vw, 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgb(0 0 0 / 8%), transparent 34%),
    #f5f5f5;
  color: #050505;
}

.admin-section-head {
  position: absolute;
  top: clamp(72px, 9vh, 96px);
  right: clamp(24px, 5vw, 72px);
  left: clamp(24px, 5vw, 72px);
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: start;
}

.admin-section-head > span {
  color: rgb(5 5 5 / 42%);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.admin-title-input {
  max-width: 760px;
  border: 0 !important;
  color: #050505;
  font-size: clamp(42px, 7vw, 112px);
  font-weight: 900;
  line-height: 0.88;
  text-transform: uppercase;
}

.admin-section-save {
  min-width: 138px;
  min-height: 42px;
  padding: 0 16px;
}

.admin-section-save:disabled {
  border-color: rgb(5 5 5 / 18%);
  background: transparent;
  color: rgb(5 5 5 / 30%);
  cursor: default;
}

.admin-hero-editor {
  position: relative;
  display: grid;
  min-height: 100vh;
  width: 100%;
}

.admin-contact-strip span {
  display: inline-block;
  padding: 12px 10px;
  color: rgb(5 5 5 / 72%);
  font-size: 15px;
  font-weight: 800;
}

.admin-hero-name input {
  border: 0 !important;
  color: #f5f5f5;
  text-align: center;
  text-transform: uppercase;
  -webkit-text-stroke: 1px rgb(5 5 5 / 25%);
}

.admin-photo-editor {
  z-index: 2;
  display: grid;
  place-items: center;
}

.admin-photo-editor .hero-character {
  filter: drop-shadow(0 22px 30px rgb(255 255 255 / 55%));
}

.admin-label-input {
  border: 0 !important;
  background: transparent;
}

.admin-floating-editor {
  position: absolute;
  right: clamp(24px, 5vw, 72px);
  bottom: clamp(88px, 10vh, 118px);
  z-index: 5;
  display: grid;
  gap: 12px;
  width: min(620px, 44vw);
}

.admin-floating-editor h3,
.admin-identity-editor h3,
.admin-summits h3,
.admin-document-panel h3 {
  margin: 0 0 4px;
  color: rgb(5 5 5 / 72%);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-identity-editor {
  position: absolute;
  bottom: clamp(88px, 10vh, 118px);
  left: clamp(24px, 5vw, 72px);
  z-index: 5;
  display: grid;
  gap: 12px;
  width: min(420px, 36vw);
}

.admin-edit-row,
.admin-contact-line,
.admin-document-edit {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.admin-contact-line {
  grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1.4fr) auto;
}

.admin-document-edit {
  grid-template-columns: 86px minmax(0, 1fr) minmax(0, 1.35fr) minmax(150px, auto) auto;
}

.admin-page textarea {
  min-height: 58px;
  resize: vertical;
}

.admin-add-button,
.admin-action-button,
.admin-file-control button {
  display: inline-flex;
  width: max-content;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.admin-add-button span {
  font-size: 20px;
  line-height: 1;
}

.admin-routes-shell {
  display: grid;
  gap: 26px;
  width: min(1180px, 100%);
}

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

.admin-routes-head p {
  max-width: 760px;
  margin: 0;
  color: rgb(5 5 5 / 66%);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.admin-routes-table {
  display: grid;
  border-top: 2px solid #050505;
}

.admin-routes-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(140px, 0.9fr) minmax(220px, 1.5fr) minmax(130px, 0.8fr);
  gap: 14px;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid rgb(5 5 5 / 22%);
  color: #050505;
  font-size: 13px;
  font-weight: 800;
}

.admin-routes-row-head {
  color: rgb(5 5 5 / 50%);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-routes-row code {
  padding: 6px 8px;
  background: #050505;
  color: #f5f5f5;
  font-family: var(--mono);
  font-size: 12px;
}

.admin-routes-row b {
  justify-self: start;
  padding: 7px 9px;
  border: 1px solid currentColor;
  font-size: 11px;
  text-transform: uppercase;
}

.admin-routes-row b.is-active {
  color: #050505;
  background: #54dc70;
}

.admin-routes-row b.is-free {
  color: rgb(5 5 5 / 58%);
}

.admin-remove-button,
.admin-modal-head button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid #050505;
  background: transparent;
  color: #050505;
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  font-weight: 900;
}

.admin-competence-body,
.admin-career-shell,
.admin-projects-shell,
.admin-education-shell,
.admin-travel-shell,
.admin-contacts-shell {
  width: min(1480px, 100%);
  margin-top: clamp(72px, 9vh, 110px);
}

.admin-project-card {
  border-top-color: rgb(5 5 5 / 18%);
  border-bottom-color: rgb(5 5 5 / 18%);
  color: #050505;
  cursor: pointer;
}

.admin-project-card .project-preview {
  background:
    linear-gradient(135deg, rgb(5 5 5 / 20%), transparent 62%),
    repeating-linear-gradient(0deg, rgb(5 5 5 / 10%) 0 1px, transparent 1px 8px),
    #e8e8e8;
  background-size: cover;
  background-position: center;
}

.admin-project-card .project-content > span {
  color: rgb(5 5 5 / 44%);
}

.admin-project-card .project-content h3 {
  color: #050505;
}

.admin-project-card .project-content p {
  color: rgb(5 5 5 / 62%);
}

.admin-project-card .project-stack span {
  border-color: rgb(5 5 5 / 26%);
  color: rgb(5 5 5 / 78%);
}

.admin-project-card .project-content a {
  border-color: #050505;
  background: #050505;
  color: #f5f5f5;
}

.admin-competence-grid .competence-group,
.admin-document-panel {
  background: transparent;
}

.admin-competence-group .admin-field-new {
  margin-bottom: 14px;
}

.admin-skill-edit {
  display: grid !important;
  min-width: 0 !important;
  min-height: 72px !important;
  gap: 6px;
  padding: 10px 12px !important;
  border-color: #050505 !important;
  background: #f5f5f5 !important;
  color: #050505 !important;
}

.admin-skill-edit input {
  border-bottom-width: 1px;
  font-size: 12px;
}

.admin-career-chart .track-label strong,
.admin-career-chart .track-label .admin-field-new {
  min-width: 190px;
}

.admin-career-chart .track-label input {
  color: #050505;
  font-size: clamp(21px, 2.2vw, 34px);
  line-height: 1;
}

.admin-career-chart {
  width: 100%;
}

.admin-marker .admin-milestone-card {
  display: grid;
  width: min(320px, 72vw);
  gap: 9px;
  padding: 14px;
  text-align: left;
}

.admin-marker:hover .admin-milestone-card,
.admin-marker:focus-visible .admin-milestone-card {
  opacity: 1;
  transform: translate(-50%, -10px);
  pointer-events: auto;
}

.admin-attachment {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgb(5 5 5 / 60%);
  font-size: 11px;
  font-weight: 900;
}

.admin-attachment a {
  color: #050505;
  text-decoration: underline;
}

.admin-file-control input {
  display: none;
}

.admin-world-map {
  position: relative;
  display: grid;
  min-height: 0;
  width: min(680px, 100%);
  justify-self: center;
  aspect-ratio: 2754 / 1398;
  overflow: hidden;
  place-items: center;
  contain: paint;
  background: #f5f5f5;
}

.admin-world-map svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.admin-summits {
  width: min(560px, 100%);
}

.admin-summit-plot {
  height: 300px;
  border-bottom-color: rgb(5 5 5 / 42%);
  border-left-color: rgb(5 5 5 / 42%);
  background:
    linear-gradient(rgb(5 5 5 / 10%) 1px, transparent 1px) 0 0 / 100% 33.33%,
    linear-gradient(90deg, rgb(5 5 5 / 8%) 1px, transparent 1px) 0 0 / 33.33% 100%;
}

.admin-summit-point {
  color: #050505;
  cursor: pointer;
}

.admin-summit-point::before {
  border-color: #f5f5f5;
  background: #050505;
  box-shadow: 0 0 0 1px #050505, 0 0 24px rgb(5 5 5 / 26%);
}

.admin-summit-point small,
.admin-summits .summit-chart-head span,
.admin-summits .summit-chart-head strong,
.admin-summits .height-mark,
.admin-summits .date-mark {
  color: rgb(5 5 5 / 58%);
}

.admin-map-tools {
  margin-top: 22px;
}

.admin-modal {
  width: min(860px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 44px));
  padding: 0;
  border: 0;
  background: transparent;
  color: #050505;
  overflow: visible;
}

.admin-modal::backdrop {
  background: rgb(245 245 245 / 82%);
  backdrop-filter: blur(10px);
}

.admin-modal-card {
  display: grid;
  box-sizing: border-box;
  max-height: min(760px, calc(100dvh - 44px));
  gap: clamp(18px, 3vw, 30px);
  width: 100%;
  padding: clamp(26px, 4vw, 46px);
  border: 0;
  background: #f5f5f5;
  box-shadow: 0 0 0 2px #050505, 0 28px 90px rgb(5 5 5 / 20%);
  overflow: hidden auto;
  scrollbar-width: thin;
  scrollbar-color: #050505 rgb(5 5 5 / 12%);
}

.admin-modal-card::-webkit-scrollbar {
  width: 10px;
}

.admin-modal-card::-webkit-scrollbar-track {
  background: rgb(5 5 5 / 10%);
}

.admin-modal-card::-webkit-scrollbar-thumb {
  border: 2px solid #f5f5f5;
  background: #050505;
}

.admin-modal-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  min-width: 0;
}

.admin-modal-body .admin-field-new input,
.admin-modal-body .admin-field-new textarea {
  border-bottom-color: rgb(5 5 5 / 20%);
  min-width: 0;
  font-size: clamp(18px, 2.35vw, 28px);
  line-height: 1.1;
}

.admin-modal-body .admin-field-new textarea {
  min-height: 120px;
  grid-column: 1 / -1;
}

.admin-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgb(5 5 5 / 14%);
  padding-top: 18px;
}

.admin-modal-actions .admin-action-button {
  width: auto;
  max-width: 100%;
}

.admin-remove-wide {
  width: auto !important;
  height: 40px !important;
  padding: 0 16px;
  font-size: 13px !important;
}

.admin-modal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: start;
  gap: 20px;
  min-width: 0;
}

.admin-modal-head > div {
  min-width: 0;
}

.admin-modal-head button {
  width: 40px;
  height: 40px;
  justify-self: end;
  background: #f5f5f5;
}

.admin-modal-head span {
  color: rgb(5 5 5 / 45%);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.admin-modal-head h2 {
  margin: 4px 0 0;
  color: #050505;
  max-width: 100%;
  font-size: clamp(34px, 6vw, 70px);
  font-weight: 900;
  line-height: 0.88;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.admin-document-panel .document-list button {
  border-top-color: rgb(5 5 5 / 16%);
  color: #050505;
}

.admin-document-panel .document-list button:last-child {
  border-bottom-color: rgb(5 5 5 / 16%);
}

.admin-document-panel .document-list button > span {
  color: rgb(5 5 5 / 44%);
}

.admin-document-panel .document-list button > strong {
  color: rgb(5 5 5 / 92%);
}

.admin-document-panel .document-list button > small {
  color: rgb(5 5 5 / 58%);
}

.admin-document-panel .document-list button:hover > strong,
.admin-document-panel .document-list button:focus-visible > strong {
  color: #050505;
}

.admin-document-panel .document-list button em {
  border-color: rgb(5 5 5 / 18%);
  background: rgb(245 245 245 / 96%);
  box-shadow: 0 22px 80px rgb(5 5 5 / 18%), 0 0 0 1px rgb(5 5 5 / 12%);
  color: #050505;
}

.admin-document-panel .document-list button em b {
  color: #050505;
}

.admin-document-panel .document-list button em small {
  color: rgb(5 5 5 / 62%);
}

.admin-country-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-country-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  color: #050505;
  font-weight: 900;
}

.admin-country-item input {
  width: 18px;
  height: 18px;
  accent-color: #050505;
}

@media (max-width: 860px) {
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    position: sticky;
    top: 0;
    right: auto;
    left: auto;
    grid-template-columns: 1fr auto;
    padding: 14px 18px;
    background: #f5f5f5;
  }

  .admin-nav nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 10px 16px;
  }

  .admin-section {
    min-height: auto;
    padding: 72px 18px 96px;
    overflow: visible;
  }

  .admin-section-head {
    position: static;
    grid-template-columns: 1fr;
    margin-bottom: 36px;
  }

  .admin-title-input {
    font-size: clamp(34px, 11vw, 56px);
  }

  .admin-hero-editor {
    min-height: 760px;
  }

  .admin-floating-editor {
    position: static;
    width: 100%;
    align-self: end;
    margin-top: 24px;
  }

  .admin-identity-editor {
    position: static;
    width: 100%;
    align-self: end;
    margin-top: 24px;
  }

  .admin-edit-row,
  .admin-contact-line,
  .admin-document-edit,
  .admin-routes-row {
    grid-template-columns: 1fr;
  }

  .admin-routes-head {
    display: grid;
    align-items: start;
  }

  .admin-routes-row {
    gap: 8px;
    padding: 12px 0;
  }

  .admin-country-list {
    grid-template-columns: 1fr;
  }

  .admin-modal-body {
    grid-template-columns: 1fr;
  }

  .admin-modal-head h2 {
    font-size: clamp(34px, 11vw, 58px);
  }
}
