/* =========================
   ACCOUNT PAGE LAYOUT
========================= */

.account-wrapper {
  display: grid;
  /* make center column 1.5x wider on desktop */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: var(--space-lg);
  width: min(100%, 1400px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px var(--space-lg) var(--space-lg);
  min-height: calc(100vh - 100px);
  align-items: stretch;
  box-sizing: border-box;
  min-width: 0;
}

.settings-sidebar,
.account-profile,
.quick-settings {
  min-width: 0;
}

/* =========================
   SIDEBAR / SETTINGS MENU
========================= */

.settings-sidebar {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--glow-secondary);
  height: 95%;
  display: flex;
  flex-direction: column;
}

.settings-sidebar h3 {
  font-size: 0.95em;
  margin: 0 0 var(--space-md) 0;
  color: var(--text-primary);
  font-weight: 600;
}

.settings-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.settings-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-default);
  color: var(--text-muted);
  border-left: 3px solid transparent;
}

.settings-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-left-color: var(--color-pink-cosmic);
}

.settings-menu-item.active {
  background: rgba(138, 43, 226, 0.15);
  color: var(--text-secondary);
  border-left-color: var(--color-purple-neon);
}

.settings-menu-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.settings-menu-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-menu-label > span:first-child {
  font-size: 0.9em;
  font-weight: 500;
}

.settings-menu-label > span:last-child {
  font-size: 0.75em;
  color: var(--text-muted);
  opacity: 0.8;
}

/* =========================
   CENTER PROFILE SECTION
========================= */

.account-profile {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--glow-secondary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 95%;
}

.profile-banner {
  width: 100%;
  height: 150px;
  background: linear-gradient(135deg, #FF0000, #CC0000);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.profile-banner-upload {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  padding: 0px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8em;
  transition: all var(--transition-default);
}

.profile-banner-upload:hover {
  background: rgba(0, 0, 0, 0.8);
}

.profile-header {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  margin-top: -60px;

  z-index: 100;
  background: transparent;

  pointer-events: none;
}

.profile-header > * {
  pointer-events: auto;
}

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  justify-content: center;
  padding-top: 40px;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  overflow: visible;
}

.profile-avatar img,
.profile-avatar-fallback {
  width: 97%;
  height: 97%;
  object-fit: fill;
  align-content: center;
  border-radius: 50%;
}

.profile-avatar-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--color-purple-neon),
    var(--color-pink-cosmic)
  );

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 2em;
  font-weight: bold;
  color: var(--text-primary);
}

.profile-username {
  display: flex;
  align-items: center;
  gap: 6px;

  margin: 0;

  font-size: 1.5em;
  font-weight: 700;
}

.profile-email {
  color: var(--text-muted);
  font-size: 0.9em;
  text-align: left;
  margin: 0;
  margin-top: -5px; 
}

.profile-roles {
  display: flex;
  gap: var(--space-sm);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8em;
  font-weight: 600;
  background: rgba(138, 43, 226, 0.25);
  color: var(--color-purple-neon);
  border: 1px solid rgba(138, 43, 226, 0.5);
}

.role-badge.admin {
  background: rgba(255, 79, 216, 0.15);
  color: var(--color-pink-cosmic);
  border-color: rgba(255, 79, 216, 0.3);
}

/* =========================
   ACCOUNT DETAILS SECTION
========================= */

.account-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.detail-item, .detail-item2 {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-default);
}

.detail-item2:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-shadow-small); 
}

.detail-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(138, 43, 226, 0.2);
  border-radius: var(--radius-sm);
  color: var(--color-purple-neon);
  font-size: 1.2em;
  flex-shrink: 0;
}

.detail-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.detail-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-label {
  font-size: 0.8em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 0.95em;
  color: var(--text-primary);
  font-weight: 500;
}

.detail-status {
  font-size: 0.75em;
  color: var(--color-blue-electric);
  margin-left: auto;
  font-weight: 600;
}

