/* =========================================
   📊 NEXUS FRONTEND v1.1 (🚧)
   [Admin UI Styles]
   ========================================= */

/*🧠 Архітектура:
 * Nexus живе ВСЕРЕДИНІ adc-workspace
 * Layout, colors, fonts — з main-style-adc.css
 * Цей файл містить специфічні стилі для Nexus модуля
 */


/* =========================================
   📦 ROOT WRAPPER
   ========================================= */

.adc-nexus {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}


/* =========================================
   🧩 GRID LAYOUT
   ========================================= */

.adc-full-width {
  grid-column: 1 / -1;
}


/* =========================================
   🧱 BASE ADMIN SECTION
   ========================================= */

.admin-section {
  background: var(--bg-soft);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 20px;

  box-shadow:
    0 10px 30px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.admin-section h3,
.adc-section-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-description {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* + Section Header with Controls */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
}

.section-header .adc-section-title {
  margin: 0;
}


/* =========================================
   🏷️ VERSION BADGE
   ========================================= */

/* + Hero Version Badge */
.hero-version {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(88, 101, 242, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  margin-left: 12px;
  vertical-align: middle;
}


/* =========================================
   ⚙️ STATUS & TOGGLE
   ========================================= */

.nexus-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.nexus-status-block {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nexus-quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Neon Toggle (спільний з Observer) */
.adc-neon-toggle {
  display: inline-flex;
  cursor: pointer;
  user-select: none;
}

.adc-neon-toggle input {
  display: none;
}

.adc-neon-track {
  position: relative;
  width: 92px;
  height: 38px;
  padding: 3px;
  border-radius: 999px;

  background: linear-gradient(180deg, #0b0f1a, #05080f);
  border: 1px solid rgba(255,255,255,.06);

  box-shadow:
    inset 0 4px 10px rgba(0,0,0,.9),
    0 8px 20px rgba(0,0,0,.7);

  overflow: hidden;
}

.adc-neon-text {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);

  font-size: 15px;
  font-weight: 900;
  letter-spacing: .2em;

  color: #00000075;
  opacity: 0;
  pointer-events: none;
}

.adc-neon-thumb {
  position: absolute;
  top: 4px;
  left: 4px;

  width: 30px;
  height: 30px;
  border-radius: 50%;

  background: radial-gradient(
    circle at 30% 30%,
    #ffffff,
    #d9f7f2 45%,
    #9fded4 100%
  );

  box-shadow:
    0 6px 14px rgba(0,0,0,.85),
    inset 0 2px 6px rgba(255,255,255,.9);

  transition: all .35s cubic-bezier(.4,0,.2,1);
}

.adc-neon-toggle input:checked + .adc-neon-track {
  background: linear-gradient(
    90deg,
    #4dffd8,
    #2fffc3,
    #19e6a8
  );

  box-shadow:
    0 0 10px rgba(46,204,113,.55),
    0 0 22px rgba(46,204,113,.35),
    inset 0 0 10px rgba(255,255,255,.25);
}

.adc-neon-toggle input:checked + .adc-neon-track .adc-neon-thumb {
  left: calc(100% - 34px);
}

.adc-neon-toggle input:checked + .adc-neon-track .adc-neon-text {
  opacity: 1;
}


/* =========================================
   🎯 TABS NAVIGATION
   ========================================= */

.nexus-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  overflow-x: auto;
}

.nexus-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nexus-tab:hover {
  background: rgba(255,255,255,0.05);
  color: #ffffff;
}

.nexus-tab.active {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.3), rgba(114, 137, 218, 0.3));
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.nexus-tab .tab-icon {
  font-size: 16px;
}

.nexus-tab-content {
  display: none;
}

.nexus-tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.3s ease;
}

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


/* =========================================
   📊 STATS CARDS
   ========================================= */

.nexus-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.stat-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: #5865F2;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.2);
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.stat-value {
  font-size: 32px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #72767d;
  letter-spacing: 0.5px;
}


/* =========================================
   🔍 USERS TOOLBAR
   ========================================= */

.users-toolbar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.users-search {
  flex: 1;
  min-width: 250px;
}

.users-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}


/* =========================================
   ✏️ INPUTS / TEXTAREA / SELECT
   ========================================= */

.adc-input,
.adc-textarea,
.adc-select {
  width: 100%;
  padding: 12px 14px;

  background: #0b0d12;
  border-radius: 14px;
  border: 1px solid var(--border-soft);

  color: #ffffff;
  font-size: 14px;
  outline: none;

  transition: border .2s ease, box-shadow .2s ease;
}

.adc-input:focus,
.adc-textarea:focus,
.adc-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(88,101,242,.25);
}

