/* ===================================================
   DASHBOARD / PERSONAL CABINET STYLES
   =================================================== */

.dash-body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dash-navbar {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(6, 7, 10, 0.85);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
}

.dash-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.back-home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
}

.back-home-link:hover {
  color: var(--neon-cyan);
  border-color: var(--border-glow);
  transform: translateX(-2px);
}

.dash-nav-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.nav-user-chip:hover {
  border-color: var(--neon-cyan);
}

.nav-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--neon-cyan);
  object-fit: cover;
  background: #111;
}

.nav-user-info {
  display: flex;
  flex-direction: column;
}

.nav-username {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.nav-user-role {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--neon-cyan);
  font-family: var(--font-mono);
}

.btn-logout {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: var(--neon-pink);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-logout:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: var(--neon-pink);
  transform: translateY(-1px);
}

.dash-main {
  flex: 1;
  padding: 32px 0 60px;
  position: relative;
  z-index: 1;
}

.auth-wrapper {
  max-width: 460px;
  margin: 40px auto 60px;
  background: rgba(13, 16, 25, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 36px 32px 30px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 240, 255, 0.08);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), #7928ca, var(--neon-cyan));
  background-size: 200% 100%;
  animation: authGlowBar 4s linear infinite;
}

@keyframes authGlowBar {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Шапка карточки входа */
.auth-header {
  text-align: center;
  margin-bottom: 22px;
}

.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(0, 240, 255, 0.07);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: var(--neon-cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.auth-brand-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  animation: pulseDot 2s ease-in-out infinite;
}

.auth-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Баннер уведомления (при переходе с кнопки покупки) */
.auth-notice {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1) 0%, rgba(120, 0, 255, 0.08) 100%);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.12);
  line-height: 1.4;
  position: relative;
}

.auth-notice .notice-icon-box {
  font-size: 1.3rem;
  line-height: 1;
  padding: 8px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 10px;
  flex-shrink: 0;
}

.auth-notice .notice-content {
  flex: 1;
}

.auth-notice .notice-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.auth-notice .notice-plan-highlight {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.auth-notice .notice-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* Переключатель вкладок Вход / Регистрация */
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  background: rgba(6, 9, 15, 0.75);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

.auth-tab-btn:hover:not(.active) {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.03);
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.16), rgba(0, 150, 255, 0.1));
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 240, 255, 0.2);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

/* Формы и поля ввода */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 8px;
}

.form-group label .label-hint {
  font-size: 0.72rem;
  font-weight: 400;
  color: #64748b;
  text-transform: none;
  letter-spacing: normal;
}

.input-icon-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.input-icon-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #64748b;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 2;
}

.dash-input {
  width: 100% !important;
  height: 48px !important;
  padding: 0 16px 0 44px !important;
  background: rgba(7, 10, 18, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  color: #fff !important;
  font-size: 0.92rem !important;
  font-family: inherit;
  transition: all 0.25s ease;
  box-sizing: border-box !important;
}

.dash-input::placeholder {
  color: #475569;
  font-weight: 400;
}

.dash-input:focus {
  outline: none !important;
  border-color: var(--neon-cyan) !important;
  background: rgba(10, 15, 28, 0.92) !important;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.25), inset 0 0 10px rgba(0, 240, 255, 0.05) !important;
}

.input-icon-wrap:focus-within svg {
  color: var(--neon-cyan);
}

