@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

input, button, select, textarea {
  font-family: 'Inter', sans-serif;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

a{
  text-decoration: none;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
  margin-bottom: 60px;
  background: #051630;
  color: white;
  font-family: 'Inter', sans-serif;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.auth-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.auth-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 48px;
  border-radius: 24px;
  width: 100%;
  max-width: 460px;
  z-index: 10;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-header { text-align: center; margin-bottom: 32px; }
.auth-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; color: #fff; }
.auth-subtitle { color: #94a3b8; font-size: 15px; }

.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; color: #e2e8f0; }
.label-wrapper { display: flex; justify-content: space-between; align-items: center; }

.auth-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 16px;
  color: #fff;
  transition: all 0.3s;
}

.auth-input:focus {
  outline: none;
  border-color: #0066FF;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.15);
}

.btn-primary-main,
.btn-danger-outline,
.btn-secondary-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  border: none;
  cursor: pointer;
}

.btn-primary-main {
  width: 100%;
  background: #0066FF;
  color: #fff;
}

.action-grid .btn-primary-main {
  width: auto;
  margin-top: 0;
}

.btn-primary-main:hover { box-shadow: 0 0 20px rgba(0, 102, 255, 0.6); }

.external-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0;
}

.external-divider::before,
.external-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.external-divider span {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.btn-external {
  width: 100%;
  gap: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s;
}
.btn-external:hover { background: rgba(255, 255, 255, 0.05); }

.helper-link, .register-text a { color: #00D1FF; text-decoration: none; font-size: 14px; }
.helper-link:hover, .register-text a:hover { text-decoration: underline; }
.register-text { text-align: center; margin-top: 24px; font-size: 14px; color: #94a3b8; }

.circle { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.2; z-index: 1; }
.circle-large { width: 400px; height: 400px; background: #0066FF; top: -100px; right: -100px; }
.circle-small { width: 300px; height: 300px; background: #00D1FF; bottom: -50px; left: -50px; }

.error-msg { color: #ff4d4d; font-size: 12px; margin-top: 4px; display: block; }
.error-summary { color: #ff4d4d; background: rgba(255, 77, 77, 0.1); padding: 10px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }

.error-summary ul {
  margin: 0;
}

.error-summary li {
  margin: 0;
  padding: 0;
}

.error-summary.text-danger {
  color: #ff4d4d;
  font-size: 14px;
  text-align: center;
  background: rgba(255, 77, 77, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.error-summary:empty,
.error-summary:has(> ul:empty) {
  display: none;
}

.validation-summary-valid {
  display: none;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 32px 20px;
    border-radius: 20px;
  }
  
}

body:has(.auth-wrapper) {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* стили для настроек акка */

.profile-main-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.profile-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
  margin-top: 30px;
}

.profile-sidebar {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: fit-content;
}

.profile-sidebar ul {
  list-style: none;
  padding: 0;
}

.profile-sidebar .nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  display: block;
  padding: 10px 15px;
  border-radius: 8px;
  transition: 0.3s;
}

.profile-sidebar .nav-link:hover,
.profile-sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.profile-content-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 30px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-content-container label {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

#status-message {
  background: rgba(0, 209, 255, 0.1);
  color: #00D1FF;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 209, 255, 0.2);
}

/* боковое меню */

.profile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-nav-list .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #94a3b8; 
  text-decoration: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.profile-nav-list .nav-link i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.profile-nav-list .nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.profile-nav-list .nav-link.active {
  background: rgba(0, 102, 255, 0.15);
  color: #00D1FF;
  border-color: rgba(0, 209, 255, 0.3);
}

.profile-nav-list .nav-link.active i {
  color: #00D1FF;
}

/* Цвет для подтвержденной почты */
.fa-circle-check {
  filter: drop-shadow(0 0 5px rgba(0, 255, 148, 0.4));
}

/* external logins */

/* Список уже привязанных сервисов */
.external-logins-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.external-login-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.provider-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 500;
}

/* Кнопка удаления привязки */
.btn-remove-link {
  background: rgba(255, 77, 77, 0.1);
  color: #ff4d4d;
  border: 1px solid rgba(255, 77, 77, 0.2);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-remove-link:hover {
  background: #ff4d4d;
  color: #fff;
}

/* Сетка для кнопок добавления новых сервисов */
.external-auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

/* вкладка two factor auth */

/* Контейнеры для логических групп настроек */
.auth-group-section {
  background: rgba(255, 255, 255, 0.02);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Сетка для кнопок действий */
.action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-secondary-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #fff;
}

/* Оранжевое предупреждение для малого кол-ва кодов */
.status-warning-box {
  background: rgba(255, 165, 0, 0.1);
  color: #ffa500;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 165, 0, 0.2);
  margin-bottom: 20px;
  font-size: 14px;
}


/* вкладка personal data */

/* Кнопка удаления аккаунта */
.btn-danger-outline {
  background: rgba(255, 77, 77, 0.05);
  color: #ff4d4d;
  border: 1px solid rgba(255, 77, 77, 0.2);
}

.btn-danger-outline:hover {
  background: #ff4d4d;
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 77, 77, 0.4);
}

/* Иконки в кнопках для этой вкладки */
.btn-primary-main i, .btn-danger-outline i {
  font-size: 16px;
}

/* кнопка назад */

.btn-back {
  display: inline-flex;
  align-items: center;
  color: #00D1FF;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  transition: opacity 0.2s;
  gap: 8px;
}

.btn-back:hover {
  opacity: 0.75;
}

.btn-back i {
  vertical-align: middle;
}

/* адаптив для мобилок */

@media (max-width: 768px) {
  .profile-main-container {
    padding: 16px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .profile-nav-list .nav-link {
    padding: 8px 12px;
    font-size: 13px;
  }

  .profile-nav-list .nav-link span {
    display: none;
  }
}

/* external login */

.provider-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 209, 255, 0.08);
  border: 1px solid rgba(0, 209, 255, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  color: #00D1FF;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 28px;
}

.provider-badge i {
  font-size: 16px;
}