/* ── Login-Seite – responsive, Mobile-first ── */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
        max(1rem, env(safe-area-inset-top))
        max(1rem, env(safe-area-inset-right))
        max(1rem, env(safe-area-inset-bottom))
        max(1rem, env(safe-area-inset-left));
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;

    background-color: #0b0e14;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: clamp(18px, 4vw, 22px) clamp(18px, 4vw, 22px);
}

.login-page::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: min(520px, 110vw);
    height: min(420px, 70vh);
    background: radial-gradient(ellipse, rgba(120, 40, 60, 0.18) 0%, rgba(80, 30, 90, 0.08) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    margin: auto;
    background: #1a1f26;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: clamp(10px, 2.5vw, 12px);
    padding:
        clamp(1.5rem, 5vw, 2.5rem)
        clamp(1.25rem, 4vw, 2.25rem)
        clamp(1.25rem, 4vw, 2rem);
    text-align: center;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.login-logo {
    width: clamp(96px, 32vw, 148px);
    height: clamp(96px, 32vw, 148px);
    margin: 0 auto clamp(1rem, 3vw, 1.5rem);
    flex-shrink: 0;
}

.login-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    border-radius: 50%;
}

.login-title {
    color: #ffffff;
    font-size: clamp(1.25rem, 4.5vw, 1.625rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 clamp(0.625rem, 2vw, 0.875rem);
    line-height: 1.3;
    word-wrap: break-word;
}

.login-desc {
    color: #9ca3af;
    font-size: clamp(0.8125rem, 2.8vw, 0.875rem);
    line-height: 1.65;
    margin: 0 0 clamp(1.25rem, 4vw, 1.75rem);
    padding: 0 clamp(0, 2vw, 0.25rem);
    max-width: 34ch;
    margin-left: auto;
    margin-right: auto;
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    font-size: clamp(0.75rem, 2.5vw, 0.8125rem);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    text-align: left;
    word-break: break-word;
}

.discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1.25rem;
    background-color: #5865F2;
    color: #ffffff;
    font-size: clamp(0.9375rem, 3vw, 1rem);
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.discord-btn:hover,
.discord-btn:focus-visible {
    background-color: #4752c4;
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.35);
    outline: none;
}

.discord-btn:active {
    transform: scale(0.98);
}

.discord-btn svg {
    width: clamp(1.25rem, 4vw, 1.375rem);
    height: clamp(1.25rem, 4vw, 1.375rem);
    flex-shrink: 0;
}

.login-disclaimer {
    color: #6b7280;
    font-size: clamp(0.6875rem, 2.5vw, 0.75rem);
    margin: clamp(1.25rem, 4vw, 1.75rem) 0 0;
    line-height: 1.5;
    padding: 0 0.5rem;
}

.login-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: #6b7280;
    font-size: clamp(0.75rem, 2.5vw, 0.8125rem);
    margin-top: clamp(0.875rem, 3vw, 1.25rem);
    padding: 0.5rem;
    min-height: 44px;
    text-decoration: none;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.login-back:hover,
.login-back:focus-visible {
    color: #d1d5db;
    outline: none;
}

/* Sehr kleine Displays (iPhone SE etc.) */
@media (max-width: 360px) {
    .login-page {
        padding: 0.75rem;
        align-items: flex-start;
        padding-top: max(1.5rem, env(safe-area-inset-top));
    }

    .login-card {
        margin-top: 0.5rem;
    }

    .login-desc br {
        display: none;
    }

    .login-desc {
        max-width: none;
    }
}

/* Kurze Viewports (Landscape Mobile) */
@media (max-height: 520px) and (orientation: landscape) {
    .login-page {
        align-items: flex-start;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .login-logo {
        width: clamp(64px, 18vh, 96px);
        height: clamp(64px, 18vh, 96px);
        margin-bottom: 0.75rem;
    }

    .login-title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .login-desc {
        margin-bottom: 1rem;
        font-size: 0.8125rem;
    }

    .login-disclaimer {
        margin-top: 1rem;
    }
}

/* Tablet+ */
@media (min-width: 768px) {
    .login-card {
        padding: 2.5rem 2.25rem 2rem;
    }

    .login-logo {
        width: 140px;
        height: 140px;
    }
}

/* ── App allgemein ── */

.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-flex;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
}

