/* =======================================================
   LanceLight – Zentrales Stylesheet
   ======================================================= */

/* --- Design Tokens --- */
:root {
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Hintergründe */
  --bg-dark:         #111;
  --bg-blue:         #1a1a2e;
  --bg-surface-blue: #16213e;
  --bg-surface-dark: #1a1a1a;
  --bg-input:        #222;
  --bg-input-blue:   #1a1a2e;

  /* Text */
  --text-base:   #e0e0e0;
  --text-white:  #fff;
  --text-muted:  #888;
  --text-dim:    #666;
  --text-label:  #aaa;

  /* Rahmen */
  --border-subtle: #2a2a2a;
  --border-input:  #333;

  /* Akzentfarbe */
  --accent:       #4fc3f7;
  --accent-hover: #29b6f6;

  /* Status */
  --error-bg:       rgba(239, 68, 68, 0.1);
  --error-border:   rgba(239, 68, 68, 0.3);
  --error-text:     #f87171;
  --success-bg:     rgba(74, 222, 128, 0.1);
  --success-border: rgba(74, 222, 128, 0.3);
  --success-text:   #86efac;

  /* Aktion-Farben */
  --clr-warning: #ffb74d;
  --clr-danger:  #e57373;
  --clr-green:   #81c784;
  --clr-purple:  #ce93d8;

  /* Radien */
  --r-sm: 4px;
  --r:    6px;
  --r-md: 8px;
  --r-lg: 12px;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Basis --- */
body {
  font-family: var(--font-ui);
  color: var(--text-base);
  min-height: 100vh;
}

/* Alpine.js: versteckte Elemente */
[x-cloak] { display: none !important; }

/* --- Hintergrund-Themes --- */
.bg-dark { background: var(--bg-dark); }
.bg-blue { background: var(--bg-blue); }

/* --- Layouts --- */
.layout-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.layout-page { padding: 1rem; }
.page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Karten --- */
.card {
  background: var(--bg-surface-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 2rem;
  width: 100%;
}
.card-admin {
  background: var(--bg-surface-blue);
  border-radius: var(--r-lg);
  padding: 2rem;
}

/* --- Admin-Header --- */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-surface-blue);
  border-radius: var(--r-md);
}
.admin-header h1 { font-size: 1.3rem; color: var(--text-white); }
.admin-header nav a {
  color: var(--accent);
  text-decoration: none;
  margin-left: 1rem;
  font-size: 0.9rem;
}
.admin-header nav a:hover { text-decoration: underline; }
.nav-logout-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.9rem;
  margin-left: 1rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.nav-logout-btn:hover { text-decoration: underline; }

/* --- Admin: Datenlisten (Alben, Benutzer, Zugänge) --- */
.data-list { display: grid; gap: 1rem; }

.data-card { background: var(--bg-surface-blue); border-radius: var(--r-md); padding: 1.2rem; }
.data-card h3 { color: var(--text-white); font-size: 1rem; margin-bottom: 0.25rem; }
.data-card .meta { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.75rem; }
.data-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

/* --- Admin: Action-Toolbar --- */
.actions { margin-bottom: 1.5rem; }

/* --- Admin: Share-Link --- */
.link-box {
  background: #0f3460;
  border-radius: var(--r-sm);
  padding: 0.5rem;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  word-break: break-all;
  cursor: pointer;
}

/* --- Admin: Scan Tokens (Details im Album-Template) --- */

/* --- Badge-System --- */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-admin   { background: rgba(206,147,216,.15); color: var(--clr-purple); border: 1px solid rgba(206,147,216,.3); }
.badge-guest   { background: rgba(79,195,247,.1);   color: var(--accent);     border: 1px solid rgba(79,195,247,.25); }
.badge-granted { background: rgba(74,222,128,.1);   color: var(--clr-green);  border: 1px solid rgba(74,222,128,.3); }
.badge-none    { background: rgba(255,255,255,.04); color: var(--text-dim);   border: 1px solid var(--border-subtle); }