.adc-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.adc-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2372767d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.adc-select-small,
.adc-input-small {
  padding: 8px 12px;
  font-size: 13px;
  width: auto;
  min-width: 80px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* =========================================
   🔘 BUTTONS
   ========================================= */

.adc-btn,
.adc-refresh-btn,
.adc-save-btn,
.adc-cancel-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.adc-btn-secondary {
  background: rgba(88, 101, 242, 0.1);
  color: #5865F2;
  border: 1px solid rgba(88, 101, 242, 0.3);
}

.adc-btn-secondary:hover {
  background: rgba(88, 101, 242, 0.2);
  transform: translateY(-1px);
}

.adc-btn-small {
  padding: 8px 16px;
  font-size: 12px;
}

/* + Icon-only button */
.adc-btn-icon {
  padding: 8px;
  min-width: 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.adc-btn-icon:hover {
  background: rgba(88, 101, 242, 0.2);
  border-color: #5865F2;
  color: #ffffff;
}

/* + Danger Button */
.adc-btn-danger {
  background: rgba(237, 66, 69, 0.1);
  color: #ED4245;
  border: 1px solid rgba(237, 66, 69, 0.3);
}

.adc-btn-danger:hover {
  background: rgba(237, 66, 69, 0.2);
}

/* + Warning Button */
.adc-btn-warning {
  background: rgba(254, 231, 92, 0.1);
  color: #FEE75C;
  border: 1px solid rgba(254, 231, 92, 0.3);
}

.adc-btn-warning:hover {
  background: rgba(254, 231, 92, 0.2);
}

.adc-refresh-btn {
  background: rgba(88, 101, 242, 0.1);
  color: #5865F2;
  border: 1px solid rgba(88, 101, 242, 0.3);
}

.adc-refresh-btn:hover {
  background: rgba(88, 101, 242, 0.2);
}

.adc-save-btn {
  background: linear-gradient(135deg, #5865F2, #7289DA);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.4);
}

.adc-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(88, 101, 242, 0.6);
}

.adc-cancel-btn {
  background: rgba(72, 76, 80, 0.3);
  color: #B9BBBE;
  border: 1px solid var(--border-soft);
}

.adc-cancel-btn:hover {
  background: rgba(72, 76, 80, 0.5);
}

/* + Disabled state */
.adc-btn:disabled,
.adc-btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}


/* =========================================
   👥 USERS LIST
   ========================================= */

.users-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.user-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.user-card:hover {
  border-color: #5865F2;
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.3);
  transform: translateY(-2px);
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5865F2, #7289DA);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-id {
  font-size: 12px;
  color: #72767d;
  font-family: monospace;
}

/* + User Tags */
.user-tag {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.user-tag.guest {
  background: rgba(88, 101, 242, 0.2);
  color: #5865F2;
}

.user-tag.member {
  background: rgba(87, 242, 135, 0.2);
  color: #57F287;
}

.user-tag.veteran {
  background: rgba(155, 89, 182, 0.2);
  color: #9B59B6;
}

.user-tag.left {
  background: rgba(153, 170, 181, 0.2);
  color: #99AAB5;
}

.user-tag.kicked {
  background: rgba(230, 126, 34, 0.2);
  color: #E67E22;
}

.user-tag.banned {
  background: rgba(237, 66, 69, 0.2);
  color: #ED4245;
}

.user-tag.pending {
  background: rgba(254, 231, 92, 0.2);
  color: #FEE75C;
}

/* + User Stats Row */
.user-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.user-stat {
  text-align: center;
}

.user-stat-label {
  font-size: 10px;
  color: #72767d;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}

.user-stat-value {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

/* + Pending Promotion Badge */
.user-pending-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  background: linear-gradient(135deg, #FEE75C, #F1C40F);
  color: #000000;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(254, 231, 92, 0.4);
}


/* =========================================
   📄 PAGINATION
   ========================================= */

.users-pagination,
.history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

.pagination-info {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 60px;
  text-align: center;
}


/* =========================================
   🏆 LEADERBOARD
   ========================================= */

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.leaderboard-item:hover {
  border-color: #5865F2;
  transform: translateX(4px);
}

.leaderboard-rank {
  font-size: 20px;
  font-weight: 900;
  color: #72767d;
  min-width: 40px;
  text-align: center;
}

.leaderboard-rank.gold {
  color: #FEE75C;
  text-shadow: 0 0 10px rgba(254, 231, 92, 0.5);
}

.leaderboard-rank.silver {
  color: #B9BBBE;
}

.leaderboard-rank.bronze {
  color: #CD7F32;
}

.leaderboard-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.leaderboard-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5865F2, #7289DA);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.leaderboard-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.leaderboard-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-value {
  font-size: 16px;
  font-weight: 900;
  color: #5865F2;
  white-space: nowrap;
}


/* =========================================
   ⚡ EVENTS
   ========================================= */

.events-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.event-category {
  padding: 8px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.event-category:hover {
  background: rgba(255,255,255,0.1);
  border-color: #5865F2;
  color: #ffffff;
}

.event-category.active {
  background: rgba(88, 101, 242, 0.2);
  border-color: #5865F2;
  color: #ffffff;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.event-item:hover {
  border-color: #5865F2;
}

.event-item.disabled {
  opacity: 0.6;
}

.event-toggle {
  flex-shrink: 0;
}

/* + Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(72, 76, 80, 0.5);
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, #57F287, #3BA55D);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.event-info {
  flex: 1;
  min-width: 0;
}

.event-type {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.event-category-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: 4px;
}

.event-features {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.event-feature {
  font-size: 16px;
  opacity: 0.3;
  transition: opacity 0.2s ease;
}

.event-feature.active {
  opacity: 1;
}

.event-actions {
  flex-shrink: 0;
}


/* =========================================
   ⚙️ CONFIG
   ========================================= */

.nexus-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.config-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.config-group:last-child {
  margin-bottom: 0;
}

.config-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-emoji {
  font-size: 14px;
}

.config-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #B9BBBE;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #5865F2;
}

/* + Config Section */
.config-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-soft);
}

