/* PixelPay Premium Light Design System */
:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --accent: #8b5cf6;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    
    --border-color: #e2e8f0;
    --input-focus: #4f46e5;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
    
    --sidebar-width: 260px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
}

/* Glassmorphism Light */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-sm);
}

/* Layout */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2.5rem;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Sidebar Logo */
.sidebar-logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    margin-bottom: 3rem;
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-logo::before {
    content: '';
    width: 8px;
    height: 24px;
    background: var(--primary);
    border-radius: 4px;
}

/* Nav Links */
.nav-links {
    list-style: none;
    flex: 1;
}

.nav-item { margin-bottom: 0.25rem; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-link:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.nav-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
    z-index: 101;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

/* Cards */
.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

.icon-revenue { background: #eef2ff; color: var(--primary); }
.icon-success { background: #ecfdf5; color: var(--success); }
.icon-apps { background: #f5f3ff; color: var(--accent); }
.icon-failed { background: #fef2f2; color: var(--danger); }

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.15rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* Table Card */
.card-table {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

tr:hover td { background: #f8fafc; }

/* Badges */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #b91c1c; }

/* Buttons */
.btn {
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

/* Form Styling */
.form-group { margin-bottom: 1.5rem; }
label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 500; color: #334155; }
input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fdfdfd;
    transition: all 0.2s ease;
}
input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; box-shadow: var(--shadow-lg); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 1.25rem; padding-top: 88px; }
    .mobile-header { display: flex; }
    .sidebar-overlay {
        display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px); z-index: 99;
    }
    .sidebar-overlay.active { display: block; }
    .top-header { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
}

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

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-up { animation: fadeInUp 0.5s ease-out forwards; }
