/* === PROFILE PAGE STYLES === */

.profile-container {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  padding: 120px 20px 40px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.profile-card {
  width: 100%;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* === PROFILE HEADER === */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #7c5cbf);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  font-family: 'Exo 2', sans-serif;
}

.profile-avatar-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(124, 92, 191, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.avatar-input {
  display: none !important;
}

.btn-upload-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 92, 191, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(124, 92, 191, 0.3);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex: 1;
}

.btn-upload-avatar:hover {
  background: rgba(124, 92, 191, 0.25);
  border-color: rgba(124, 92, 191, 0.5);
  transform: translateY(-1px);
}

.btn-remove-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 64, 64, 0.12);
  color: #f87171;
  border: 1px solid rgba(240, 64, 64, 0.2);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex: 1;
}

.btn-remove-avatar:hover {
  background: rgba(240, 64, 64, 0.2);
  border-color: rgba(240, 64, 64, 0.4);
  transform: translateY(-1px);
}

.avatar-buttons {
  display: flex;
  gap: 8px;
  width: 100%;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: #e8eaf0;
  margin-bottom: 4px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}

.profile-status {
  font-size: 0.85rem;
  color: #8b8fa8;
  font-weight: 500;
}

.btn-logout-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 64, 64, 0.12);
  color: #f87171;
  border: 1.5px solid rgba(240, 64, 64, 0.2);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-logout-profile:hover {
  background: rgba(240, 64, 64, 0.2);
  transform: translateY(-1px);
}

/* === TABS === */
.profile-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 0;
}

.tab-btn {
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #8b8fa8;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: capitalize;
}

.tab-btn.active {
  color: #e8eaf0;
  border-bottom-color: #3b82f6;
}

.tab-btn:not(.disabled):hover:not(.active) {
  color: #e8eaf0;
}

/* === TAB CONTENT === */
.profile-content {
  min-height: 200px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.2s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === SECTIONS === */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #e8eaf0;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
  font-family: 'Exo 2', sans-serif;
}

/* === PROFILE FIELDS === */
.profile-field {
  margin-bottom: 24px;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b8fa8;
  margin-bottom: 10px;
}

.field-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  gap: 12px;
}

.field-display span {
  font-size: 0.95rem;
  color: #e8eaf0;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}

.btn-change {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 92, 191, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(124, 92, 191, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-change:hover {
  background: rgba(124, 92, 191, 0.25);
  border-color: rgba(124, 92, 191, 0.5);
  transform: translateY(-1px);
}

/* === EDIT FORM === */
.edit-form {
  animation: slideDown 0.3s ease;
  margin-bottom: 20px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 200px;
  }
}

.field-group {
  margin-bottom: 12px;
}

.field-input {
  width: 100%;
  background: #2a2d38;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  color: #e8eaf0;
  font-size: 0.95rem;
  font-family: 'Exo 2', sans-serif;
  transition: all 0.2s ease;
}

.field-input::placeholder {
  color: #8b8fa8;
}

.field-input:focus {
  outline: none;
  border-color: rgba(124, 92, 191, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 92, 191, 0.1);
}

.error-msg {
  display: none;
  font-size: 0.8rem;
  color: #f87171;
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(240, 64, 64, 0.1);
  border-radius: 6px;
  border-left: 2px solid #f87171;
}

.error-msg.show {
  display: block;
}

.form-buttons {
  display: flex;
  gap: 10px;
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #7c5cbf, #5a3fa0);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(124, 92, 191, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(124, 92, 191, 0.5);
}

.btn-cancel {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  color: #8b8fa8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

@media (max-width: 600px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .profile-info {
    flex: 1;
  }

  .btn-logout-profile {
    width: 100%;
  }

  .profile-card {
    padding: 24px;
  }

  .profile-tabs {
    gap: 4px;
  }

  .tab-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
}

/* ═══════════════════════════════════════════
   МОБИЛЬНАЯ АДАПТАЦИЯ — profile.css доп.
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
  .profile-container {
    padding: 90px 12px 32px;
  }

  .profile-card {
    padding: 20px 16px;
  }

  .profile-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .profile-name {
    font-size: 1.1rem;
  }

  .btn-logout-profile {
    width: 100%;
    margin-top: 4px;
  }

  .field-display {
    flex-wrap: wrap;
    gap: 10px;
  }

  .btn-change {
    width: 100%;
    justify-content: center;
  }

  .form-buttons {
    flex-direction: column;
  }

  .field-input {
    font-size: 16px; /* предотвращает зум на iOS */
  }
}

.btn-admin-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.3);
  color: #f97316;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Exo 2', sans-serif;
  letter-spacing: 0.03em;
  transition: background 0.2s;
}
.btn-admin-profile:hover {
  background: rgba(249,115,22,0.22);
}
