@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #ec4899;
    --dark-bg: #f1f5f9;
    /* Light Slate Background */
    --card-bg: #ffffff;
    /* White Card */
    --text-color: #1e293b;
    /* Dark Slate Text */
    --text-muted: #64748b;
    /* Slate Grey Text */
    --border-color: #e2e8f0;
    /* Light Gray Border */
    --sidebar-width: 260px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Glassmorphism & Cards */
.card-custom {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color);
}

/* Login Page Styling */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3f4f6 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Form Controls */
.form-control {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border-radius: 10px;
}

.form-control:focus {
    background-color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    color: var(--text-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 1px 0 10px rgba(0, 0, 0, 0.02);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
}

/* Navbar */
.top-navbar {
    height: 75px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 999;
}

.header-search {
    background: #f1f5f9;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    width: 350px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.header-search:focus-within {
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.header-search i {
    color: var(--text-muted);
}

.header-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-color);
}

.notification-pill {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.notification-pill:hover {
    background: #e2e8f0;
    color: var(--primary-color);
}

.badge-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.admin-name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.admin-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tiny-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dropdown-item {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
}

.dropdown-item i {
    font-size: 1.1rem;
    opacity: 0.8;
}

.main-content {
    margin-left: var(--sidebar-width);
    margin-top: 75px;
    padding: 2rem;
    min-height: calc(100vh - 75px);
}

.nav-link {
    color: var(--text-muted);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link:hover,
.nav-link.active {
    background: #eff6ff;
    color: var(--primary-color);
}

.nav-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo span {
    background: linear-gradient(to right, #6366f1, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-img {
    width: 75px;
    height: 75px;
    object-fit: contain;
    border-radius: 12px;
}

.login-logo {
    width: 75px;
    height: 75px;
    object-fit: contain;
    border-radius: 12px;
}

/* Tables */
.table td,
.table th {
    border-color: var(--border-color);
    padding: 1rem;
    vertical-align: middle;
    color: var(--text-color);
}

.table thead th {
    color: var(--text-color);
    font-weight: 600;
    border-bottom-width: 1px;
    background-color: #f8fafc;
}

/* Explicit Table Hover Fix */
.table-hover>tbody>tr:hover>* {
    --bs-table-accent-bg: #f1f5f9;
    color: var(--text-color);
}

/* Status Badges */
.badge-status {
    padding: 0.5em 1em;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85em;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-warning {
    background: #fef3c7;
    color: #b45309;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

/* Dashboard Cards */
.stat-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.stat-card-link:hover,
.stat-card-link:focus,
.stat-card-link:active,
.stat-card-link:visited {
    text-decoration: none;
    color: inherit;
}

.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    cursor: pointer;
}

.stat-card-link:hover .card-custom {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.15), 0 6px 10px -3px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: #f1f5f9;
    color: var(--primary-color);
}

/* Gradient Cards */
.gradient-card-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.gradient-card-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
}

.gradient-card-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
}

.gradient-card-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    border: none;
}

.stat-icon-gradient {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.gradient-card-1:hover,
.gradient-card-2:hover,
.gradient-card-3:hover,
.gradient-card-4:hover {
    transform: translateY(-5px);
}

/* Additional Gradient Cards for Reports */
.gradient-card-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    border: none;
}

.gradient-card-6 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    border: none;
}

.gradient-card-7 {
    background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%);
    border: none;
}

.gradient-card-8 {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
}

.gradient-card-9 {
    background: linear-gradient(135deg, #5f72bd 0%, #9b23ea 100%);
    border: none;
}

.gradient-card-10 {
    background: linear-gradient(135deg, #ff6e7f 0%, #bfe9ff 100%);
    border: none;
}

/* Table styling for gradient backgrounds */
.table-bordered-0 {
    border: none;
}

.table-bordered-0 thead th {
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
}

.table-bordered-0 tbody td {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
}

/* Rank badges */
.badge-rank {
    display: inline-block;
    padding: 0.4em 0.8em;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.badge-rank-top {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #000;
}

/* Premium/Free badges */
.badge-premium {
    display: inline-block;
    padding: 0.4em 0.8em;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85em;
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.5);
}

.badge-free {
    display: inline-block;
    padding: 0.4em 0.8em;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Report Stat Cards */
.report-stat-card {
    padding: 1.5rem;
    border-radius: 16px;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.report-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.report-gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.report-gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.report-gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.report-gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.report-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.report-stat-content {
    color: white;
}

.report-stat-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.report-stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.report-stat-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Content Stat Items */
.content-stat-item {
    padding: 0.75rem 0;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
}

/* Wallpaper Thumbnail */
.wallpaper-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

/* Rank Badges */
.rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    background: #f1f5f9;
    color: var(--text-color);
}

.rank-badge.rank-top {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: #eff6ff;
    color: #3b82f6;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Type Badges */
.type-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.type-badge.premium {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
}

.type-badge.free {
    background: #e5e7eb;
    color: #6b7280;
}

/* Download Count */
.download-count {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
}