/* ============================================================================
   LORD HENTAI — Admin UI Design System (AkumaBox Cyber Dark Glass v22)
   ============================================================================ */

:root {
    --adm-bg: #07050A;
    --adm-sidebar: #0D0914;
    --adm-card: #130E1C;
    --adm-card-hover: #191325;
    --adm-border: rgba(255, 255, 255, 0.08);
    --adm-border-hover: rgba(255, 255, 255, 0.16);
    --adm-accent: #FF2A7A;
    --adm-accent-hover: #FF478D;
    --adm-accent-glow: rgba(255, 42, 122, 0.25);
    --adm-accent-subtle: rgba(255, 42, 122, 0.12);
    --adm-cyan: #06B6D4;
    --adm-cyan-glow: rgba(6, 182, 212, 0.25);
    --adm-green: #10B981;
    --adm-green-glow: rgba(16, 185, 129, 0.25);
    --adm-purple: #9D4EDD;
    --adm-purple-glow: rgba(157, 78, 221, 0.25);
    --adm-amber: #F59E0B;
    --adm-text: #F1F5F9;
    --adm-text-secondary: #94A3B8;
    --adm-text-muted: #64748B;
    --adm-radius-sm: 8px;
    --adm-radius-md: 12px;
    --adm-radius-lg: 16px;
    --adm-radius-xl: 20px;
    --adm-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --adm-sidebar-w: 260px;
}

* { box-sizing: border-box; }
body {
    background: var(--adm-bg) !important;
    color: var(--adm-text);
    font-family: "A Negaar", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    line-height: 1.5;
}

/* ── Layout Framework ── */
.admin-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ── Desktop Symmetrical Sidebar ── */
.admin-sidebar {
    width: var(--adm-sidebar-w);
    background: var(--adm-sidebar);
    border-left: 1px solid var(--adm-border);
    padding: 1.5rem 1rem;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 90;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--adm-border);
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.admin-brand i {
    color: var(--adm-accent);
    font-size: 1.35rem;
    filter: drop-shadow(0 0 10px var(--adm-accent));
}

.admin-brand span.badge-tag {
    font-size: 0.70rem;
    font-weight: 700;
    background: var(--adm-accent-subtle);
    color: var(--adm-accent);
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(255, 42, 122, 0.3);
    margin-right: auto;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    overflow-y: auto;
    padding-left: 4px;
}

.admin-nav::-webkit-scrollbar { width: 4px; }
.admin-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--adm-text-secondary);
    text-decoration: none;
    border-radius: var(--adm-radius-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.admin-nav-item i {
    font-size: 1.15rem;
    transition: transform 0.2s ease;
}

.admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    transform: translateX(-3px);
}

.admin-nav-item:hover i {
    transform: scale(1.1);
    color: var(--adm-accent);
}

.admin-nav-item.active {
    background: linear-gradient(135deg, rgba(255, 42, 122, 0.20) 0%, rgba(157, 78, 221, 0.12) 100%);
    color: #FF75A9;
    border: 1px solid rgba(255, 42, 122, 0.35);
    box-shadow: 0 4px 15px rgba(255, 42, 122, 0.15);
}

.admin-nav-item.active::before {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--adm-accent);
    border-radius: 4px 0 0 4px;
    box-shadow: 0 0 10px var(--adm-accent);
}

.admin-nav-item.active i {
    color: var(--adm-accent);
    filter: drop-shadow(0 0 6px var(--adm-accent));
}

.admin-nav-badge {
    margin-right: auto;
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--adm-text-secondary);
}

.admin-back-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
    font-size: 0.85rem;
    color: var(--adm-text-muted);
    text-decoration: none;
    border-top: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-md);
    transition: all 0.2s ease;
}

.admin-back-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

/* ── Main Work Area ── */
.admin-main {
    flex: 1;
    padding: 2rem;
    min-width: 0;
    max-width: 1400px;
}

