/* ══════════════════════════════════════════════════════════════════
   ADMIN DASHBOARD — cinematic redesign, matching the site's premium
   angular/neon/glass language (Rules, Donors, Team sections). Every
   class name and functional state (active/hover/pending/accepted/
   rejected/ok/bad/warn/info) is unchanged — only the visual treatment
   (shapes, borders, glows, backgrounds) was reskinned.
   ══════════════════════════════════════════════════════════════════ */

@property --admin-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

.crp-admin-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 0%, rgba(239, 68, 68, 0.1), transparent 70%),
        linear-gradient(160deg, #050303 0%, #0a0404 45%, #050303 100%);
    z-index: 99999;
    display: none;
    overflow: hidden;
    padding: 0;
    font-family: inherit;
}

.crp-admin-overlay.open {
    display: block;
}

/* Lightweight drifting embers across the whole dashboard background. */
.crp-admin-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
    background-image:
        radial-gradient(1.5px 1.5px at 10% 15%, rgba(239, 68, 68, 0.5), transparent 60%),
        radial-gradient(1.5px 1.5px at 85% 25%, rgba(255, 255, 255, 0.18), transparent 60%),
        radial-gradient(1.5px 1.5px at 30% 70%, rgba(239, 68, 68, 0.4), transparent 60%),
        radial-gradient(1.5px 1.5px at 70% 85%, rgba(255, 255, 255, 0.15), transparent 60%),
        radial-gradient(1.5px 1.5px at 92% 60%, rgba(239, 68, 68, 0.35), transparent 60%);
    animation: crpEmbersDrift 16s ease-in-out infinite alternate;
}

@keyframes crpEmbersDrift {
    0% { transform: translate3d(0, 0, 0); opacity: 0.22; }
    50% { opacity: 0.4; }
    100% { transform: translate3d(-10px, 8px, 0); opacity: 0.22; }
}

@media (prefers-reduced-motion: reduce) {
    .crp-admin-overlay::before {
        animation: none !important;
    }
}

.crp-admin-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    color: #e5e7eb;
    box-shadow: none;
    display: flex;
    flex-direction: row-reverse;
    align-items: stretch;
}

/* ── SIDEBAR (now right-side nav) ── */
.crp-admin-sidebar {
    position: relative;
    width: 264px;
    flex-shrink: 0;
    background: rgba(8, 5, 6, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-right: none;
    border-left: 1px solid rgba(239, 68, 68, 0.16);
    border-bottom: none;
    box-shadow: -1px 0 24px rgba(239, 68, 68, 0.06);
    padding: 18px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

/* ── Brand card — angular clipped corners, dotted texture, neon border ── */
/* Brand bar (logo + "Admin Dashboard" pill) — removed per request. */
.crp-admin-brand {
    display: none;
}

/* Dotted texture overlay */
.crp-admin-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 14px 14px;
    pointer-events: none;
}

.crp-admin-brand-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.crp-admin-brand-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
    background: rgba(12, 9, 9, 0.55);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.crp-admin-brand-icon svg {
    width: 16px;
    height: 16px;
}

.crp-admin-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}

/* Pill-shaped status chip with a pulsing green dot */
.crp-admin-subtitle {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-self: center;
    align-items: center;
    gap: 6px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #A3A3A3;
    background: rgba(12, 9, 9, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.crp-admin-subtitle .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    flex-shrink: 0;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ── Grouped nav cards — each group (Overview / Applications /
   Management) is its own angular glass card, not one continuous list. ── */
.crp-admin-tabs-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-bottom: none;
    margin-bottom: 0;
    flex-wrap: nowrap;
}

.crp-nav-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    background: rgba(255, 255, 255, 0.028);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 12px;
}

.crp-sidebar-group-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #525252;
    padding: 2px 6px 10px;
}

.crp-admin-tabs-main .crp-admin-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    white-space: nowrap;
    text-align: left;
    padding: 7px 8px;
    border-radius: 8px;
    border-bottom: none;
    gap: 10px;
    color: #A3A3A3;
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.crp-admin-tabs-main .crp-admin-tab .badge {
    margin-left: auto;
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    color: #A3A3A3;
}

/* Icon tile — angular, 26x26. The active state turns this into a solid
   red gradient with glow, not a border or side indicator. */
