/* Доработки стилей дашборда поверх project-style.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

.rating__line {
  max-width: 100%;
  overflow-x: hidden;
}

/* --- Шапка: фиксированная сетка, заголовок не смещается --- */

.header__line {
  display: grid;
  grid-template-columns: 253px minmax(0, 1fr) 253px;
  gap: 20px;
  align-items: center;
}

.header__title {
  margin: 0;
  text-align: center;
  justify-self: center;
  width: 100%;
  color: #ab6e48;
  background-color: blue;
}

.header__aside {
  width: 253px;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.header__status {
  width: 253px;
  flex: none;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

.dashboard-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: #1f1f24;
}

.dashboard-login__card {
  width: min(100%, 420px);
  padding: 2rem;
  border-radius: 16px;
  background: #2b2b31;
  border: 1px solid #4a4953;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-login__logo img {
  display: block;
  margin: 0 auto;
  max-width: 180px;
  height: auto;
}

.dashboard-login__title {
  margin: 0;
  text-align: center;
  color: #ffffff;
  font-size: 1.5rem;
}

.dashboard-login__subtitle {
  margin: 0;
  text-align: center;
  color: #b3b3b3;
  font-size: 0.95rem;
}

.dashboard-login__error {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(221, 32, 37, 0.15);
  border: 1px solid rgb(221, 32, 37);
  color: #ffb4b4;
  font-size: 0.9rem;
}

.dashboard-login__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dashboard-login__label {
  color: #d9d9d9;
  font-size: 0.9rem;
}

.dashboard-login__input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #4a4953;
  background: #1f1f24;
  color: #ffffff;
}

.dashboard-login__input--invalid {
  border-color: rgb(221, 32, 37);
}

.dashboard-login__submit {
  min-height: 2.75rem;
  border: 0;
  border-radius: 10px;
  background: #ab6e48;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
}

.dashboard-login__submit:hover {
  background: #c07f58;
}

.dashboard-login__hint {
  margin: 0;
  text-align: center;
  color: #b3b3b3;
  font-size: 0.85rem;
}

.dashboard-login__hint a {
  color: #ffcf8c;
}

.header__status__title {
  flex-shrink: 0;
  white-space: nowrap;
}

.header__status__text {
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 6.5rem;
  text-align: left;
}

/* --- Места в рейтинге --- */

.tablerating__column:nth-child(1) {
  width: 56px;
  min-width: 56px;
}

.ratingblock__place {
  width: auto;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 999px;
  flex-shrink: 0;
  line-height: 1;
}

.ratingblock__place--1 {
  background-color: #ffcf8c;
}

.ratingblock__place--2 {
  background-color: #ffffff;
}

.ratingblock__place--3 {
  background-color: #ab6e48;
}

/* --- Таблица: без горизонтального скролла --- */

.tablerating {
  max-width: 100%;
}

.tablerating__column:nth-child(3),
.tablerating__column:nth-child(4) {
  min-width: 0;
  flex-shrink: 1;
}

.tablerating__column:nth-child(5) {
  min-width: 200px;
  flex-shrink: 1;
}

.tablerating__header .tablerating__column:nth-child(5) {
  min-width: 200px;
}

/* --- Область прокрутки и декоративный скроллбар --- */

.rating__inner {
  position: relative;
}

.tablerating__body {
  overflow: hidden;
  height: calc(100vh - 282px);
}

.tablerating-scrollbar {
  position: absolute;
  right: 20px;
  width: 8px;
  background-color: #4a4953;
  border-radius: 4px;
  pointer-events: none;
}

.tablerating-scrollbar__thumb {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  min-height: 40px;
  background-color: #d9d9d9;
  border-radius: 4px;
}

/* --- Модальное окно новой сделки (как в макете Сайт) --- */

.js-custom-toggle-active {
  display: none;
  opacity: 0;
  transition: 0.3s;
}

.js-custom-toggle-active-is-visible {
  display: block;
  animation: dealModalFadeIn 0.3s ease-in-out forwards;
}

.js-custom-toggle-active-is-hidden {
  animation: dealModalFadeOut 0.3s ease-in-out forwards;
}

@keyframes dealModalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes dealModalFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}