body.app-bg {
    background-color: #070b14;
    color: #e5e7eb;
}

/* ── Internes Panel (LSPD-Style) ── */

.panel-app {
    display: flex;
    min-height: 100vh;
    background: #070b14;
}

.panel-nav-toggle {
    position: fixed;
    opacity: 0;
    pointer-events: none;
}

.panel-sidebar-backdrop {
    display: none;
}

.panel-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    flex-shrink: 0;
}

.panel-menu-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #e5e7eb;
}

.panel-sidebar {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #0a0f1a;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1rem 0.75rem;
}

.panel-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.25rem 0.5rem 1rem;
}

.panel-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.panel-brand-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.panel-brand-sub {
    font-size: 0.625rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.panel-sidebar-search {
    position: relative;
    margin-bottom: 1rem;
    padding: 0 0.25rem;
}

.panel-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: #6b7280;
    pointer-events: none;
}

.panel-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.panel-nav {
    flex: 1;
    overflow-y: auto;
}

.panel-nav-group {
    margin-bottom: 1rem;
}

.panel-nav-label {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #4b5563;
    padding: 0.25rem 0.75rem 0.5rem;
}

.panel-nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    margin: 0.125rem 0.25rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #9ca3af;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.panel-nav-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

.panel-nav-link:hover:not(.is-disabled) {
    background: rgba(255, 255, 255, 0.04);
    color: #e5e7eb;
}

.panel-nav-link.is-active {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border-left-color: #3b82f6;
}

.panel-nav-link.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.panel-sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.75rem;
    margin-top: auto;
}

.panel-dark-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.panel-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    margin-top: 0.25rem;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #9ca3af;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.panel-logout-btn svg {
    width: 16px;
    height: 16px;
}

.panel-logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.panel-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background:
        radial-gradient(ellipse 600px 400px at 100% 0%, rgba(59, 130, 246, 0.06), transparent),
        radial-gradient(ellipse 500px 350px at 0% 100%, rgba(239, 68, 68, 0.04), transparent),
        #070b14;
}

.panel-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 15, 26, 0.6);
    backdrop-filter: blur(8px);
}

.panel-topbar-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.panel-topbar-search svg {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.panel-topbar-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    font-size: 0.8125rem;
    color: #9ca3af;
}

.panel-user-chip {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.panel-user-meta {
    display: flex;
    flex-direction: column;
}

.panel-user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #f3f4f6;
}

.panel-user-role {
    font-size: 0.6875rem;
    color: #6b7280;
}

.panel-content {
    flex: 1;
    padding: 1.5rem;
    overflow-x: auto;
}

/* ── Admin-Seite ── */

.admin-page {
    max-width: 1200px;
}

.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.admin-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.02em;
}

.admin-subtitle {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0.25rem 0 0;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-btn-ghost {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: color 0.15s;
}

.admin-btn-ghost:hover {
    color: #e5e7eb;
}

.admin-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.admin-btn-primary svg {
    width: 16px;
    height: 16px;
}

.admin-btn-primary:hover {
    background: #1d4ed8;
}

.admin-sync-indicator {
    font-size: 0.8125rem;
    color: #60a5fa;
    margin-bottom: 0.75rem;
}

.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.25rem;
}

.admin-tab {
    background: none;
    border: none;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s;
}

.admin-tab.is-active {
    color: #60a5fa;
    border-bottom-color: #3b82f6;
}

.admin-tab:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.admin-role-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.admin-role-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.875rem 1rem;
}

.admin-role-card-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}

.admin-role-card-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #f3f4f6;
    line-height: 1.2;
}

.admin-role-card-count {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-top: 0.125rem;
}

.admin-role-card-empty {
    grid-column: 1 / -1;
    justify-content: center;
    color: #6b7280;
    font-size: 0.8125rem;
}

