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

:root {
    /* Nexus Core Palette - Darker & Higher Contrast */
    --primary: #2563eb;           /* Royal Blue */
    --primary-hover: #1d4ed8;
    --secondary: #475569;         /* Darker Slate */
    --dark: #0f172a;              /* Navy Dark */
    --bg-body: #f1f5f9;           /* Slightly darker off-white for better contrast */
    --bg-card: #ffffff;           /* Pure White */
    
    /* Text Palette - FORCED HIGH CONTRAST */
    --text-main: #0f172a;         /* Near Black (Ink) */
    --text-muted: #334155;        /* Dark Slate */
    --text-light: #64748b;        /* Steel Grey */
    
    /* Functional Colors */
    --danger: #dc2626;            /* Strong Red */
    --success: #059669;           /* Strong Green */
    --warning: #d97706;           /* Strong Amber */
    
    /* Layout & UI */
    --header-height: 85px;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
    --border: #cbd5e1;           /* More visible border */
}

/* --- GLOBAL TEXT VISIBILITY FIX --- */
/* This ensures that even if an element doesn't have a class, it won't be white on white */
* { 
    box-sizing: border-box; 
    transition: background 0.2s, color 0.2s, border 0.2s, transform 0.2s; 
}

body, p, span, div, li, td, th {
    color: var(--text-main);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- PROFESSIONAL SCROLLBAR --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #e2e8f0; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* --- CONTAINERS & CARDS --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    color: var(--text-main); /* Explicitly set text color inside cards */
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: #94a3b8;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 { 
    font-weight: 800; 
    letter-spacing: -0.025em; 
    color: var(--dark); /* Force titles to be dark navy */
    margin-top: 0;
    line-height: 1.2;
}

/* --- BUTTONS --- */
.btn {
    padding: 12px 26px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.95rem;
    gap: 10px;
}

.btn-primary { 
    background: var(--primary); 
    color: #ffffff !important; /* Force white text on blue buttons */
}

.btn-primary:hover { 
    background: var(--primary-hover); 
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

.btn-outline { 
    background: transparent; 
    border: 2px solid var(--border); 
    color: var(--text-main); 
}

.btn-outline:hover { 
    background: #ffffff; 
    border-color: var(--primary);
    color: var(--primary);
}

/* --- MODERN FORM INPUTS --- */
input, select, textarea {
    width: 100%;
    padding: 14px 18px;
    margin: 10px 0;
    background: #ffffff;
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-main); /* Ensure typed text is dark ink */
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
}

input:focus, select:focus, textarea:focus { 
    border-color: var(--primary); 
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Placeholder visibility */
::placeholder {
    color: #94a3b8;
    opacity: 1;
}

label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
    display: block;
}

/* --- PROFESSIONAL NOTIFICATION SYSTEM --- */
#alert-area {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-message {
    background: var(--dark); /* High contrast alerts */
    color: white;
    border-left: 5px solid var(--primary);
    padding: 18px 28px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- STATUS BADGES --- */
.badge {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
}
.badge-pending { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }
.badge-success { background: #d1fae5; color: #065f46; border: 1px solid #10b981; }
.badge-error { background: #fee2e2; color: #991b1b; border: 1px solid #ef4444; }

/* --- ANIMATIONS --- */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .card { padding: 25px 20px; }
    h1 { font-size: 1.8rem; }
    .btn { width: 100%; margin-bottom: 10px; }
}