/* --- Album-Zugangsliste (Admin: User-Detail) --- */
.access-list { display: grid; gap: 0.75rem; }
.access-row {
  background: var(--bg-surface-blue);
  border-radius: var(--r-md);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.access-row .item-title { color: var(--text-white); font-size: 0.95rem; }
.access-row .item-sub   { color: var(--text-dim);   font-size: 0.8rem;  margin-top: 0.1rem; }

/* --- Formulare --- */
.form-group { margin-bottom: 1rem; }

label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-label);
}

.input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--r);
  color: var(--text-white);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus  { border-color: var(--accent); }
.input-admin  { background: var(--bg-input-blue); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: var(--r);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, background 0.15s;
  line-height: 1;
  white-space: nowrap;
}
.btn:hover    { opacity: 0.88; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary       { background: var(--accent);      color: #000; }
.btn-primary:hover { background: var(--accent-hover); opacity: 1; }
.btn-secondary     { background: transparent; border: 1px solid #444; color: #bbb; }
.btn-danger        { background: var(--clr-danger);  color: #000; }
.btn-warning       { background: var(--clr-warning); color: #000; }
.btn-success       { background: var(--clr-green);   color: #000; }
.btn-purple        { background: var(--clr-purple);  color: #000; }

.btn-block  { display: flex; width: 100%; }
.btn-sm     { font-size: 0.8rem; padding: 0.4rem 0.8rem; }

.btn-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.btn-row--mt { margin-top: 0.5rem; }

/* --- Meldungen --- */
.msg {
  padding: 0.7rem 1rem;
  border-radius: var(--r);
  font-size: 0.88rem;
  border: 1px solid transparent;
  margin-bottom: 1rem;
}
.msg-error   { background: var(--error-bg);   border-color: var(--error-border);   color: var(--error-text);   }
.msg-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success-text); }
.msg-info    {
  background: #0d2a4a;
  border-left: 3px solid var(--accent);
  color: #90caf9;
  border-radius: 0 var(--r) var(--r) 0;
}

/* --- Seitentitel --- */
.page-title { font-size: 1.3rem; color: var(--text-white); margin-bottom: 1.5rem; }
.page-subtitle { font-size: 0.8rem; color: var(--text-dim); font-weight: 400; margin-left: 0.5rem; }

/* --- Leerer Zustand --- */
.empty {
  color: var(--text-dim);
  text-align: center;
  padding: 3rem;
  font-size: 0.95rem;
}

/* --- Hilfs-Klassen --- */
.text-muted   { color: var(--text-muted); }
.text-white   { color: var(--text-white); }
.text-accent  { color: var(--accent); }
.text-warning { color: var(--clr-warning); }
.hint         { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.hint-warning { font-size: 0.85rem; color: var(--clr-warning); margin-bottom: 1.5rem; }
.card-meta    { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; }

.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 1.5rem; }
.mb-md { margin-bottom: 1.5rem; }

.back-link        { color: var(--text-muted); text-decoration: none; }
.back-link:hover  { text-decoration: underline; }
.back-link-block  { display: inline-block; margin-bottom: 1.5rem; }

/* Inline-Form (verhindert Zeilenumbruch in btn-row) */
.form-inline { display: inline; }

/* --- User-Bereich: Header --- */
.user-header {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}
.user-header h1      { font-size: 1.1rem; color: var(--text-white); }
.user-header .meta   { font-size: 0.85rem; color: var(--text-dim); }
.user-header .meta a,
.user-header > a     { color: var(--accent); text-decoration: none; margin-left: 1rem; font-size: 0.9rem; }

/* --- User-Bereich: Konto-Seite --- */
.user-container { max-width: 420px; margin: 2.5rem auto; padding: 0 1.5rem; }
.section-label  { font-size: 1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1.5rem; }
.user-info           { margin-bottom: 2rem; }
.user-info span      { font-size: 0.85rem; color: var(--text-dim); }
.user-info strong    { color: #ccc; font-size: 1rem; display: block; margin-top: 0.2rem; }

/* --- User-Bereich: Album-Kacheln --- */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.album-link-card {
  background: var(--bg-surface-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
  display: block;
}
.album-link-card:hover          { border-color: var(--accent); }
.album-link-card .title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-white);
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-link-card .slug { font-size: 0.8rem; color: var(--text-dim); }

/* --- Zugangsseite (Album-Link) --- */
.choice-title    { font-size: 1.4rem; font-weight: 600; color: var(--text-white); margin-bottom: 0.25rem; }
.choice-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.benefits        { background: var(--bg-surface-dark); border-radius: var(--r-md); padding: 1.25rem; margin-bottom: 2rem; }
.benefits h3     { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.75rem; }
.benefits ul     { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.benefits li     { font-size: 0.9rem; color: #ccc; padding-left: 1.4rem; position: relative; }
.benefits li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-size: 0.85rem; }
.choice-actions  { display: flex; flex-direction: column; gap: 0.75rem; }
.divider         { text-align: center; color: var(--text-dim); font-size: 0.8rem; margin: 0.25rem 0; }
.login-hint      { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-dim); }
.login-hint a    { color: var(--accent); text-decoration: none; }

/* --- Galerie: Aufbereitungshinweis --- */
.gallery-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
}
.gallery-pending-icon  { font-size: 3rem; margin-bottom: 1rem; }
.gallery-pending-title { font-size: 1.15rem; color: var(--text-white); font-weight: 500; margin-bottom: 0.4rem; }
.gallery-pending-sub     { font-size: 0.9rem; color: var(--text-muted); max-width: 360px; }
.gallery-pending-refresh {
    margin-top: 1.2rem;
    padding: 0.45rem 1.1rem;
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color .2s, color .2s;
}
.gallery-pending-refresh:hover { border-color: var(--text-white); color: var(--text-white); }

/* Banner für laufenden Scan wenn bereits Bilder sichtbar sind */
.gallery-scan-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0.75rem 0 0.5rem;
}
.gallery-scan-banner button {
    margin-left: auto;
    padding: 0.25rem 0.75rem;
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: border-color .2s, color .2s;
    white-space: nowrap;
}
.gallery-scan-banner button:hover { border-color: var(--text-white); color: var(--text-white); }

/* --- Galerie: Header & Grid --- */
.gallery-header { padding: 1.5rem; display: flex; align-items: center; justify-content: space-between; position: relative; }
.gallery-header h1 { font-size: 1.3rem; color: var(--text-white); }
.gallery-header .center-actions { position: absolute; left: 50%; transform: translateX(-50%); }
.gallery-header .center-actions a { color: var(--accent); text-decoration: none; font-size: 0.9rem; }
.header-right { display: flex; align-items: center; gap: 0.75rem; }

.btn-login {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid #2a4a5a;
  border-radius: var(--r);
  transition: background 0.15s;
}
.btn-login:hover { background: rgba(79,195,247,0.08); }

.user-menu { position: relative; }
.user-btn  {
  background: none;
  border: none;
  color: var(--text-base);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.15s;
}
.user-btn:hover          { background: var(--bg-surface-dark); }
.user-btn .chevron       { font-size: 0.65rem; color: var(--text-dim); transition: transform 0.15s; }
.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg-surface-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  min-width: 160px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 200;
}
.dropdown a        { display: block; padding: 0.65rem 1rem; color: var(--text-base); text-decoration: none; font-size: 0.875rem; transition: background 0.1s; }
.dropdown a:hover  { background: var(--border-subtle); color: var(--text-white); }
.dropdown-link-btn {
  background: none;
  border: none;
  color: var(--text-base);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.65rem 1rem;
  width: 100%;
  text-align: left;
  display: block;
  transition: background 0.1s;
}
.dropdown-link-btn:hover { background: var(--border-subtle); color: var(--text-white); }
.dropdown hr       { border: none; border-top: 1px solid var(--border-subtle); margin: 0; }

/* --- Galerie: Foto-Grid --- */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 4px; }
@media (min-width: 768px)  { .photo-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .photo-grid { grid-template-columns: repeat(6, 1fr); } }
.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: opacity 0.2s;
}
.photo-grid img:hover { opacity: 0.8; }
/* Platzhalter solange src noch nicht gesetzt (Lazy Loading) */
.photo-grid img.thumb-lazy {
  background: var(--bg-surface-dark);
  cursor: default;
}

/* --- Galerie: Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.lightbox.cursor-prev     { cursor: default; }
.lightbox.cursor-next     { cursor: default; }
.lightbox.cursor-grab     { cursor: grab; }
.lightbox.cursor-grabbing { cursor: grabbing; }

/* Nav-Pfeile im Hover-Bereich */
.lightbox .nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: rgba(255,255,255,0.7);
  pointer-events: none;
  z-index: 1005;
  opacity: 0;
  transition: opacity 0.2s;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  user-select: none;
}
.lightbox .nav-arrow-prev { left: 1.5rem; }
.lightbox .nav-arrow-next { right: 1.5rem; }
.lightbox.cursor-prev .nav-arrow-prev,
.lightbox.cursor-next .nav-arrow-next {
  opacity: 1;
}
.lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  touch-action: none;
  transition: transform 0.15s ease;
  position: relative;
  z-index: 1002;
  pointer-events: none;
  -webkit-user-drag: none;
}
.lightbox .close {
  position: absolute; top: 1rem; right: 1.5rem;
  color: var(--text-white); font-size: 2rem; cursor: pointer;
  z-index: 1010; line-height: 1; background: none; border: none;
}
.lightbox .download {
  position: absolute; bottom: 1.5rem; right: 1.5rem;
  color: var(--accent); text-decoration: none; font-size: 0.9rem;
  background: rgba(0,0,0,0.7); padding: 0.5rem 1rem;
  border-radius: var(--r-sm); z-index: 1010; cursor: pointer;
}
.lightbox .counter {
  position: absolute; bottom: 1.5rem; left: 1.5rem;
  color: var(--text-muted); font-size: 0.85rem;
  z-index: 1010; pointer-events: none;
}
.lightbox .fullscreen-btn {
  position: absolute; top: 1rem; right: 4rem;
  color: var(--text-white); font-size: 1.4rem; cursor: pointer;
  z-index: 1010; background: none; border: none;
  padding: 0.2rem 0.4rem; line-height: 1; opacity: 0.8;
}
.lightbox .fullscreen-btn:hover { opacity: 1; }
.lightbox-spinner {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: var(--text-white); font-size: 2rem;
  animation: spin 1s linear infinite; pointer-events: none; z-index: 1003;
}