.config-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.config-section h4 {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

/* + Hint text */
.hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px;
}


/* =========================================
   🎖️ RANKS
   ========================================= */

.ranks-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.rank-order {
  font-size: 18px;
  font-weight: 900;
  color: #72767d;
  min-width: 30px;
  text-align: center;
}

.rank-info {
  flex: 1;
}

.rank-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.rank-details {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.rank-actions {
  display: flex;
  gap: 8px;
}


/* =========================================
   📜 HISTORY
   ========================================= */

/* + History Controls */
.history-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* + History Filters */
.history-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  max-height: 600px;
  overflow-y: auto;
}

/* + History Event Item */
.history-event {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.history-event:hover {
  border-color: rgba(255,255,255,0.1);
}

.history-time {
  font-size: 12px;
  color: #72767d;
  min-width: 100px;
  font-family: monospace;
}

.history-icon {
  font-size: 20px;
  min-width: 28px;
  text-align: center;
}

.history-content {
  flex: 1;
  min-width: 0;
}

.history-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.history-details {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-user-btn {
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.3);
  color: #5865F2;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-user-btn:hover {
  background: rgba(88, 101, 242, 0.2);
}


/* =========================================
   🔔 MODAL
   ========================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-small {
  max-width: 400px;
}

.modal-medium {
  max-width: 600px;
}

.modal-large {
  max-width: 900px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-soft);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #72767d;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(237, 66, 69, 0.1);
  color: #ED4245;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid var(--border-soft);
}

/* + Form Group in Modal */
.form-group {
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

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

.form-row .form-group {
  flex: 1;
  min-width: 150px;
}


/* =========================================
   👤 USER PROFILE MODAL
   ========================================= */

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.profile-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
}

.profile-section h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.profile-field {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.profile-field:last-child {
  border-bottom: none;
}

.field-label {
  font-size: 13px;
  color: var(--text-muted);
}

.field-value {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.profile-legacy-badge {
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(254, 231, 92, 0.1);
  border: 1px solid rgba(254, 231, 92, 0.3);
  border-radius: 6px;
  color: #FEE75C;
  font-size: 12px;
  font-weight: 600;
}

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

/* + User Timeline */
.user-timeline {
  max-height: 200px;
  overflow-y: auto;
}

.timeline-event {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.timeline-event:last-child {
  border-bottom: none;
}

.timeline-type {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.timeline-time {
  font-size: 12px;
  color: #72767d;
}

/* + Loading State */
.loading {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
}


/* =========================================
   ⚙️ EVENT CONFIG MODAL
   ========================================= */

.post-actions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.post-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
}

.post-action-name {
  font-size: 13px;
  color: #ffffff;
}


/* =========================================
   🔔 NOTIFICATIONS (Toast)
   ========================================= */

.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.notification {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: notificationSlideIn 0.3s ease;
}

@keyframes notificationSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification.fade-out {
  animation: notificationSlideOut 0.3s ease forwards;
}

@keyframes notificationSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.notification.success {
  border-left: 4px solid #57F287;
}

.notification.error {
  border-left: 4px solid #ED4245;
}

.notification-icon {
  font-size: 20px;
}

.notification-text {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.notification-close {
  background: none;
  border: none;
  color: #72767d;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.notification-close:hover {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}


/* =========================================
   🎨 EMPTY STATE
   ========================================= */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #72767d;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
}


/* =========================================
   📱 RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
  .nexus-top-bar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .users-toolbar {
    flex-direction: column;
  }

  .users-search {
    width: 100%;
  }

  .users-filters {
    flex-direction: column;
  }

  .users-container {
    grid-template-columns: 1fr;
  }

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

  .nexus-config-grid {
    grid-template-columns: 1fr;
  }

  .events-categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .modal-content {
    max-width: 100%;
  }

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

  .notification-container {
    left: 20px;
    right: 20px;
    max-width: none;
  }
}

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

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

  .leaderboard-item {
    padding: 10px;
    gap: 10px;
  }

  .leaderboard-rank {
    font-size: 16px;
    min-width: 30px;
  }
}

/* v1.1 - Nexus Icon */
.nexus-icon {
  background: radial-gradient(
    circle at center,
    transparent 36%,
    rgba(26,188,156,0.28) 40%,
    rgba(26,188,156,0.18) 70%,
    rgba(0,0,0,0.65) 100%
  );
  box-shadow:
    0 0 52px rgba(26,188,156,0.55),
    inset 0 0 28px rgba(255,255,255,0.08);
}

.nexus-icon svg {
  fill: #5fffe0;
  filter: drop-shadow(0 0 8px rgba(26,188,156,0.6));
}