.crp-tab-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%, 0 6px);
    background: rgba(255, 255, 255, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}

.crp-tab-icon svg {
    width: 15px;
    height: 15px;
}

.crp-admin-tabs-main .crp-admin-tab.active {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.28);
    color: #fff;
}

.crp-admin-tabs-main .crp-admin-tab.active .crp-tab-icon {
    background: linear-gradient(135deg, #EF4444, #B91C1C);
    color: #fff;
    box-shadow: 0 4px 14px -3px rgba(239, 68, 68, 0.65);
}

.crp-admin-tabs-main .crp-admin-tab.active .badge {
    background: rgba(239, 68, 68, 0.22);
    color: #FCA5A5;
}

.crp-admin-tabs-main .crp-admin-tab:hover:not(.active) {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.16);
    color: #e2e8f0;
}

.crp-admin-tabs-main .crp-admin-tab:hover:not(.active) .crp-tab-icon {
    color: #f87171;
}

.crp-tab-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sidebar items for features that are staged but not built yet.
   Visible (so the full structure reads as complete + professional)
   but inert: no click handler, no hover affordance, dimmed. */
.crp-admin-tabs-main .crp-admin-tab.crp-soon {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.crp-soon-pill {
    display: inline-block;
    flex-shrink: 0;
    background: rgba(148, 163, 184, 0.14);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── MAIN CONTENT ── */
.crp-admin-main {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 26px 34px 60px;
}

.crp-admin-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
}

.crp-admin-head-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.crp-admin-head-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.15);
    color: #F87171;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crp-admin-head-icon.amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.1));
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

.crp-admin-head-icon svg {
    width: 20px;
    height: 20px;
}

.crp-admin-headsub {
    font-size: 12.5px;
    color: #64748b;
    margin-top: 3px;
    font-weight: 500;
}

.crp-admin-headline {
    font-family: 'Rajdhani', sans-serif;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
}

.crp-admin-close {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
    color: #fca5a5;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.15s, border-color 0.15s;
}

.crp-admin-close:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.6);
}

