/**
 * EURABELT FUELS RESOURCE PORTAL
 * ===============================
 * Main Global Stylesheet
 * Version: 1.0
 */

/* ============================================
   CSS VARIABLES / DESIGN TOKENS
   ============================================ */
:root {
    /* Primary Brand Colors */
    --primary: #0A1628;
    --primary-light: #1E3A5F;
    --primary-dark: #050D17;
    --secondary: #162D50;
    
    /* Accent Colors (Gold) */
    --accent: #C9A227;
    --accent-light: #D4AF37;
    --accent-dark: #A68B1F;
    --accent-muted: rgba(201, 162, 39, 0.15);
    
    /* Text Colors */
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-dark: #1E293B;
    
    /* Background Colors */
    --bg-dark: #030712;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.05);
    --bg-input: rgba(0, 0, 0, 0.3);
    
    /* Border Colors */
    --border-color: rgba(201, 162, 39, 0.2);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-muted: rgba(255, 255, 255, 0.05);
    
    /* Status Colors */
    --success: #10B981;
    --success-light: #6EE7B7;
    --success-bg: rgba(16, 185, 129, 0.15);
    
    --warning: #F59E0B;
    --warning-light: #FCD34D;
    --warning-bg: rgba(245, 158, 11, 0.15);
    
    --danger: #EF4444;
    --danger-light: #FCA5A5;
    --danger-bg: rgba(239, 68, 68, 0.15);
    
    --info: #3B82F6;
    --info-light: #93C5FD;
    --info-bg: rgba(59, 130, 246, 0.15);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 4px 30px rgba(201, 162, 39, 0.15);
    --shadow-gold-lg: 0 8px 40px rgba(201, 162, 39, 0.25);
    
    /* Typography */
    --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-tooltip: 400;
}

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(201, 162, 39, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(30, 58, 95, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-light);
}

ul, ol {
    list-style: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.text-display {
    font-family: var(--font-display);
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-small {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container-sm { max-width: 600px; }
.container-md { max-width: 900px; }
.container-lg { max-width: 1200px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.grid { display: grid; }

.hidden { display: none !important; }
.visible { display: block; }

/* ============================================
   SPACING UTILITIES
   ============================================ */
.m-0 { margin: 0; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.p-0 { padding: 0; }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.875rem 1.5rem;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    outline: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    color: var(--primary);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-color: var(--accent);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold-lg);
}

.btn-secondary {
    color: var(--text-secondary);
    background: transparent;
    border-color: var(--border-light);
}

.btn-secondary:hover:not(:disabled) {
    color: var(--accent);
    border-color: var(--accent);
}

.btn-danger {
    color: var(--danger-light);
    background: var(--danger-bg);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

/* Button Loading State */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: var(--space-sm);
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.form-label .required {
    color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    outline: none;
    transition: all var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-select {
    appearance: none;
    cursor: pointer;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: linear-gradient(145deg, rgba(22, 45, 80, 0.4), rgba(10, 22, 40, 0.6));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(201, 162, 39, 0.4);
    box-shadow: var(--shadow-gold);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    color: var(--text-secondary);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-muted);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
}

.badge-primary {
    color: var(--primary);
    background: var(--accent);
}

.badge-success {
    color: var(--success);
    background: var(--success-bg);
}

.badge-warning {
    color: var(--warning);
    background: var(--warning-bg);
}

.badge-danger {
    color: var(--danger);
    background: var(--danger-bg);
}

.badge-info {
    color: var(--info);
    background: var(--info-bg);
}

.badge-outline {
    background: transparent;
    border: 1px solid currentColor;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: var(--space-lg);
}

.alert-success {
    color: var(--success-light);
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-warning {
    color: var(--warning-light);
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-danger {
    color: var(--danger-light);
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-info {
    color: var(--info-light);
    background: var(--info-bg);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ============================================
   HEADER COMPONENT
   ============================================ */
.header {
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.98), rgba(10, 22, 40, 0.95));
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
    max-width: 1600px;
    margin: 0 auto;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--primary);
}

.logo-text h1 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.logo-text span {
    font-size: 0.65rem;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.back-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--accent);
}

/* ============================================
   FOOTER COMPONENT
   ============================================ */
.footer {
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    padding: var(--space-xl);
    text-align: center;
}

.footer-ncage {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.ncage-item {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.ncage-item strong {
    color: var(--accent);
}

.footer-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-text a {
    color: var(--accent);
}

/* ============================================
   DISCLAIMER BOX
   ============================================ */
.disclaimer {
    max-width: 800px;
    margin: 0 auto var(--space-md);
    padding: var(--space-md);
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    color: var(--warning);
    text-align: center;
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
    padding: var(--space-2xl) var(--space-xl);
    max-width: 1600px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-color), transparent);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
}

.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

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

/* ============================================
   SEARCH & FILTER CONTROLS
   ============================================ */
.controls-section {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-muted);
    padding: var(--space-lg) var(--space-xl);
}

.search-row {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.search-input {
    flex: 1;
    min-width: 250px;
}

.filter-select {
    min-width: 180px;
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.results-count span {
    color: var(--accent);
    font-weight: 600;
}

/* ============================================
   NO RESULTS STATE
   ============================================ */
.no-results {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    color: var(--text-secondary);
}

.no-results svg {
    width: 64px;
    height: 64px;
    stroke: var(--text-secondary);
    margin: 0 auto var(--space-md);
    opacity: 0.5;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .search-row {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .results-info {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

@media (max-width: 480px) {
    :root {
        --space-xl: 1rem;
        --space-2xl: 1.5rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

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

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse {
    animation: pulse 2s ease infinite;
}
