/* ==========================================================================
   Admin-Widget – schwebendes Panel unten rechts auf RP-Generatoren-Seiten.
   Nur sichtbar, wenn ein Admin eingeloggt ist.
   ========================================================================== */

#admin-widget {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

#admin-widget * { box-sizing: border-box; }

/* Trigger-Button (rund, geschlossen) */
.aw-trigger {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #b8b8b8);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #111;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.55),
        0 0 0 0 rgba(255, 255, 255, 0.5);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    position: relative;
    outline: none;
}
.aw-trigger:hover {
    transform: scale(1.06);
    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(255, 255, 255, 0.55);
}

.aw-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e07070;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0a0a0a;
    animation: aw-pulse 2s ease-in-out infinite;
}
@keyframes aw-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}

/* Panel (offen) */
.aw-panel {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: 300px;
    max-width: calc(100vw - 32px);
    background: rgba(20, 20, 20, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    overflow: hidden;
    animation: aw-slide-in 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes aw-slide-in {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.aw-panel[hidden] { display: none; }

.aw-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
}
.aw-head__icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #b8b8b8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.45);
}
.aw-head__info { flex: 1; min-width: 0; }
.aw-head__title {
    color: #f2f2f2;
    font-weight: 700;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.aw-head__sub {
    color: #9a9a9a;
    font-size: 0.75rem;
}

.aw-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.aw-stat {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 10px 12px;
}
.aw-stat__num {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #dcdcdc;
    line-height: 1.1;
}
.aw-stat__label {
    display: block;
    font-size: 0.68rem;
    color: #9a9a9a;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 2px;
}

.aw-pending {
    max-height: 220px;
    overflow-y: auto;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.aw-pending__title {
    font-size: 0.7rem;
    color: #9a9a9a;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 8px;
    font-weight: 700;
}
.aw-pending__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    margin-bottom: 6px;
}
.aw-pending__item:last-child { margin-bottom: 0; }
.aw-pending__name {
    color: #f2f2f2;
    font-size: 0.82rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.aw-pending__actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.aw-mini-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: #f2f2f2;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.aw-mini-btn:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.5); }
.aw-mini-btn--ok:hover  { background: rgba(80, 200, 120, 0.2); border-color: rgba(80, 200, 120, 0.5); color: #b8f5cf; }
.aw-mini-btn--no:hover  { background: rgba(220, 60, 60, 0.2); border-color: rgba(220, 60, 60, 0.5); color: #ffc2c2; }

.aw-empty {
    color: #9a9a9a;
    font-size: 0.82rem;
    text-align: center;
    padding: 8px;
    font-style: italic;
}

.aw-actions {
    padding: 10px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.aw-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.3);
    color: #f2f2f2;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
}
.aw-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.45);
    color: #dcdcdc;
}
.aw-btn i { color: #ffffff; font-size: 0.95rem; }
.aw-btn--primary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 180, 100, 0.14));
    border-color: rgba(255, 255, 255, 0.4);
}
.aw-btn--primary:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 180, 100, 0.22));
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
}
.aw-btn--danger { border-color: rgba(220, 60, 60, 0.3); color: #ffc2c2; }
.aw-btn--danger:hover { background: rgba(220, 60, 60, 0.15); border-color: rgba(220, 60, 60, 0.5); }
.aw-btn--danger i { color: #e07070; }

/* Mobile */
@media (max-width: 520px) {
    #admin-widget { right: 12px; bottom: 12px; }
    .aw-trigger { width: 50px; height: 50px; font-size: 19px; }
    .aw-panel { width: calc(100vw - 24px); bottom: 62px; }
}

.aw-pending__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.aw-pending__path {
    color: #9a9a9a;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
}