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

:root {
    --erp-primary: #0f172a; /* Deep Slate corporate primary */
    --erp-accent: #3b82f6;  /* Modern Blue accent */
    --erp-dark: #0f172a;
    --erp-light: #f1f5f9;
    --erp-text: #1e293b;
    --erp-text-muted: #64748b;
    --erp-border: #e2e8f0;
    --erp-card-bg: #ffffff;
    --erp-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', sans-serif;
    color: #1e293b !important;
    background-color: #f8fafc !important; /* Force Light Background */
    line-height: 1.6;
}

/* Font Weight Utilities */
.fw-black { font-weight: 950 !important; }
.fw-extrabold { font-weight: 800 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }


/* Aggressive Universal Overrides for Locked Files */
main, .erp-viewport, .erp-light-viewport, 
.erp-wizard-container, .ERP-BODY, 
[style*="background-color: #0b0e14"], 
[style*="background: #0"] {
    background-color: #f1f5f9 !important;
    background: #f1f5f9 !important;
    color: #1e293b !important;
}

.erp-viewport, .ERP-light-viewport {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height, 110px));
    padding: 1.5rem;
    gap: 1.5rem;
}

.erp-full-height, .ERP-full-height {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.erp-card-body-scroll, .ERP-card-body-scroll {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

/* Premium Universal Card Style (Replaces Dark) */
.dashboard-card, .card, .erp-card, .erp-light-card, .ERP-light-card,
.erp-glass-card, .erp-stat-item, .ERP-stat-item {
    background: #ffffff !important;
    background-color: #ffffff !important;
    backdrop-filter: none !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
    display: flex;
    flex-direction: column;
    color: #1e293b !important;
}

.erp-card-header, .erp-light-header, .ERP-light-header, .erp-header, .ERP-header {
    padding: 1rem 1.5rem;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.erp-header-title, .erp-card-title, .ERP-card-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 950 !important; /* Extremely Bold */
    letter-spacing: 0.5px;
    color: #0f172a !important;
    text-transform: uppercase;
    margin: 0;
}

/* Universal Table System (Light Only) */
.erp-table-container {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.erp-table, .erp-light-table, .ERP-light-table {
    margin-bottom: 0 !important;
}

.erp-table thead th, .erp-light-table thead th, .ERP-light-table thead th {
    background: #0f172a !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    font-weight: 900 !important;
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 1rem !important;
    border-bottom: 2px solid #f1f5f9 !important;
}

.erp-table tbody td, .erp-light-table tbody td, .ERP-light-table tbody td {
    padding: 0.85rem 1rem !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #1e293b !important;
    font-size: 0.85rem !important;
    font-weight: 600; /* High legibility */
}

.erp-table tr:hover td, .erp-light-table tr:hover td, .ERP-light-table tr:hover td {
    background: #f8fafc !important;
}

/* Global Input Modernization (Light only) */
.form-control, .form-select, .erp-input, .erp-select,
.erp-light-form-control, .ERP-light-form-control, .erp-light-form-select, .ERP-light-form-select {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 8px !important;
    padding: 0.6rem 0.85rem !important;
    font-size: 0.85rem;
    font-weight: 800 !important; /* Bold Inputs */
}

.form-control:focus, .form-select:focus, .erp-input:focus, .erp-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

.form-label, .erp-label, .erp-light-label, .ERP-light-label {
    text-transform: uppercase;
    font-size: 0.65rem;
    font-weight: 950 !important; /* Extremely Bold Labels */
    letter-spacing: 1px;
    color: #475569 !important;
    margin-bottom: 0.4rem;
}

/* Wizard/Step Overrides */
.erp-steps-nav {
    background: #f1f5f9 !important;
    border-radius: 12px !important;
}

.erp-step-link {
    background: transparent !important;
    color: #64748b !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
}

.erp-step-link.active {
    background: white !important;
    color: #3b82f6 !important;
    border: 1px solid #3b82f6 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
}

/* Professional Corporate Button */
.btn-erp, .btn-erp-light, .btn-ERP-light {
    background: #0f172a;
    color: #ffffff !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
}

.btn-erp:hover, .btn-erp-light:hover, .btn-ERP-light:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }


/* =========================================
   Professional Light Theme (Standard Mode)
   ========================================= */

.ERP-light-viewport {
    background-color: #f1f5f9;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 110px);
}

.ERP-light-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.ERP-light-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ERP-light-table thead th {
    background: #0f172a !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 1.25rem 1rem !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.ERP-light-table tbody td {
    padding: 0.875rem 1rem !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #1e293b !important;
    font-size: 0.875rem !important;
}

.ERP-light-form-control, .ERP-light-form-select {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 8px !important;
    padding: 0.6rem 0.85rem !important;
    font-size: 0.85rem;
}

.ERP-light-form-control:focus, .ERP-light-form-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

.ERP-light-label {
    text-transform: uppercase;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.btn-ERP-light {
    background-color: #0f172a;
    color: #ffffff !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    transition: all 0.2s;
}

.btn-ERP-light:hover {
    background-color: #1e293b;
    transform: translateY(-1px);
}


/* =========================================
   Typography & Spacing Utilities
   (Used across all ERP modules — defined here globally)
   ========================================= */

/* Tiny text helper */
.smallest { font-size: 0.62rem !important; }
.font-7   { font-size: 0.7rem !important; }

/* Letter spacing helpers */
.tracking-tighter { letter-spacing: -0.05em !important; }
.tracking-tight   { letter-spacing: -0.025em !important; }
.tracking-normal  { letter-spacing: 0 !important; }
.tracking-wide    { letter-spacing: 0.025em !important; }
.tracking-wider   { letter-spacing: 0.05em !important; }
.tracking-widest  { letter-spacing: 0.15em !important; }

/* Text transform helpers */
.uppercase { text-transform: uppercase !important; }
.italic    { font-style: italic !important; }

/* =========================================
   User Profile Header — Fix name visibility
   ========================================= */
.user-profile .user-name-text {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.25 !important;
    display: block !important;
    min-width: 0 !important;
    overflow: visible !important;
    max-width: 150px;
}
