* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

/* Dropdown menu (native) styling - high contrast for all states */
.admin-page select option {
    background: #0f172a;
    color: #f1f5f9;
    padding: 10px 12px;
}

.admin-page select option:disabled {
    color: #64748b;
    background: #0f172a;
}

.admin-page select option:checked {
    background: #0d9488 !important;
    color: #ffffff !important;
}

.admin-page select option:hover {
    background: #1e3a5f !important;
    color: #ffffff !important;
}

/* Select style – matches videos page .filter-select */
.admin-filters select,
.admin-table select,
.admin-role-select {
    padding: 8px 36px 8px 14px;
    background: rgba(20, 24, 36, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 0.82rem;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.25s ease;
    color-scheme: dark;
}

.admin-filters select option,
.admin-table select option,
.admin-role-select option {
    background: #0f172a;
    color: #f1f5f9;
}

.admin-filters select option:checked,
.admin-table select option:checked,
.admin-role-select option:checked {
    background: #0d9488 !important;
    color: #ffffff !important;
}

.admin-filters select option:hover,
.admin-table select option:hover,
.admin-role-select option:hover {
    background: #1e3a5f !important;
    color: #ffffff !important;
}

.admin-filters select:focus,
.admin-table select:focus,
.admin-role-select:focus {
    border-color: #f09755;
    box-shadow: 0 0 0 3px rgba(240, 151, 85, 0.15);
}

.admin-table select,
.admin-role-select {
    min-width: 110px;
    font-weight: 600;
}

body {
    background: var(--gradient-primary);
    color: var(--text-primary);
}

.admin-page {
    max-width: 1280px;
    margin: 92px auto 0;
    padding: 0 24px;
    min-height: calc(100vh - 92px);
    padding-bottom: 70px;
}

.admin-header {
    margin-bottom: 18px;
}

.admin-header h1 {
    font-size: 1.9rem;
    font-weight: 850;
    letter-spacing: -0.4px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-header p {
    margin-top: 6px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.92rem;
}

.admin-page a {
    color: inherit;
    text-decoration: none;
}

.admin-nav {
    display: flex;
    gap: 10px;
    margin: 18px 0 22px;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 10px 16px;
    background: rgba(17, 28, 51, 0.72);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition:
        transform 0.15s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.admin-nav a:hover {
    transform: translateY(-1px);
    background: rgba(31, 59, 92, 0.55);
    border-color: rgba(13, 148, 136, 0.35);
    color: var(--text-primary);
}

.admin-nav a.active {
    background: rgba(13, 148, 136, 0.12);
    border-color: rgba(13, 148, 136, 0.55);
    color: var(--text-primary);
}

/* Nav badge for pending counts */
.admin-nav a {
    position: relative;
}

.admin-nav-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-left: 2px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin: 22px 0 30px;
}

.admin-stat-card {
    background: rgba(17, 28, 51, 0.68);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

.admin-stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(700px circle at 20% 10%,
            rgba(13, 148, 136, 0.1),
            transparent 50%);
    pointer-events: none;
}

.admin-stat-card .value {
    position: relative;
    font-size: 2.3rem;
    font-weight: 900;
    letter-spacing: -0.8px;
}

.admin-stat-card .label {
    position: relative;
    margin-top: 6px;
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 700;
}

.admin-card {
    background: rgba(17, 28, 51, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 22px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.admin-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.admin-filters input {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
    min-width: 170px;
}

.admin-filters input::placeholder {
    color: rgba(148, 163, 184, 0.85);
}

.admin-filters input:focus {
    border-color: rgba(13, 148, 136, 0.55);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
    background: rgba(255, 255, 255, 0.08);
}

.admin-filters select {
    min-width: 150px;
}

.btn,
.admin-filters button,
button.btn {
    padding: 10px 14px;
    background: rgba(13, 148, 136, 0.14);
    border: 1px solid rgba(13, 148, 136, 0.55);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 750;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.btn:hover,
.admin-filters button:hover,
button.btn:hover {
    transform: translateY(-1px);
    background: rgba(13, 148, 136, 0.22);
    border-color: rgba(13, 148, 136, 0.75);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.btn:active,
.admin-filters button:active,
button.btn:active {
    transform: translateY(0);
}

.btn-sm {
    padding: 7px 10px;
    font-size: 0.84rem;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition:
        transform 0.15s ease,
        background 0.2s ease,
        border-color 0.2s ease;
    cursor: pointer;
}

.btn-sm:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(13, 148, 136, 0.35);
}

.btn-sm.btn-view {
    border-color: rgba(13, 148, 136, 0.35);
    background: rgba(13, 148, 136, 0.08);
}

.btn-sm.btn-view:hover {
    border-color: rgba(13, 148, 136, 0.65);
    background: rgba(13, 148, 136, 0.14);
}

.btn-sm.btn-danger,
.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.45);
}

.btn-sm.btn-danger:hover,
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.7);
}

.btn-sm.btn-success,
.btn-success {
    background: rgba(13, 148, 136, 0.12);
    border-color: rgba(13, 148, 136, 0.45);
}

.btn-sm.btn-success:hover,
.btn-success:hover {
    background: rgba(13, 148, 136, 0.18);
    border-color: rgba(13, 148, 136, 0.7);
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 14px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}

.admin-table thead th {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(219, 234, 254, 0.8);
    background: rgba(2, 6, 23, 0.18);
}

.admin-table tbody tr {
    transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.035);
}