.admin-matrix-wrap {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.admin-matrix-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-matrix-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.admin-matrix-hint {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #4b5563;
}

.admin-matrix-scroll {
    overflow-x: auto;
}

.admin-matrix {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.admin-matrix thead th {
    padding: 0.75rem 1rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #9ca3af;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: bottom;
}

.admin-matrix-perm-col {
    text-align: left !important;
    min-width: 200px;
}

.admin-matrix-role-col {
    min-width: 100px;
}

.admin-matrix-role-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.375rem;
    vertical-align: middle;
}

.admin-matrix-role-name {
    font-size: 0.6875rem;
    vertical-align: middle;
}

.admin-matrix-group-row td {
    padding: 0.625rem 1rem 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.04);
}

.admin-matrix-perm-label {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: #d1d5db;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-matrix-cell {
    text-align: center;
    padding: 0.375rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-matrix-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    background: transparent;
}

.admin-matrix-toggle.is-on {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.admin-matrix-toggle.is-on svg {
    width: 18px;
    height: 18px;
}

.admin-matrix-toggle.is-off {
    color: #374151;
}

.admin-matrix-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.admin-matrix-toggle:active {
    transform: scale(0.92);
}

.admin-matrix-dash {
    font-size: 1.125rem;
    line-height: 1;
    color: #374151;
}

.admin-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #86efac;
    font-size: 0.8125rem;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.admin-loading {
    display: flex;
    justify-content: center;
    padding: 3rem;
}

.admin-stats-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.admin-stat-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.admin-stat-chip-active {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.06);
}

.admin-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.admin-stat-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
}

.admin-section {
    margin-bottom: 1.5rem;
}

.admin-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    width: 100%;
}

.admin-section-desc {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0;
    flex: 1;
}

.admin-section-hint {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: 0.8125rem;
    color: #93c5fd;
}

.admin-btn-sm {
    padding: 0.4375rem 0.875rem;
    font-size: 0.75rem;
}

.admin-btn-sm svg {
    width: 14px;
    height: 14px;
}

.admin-btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
}

.admin-role-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-role-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    transition: border-color 0.15s, background 0.15s;
}

.admin-role-row.is-active {
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.04);
}

.admin-role-row.is-inactive {
    opacity: 0.65;
}

.admin-role-row-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.admin-role-row-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f3f4f6;
}

.admin-role-row-meta {
    font-size: 0.6875rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

.admin-role-row-meta code {
    font-size: 0.625rem;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.admin-badge-warn {
    color: #fbbf24;
    font-weight: 600;
}

.admin-field-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 0.375rem;
}

.admin-select-wrap {
    position: relative;
    display: inline-block;
    min-width: 10.5rem;
}

.admin-select-wrap::after {
    content: "";
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #9ca3af;
    pointer-events: none;
}

.admin-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    min-width: 10.5rem;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #f3f4f6;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    cursor: pointer;
    color-scheme: dark;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.admin-select:hover {
    border-color: rgba(59, 130, 246, 0.45);
    background: #151c2c;
}

.admin-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: #151c2c;
}

.admin-select option {
    background: #111827;
    color: #f3f4f6;
    padding: 0.5rem;
}

.admin-access-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 0.25rem;
    cursor: pointer;
    min-width: 5.5rem;
    transition: background 0.15s, border-color 0.15s;
}

.admin-access-toggle.is-on {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
}

.admin-access-knob {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: #6b7280;
    transition: transform 0.15s, background 0.15s;
    flex-shrink: 0;
}

.admin-access-toggle.is-on .admin-access-knob {
    background: #22c55e;
    transform: translateX(0);
    margin-left: auto;
    order: 2;
}

.admin-access-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #9ca3af;
    padding: 0 0.375rem;
}

.admin-access-toggle.is-on .admin-access-label {
    color: #86efac;
    order: 1;
}

.admin-role-row-empty {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-size: 0.875rem;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

@media (max-width: 900px) {
    .admin-role-row {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto auto;
    }

    .admin-role-row-level,
    .admin-role-row-access,
    .admin-role-row-preset {
        grid-column: 2;
    }
}

@media (max-width: 900px) {
    .panel-menu-btn {
        display: flex;
    }

    .panel-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 40;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
    }

    .panel-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    }

    .panel-nav-toggle:checked ~ .panel-app .panel-sidebar {
        transform: translateX(0);
    }

    .panel-nav-toggle:checked ~ .panel-app .panel-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .panel-content {
        padding: 1rem;
    }

    .admin-header {
        flex-direction: column;
    }
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    object-fit: cover;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}