@keyframes spin {
  from { transform: translate(-50%,-50%) rotate(0deg); }
  to   { transform: translate(-50%,-50%) rotate(360deg); }
}

/* --- Login-Formular --- */
.login-form {
  width: 100%;
  max-width: 320px;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* --- Register: Kontext & Zurück --- */
.context        { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 1.75rem; }
.context strong { color: #ccc; }
.back           { text-align: center; margin-top: 1.25rem; font-size: 0.85rem; color: var(--text-dim); }
.back a         { color: var(--accent); text-decoration: none; }

/* --- Setup --- */
.subtitle       { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }
.step           { margin-bottom: 1.5rem; padding: 1rem; background: #0f3460; border-radius: var(--r-md); }
.step.completed { opacity: 0.6; }
.step h3        { margin-bottom: 0.5rem; color: var(--accent); }
.step.completed h3::after { content: ' ✓'; color: #4caf50; }
.info-box       { background: #0d47a1; color: #90caf9; padding: 0.75rem; border-radius: var(--r); margin-top: 0.75rem; font-size: 0.85rem; }
.logo           { font-size: 2rem; margin-bottom: 0.4rem; }
.hint code      { background: #0a1e35; padding: 0.1em 0.4em; border-radius: var(--r-sm); font-family: monospace; }
.text-success   { color: #4caf50; }
.text-dim       { color: var(--text-dim); }
.card-narrow    { max-width: 420px; width: 90%; }
.card-medium    { max-width: 500px; width: 90%; }
.card-sm        { max-width: 400px; width: 90%; }
.card-md        { max-width: 480px; }

/* --- Admin: Album-Link mit Clipboard-Icon --- */
.album-link-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #0f2744;
  border: 1px solid #1e3a5f;
  border-radius: var(--r-sm);
  padding: 0.22rem 0.5rem;
  max-width: 340px;
}
.album-link-text {
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.copy-btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  padding: 0.1rem;
  transition: color 0.15s;
}
.copy-btn:hover     { color: var(--accent); }
.copy-btn--ok       { color: var(--clr-green) !important; }
.link-unstyled  { text-decoration: none; color: inherit; }

/* --- Setup: Hinweis-Text --- */
.form-hint { font-size: 0.8rem; color: #79c0ff; margin-top: 0.25rem; }

/* --- Admin: Scan Shrink-Button --- */

/* --- Admin: Benutzertabelle --- */
.users-table-wrap {
  overflow-x: auto;
}
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.users-table thead th {
  text-align: left;
  padding: 0.55rem 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-surface-blue);
  border-bottom: 1px solid #1e3a5f;
}
.users-table thead th:first-child { border-radius: var(--r-sm) 0 0 0; }
.users-table thead th:last-child  { border-radius: 0 var(--r-sm) 0 0; }
.users-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.1s;
}
.users-table tbody tr:hover { background: rgba(79,195,247,0.04); }
.users-table tbody td {
  padding: 0.68rem 0.9rem;   /* +3 px ≈ 0.19 rem mehr als vorher */
  vertical-align: middle;
  color: var(--text-base);
}
.users-table-name  { color: var(--text-white); font-weight: 500; }
.users-table-id    { color: var(--text-dim); font-size: 0.8rem; width: 2.5rem; text-align: right; }
.users-table-date  { color: var(--text-dim);   white-space: nowrap; }
.users-table-actions { text-align: right; white-space: nowrap; }

/* Role-Badge: Klick-Indikator */
.role-badge-btn { cursor: pointer; user-select: none; }
.role-badge-btn:hover { opacity: 0.8; }

/* Rolle: Select-Box */
.role-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--bg-surface-blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%234fc3f7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  border: 1px solid #2a4a5a;
  border-radius: var(--r);
  color: var(--text-base);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.28rem 1.7rem 0.28rem 0.65rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s, background-color 0.15s;
  min-width: 72px;
}
.role-select:hover  { border-color: var(--accent); background-color: #1e2f4a; }
.role-select:focus  { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(79,195,247,0.15); }

/* Zugänge: Zähler-Badge */
.access-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  border-radius: 20px;
  font-size: 0.7rem;
  padding: 0 0.35rem;
  min-width: 1.2rem;
  line-height: 1.4;
}

/* --- Globale Layer-Popups (Album-Tooltip) --- */
.layer-popup {
  position: absolute;
  z-index: 9000;
  background: var(--bg-surface-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  box-shadow: 0 10px 28px rgba(0,0,0,0.6);
  padding: 0.4rem;
  min-width: 90px;
}
.layer-popup[hidden] { display: none; }

/* Album-Tooltip Variante */
.layer-tooltip {
  padding: 0.5rem 0.75rem;
  min-width: 160px;
  max-width: 280px;
}
.layer-tooltip-item {
  font-size: 0.8rem;
  color: var(--text-base);
  padding: 0.18rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.layer-tooltip-item + .layer-tooltip-item {
  border-top: 1px solid rgba(255,255,255,0.05);
}