.admin-table td a {
    color: var(--text-primary);
}

.admin-table td a:hover {
    color: var(--text-secondary);
}

/* Actions column layout */
.admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-actions form {
    display: inline-flex;
}

.admin-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(219, 234, 254, 0.92);
    font-weight: 700;
    font-size: 0.84rem;
    max-width: 100%;
}

.admin-tag a {
    color: inherit;
    text-decoration: none;
}

.admin-tag a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.admin-note-input {
    padding: 7px 10px;
    font-size: 0.84rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    outline: none;
    min-width: 140px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.admin-note-input::placeholder {
    color: rgba(148, 163, 184, 0.85);
}

.admin-note-input:focus {
    border-color: rgba(13, 148, 136, 0.55);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
    background: rgba(255, 255, 255, 0.08);
}

.admin-note-input--full {
    width: 100%;
    min-width: 100%;
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(2, 6, 23, 0.62);
    z-index: 9999;
}

.admin-modal-backdrop.is-open {
    display: flex;
}

.admin-modal {
    width: 100%;
    max-width: 520px;
    background: rgba(17, 28, 51, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    box-shadow:
        0 30px 120px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    overflow: hidden;
    transform: translateY(10px) scale(0.985);
    opacity: 0;
    transition:
        transform 0.18s ease,
        opacity 0.18s ease;
}

.admin-modal-backdrop.is-open .admin-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.admin-modal.admin-modal--success {
    box-shadow:
        0 30px 120px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(13, 148, 136, 0.18) inset,
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.admin-modal.admin-modal--danger {
    box-shadow:
        0 30px 120px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(239, 68, 68, 0.16) inset,
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg,
            rgba(2, 6, 23, 0.3),
            rgba(2, 6, 23, 0.12));
}

.admin-modal-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 850;
    letter-spacing: -0.2px;
}

.admin-modal-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(219, 234, 254, 0.92);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.admin-modal--success .admin-modal-icon {
    border-color: rgba(13, 148, 136, 0.35);
    background: rgba(13, 148, 136, 0.12);
}

.admin-modal--danger .admin-modal-icon {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.12);
}

.admin-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    transition:
        transform 0.15s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.admin-modal-close:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(13, 148, 136, 0.35);
}

.admin-modal-body {
    padding: 16px 14px;
}

.admin-popup-message {
    color: rgba(219, 234, 254, 0.88);
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 12px;
}

.admin-popup-field {
    margin-bottom: 12px;
}

