/* ... existing code ... */
.text-transparent {
    color: transparent;
}

/* REVISI: Enhanced Chart Container for responsive sizing */
.chart-container {
    /* Menggunakan tinggi viewport (vh) dikurangi perkiraan tinggi header/padding */
    height: calc(100vh - 220px);
    min-height: 400px; /* Tinggi minimum agar tidak terlalu kecil di layar besar */
    width: 100%;
    transition: height 0.2s ease-in-out;
}

@media (max-width: 1024px) {
    .chart-container {
        height: 60vh;
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .chart-container {
        height: 55vh;
        min-height: 350px;
    }
}

@media (max-width: 640px) {
    .chart-container {
        /* Memberi ruang lebih besar pada mobile */
        height: 50vh;
        min-height: 300px;
    }
}


/* REVISI: Enhanced Toast Styles */
.toast {
    padding: 12px 16px;
/* ... existing code ... -->

/* ========================================
   TAHAP 1: FOUNDATION & COLORS ENHANCEMENT
   ======================================== */

/* Modern Gradient Backgrounds */
body {
    background-attachment: fixed;
}

/* Enhanced Shadow System */
.shadow-3xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Smooth Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #9333ea, #ec4899);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7e22ce, #db2777);
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
    background: rgba(51, 65, 85, 0.3);
}

.dark ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #a855f7, #f472b6);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9333ea, #ec4899);
}

/* ========================================
   TAHAP 2: GLASSMORPHISM & DEPTH
   ======================================== */

/* Enhanced Glass Effect for Cards */
.bg-white\/80 {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.75) 100%);
}

.dark .bg-slate-900\/80 {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.75) 100%);
}

/* Layered Shadow System for Depth */
.shadow-2xl {
    box-shadow: 
        0 0 0 1px rgba(147, 51, 234, 0.05),
        0 10px 15px -3px rgba(147, 51, 234, 0.1),
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 40px 40px -10px rgba(147, 51, 234, 0.05);
}

.dark .shadow-2xl {
    box-shadow: 
        0 0 0 1px rgba(168, 85, 247, 0.1),
        0 10px 15px -3px rgba(168, 85, 247, 0.15),
        0 20px 25px -5px rgba(0, 0, 0, 0.3),
        0 40px 40px -10px rgba(168, 85, 247, 0.1);
}

/* Hover Shadow with Purple Glow */
.hover\:shadow-3xl:hover {
    box-shadow: 
        0 0 0 1px rgba(147, 51, 234, 0.1),
        0 15px 25px -5px rgba(147, 51, 234, 0.2),
        0 25px 35px -10px rgba(0, 0, 0, 0.15),
        0 50px 60px -15px rgba(147, 51, 234, 0.15),
        0 0 50px rgba(147, 51, 234, 0.1);
}

.dark .hover\:shadow-3xl:hover {
    box-shadow: 
        0 0 0 1px rgba(168, 85, 247, 0.15),
        0 15px 25px -5px rgba(168, 85, 247, 0.25),
        0 25px 35px -10px rgba(0, 0, 0, 0.4),
        0 50px 60px -15px rgba(168, 85, 247, 0.2),
        0 0 60px rgba(168, 85, 247, 0.15);
}

