/* ===== PROFILE 2025 ===== */
.profile-section .container,
.profile-hero-inner.container {
  padding-left: 20px;
  padding-right: 20px;
}

:root {
  --profile-radius: 20px;
  --profile-radius-sm: 12px;
  --profile-space: 24px;
  --profile-space-sm: 16px;
  --profile-accent: #3cffc3;
  --profile-accent-dim: rgba(60, 255, 195, 0.15);
  --profile-bg: rgba(18, 18, 18, 0.85);
  --profile-border: rgba(60, 255, 195, 0.18);
  --profile-text: #e8e8e8;
  --profile-text-muted: #9ca3af;
}

/* Header на странице профиля */
.header-profile .header-inner {
  max-width: 1200px;
}
.nav-profile a {
  color: var(--profile-text-muted);
  font-size: 15px;
}
.nav-profile a:hover {
  color: var(--profile-accent);
}

/* ===== AUTH GATE ===== */
.auth-gate {
  min-height: 100vh;
  padding: 100px 20px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, var(--profile-accent-dim) 0%, transparent 50%);
}

.auth-gate-card {
  max-width: 420px;
  width: 100%;
  padding: 48px 32px;
  text-align: center;
  background: var(--profile-bg);
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.auth-gate-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  color: var(--profile-accent);
  opacity: 0.95;
}

.auth-gate-icon svg {
  width: 100%;
  height: 100%;
}

.auth-gate-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.auth-gate-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--profile-text-muted);
  margin: 0 0 28px;
}

.auth-gate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--profile-radius-sm);
  background: linear-gradient(135deg, var(--profile-accent), #00e676);
  color: #0a0a0a;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(60, 255, 195, 0.35);
}

.auth-gate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(60, 255, 195, 0.45);
}

.auth-gate-btn:active {
  transform: translateY(0);
}

.auth-gate-btn-icon {
  font-size: 20px;
}

.auth-gate-hint {
  margin-top: 20px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

/* ===== PROFILE HERO ===== */
.profile-section {
  padding: 0 0 60px;
  min-height: 60vh;
}

.profile-hero {
  position: relative;
  padding: 100px 0 48px;
  overflow: hidden;
}

.profile-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 80% at 50% -20%, var(--profile-accent-dim) 0%, transparent 55%);
  pointer-events: none;
}

.profile-hero-inner {
  position: relative;
  text-align: center;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--profile-accent), #00e676);
  color: #0a0a0a;
  font-size: 32px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.03em;
  box-shadow: 0 8px 32px rgba(60, 255, 195, 0.35);
}

.profile-greeting {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.profile-status {
  font-size: 14px;
  color: var(--profile-text-muted);
  margin: 0 0 14px;
}

.profile-status.ok {
  color: var(--profile-accent);
  opacity: 0.95;
}

.profile-status.err {
  color: #f87171;
}

.profile-admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--profile-accent-dim);
  border: 1px solid var(--profile-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--profile-accent);
}

.profile-admin-pill-icon {
  font-size: 14px;
}

/* ===== STATS ROW ===== */
.profile-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 20px 16px;
  background: var(--profile-bg);
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius-sm);
  text-align: center;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  border-color: rgba(60, 255, 195, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.stat-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--profile-accent);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 12px;
  color: var(--profile-text-muted);
  text-transform: lowercase;
}

/* ===== PROFILE GRID ===== */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.profile-card {
  background: var(--profile-bg);
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius);
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-card:hover {
  border-color: rgba(60, 255, 195, 0.28);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--profile-border);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}

.card-content {
  padding: 24px;
}

/* ===== FORM ===== */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  gap: 16px;
}

.form-row-2 {
  grid-template-columns: 1fr 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--profile-text-muted);
}

.form-group .required {
  color: #f87171;
}

.form-group input {
  padding: 14px 16px;
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid var(--profile-border);
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
  color: #6b7280;
}

.form-group input:focus {
  outline: none;
  border-color: var(--profile-accent);
  box-shadow: 0 0 0 3px var(--profile-accent-dim);
}

.form-group input[readonly],
.form-group input:disabled {
  background: rgba(20, 20, 20, 0.6);
  cursor: default;
  opacity: 0.85;
}

.form-help {
  font-size: 12px;
  color: var(--profile-text-muted);
  line-height: 1.4;
  margin: 0;
}

.form-help.locked {
  color: var(--profile-accent);
  opacity: 0.9;
}

.btn-primary {
  margin-top: 8px;
  padding: 14px 24px;
  border-radius: var(--profile-radius-sm);
  background: linear-gradient(135deg, var(--profile-accent), #00e676);
  color: #0a0a0a;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(60, 255, 195, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(60, 255, 195, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ===== ACTIONS LIST ===== */
.actions-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--profile-radius-sm);
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  width: 100%;
}

.action-item:hover {
  background: rgba(60, 255, 195, 0.08);
}

.action-item-primary {
  background: var(--profile-accent-dim);
  border: 1px solid var(--profile-border);
}

.action-item-primary:hover {
  background: rgba(60, 255, 195, 0.12);
  border-color: rgba(60, 255, 195, 0.3);
}

.action-item-logout:hover {
  background: rgba(248, 113, 113, 0.1);
}

.action-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.action-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.action-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.action-desc {
  font-size: 12px;
  color: var(--profile-text-muted);
}

.action-chevron {
  font-size: 18px;
  color: var(--profile-text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.action-item:hover .action-chevron {
  color: var(--profile-accent);
  transform: translateX(4px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .profile-hero {
    padding: 88px 0 36px;
  }

  .profile-avatar {
    width: 72px;
    height: 72px;
    font-size: 26px;
  }

  .profile-greeting {
    font-size: 24px;
  }

  .profile-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
  }

  .stat-card {
    padding: 16px 12px;
  }

  .stat-value {
    font-size: 18px;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .card-content {
    padding: 20px;
  }

  .action-item {
    padding: 14px 16px;
  }

  .nav-profile {
    display: none;
  }
}

@media (max-width: 380px) {
  .profile-stats {
    grid-template-columns: 1fr;
  }
}