.admin-popup-label {
    display: block;
    margin-bottom: 8px;
    color: rgba(219, 234, 254, 0.78);
    font-weight: 750;
    font-size: 0.82rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* Select in admin popup – matches videos page .filter-select */
.admin-popup-field select {
    width: 100%;
    padding: 8px 36px 8px 14px;
    background: rgba(20, 24, 36, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 0.82rem;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.25s ease;
    color-scheme: dark;
}

.admin-popup-field select option {
    background: #0f172a;
    color: #f1f5f9;
}

.admin-popup-field select option:checked {
    background: #0d9488 !important;
    color: #ffffff !important;
}

.admin-popup-field select option:hover {
    background: #1e3a5f !important;
    color: #ffffff !important;
}

.admin-popup-field select:focus {
    border-color: #f09755;
    box-shadow: 0 0 0 3px rgba(240, 151, 85, 0.15);
}

.admin-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(2, 6, 23, 0.12);
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.45);
    color: rgba(255, 237, 213, 0.95);
}

.badge-resolved {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.45);
    color: rgba(220, 252, 231, 0.95);
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.45);
    color: rgba(254, 226, 226, 0.95);
}

.badge-user {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.25);
    color: rgba(219, 234, 254, 0.9);
}

.badge-moderator {
    background: rgba(13, 148, 136, 0.1);
    border-color: rgba(13, 148, 136, 0.35);
    color: var(--text-primary);
}

.badge-admin {
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.35);
    color: rgba(219, 234, 254, 0.95);
}

.toast-success {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(13, 148, 136, 0.1);
    border: 1px solid rgba(13, 148, 136, 0.35);
    color: var(--text-primary);
    font-weight: 650;
}

.toast-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: var(--text-primary);
    font-weight: 650;
}

.admin-card table+.pagination,
.admin-card nav[role="navigation"] {
    margin-top: 14px;
}

.admin-card select,
.admin-card input[type="text"] {
    appearance: none;
}

/* ===== Admin Action Buttons (Base & Theme Variants) ===== */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-btn i {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.admin-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.admin-btn:active {
    transform: translateY(0);
}

/* Success Button (Approve) */
.admin-btn--success {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
    color: #34d399 !important;
}

.admin-btn--success:hover {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.15) !important;
}

/* Danger Button (Reject) */
.admin-btn--danger {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: #f87171 !important;
}

.admin-btn--danger:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.15) !important;
}

@media (max-width: 900px) {
    .admin-page {
        padding: 0 16px;
    }

    .admin-card {
        padding: 16px;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table th,
    .admin-table td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    /* Slick Horizontal Scrollable Nav for Mobile/Tablets */
    .admin-nav {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px !important;
        gap: 8px !important;
        margin: 10px 0 16px !important;
        scrollbar-width: none; /* Firefox */
    }
    .admin-nav::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    .admin-nav a {
        flex-shrink: 0 !important;
        padding: 8px 12px !important;
        font-size: 0.82rem !important;
        border-radius: 10px !important;
    }
}

@media (max-width: 560px) {
    .admin-header h1 {
        font-size: 1.45rem !important;
        gap: 8px !important;
    }
    
    .admin-header p {
        font-size: 0.85rem !important;
    }

    .admin-filters {
        gap: 8px !important;
    }

    .admin-filters input,
    .admin-filters select,
    .admin-filters button {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Stats Card Mobile optimization */
    .admin-stats {
        grid-template-columns: 1fr !important; /* Stack stats vertically */
        gap: 12px !important;
        margin: 14px 0 20px !important;
    }

    .admin-stat-card {
        padding: 16px 20px !important;
        border-radius: 16px !important;
    }

    .admin-stat-card .value {
        font-size: 1.85rem !important;
    }

    .admin-stat-card .label {
        font-size: 0.78rem !important;
    }

    .admin-stat-card .icon-wrapper {
        top: 16px !important;
        right: 16px !important;
        width: 38px !important;
        height: 38px !important;
        font-size: 1.1rem !important;
        border-radius: 10px !important;
    }

    .admin-stat-card .footer-link {
        margin-top: 12px !important;
        font-size: 0.8rem !important;
    }

    /* Compact Buttons inside tables */
    .admin-btn {
        padding: 6px 10px !important;
        font-size: 0.78rem !important;
        border-radius: 8px !important;
        gap: 4px !important;
    }

    .admin-btn i {
        font-size: 0.75rem !important;
    }

    /* Table cells adjustments */
    .admin-table td small {
        font-size: 0.7rem !important;
    }

    .admin-badge {
        padding: 3px 6px !important;
        font-size: 0.7rem !important;
        border-radius: 6px !important;
    }
}