/* Planet Kebab Dashboard - Custom Styles */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   CUSTOM SCROLLBAR
   ============================================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0F1117;
}

::-webkit-scrollbar-thumb {
    background: #2A2D37;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3A3D47;
}

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

.card {
    background: #1A1D27;
    border: 1px solid #2A2D37;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: #3A3D47;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.1);
}

.card-hero {
    background: linear-gradient(135deg, #1A1D27 0%, #242834 100%);
    border: 1px solid #2A2D37;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.card-hero:hover {
    border-color: #F97316;
    box-shadow: 0 8px 32px rgba(249, 115, 22, 0.2);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #F3F4F6;
}

/* ============================================================================
   PAGE LAYOUT
   ============================================================================ */

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

.page-title {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

/* ============================================================================
   NAVIGATION
   ============================================================================ */

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 12px;
    color: #9CA3AF;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: rgba(249, 115, 22, 0.1);
    color: #F97316;
}

.nav-item.active {
    background: rgba(249, 115, 22, 0.15);
    color: #F97316;
    font-weight: 600;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    color: #6B7280;
    text-decoration: none;
    position: relative;
    transition: all 0.2s ease;
    min-width: 0;
    flex: 1;
}

.bottom-nav-item:hover {
    color: #F97316;
}

.bottom-nav-item.active {
    color: #F97316;
}

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: #F97316;
    border-radius: 0 0 3px 3px;
}

/* ============================================================================
   HERO NUMBERS
   ============================================================================ */

.hero-number {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #F97316 0%, #FB923C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .hero-number {
        font-size: 36px;
    }
}

/* ============================================================================
   NUMBER FORMATTING
   ============================================================================ */

.positive {
    color: #10B981;
}

.negative {
    color: #EF4444;
}

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

.stat-card {
    background: #1A1D27;
    border: 1px solid #2A2D37;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #3A3D47;
    transform: translateY(-2px);
}

.stat-label {
    font-size: 12px;
    color: #9CA3AF;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #F3F4F6;
}

/* ============================================================================
   PERIOD TOGGLE
   ============================================================================ */

.period-toggle {
    display: flex;
    gap: 8px;
    background: #1A1D27;
    border: 1px solid #2A2D37;
    border-radius: 12px;
    padding: 4px;
}

.period-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #9CA3AF;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover {
    color: #F97316;
}

.period-btn.active {
    background: #F97316;
    color: white;
}

/* ============================================================================
   CHARTS
   ============================================================================ */

.chart-container {
    position: relative;
    width: 100%;
    margin-top: 16px;
}

/* ============================================================================
   DATA TABLE
   ============================================================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    border-bottom: 2px solid #2A2D37;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    color: #9CA3AF;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid #2A2D37;
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(249, 115, 22, 0.05);
}

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

.alert {
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.alert:hover {
    transform: translateX(4px);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3B82F6;
}

.alert-warning {
    background: rgba(249, 115, 22, 0.1);
    border-color: #F97316;
}

.alert-critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: #EF4444;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 20px;
}

/* ============================================================================
   LOADING SPINNER
   ============================================================================ */

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #2A2D37;
    border-top-color: #F97316;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================================================
   LOADING SKELETONS
   ============================================================================ */

.skeleton {
    background: linear-gradient(
        90deg,
        #1A1D27 0%,
        #242834 50%,
        #1A1D27 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

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

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

/* ============================================================================
   PAGE TRANSITIONS
   ============================================================================ */

#pageContent {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 768px) {
    .page-title {
        font-size: 24px;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .card-hero {
        padding: 24px;
        margin-bottom: 16px;
    }
    
    .stat-value {
        font-size: 20px;
    }
}

/* ============================================================================
   PULL TO REFRESH (Optional Enhancement)
   ============================================================================ */

.pull-to-refresh {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1A1D27;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.pull-to-refresh.active {
    transform: translateY(0);
}

.pull-to-refresh .spinner {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

/* ============================================================================
   BUTTON STYLES
   ============================================================================ */

button:focus,
input:focus {
    outline: none;
}

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

/* ============================================================================
   INPUT STYLES
   ============================================================================ */

input[type="password"]::placeholder {
    color: #6B7280;
}

input[type="password"]:focus {
    border-color: #F97316 !important;
}

/* ============================================================================
   CUSTOM UTILITIES
   ============================================================================ */

.text-brand-orange {
    color: #F97316;
}

.text-brand-green {
    color: #10B981;
}

.text-brand-red {
    color: #EF4444;
}

.bg-dark-bg {
    background-color: #0F1117;
}

.bg-dark-card {
    background-color: #1A1D27;
}

.border-dark-border {
    border-color: #2A2D37;
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

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

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #F97316;
    outline-offset: 2px;
}