.disconnect-button {
  font-size: 0.75em;
  color: var(--text-error);
  border-color: var(--text-error);
  margin-left: auto;
  font-weight: 600;
}

.disconnect-button {
  font-size: 0.75em;
  color: var(--text-error);
  border-color: var(--text-error);
    margin-left: 0;
    font-weight: 600;
    align-self: flex-start;
}

.btn2:hover {
    box-shadow: var(--glow-error);
}

/* =========================
   DISABLED STATE
========================= */

[data-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed !important;
}

[data-disabled="true"] * {
  cursor: not-allowed !important;
}

/* =========================
   OVERLAY STYLES
========================= */

.overlay-hover {
  position: relative;
  overflow: hidden;
}

.overlay-hover::before {
  content: attr(data-hover-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9em;
  text-align: center;
  padding: 10px;
  opacity: 0;
  transition: opacity var(--transition-default);
  border-radius: inherit;
  z-index: 5;
}

.overlay-hover:hover::before {
  opacity: 1;
}

.overlay-hover2 {
  position: relative;
  overflow: hidden;
    border-radius: 50%;
}

.overlay-hover2::before {
  content: attr(data-hover-text);

  position: absolute;
  inset: 0;

  border-radius: inherit;

  background: rgba(0, 0, 0, 0.7);

  display: flex;
  align-items: center;
  justify-content: center;

  color: white;
  font-size: 2.5em;
  text-align: center;

  padding: 0;

  opacity: 0;
  transition: opacity var(--transition-default);

  z-index: 5;
}

.overlay-hover2:hover::before {
  opacity: 1;
}

.quick-settings {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--glow-secondary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 95%;
}

.quick-settings h3 {
  font-size: 0.95em;
  margin: 0 0 var(--space-md) 0;
  color: var(--text-primary);
  font-weight: 600;
}

.quick-settings-subtitle {
  font-size: 0.8em;
  color: var(--text-muted);
  margin: 0 0 var(--space-md) 0;
}

.quick-settings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.quick-settings-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-default);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

.quick-settings-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-subtle);
}

.quick-settings-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(138, 43, 226, 0.2);
  border-radius: var(--radius-sm);
  color: var(--color-purple-neon);
  font-size: 0.9em;
  flex-shrink: 0;
}

.quick-settings-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.quick-settings-title {
  font-size: 0.85em;
  color: var(--text-primary);
  font-weight: 500;
}

.quick-settings-desc {
  font-size: 0.75em;
  color: var(--text-muted);
}

.quick-settings-arrow {
  color: var(--text-secondary);
  font-weight: 700;
}

/* =========================
   WALLET SECTION (in Quick Settings)
========================= */

.wallet-card {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(255, 79, 216, 0.1));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-md);
}