.btn-block {
  width: 100%;
  height: 48px;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* Ссылка быстрого переключения под кнопкой */
.auth-switch-prompt {
  margin-top: 18px;
  text-align: center;
  font-size: 0.82rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-switch-prompt .switch-link {
  background: none;
  border: none;
  color: var(--neon-cyan);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.auth-switch-prompt .switch-link:hover {
  color: #fff;
}

/* Кнопка "Назад на главную" */
.auth-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-back-link:hover {
  color: var(--neon-cyan);
}

.dash-layout {
  display: grid !important;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  position: relative;
}

.dash-layout[style*="none"] {
  display: none !important;
}

.dash-sidebar {
  background: rgba(12, 16, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  backdrop-filter: blur(25px);
  position: sticky;
  top: 90px;
  z-index: 10;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.sidebar-profile {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.profile-avatar-box {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--neon-cyan);
  box-shadow: 0 0 20px var(--neon-cyan-glow);
  object-fit: cover;
  background: #111;
}

.avatar-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: var(--neon-green);
  border: 3px solid var(--bg-surface);
  border-radius: 50%;
}

.profile-username {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.profile-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: var(--neon-purple);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.dash-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
}

.dash-menu-item svg {
  color: var(--text-muted);
  transition: var(--transition);
}

.dash-menu-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.dash-menu-item:hover svg {
  color: var(--neon-cyan);
}

.dash-menu-item.active {
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--border-glow);
}

.dash-menu-item.active svg {
  color: var(--neon-cyan);
}

.dash-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.dash-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.dash-stat-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.stat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(0, 240, 255, 0.1);
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap.purple {
  background: rgba(168, 85, 247, 0.1);
  color: var(--neon-purple);
}

.stat-icon-wrap.green {
  background: rgba(0, 255, 136, 0.1);
  color: var(--neon-green);
}

.stat-icon-wrap.pink {
  background: rgba(244, 63, 94, 0.1);
  color: var(--neon-pink);
}

.dash-stat-info h4 {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.dash-stat-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.dash-tab-pane {
  display: none;
  animation: fadeInPane 0.3s ease-in-out;
}

.dash-tab-pane.active {
  display: block;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  backdrop-filter: blur(20px);
  margin-bottom: 22px;
  position: relative;
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-title-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0, 240, 255, 0.1);
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-card-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.sub-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.12) 0%, rgba(168, 85, 247, 0.12) 100%);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 22px;
}

.sub-banner-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sub-badge-large {
  padding: 6px 14px;
  background: var(--neon-cyan);
  color: #000;
  font-weight: 900;
  font-size: 0.85rem;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.sub-plan-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.sub-plan-expiry {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.dl-card {
  background: rgba(10, 14, 24, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.dl-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dl-card-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.dl-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: rgba(0, 240, 255, 0.12);
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dl-icon.purple {
  background: rgba(168, 85, 247, 0.12);
  color: var(--neon-purple);
}

.dl-meta h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.dl-version-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.dl-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.hwid-box {
  background: rgba(6, 8, 14, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.hwid-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 1px;
}

.configs-table {
  width: 100%;
  border-collapse: collapse;
}

.configs-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
}

.configs-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}

.configs-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.cyber-toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideToast 0.3s ease-out;
}

@keyframes slideToast {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 960px) {
  .dash-layout {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
  }
  .dash-sidebar {
    position: relative !important;
    top: 0 !important;
    width: 100%;
    padding: 14px;
    z-index: 5;
  }
  .sidebar-profile {
    display: none;
  }
  .dash-menu {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .dash-menu::-webkit-scrollbar {
    height: 4px;
  }
  .dash-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
  }
  .dash-menu-item {
    white-space: nowrap;
    padding: 10px 14px;
    flex-shrink: 0;
    width: auto;
    font-size: 0.85rem;
  }
  .sub-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .hwid-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===================================================
   ADMIN PANEL STYLES
   =================================================== */

.profile-tag.admin-tag {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.25), rgba(255, 215, 0, 0.25));
  border: 1px solid rgba(255, 215, 0, 0.6);
  color: #ffd700;
  box-shadow: 0 0 15px rgba(255, 51, 102, 0.35);
  font-weight: 800;
}

.nav-user-role.admin-role {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  font-weight: 800;
}

.admin-badge {
  background: linear-gradient(135deg, #ff3366, #ffd700);
  color: #000;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-only-item {
  border-left: 3px solid #ff3366 !important;
}

.admin-generator-box {
  background: rgba(15, 20, 32, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.keys-list-area {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--neon-cyan);
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  margin-top: 14px;
  line-height: 1.6;
}

.admin-select {
  padding: 10px 14px;
  background: rgba(10, 13, 20, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
}

.admin-select:focus {
  outline: none;
  border-color: var(--neon-cyan);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
}

.admin-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