.crp-admin-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid rgba(239, 68, 68, 0.18);
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.crp-admin-tab {
    background: transparent;
    border: none;
    padding: 10px 16px;
    color: #94a3b8;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}

.crp-admin-tab.active {
    color: #F87171;
    border-bottom-color: #EF4444;
    text-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.crp-admin-tab:hover {
    color: #cbd5e1;
}

.crp-admin-tab .badge {
    display: inline-block;
    margin-left: 6px;
    background: rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.crp-admin-subtabs {
    display: flex;
    gap: 4px;
    border-bottom: none;
    margin-bottom: 18px;
    margin-top: -6px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(239, 68, 68, 0.14);
    padding: 6px;
    border-radius: 999px;
    width: fit-content;
}

.crp-admin-subtab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 1px solid transparent;
    padding: 6px 14px;
    border-radius: 999px;
    color: #737373;
    cursor: pointer;
    font-weight: 700;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: all 0.15s;
}

.crp-admin-subtab::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.crp-admin-subtab:hover:not(.active) {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
}

.crp-admin-subtab.active {
    color: #fff;
    background: linear-gradient(135deg, #EF4444, #B91C1C);
    border-color: transparent;
    box-shadow: 0 10px 22px -6px rgba(239, 68, 68, 0.7);
}

.crp-admin-subtab.active::before {
    background: #fff;
}

/* Main content panel — angular glass, large corner cuts, soft red glow
   bleeding from the top-right (kept from the original design). */
.crp-admin-content {
    position: relative;
    min-height: 200px;
    clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(239, 68, 68, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 24px;
    overflow: hidden;
}

.crp-admin-content::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: #B91C1C;
    opacity: 0.14;
    filter: blur(90px);
    pointer-events: none;
}

.crp-admin-empty {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 60px 20px;
    color: #737373;
    font-size: 14px;
}

.crp-empty-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
    clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #F87171;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crp-empty-icon svg {
    width: 36px;
    height: 36px;
}

.crp-empty-heading {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.crp-empty-text {
    color: #737373;
    font-size: 13.5px;
}

/* ── App cards — angular clipped corners, corner tick accent (like the
   Rules page), traveling neon border on hover instead of a flat
   left-edge stripe. ── */
.crp-app-card {
    position: relative;
    background:
        linear-gradient(160deg, rgba(239, 68, 68, 0.06), transparent 60%),
        rgba(10, 6, 7, 0.65);
    border: 1px solid rgba(239, 68, 68, 0.2);
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    padding: 18px 20px;
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Corner tick mark, top-left. */
.crp-app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.85), transparent 70%);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    opacity: 0.7;
    pointer-events: none;
}

/* Traveling neon border light on hover — same technique used on the
   Rules cards, paused by default so it costs nothing until hovered. */
.crp-app-card::after {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    padding: 1.5px;
    background: conic-gradient(from var(--admin-angle), transparent 75%, rgba(239, 68, 68, 0.95) 88%, transparent 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: crpBorderSpin 2.6s linear infinite paused;
    pointer-events: none;
}

@keyframes crpBorderSpin {
    to { --admin-angle: 360deg; }
}

.crp-app-card:hover {
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 24px rgba(239, 68, 68, 0.15);
}

.crp-app-card:hover::after {
    opacity: 1;
    animation-play-state: running;
}

@media (prefers-reduced-motion: reduce) {
    .crp-app-card::after {
        animation: none !important;
    }
}

.crp-app-head {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
}

.crp-app-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}

.crp-app-head-body {
    flex: 1;
    min-width: 160px;
}

.crp-app-head-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.crp-app-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.crp-app-name-sub {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.crp-app-meta {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.crp-app-meta-id {
    font-family: monospace;
    color: #FCA5A5;
}

.crp-app-type {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
}

.crp-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.crp-status.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.crp-status.accepted {
    background: rgba(34, 197, 94, 0.15);
    color: #4ADE80;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.crp-status.rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.crp-app-body {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 720px) {
    .crp-app-body {
        grid-template-columns: 1fr;
    }
}

.crp-app-section h4 {
    font-family: 'Rajdhani', sans-serif;
    color: #cbd5e1;
    margin: 0 0 8px;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.crp-app-section .row {
    padding: 8px 12px;
    background: rgba(8, 4, 5, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-left: 2px solid rgba(239, 68, 68, 0.35);
    border-radius: 0 8px 8px 0;
    margin-bottom: 6px;
    font-size: 13px;
}

.crp-app-section .row b {
    color: #FCA5A5;
    display: block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    font-weight: 700;
}

.crp-app-section .row span {
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
}

.crp-app-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

/* ── Buttons — angular HUD-style, gradient + glow, semantic colors kept
   (green = accept, red = reject). ── */
.crp-btn {
    position: relative;
    padding: 9px 18px;
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.crp-btn:hover {
    transform: translateY(-1px);
}

.crp-btn-accept {
    background: linear-gradient(135deg, #22c55e, #15803d);
    color: #fff;
    box-shadow: 0 6px 18px -4px rgba(34, 197, 94, 0.5);
}

.crp-btn-accept:hover {
    box-shadow: 0 8px 22px -4px rgba(34, 197, 94, 0.65);
}

.crp-btn-reject {
    background: linear-gradient(135deg, #EF4444, #991b1b);
    color: #fff;
    box-shadow: 0 6px 18px -4px rgba(239, 68, 68, 0.5);
}

.crp-btn-reject:hover {
    box-shadow: 0 8px 22px -4px rgba(239, 68, 68, 0.65);
}

.crp-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

/* Generic/neutral button (used without -accept/-reject, e.g. "Edit"). */
.crp-btn:not(.crp-btn-accept):not(.crp-btn-reject) {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: #e5e7eb;
}

.crp-btn:not(.crp-btn-accept):not(.crp-btn-reject):hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fff;
}

/* ── User rows — angular glass rows used across Team/Users/Streamers/etc
   admin lists. ── */
.crp-user-row {
    display: grid;
    grid-template-columns: 50px 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    background: rgba(10, 6, 7, 0.6);
    border: 1px solid rgba(239, 68, 68, 0.16);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    margin-bottom: 6px;
    transition: border-color 0.15s;
}

.crp-user-row:hover {
    border-color: rgba(239, 68, 68, 0.38);
}

.crp-user-row img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.crp-user-name {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.crp-user-id {
    color: #64748b;
    font-size: 11px;
    font-family: monospace;
}

.crp-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.crp-pill.wl {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.crp-pill.adm {
    background: rgba(122, 17, 40, 0.2);
    color: #ff8a94;
}

.crp-pill.no {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

.crp-toast-mini {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 6, 7, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 12px 20px;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    border: 1px solid rgba(239, 68, 68, 0.35);
    z-index: 100000;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(239, 68, 68, 0.15);
}

@media (max-width: 900px) {
    .crp-admin-shell {
        flex-direction: column;
    }

    .crp-admin-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(239, 68, 68, 0.18);
        flex-direction: row;
        flex-wrap: wrap;
        padding: 14px;
    }

    .crp-admin-tabs-main {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .crp-nav-group {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        background: none;
        border: none;
        padding: 0;
    }

    .crp-admin-tabs-main .crp-admin-tab {
        width: auto;
    }

    .crp-sidebar-group-label {
        display: none;
    }

    .crp-admin-main {
        padding: 20px 18px 60px;
    }
}

/* ── Card-grid layout: each tab pane lays its cards out as a responsive
   dashboard grid instead of one long vertical stack, now that the main
   content area is full-width. ── */
.crp-tab-pane {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
    gap: 16px;
    align-items: start;
}

.crp-tab-pane > .crp-app-card {
    margin-bottom: 0;
}

.crp-tab-pane > .crp-admin-empty,
.crp-tab-pane > .crp-app-card:only-child {
    grid-column: 1 / -1;
}

@media (max-width: 960px) {
    .crp-tab-pane {
        grid-template-columns: 1fr;
    }
}

/* ── WEB SETTINGS TAB ── */
.crp-settings-preview {
    width: 100%;
    height: 140px;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    overflow: hidden;
    background: rgba(8, 4, 5, 0.6);
    border: 1px solid rgba(239, 68, 68, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.crp-settings-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.crp-settings-preview-empty {
    color: #64748b;
    font-size: 12px;
    text-align: center;
    padding: 0 16px;
}

.crp-settings-dropzone {
    border: 2px dashed rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.crp-settings-dropzone:hover {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.04);
}

/* ── VIEW AUDIT LOGS quick-access button (admin head) ── */
.crp-admin-viewlogs {
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.4);
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
    color: #fbbf24;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.crp-admin-viewlogs:hover {
    background: rgba(245, 158, 11, 0.24);
}

/* ── AUDIT LOGS TAB ── */
.crp-log-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.crp-log-search-wrap {
    flex: 1 1 260px;
    min-width: 220px;
}

.crp-log-search {
    width: 100%;
    background: rgba(10, 6, 7, 0.6);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #e5e7eb;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.crp-log-search::placeholder {
    color: #64748b;
}

.crp-log-search:focus {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.crp-log-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.crp-log-pill {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.crp-log-pill:hover {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.35);
}

.crp-log-pill.active {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.45);
}

.crp-log-pill-count {
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10.5px;
}

.crp-log-count {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 12px;
}

.crp-log-row {
    position: relative;
    background: rgba(10, 6, 7, 0.6);
    border: 1px solid rgba(239, 68, 68, 0.16);
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    padding: 14px 16px;
    margin-bottom: 8px;
    transition: border-color 0.15s;
}

.crp-log-row:hover {
    border-color: rgba(239, 68, 68, 0.38);
}

.crp-log-row-main {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: flex-start;
    gap: 12px;
}

.crp-log-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.crp-log-row-body {
    flex: 1;
    min-width: 0;
}

.crp-log-row-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.crp-log-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.crp-log-badge.ok {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.crp-log-badge.bad {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.crp-log-badge.warn {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.crp-log-badge.info {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.crp-log-actor {
    color: #fff;
    font-weight: 700;
    font-size: 13.5px;
}

.crp-log-time {
    color: #64748b;
    font-size: 12px;
    margin-left: auto;
}

.crp-log-details {
    color: #cbd5e1;
    font-size: 13px;
    margin-top: 6px;
}

.crp-log-target {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #94a3b8;
    font-size: 11.5px;
    margin-top: 6px;
}

.crp-log-target-id {
    color: #64748b;
    font-family: monospace;
}

.crp-log-cat {
    flex-shrink: 0;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.15);
    padding: 4px 10px;
    border-radius: 8px;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .crp-log-cat {
        display: none;
    }

    .crp-log-time {
        margin-left: 0;
    }
}