.wallet-label {
  font-size: 0.8em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.wallet-amount {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.wallet-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.wallet-btn {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.8em;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-default);
}

.wallet-btn-primary {
  background: linear-gradient(135deg, var(--color-purple-neon), var(--color-pink-cosmic));
  color: white;
}

.wallet-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

.wallet-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.wallet-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* =========================
   RESPONSIVE DESIGN
========================= */

/* =========================
   MODAL STYLES
========================= */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--glow-secondary);
  max-width: 500px;
  width: 90%;
  position: relative;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2em;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-default);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.modal-content input[type="file"] {
  width: 100%;
  margin-bottom: var(--space-md);
  padding: var(--space-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

.image-preview {
  width: 100%;
  height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  border: 1px solid var(--border-subtle);
}

/* Avatar preview (modal) - larger and more visible */
.avatar-preview {
  width: 100%;
  height: 240px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  border: 1px solid rgba(255,255,255,0.08);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.modal-btn-primary,
.modal-btn-secondary {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-default);
  margin-right: var(--space-sm);
  margin-top: var(--space-sm);
}

.modal-btn-primary {
  background: linear-gradient(135deg, var(--color-purple-neon), var(--color-pink-cosmic));
  color: white;
}

.modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

.modal-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* =========================
   RESPONSIVE DESIGN
========================= */

@media (max-width: 1024px) {
  .account-wrapper {
    grid-template-columns: 1fr;
    padding: 60px var(--space-md) var(--space-md);
  }

  .settings-sidebar,
  .quick-settings {
    position: static;
    height: auto;
  }
}

@media (max-width: 768px) {
  .account-wrapper {
    padding: 40px var(--space-sm) var(--space-sm);
  }

  .profile-header {
    margin-top: -80px;
  }

  .profile-info {
    width: 100%;
    top: 65px;
    margin-bottom: 40px;
  }

  .settings-menu-label > span:last-child {
    display: none;
  }

  .profile-banner {
    height: 100px;
  }

  .wallet-buttons {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   Admin Panel — neue Komponenten-Styles
   Nutzt bestehende Utilities: .container-top, .split-layout,
   .split-sidebar, .split-main, .flex-col-fill, .grow, .scroll-y
   ========================================================== */

.admin-stats-card,
.admin-nav-card,
.admin-list-card {
    width: 100%;
}

/* --- Nav card (Start / Manage User) --- */

.admin-nav-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.admin-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    padding: var(--space-sm) var(--space-md);

    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
    background: var(--bg-glass);

    font-weight: var(--font-medium);
    color: var(--text-primary);

    transition: var(--transition-default);
}

.admin-nav-btn:hover {
    border-color: var(--border-hover);
    box-shadow: var(--glow-secondary);
}

/* Aktuelle Seite: ausgegraut, nicht klickbar */
.admin-nav-btn.is-active {
    pointer-events: none;
    opacity: .5;
    color: var(--text-muted);
}

/* --- Stats card --- */

.stat-value {
    font-weight: var(--font-bold);
}

/* --- List card: fixe Suchleiste, nur die Karten scrollen --- */

.admin-list-card h2 {
    flex-shrink: 0;
    text-align: left;
    margin-bottom: var(--space-sm);
}

.admin-search {
    flex-shrink: 0;
}

.admin-user-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);

    margin-top: var(--space-sm);
    padding-right: 4px; /* Platz für Scrollbar, damit Karten nicht springen */
}

/* Jede Nutzer-Karte bleibt gleich groß, egal wie lang Name/Mail/Rollen sind */
.user-card {
    flex-shrink: 0;
    min-height: 128px;
    box-sizing: border-box;
}

.user-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-sm);
}

.user-card-identity {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
    flex: 1;
}

.user-card-info {
    min-width: 0;
    flex: 1;
}

.user-card-info strong,
.user-card-roles {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card-roles {
    font-size: var(--font-sm);
}

.user-card-menu {
    position: relative;
    align-self: flex-start;
    flex-shrink: 0;
}

.user-email {
    margin-top: var(--space-xs);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card-actions {
    margin-top: var(--space-sm);
}

.user-card-actions-row {
    display: flex;
    gap: var(--space-xs);
    width: 100%;
}

.user-card-actions-row .btn3 {
    flex: 1;
}

.user-card-delete-btn {
    width: 100%;
    margin-top: 6px;
}

/* --- Profilbilder ca. 15-20% größer ---
   HINWEIS: Die ursprüngliche Größendefinition für .profile-img /
   .profile-fallback war in keiner der hochgeladenen CSS-Dateien
   enthalten (vermutlich in card.php oder einer weiteren Stylesheet-
   Datei). Die Werte unten sind eine sinnvolle Schätzung — bitte die
   px-Werte anpassen, falls sie nicht zur echten Basisgröße passen. */
.profile-img,
.profile-fallback {
    width: 52px;
    height: 52px;
    font-size: 16px;
    flex-shrink: 0;
}