/* Pjs solutions Admin Panel - Light Theme Design System */

:root {
    --primary-bg: #f1f5f9;
    --secondary-bg: #ffffff;
    --surface-dark: #f8fafc;
    --accent-cyan: #0284c7;
    --accent-purple: #6366f1;
    --accent-pink: #ec4899;
    --accent-warning: #d97706;
    --accent-danger: #dc2626;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --glass-bg: #ffffff;
    --glass-border: #cbd5e1;
    --primary-gradient: linear-gradient(135deg, #0284c7, #0369a1);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    margin: 0;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0284c7;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar-backdrop {
    display: none;
}

.admin-sidebar {
    width: 260px;
    background: #ffffff !important;
    border-right: 1px solid #cbd5e1 !important;
    padding: 24px 20px 22px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    box-sizing: border-box;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
    padding-left: 10px;
}

.sidebar-logo img {
    height: 42px;
    width: auto;
}

.sidebar-logo span {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0284c7;
    letter-spacing: 1px;
}

.mobile-menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #0284c7;
    cursor: pointer;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 10px;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    color: #334155 !important;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.25s ease;
    font-size: 0.92rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.nav-link i {
    font-size: 1.1rem;
    width: 25px;
    text-align: center;
    color: #0284c7;
}

.nav-link:hover {
    color: #0284c7 !important;
    background: #e0f2fe !important;
    border-color: #7dd3fc;
    transform: translateX(4px);
}

.nav-link.active {
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

.nav-link.active i {
    color: #ffffff !important;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #cbd5e1;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #0284c7;
}

.admin-main {
    flex-grow: 1;
    margin-left: 260px;
    padding: 40px;
    transition: all 0.4s ease;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 35px;
}

.header-title h1 {
    color: #0f172a !important;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.header-title p {
    color: #475569 !important;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.stat-card,
.card-premium {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    color: #0f172a !important;
}

.stat-card {
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover,
.card-premium:hover {
    transform: translateY(-4px);
    border-color: #0284c7 !important;
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.15) !important;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 18px;
}

.stat-info h3 {
    color: #0f172a !important;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-info p {
    color: #475569 !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.stat-trend {
    position: absolute;
    top: 22px;
    right: 22px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.trend-up {
    background: #e0f2fe;
    color: #0284c7;
}

.stat-icon.users {
    background: #e0f2fe !important;
    color: #0284c7 !important;
}

.stat-icon.entries {
    background: #e0e7ff !important;
    color: #4f46e5 !important;
}

.stat-icon.revenue {
    background: #fce7f3 !important;
    color: #db2777 !important;
}

.stat-icon.pending {
    background: #fef3c7 !important;
    color: #d97706 !important;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 25px;
    align-items: start;
}

.card-premium {
    padding: 7px;
    transition: all 0.3s ease;
    min-width: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.card-header h2 {
    color: #0f172a !important;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
}

.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.premium-table th {
    background: #f1f5f9 !important;
    border-bottom: 2px solid #0284c7 !important;
    color: #0f172a !important;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    text-transform: uppercase;
}

.premium-table tr {
    background: #ffffff !important;
    transition: all 0.2s ease;
}

.premium-table tr:hover {
    background: #f8fafc !important;
}

.premium-table td {
    color: #0f172a !important;
    font-size: 0.9rem;
    padding: 14px 18px;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
}

.premium-table td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.premium-table td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.badge-status {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: #dcfce7;
    color: #15803d;
}

.status-pending {
    background: #fef3c7;
    color: #b45309;
}

.status-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-premium {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff !important;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.25);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(2, 132, 199, 0.35);
    color: #ffffff !important;
}

.text-accent,
.text-info {
    color: #0284c7 !important;
}

.text-white,
.text-light {
    color: #0f172a !important;
}

.text-muted {
    color: #475569 !important;
}

.text-warning {
    color: #d97706 !important;
}

.text-danger {
    color: #dc2626 !important;
}

.bg-dark {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

.bg-secondary {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

.border-secondary {
    border-color: #cbd5e1 !important;
}

.btn-outline-info {
    color: #0284c7;
    border-color: #0284c7 !important;
}

.btn-outline-info:hover {
    background: #0284c7;
    color: #ffffff !important;
}

.btn-outline-danger {
    color: #dc2626;
    border-color: #dc2626 !important;
}

.btn-outline-danger:hover {
    background: #dc2626;
    color: #ffffff !important;
}

.form-control,
.form-select,
.input-group-text {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15) !important;
}

.form-control::placeholder {
    color: #94a3b8 !important;
}

.admin-modal {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    color: #0f172a;
}

.dropdown-menu-dark {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.dropdown-item {
    font-size: 0.9rem;
    color: #0f172a !important;
    font-weight: 500 !important;
    transition: all 0.2s ease;
}

.dropdown-item i {
    color: #0284c7 !important;
}

.dropdown-item:hover {
    background: #e0f2fe !important;
    color: #0284c7 !important;
}

.dropdown-item.text-danger {
    color: #dc2626 !important;
}

.dropdown-item.text-danger i {
    color: #dc2626 !important;
}

/* Animations & Responsive */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-main>* {
    animation: fadeIn 0.4s ease-out forwards;
}

/* ADMIN MOBILE NAVBAR (Visible on mobile <= 991px) */
.admin-mobile-navbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-bottom: 1px solid #cbd5e1;
    padding: 12px 18px;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.admin-mobile-toggle-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0284c7;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.admin-mobile-toggle-btn:hover,
.admin-mobile-toggle-btn:active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

/* SIDEBAR CLOSE BUTTON (Inside Sidebar Top Right) */
.sidebar-close-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
    transform: rotate(90deg);
}

/* SIDEBAR BACKDROP OVERLAY */
.admin-sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.admin-sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* RESPONSIVE LAYOUT FOR MOBILE/TABLET (<= 991px) */
@media (max-width: 991px) {
    .admin-mobile-navbar {
        display: flex !important;
    }

    .admin-wrapper {
        display: block !important;
    }

    .admin-sidebar {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        width: 290px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        background: #ffffff !important;
        border-left: 1px solid #cbd5e1 !important;
        border-right: none !important;
        border-radius: 0 !important;
        z-index: 1050 !important;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18) !important;
        padding: 22px 18px !important;
        display: flex !important;
        flex-direction: column !important;
        transform: translateX(100%) !important;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
    }

    .admin-sidebar.show-sidebar {
        transform: translateX(0) !important;
    }

    .sidebar-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e2e8f0;
    }

    .sidebar-logo span {
        display: inline-block !important;
    }

    .nav-link span,
    .sidebar-footer span {
        display: inline-block !important;
    }

    .nav-menu {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        overflow-x: visible !important;
        flex-grow: 1 !important;
    }

    .nav-item {
        flex: 1 1 auto !important;
        width: 100% !important;
    }

    .nav-link {
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 0.92rem !important;
        border-radius: 12px !important;
    }

    .admin-main {
        margin-left: 0 !important;
        padding: 20px 14px !important;
    }

    .stats-grid,
    .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}