/* Shadow for Buttons */
.shadow-lg {
    box-shadow: 
        0 0 0 1px rgba(147, 51, 234, 0.1),
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.hover\:shadow-xl:hover {
    box-shadow: 
        0 0 0 1px rgba(147, 51, 234, 0.15),
        0 20px 25px -5px rgba(147, 51, 234, 0.15),
        0 10px 10px -5px rgba(0, 0, 0, 0.1),
        0 0 30px rgba(147, 51, 234, 0.1);
}

/* Border Gradient Effect */
.border-purple-200\/50 {
    border-color: rgba(233, 213, 255, 0.5);
}

.dark .border-purple-800\/50 {
    border-color: rgba(107, 33, 168, 0.5);
}

/* Enhanced Backdrop Blur */
.backdrop-blur-xl {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.backdrop-blur-sm {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Glass Reflection Effect */
.bg-white\/80::before,
.dark .bg-slate-900\/80::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 100%
    );
    pointer-events: none;
    border-radius: inherit;
    opacity: 0.5;
}

/* Inner Shadow for Depth */
.shadow-inner {
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.dark .shadow-inner {
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2);
}

/* Ticker Animation - Smooth Scroll */
.ticker-content {
    animation: ticker-scroll 60s linear infinite;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ticker-content:hover {
    animation-play-state: paused;
}

/* Card Hover Lift Effect */
.hover\:shadow-md:hover {
    transform: translateY(-2px);
}

.hover\:shadow-xl:hover {
    transform: translateY(-2px);
}

.hover\:shadow-3xl:hover {
    transform: translateY(-4px);
}

/* ========================================
   TAHAP 3: ANIMATIONS & MICRO-INTERACTIONS
   ======================================== */

/* Fade-in Animation for Page Load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Apply animations to elements */
header {
    animation: slideInFromTop 0.6s ease-out;
}

.max-w-7xl > div:nth-child(1) {
    animation: fadeIn 0.8s ease-out 0.1s backwards;
}

.max-w-7xl > div:nth-child(2) {
    animation: fadeIn 0.8s ease-out 0.2s backwards;
}

.max-w-7xl > div:nth-child(3) {
    animation: fadeIn 0.8s ease-out 0.3s backwards;
}

/* Button Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

button {
    position: relative;
    overflow: hidden;
}

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

button:active::before {
    width: 300px;
    height: 300px;
    transition: 0s;
}

/* Smooth Hover Transitions */
a, button, input, select, textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icon Spin on Hover */
.hover-spin:hover {
    animation: spin 0.6s ease-in-out;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Pulse Animation for Important Elements */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(147, 51, 234, 0);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Shimmer Loading Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Bounce Animation for Success/Error */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 0.5s ease-in-out;
}

/* Scale on Hover - Enhanced */
.hover\:scale-105:hover {
    transform: scale(1.05);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover\:scale-110:hover {
    transform: scale(1.1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Rotate on Hover */
.hover-rotate:hover {
    transform: rotate(5deg);
    transition: transform 0.3s ease;
}

/* Gradient Animation for Backgrounds */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Toast Slide In Animation */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast {
    animation: slideInFromRight 0.3s ease-out;
}

/* Modal Fade In */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-overlay {
    animation: modalFadeIn 0.3s ease-out;
}

.modal-content {
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Number Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-up {
    animation: countUp 0.6s ease-out;
}

/* Focus Ring Enhancement */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.5);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Stagger Animation for Lists */
.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Glow on Hover */
.hover-glow:hover {
    box-shadow: 0 0 30px rgba(147, 51, 234, 0.5);
    transition: box-shadow 0.3s ease;
}

/* ========================================
   TAHAP 4: DATA VISUALIZATION ENHANCEMENT
   ======================================== */

/* Enhanced PNL Display */
.pnl-positive {
    position: relative;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.pnl-negative {
    position: relative;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
}

/* Status Badge Animations */
@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.status-badge {
    animation: badge-pulse 2s ease-in-out infinite;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(147, 51, 234, 0.1);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #9333ea, #ec4899);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Card Stat Enhancement */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #9333ea, #ec4899, #6366f1);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
}

/* Number Highlight Effect */
.number-highlight {
    position: relative;
    display: inline-block;
}

.number-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #9333ea, #ec4899);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.number-highlight:hover::after {
    transform: scaleX(1);
}

/* Icon Badge */
.icon-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-badge::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #9333ea, #ec4899);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.icon-badge:hover::before {
    opacity: 1;
}

/* Chart Legend */
.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.chart-legend-item:hover {
    background: rgba(147, 51, 234, 0.1);
    transform: translateX(4px);
}

.chart-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.2);
}

/* Data Table Enhancement */
.data-row {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.data-row:hover {
    border-left-color: #9333ea;
    background: linear-gradient(90deg, rgba(147, 51, 234, 0.05) 0%, transparent 100%);
    transform: translateX(2px);
}

/* Metric Card */
.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Percentage Badge */
.percentage-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.percentage-badge.positive {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.1));
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.percentage-badge.negative {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.percentage-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Visual Separator */
.visual-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(147, 51, 234, 0.3), transparent);
    margin: 1rem 0;
}

/* ========================================
   TAHAP 5: POLISH & FINE-TUNING
   ======================================== */

/* Typography Optimization */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* Button Polish */
button {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Input Polish */
input, select, textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Focus Visible (Accessibility) */
*:focus-visible {
    outline: 2px solid rgba(147, 51, 234, 0.6);
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background: rgba(147, 51, 234, 0.3);
    color: inherit;
}

::-moz-selection {
    background: rgba(147, 51, 234, 0.3);
    color: inherit;
}

/* Link Improvements */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent Text Overflow */
.truncate-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.truncate-lines-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(147, 51, 234, 0.3);
    border-top-color: #9333ea;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(147, 51, 234, 0.05) 25%,
        rgba(147, 51, 234, 0.1) 50%,
        rgba(147, 51, 234, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Error State */
.error-state {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.05);
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success State */
.success-state {
    border-color: #10b981 !important;
    background-color: rgba(16, 185, 129, 0.05);
}

/* Improved Card Shadows */
.card-shadow-sm {
    box-shadow: 
        0 1px 2px 0 rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(147, 51, 234, 0.05);
}

.card-shadow-md {
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(147, 51, 234, 0.05);
}

.card-shadow-lg {
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(147, 51, 234, 0.05);
}

/* Responsive Utilities */
@media (max-width: 640px) {
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
    h3 { font-size: 1.125rem !important; }
    
    .mobile-hidden {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .tablet-hidden {
        display: none !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .border-purple-200\/50 {
        border-color: rgba(147, 51, 234, 0.8) !important;
    }
    
    .bg-purple-50\/50 {
        background-color: rgba(147, 51, 234, 0.15) !important;
    }
}

/* Print Styles */
@media print {
    body {
        background: white !important;
    }
    
    header,
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-after: always;
    }
}

/* Accessibility - Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Improved Transitions */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bounce-transition {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Z-Index Management */
.z-dropdown { z-index: 500; }
.z-sticky { z-index: 200; }
.z-modal { z-index: 1000; }
.z-toast { z-index: 2000; }

/* Header MUST NOT create new stacking context */
header {
    z-index: 100;
    position: sticky;
}

/* Profile dropdown menu - Use absolute with VERY high z-index */
#profileMenu {
    position: absolute !important;
    z-index: 999999 !important;
}

/* Ensure main content stays below */
main {
    position: relative;
    z-index: 1;
}

/* Utility Classes */
.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-auto-fill {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Performance Optimization */
.gpu-accelerate {
    transform: translateZ(0);
    will-change: transform;
}

.optimize-rendering {
    contain: layout style paint;
}

/* Safe Area (Mobile Notch) */
@supports (padding: env(safe-area-inset-bottom)) {
    .safe-bottom {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .safe-top {
        padding-top: env(safe-area-inset-top);
    }
}
