@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================ */
/* DASHBOARD GLOBAL STYLES */
/* ============================================ */

:root {
    /* COLORS */
    --primary: #0066cc;
    --primary-dark: #0052a3;
    --primary-light: #e6f2ff;
    
    --success: #00a366;
    --success-light: #e6f9f0;
    
    --warning: #ff9800;
    --warning-light: #fff4e6;
    
    --danger: #cc0000;
    --danger-light: #ffe6e6;
    
    --text-primary: #1a202c;
    --text-secondary: #5a6c7d;
    --text-tertiary: #7a8b9a;
    --text-quaternary: #a0aab0;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fb;
    --bg-tertiary: #f0f4f8;
    
    --border: #e8ecf1;
    --border-light: #d0d8e0;
    
    /* SPACING */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-2xl: 24px;
    --spacing-3xl: 32px;
    
    /* TYPOGRAPHY */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-base: 13px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 24px;
    --font-size-3xl: 28px;
    
    /* SHADOWS */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* BORDER RADIUS */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    
    /* TRANSITIONS */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: #f8f9fb;
}

/* ============================================ */
/* DASHBOARD CONTAINER */
/* ============================================ */

.dashboard-container {

    width: 100%;
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    padding: 6px;
    gap: 10px;

    overflow-x: hidden;
    overflow-y: visible;

    height: auto !important;
}

.dashboard-section {

    width: 100%;

    background: #ffffff;

    border-radius: 12px;

    padding: 2px;

    overflow: visible !important;

    height: auto !important;

    min-height: fit-content;
}



/* ============================================ */
/* GRID LAYOUTS */
/* ============================================ */

.dashboard-grid-3,
.dashboard-grid-2,
.dashboard-grid-1 {

    display: grid;

    gap: 8px;

    margin-bottom: 0;
}

.dashboard-grid-3 {

    grid-template-columns:
        repeat(3, 1fr);
}

.dashboard-grid-2 {

    grid-template-columns:
        repeat(2, 1fr);
}

.dashboard-grid-1 {

    grid-template-columns:
        1fr;
}

/* ============================================ */
/* CARD COMPONENTS */
/* ============================================ */

.metric-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.metric-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.card-header h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-content {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================ */
/* UTILITY CLASSES */
/* ============================================ */

.no-data {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
    color: var(--text-tertiary);
    font-size: var(--font-size-base);
}

.loading-state {
    text-align: center;
    padding: var(--spacing-3xl);
    color: var(--text-tertiary);
}

/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */

/* TABLET - 1024px and below */
@media (max-width: 1024px) {
    .dashboard-container {
        padding: 0 var(--spacing-lg);
    }

    .dashboard-section {
        padding: var(--spacing-xl);
    }

    .dashboard-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid-3:last-child {
        grid-template-columns: 1fr;
    }

    .dashboard-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-header {
        padding-left: var(--spacing-lg);
        padding-right: var(--spacing-lg);
        margin-left: calc(var(--spacing-lg) * -1);
        margin-right: calc(var(--spacing-lg) * -1);
    }
}

/* LANDSCAPE TABLET - 768px and below */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 0 var(--spacing-md);
    }

    .dashboard-section {
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-xl);
    }

    .dashboard-grid-3,
    .dashboard-grid-2 {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .dashboard-header {
        padding: var(--spacing-xl) var(--spacing-md);
        margin-left: calc(var(--spacing-md) * -1);
        margin-right: calc(var(--spacing-md) * -1);
    }

    .dashboard-title {
        font-size: var(--font-size-2xl);
    }

    .card-header h4 {
        font-size: var(--font-size-base);
    }

    .card-content {
        padding: var(--spacing-md);
    }

    .card-header {
        padding: var(--spacing-md);
    }

    .section-header {
        margin-bottom: var(--spacing-lg);
        padding-bottom: var(--spacing-md);
    }

    .section-header h3 {
        font-size: var(--font-size-lg);
    }
}

/* MOBILE - 480px and below */
@media (max-width: 480px) {
    .dashboard-container {
        padding: 0 var(--spacing-sm);
    }

    .dashboard-section {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
        border-radius: var(--radius-md);
    }

    .dashboard-header {
        padding: var(--spacing-lg) var(--spacing-sm);
        margin-left: calc(var(--spacing-sm) * -1);
        margin-right: calc(var(--spacing-sm) * -1);
        padding-bottom: var(--spacing-lg);
    }

    .dashboard-title {
        font-size: var(--font-size-lg);
    }

    .dashboard-subtitle {
        font-size: var(--font-size-sm);
    }

    .section-header h3 {
        font-size: var(--font-size-base);
    }

    .metric-card {
        border-radius: var(--radius-md);
    }

    .card-header {
        padding: var(--spacing-sm);
    }

    .card-header h4 {
        font-size: var(--font-size-sm);
    }

    .card-content {
        padding: var(--spacing-sm);
    }
}

/* ============================================ */
/* DARK MODE SUPPORT (Optional Future) */
/* ============================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a202c;
        --bg-secondary: #2d3748;
        --bg-tertiary: #3a4556;
        
        --text-primary: #f0f4f8;
        --text-secondary: #cbd5e0;
        --text-tertiary: #a0aab0;
        
        --border: #4a5568;
        --border-light: #5a6c7d;
    }

    html, body {
        background: #0f1419;
    }

    .dashboard-section {
        background: var(--bg-primary);
    }

    .metric-card {
        background: var(--bg-primary);
    }
}

/* ============================================ */
/* PRINT STYLES */
/* ============================================ */

@media print {
    .dashboard-filter-bar {
        display: none;
    }

    .dashboard-container {
        padding: 0;
    }

    .dashboard-section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
/* =========================================
   LIVE OPERATIONS HEADER
========================================= */

.section-header {
    background: #101c72;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 12px;
    border: 1px solid rgba(0,255,102,0.25);
}

.live-dashboard-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: #00ff66;
    box-shadow: 0 0 5px #00ff66, 0 0 10px #00ff66, 0 0 18px #00ff66;
    animation: liveDotBlink 0.8s infinite;
}

.live-dashboard-text {
    font-size: 8px;
    font-weight: 800;
    color: #00ff66 !important;
    letter-spacing: 0.5px;
    text-shadow: 0 0 5px #00ff66, 0 0 10px #00ff66;
    animation: liveTextBlink 0.8s infinite;
}

/* TEXT BLINK */
@keyframes liveTextBlink {

    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }

    100% {
        opacity: 1;
    }
}

/* DOT BLINK */
@keyframes liveDotBlink {

    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.35);
        opacity: 0.4;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}
html,
body {

    width: 100%;
    min-height: 100%;

    overflow-x: hidden;
    overflow-y: auto !important;
}

.main-content,
.page-content,
.dashboard-page {

    height: auto !important;

    min-height: 100vh;

    overflow: visible !important;
}