/* ── Topbar ── */
.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.admin-topbar h1 {
    font-size: 1.6rem;
    font-weight: 900;
    margin: 0;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    line-height: 1.3;
}

.admin-topbar h1 i {
    font-size: 1.75rem;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* ── Neon Stat Grid & Cards ── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--adm-card);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    padding: 1.3rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(12px);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--adm-border-hover);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--adm-accent), var(--adm-purple));
}

.stat-card.neon-cyan::before { background: linear-gradient(90deg, var(--adm-cyan), #3B82F6); }
.stat-card.neon-green::before { background: linear-gradient(90deg, var(--adm-green), #14B8A6); }
.stat-card.neon-purple::before { background: linear-gradient(90deg, var(--adm-purple), #D946EF); }
.stat-card.neon-amber::before { background: linear-gradient(90deg, var(--adm-amber), #F97316); }

.stat-card .label {
    font-size: 0.82rem;
    color: var(--adm-text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-card .label i { font-size: 1rem; }
.stat-card .value {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    font-feature-settings: "tnum";
}
.stat-card .sub {
    font-size: 0.78rem;
    color: var(--adm-text-muted);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Card Panel Container ── */
.card-panel {
    background: var(--adm-card);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-xl);
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: var(--adm-shadow);
    backdrop-filter: blur(16px);
}

.card-panel h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.card-panel h2 i {
    color: var(--adm-accent);
}

/* ── Table & Responsive Wrappers ── */
.adm-table-wrap {
    overflow-x: auto;
    border-radius: var(--adm-radius-md);
    border: 1px solid var(--adm-border);
    -webkit-overflow-scrolling: touch;
    background: rgba(0, 0, 0, 0.15);
}

.adm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: right;
}

.adm-table th {
    background: rgba(255, 255, 255, 0.04);
    padding: 0.85rem 1.1rem;
    color: var(--adm-text-secondary);
    font-weight: 700;
    border-bottom: 1px solid var(--adm-border);
    white-space: nowrap;
    font-size: 0.82rem;
}

.adm-table td {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #E2E8F0;
    vertical-align: middle;
}

.adm-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.adm-table tr:last-child td {
    border-bottom: none;
}

/* ── Mobile Card List Fallback System ── */
.adm-mobile-list {
    display: none;
    flex-direction: column;
    gap: 0.85rem;
}

.adm-mob-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--adm-border);
    border-radius: var(--adm-radius-lg);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s ease;
}

.adm-mob-card:hover {
    border-color: var(--adm-border-hover);
}

.adm-mob-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.adm-mob-thumb {
    width: 48px;
    height: 64px;
    border-radius: var(--adm-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: #1c152a;
}

.adm-mob-info {
    flex: 1;
    min-width: 0;
}

.adm-mob-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    line-height: 1.4;
}

.adm-mob-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.76rem;
    color: var(--adm-text-secondary);
}

.adm-mob-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

/* ── Interactive Buttons & Components ── */
.adm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem;
    min-height: 40px;
    border-radius: var(--adm-radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-family: inherit;
}

.adm-btn-sm {
    padding: 0.3rem 0.65rem;
    min-height: 32px;
    font-size: 0.78rem;
    border-radius: var(--adm-radius-sm);
}

.adm-btn-primary {
    background: linear-gradient(135deg, #FF2A7A 0%, #D81B60 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 42, 122, 0.35);
}

.adm-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 42, 122, 0.45);
}

.adm-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #E2E8F0;
    border: 1px solid var(--adm-border);
}

.adm-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: var(--adm-border-hover);
}

.adm-btn-cyan {
    background: linear-gradient(135deg, #06B6D4 0%, #0284C7 100%);
    color: #fff;
    box-shadow: 0 4px 14px var(--adm-cyan-glow);
}
.adm-btn-cyan:hover { filter: brightness(1.1); transform: translateY(-1px); }

.adm-btn-purple {
    background: linear-gradient(135deg, #9D4EDD 0%, #7B2CBF 100%);
    color: #fff;
    box-shadow: 0 4px 14px var(--adm-purple-glow);
}
.adm-btn-purple:hover { filter: brightness(1.1); transform: translateY(-1px); }

.adm-btn-green {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 14px var(--adm-green-glow);
}
.adm-btn-green:hover { filter: brightness(1.1); transform: translateY(-1px); }

.adm-btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.adm-btn-danger:hover {
    background: #EF4444;
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

/* ── Badges ── */
.adm-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.adm-badge-anime {
    background: rgba(255, 42, 122, 0.15);
    color: #FF75A9;
    border: 1px solid rgba(255, 42, 122, 0.3);
}

.adm-badge-manhwa {
    background: rgba(157, 78, 221, 0.15);
    color: #C084FC;
    border: 1px solid rgba(157, 78, 221, 0.3);
}

.adm-badge-adult {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.adm-badge-green {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.adm-badge-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: #67E8F9;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* ── Form Inputs & Selects ── */
.adm-input, .adm-select, .adm-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #181224 0%, #0d0916 100%);
    border: 1.5px solid var(--adm-border);
    border-radius: var(--adm-radius-md);
    color: #fff;
    font-family: inherit;
    font-size: 0.90rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.adm-input:focus, .adm-select:focus, .adm-textarea:focus {
    outline: none;
    border-color: var(--adm-accent);
    box-shadow: 0 0 0 3px var(--adm-accent-glow);
}

.adm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.adm-form-full { grid-column: 1 / -1; }
.adm-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--adm-text-secondary);
    margin-bottom: 0.4rem;
}

/* ── Filter Bar ── */
.adm-filter-bar {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.adm-filter-bar .adm-input { max-width: 280px; }
.adm-filter-bar .adm-select { max-width: 180px; }

/* ── Storage Progress Bar ── */
.adm-progress {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}

.adm-progress-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.4s ease;
}

/* ── Mobile Navigation (Header, Drawer & Dock) ── */
.admin-mobile-header {
    display: none;
    height: 60px;
    background: rgba(13, 9, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--adm-border);
    padding: 0 1rem;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-mobile-dock {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(10, 6, 16, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--adm-border);
    z-index: 100;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px calc(env(safe-area-inset-bottom, 0px));
}

.adm-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--adm-text-muted);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 6px 10px;
    min-width: 50px;
    min-height: 48px;
    border-radius: var(--adm-radius-md);
    transition: all 0.2s ease;
}

.adm-dock-item i { font-size: 1.3rem; }
.adm-dock-item.active { color: var(--adm-accent); }
.adm-dock-item.active i {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px var(--adm-accent));
}

/* ── Drawer Overlay ── */
.adm-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.adm-drawer-overlay.active {
    display: block;
    opacity: 1;
}

.adm-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -300px;
    width: 280px;
    background: var(--adm-sidebar);
    border-left: 1px solid var(--adm-border);
    padding: 1.5rem 1rem;
    z-index: 201;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.adm-drawer.active {
    right: 0;
}

/* ── Responsive Media Queries ── */
@media (max-width: 991px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { display: none; }
    .admin-mobile-header { display: flex; }
    .admin-mobile-dock { display: flex; }
    .admin-main { padding: 1.25rem 1rem 5.5rem; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
    .adm-form-grid { grid-template-columns: 1fr; }
    .card-panel { padding: 1.25rem; }
    .adm-table-wrap { display: none; }
    .adm-mobile-list { display: flex; }
    .adm-filter-bar .adm-input, .adm-filter-bar .adm-select { max-width: 100%; flex: 1; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .admin-topbar h1 { font-size: 1.35rem; }
    .adm-topbar-actions { width: 100%; }
    .adm-topbar-actions .adm-btn { flex: 1; }
}
