/* ========================================
   MODERN DASHBOARD STYLES
   Ultra-modern, futuristic design system
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Color System */
    --primary-green: #28ab49;
    --primary-blue: #0146aa;
    --primary-light: #3bc45f;
    --blue-light: #0d5fd6;
    --emerald: #10B981;
    --amber: #F59E0B;
    --purple: #8b5cf6;
    --pink: #ec4899;
    --cyan: #06b6d4;
    
    /* Glass & Effects */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.25);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.12);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #eff8ff 100%);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(40, 171, 73, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(1, 70, 170, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ========================================
   MODERN CARDS
   ======================================== */

.modern-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafb 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid rgba(40, 171, 73, 0.1);
    transition: var(--transition-smooth);
    overflow: hidden;
    position: relative;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-blue), #0ea5e9);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.modern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(40, 171, 73, 0.15), 0 0 60px rgba(40, 171, 73, 0.1);
    border-color: rgba(40, 171, 73, 0.3);
}

.modern-card:hover::before {
    transform: scaleX(1);
}

.modern-card-header {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    color: white;
    padding: 1.5rem 2rem;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.modern-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.6; }
}

.modern-card-header h5,
.modern-card-header h4 {
    margin: 0;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.modern-card-body {
    padding: 2rem;
}

/* ========================================
   COLORFUL CARD VARIANTS
   ======================================== */

.card-green {
    background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: rgba(34, 197, 94, 0.2);
}

.card-green:hover {
    box-shadow: 0 12px 40px rgba(34, 197, 94, 0.25), 0 0 60px rgba(34, 197, 94, 0.15);
}

.card-blue {
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

.card-blue:hover {
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.25), 0 0 60px rgba(59, 130, 246, 0.15);
}

.card-amber {
    background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%);
    border-color: rgba(245, 158, 11, 0.2);
}

.card-amber:hover {
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.25), 0 0 60px rgba(245, 158, 11, 0.15);
}

.card-pink {
    background: linear-gradient(145deg, #fce7f3 0%, #fbcfe8 100%);
    border-color: rgba(236, 72, 153, 0.2);
}

.card-pink:hover {
    box-shadow: 0 12px 40px rgba(236, 72, 153, 0.25), 0 0 60px rgba(236, 72, 153, 0.15);
}

.card-purple {
    background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: rgba(139, 92, 246, 0.2);
}

.card-purple:hover {
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.25), 0 0 60px rgba(139, 92, 246, 0.15);
}

.card-cyan {
    background: linear-gradient(145deg, #ecfeff 0%, #cffafe 100%);
    border-color: rgba(6, 182, 212, 0.2);
}

.card-cyan:hover {
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.25), 0 0 60px rgba(6, 182, 212, 0.15);
}

/* ========================================
   MODERN BUTTONS
   ======================================== */

.btn-modern {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    border: none;
    color: white;
    border-radius: var(--radius-sm);
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(40, 171, 73, 0.3), 0 0 30px rgba(40, 171, 73, 0.1);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 500px;
    height: 500px;
}

.btn-modern:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(40, 171, 73, 0.4), 0 0 60px rgba(40, 171, 73, 0.2);
    color: white;
}

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

/* Button Variants */
.btn-modern-success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-modern-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-modern-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-modern-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ========================================
   MODERN FORMS
   ======================================== */

.modern-form-group {
    margin-bottom: 1.5rem;
}

.modern-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.modern-input,
.modern-select,
.modern-textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    background: white;
    color: #1f2937;
}

.input-group > .modern-input,
.input-group > .modern-select {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.modern-input:focus,
.modern-select:focus,
.modern-textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(40, 171, 73, 0.1);
}

.modern-input::placeholder {
    color: #9ca3af;
}

/* ========================================
   MODERN TABLE
   ======================================== */

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.modern-table thead th {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border: none;
}

.modern-table thead th:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.modern-table thead th:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.modern-table tbody tr {
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.modern-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(145deg, #ffffff, #f9fafb);
}

.modern-table tbody td {
    padding: 1.25rem 1.5rem;
    border: none;
    color: #374151;
}

.modern-table tbody td:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.modern-table tbody td:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* ========================================
   MODERN BADGES
   ======================================== */

.modern-badge {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-modern-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3), 0 0 20px rgba(16, 185, 129, 0.15);
}

.badge-modern-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3), 0 0 20px rgba(59, 130, 246, 0.15);
}

.badge-modern-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3), 0 0 20px rgba(245, 158, 11, 0.15);
}

.badge-modern-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3), 0 0 20px rgba(239, 68, 68, 0.15);
}

.badge-modern-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3), 0 0 20px rgba(139, 92, 246, 0.15);
}

.badge-modern-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    color: white;
    box-shadow: 0 4px 12px rgba(40, 171, 73, 0.3), 0 0 20px rgba(40, 171, 73, 0.15);
}
.badge-modern-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3), 0 0 20px rgba(107, 114, 128, 0.15);
}

/* ========================================
   MODERN STAT CARDS
   ======================================== */

.stat-card-modern {
    background: linear-gradient(145deg, #ffffff, #fefefe);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), #0ea5e9, var(--primary-blue));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-card-modern:hover::before {
    transform: scaleX(1);
}

.stat-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(40, 171, 73, 0.15), 0 0 60px rgba(40, 171, 73, 0.1);
}

.stat-card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(40, 171, 73, 0.3), 0 0 40px rgba(40, 171, 73, 0.15);
    position: relative;
    overflow: hidden;
}

.stat-card-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.stat-card-icon i {
    font-size: 32px;
    color: white;
    z-index: 1;
}

.stat-card-title {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1a202c;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   MODERN ALERTS
   ======================================== */

.alert-modern {
    border-radius: var(--radius-md);
    border: none;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.alert-modern-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-left: 4px solid #10b981;
    color: #065f46;
}

.alert-modern-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.alert-modern-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.alert-modern-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

/* ========================================
   PROFILE PAGE STYLES
   ======================================== */

.profile-header-card {
    background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(40, 171, 73, 0.15), 0 0 60px rgba(40, 171, 73, 0.1);
    border: 2px solid rgba(40, 171, 73, 0.2);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.profile-header-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(40, 171, 73, 0.25), 0 0 100px rgba(40, 171, 73, 0.2);
}

.profile-cover {
    height: 180px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
    position: relative;
    overflow: hidden;
}

.profile-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cover-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
}

.profile-content {
    padding: 2rem;
    position: relative;
}

.profile-avatar-section {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-top: -80px;
}

.avatar-container {
    position: relative;
}

.profile-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

.avatar-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 3px solid transparent;
    border-top-color: var(--primary-green);
    border-right-color: var(--primary-blue);
    border-radius: 50%;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-info {
    flex: 1;
    margin-top: 60px;
}

.profile-name {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: #1a202c;
}

.profile-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a5568;
    font-size: 0.95rem;
}

.detail-item i {
    font-size: 18px;
}

.btn-edit-profile {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(40, 171, 73, 0.3);
}

.btn-edit-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(40, 171, 73, 0.4);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-gradient-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-green {
    box-shadow: 0 0 20px rgba(40, 171, 73, 0.5), 0 0 40px rgba(40, 171, 73, 0.3);
}

.glow-blue {
    box-shadow: 0 0 20px rgba(1, 70, 170, 0.5), 0 0 40px rgba(1, 70, 170, 0.3);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .modern-card-body {
        padding: 1.5rem;
    }
    
    .profile-info {
        margin-top: 1rem;
    }
    
    .profile-details {
        flex-direction: column;
        gap: 0.75rem;
    }
}
