/* ===== GLOBAL TYPOGRAPHY UPDATES ===== */

/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

/* Global font family assignments */
:root {
    --font-body: 'Lato', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-title: 'Playfair Display', serif;
    --font-button: 'Bebas Neue', cursive;
}

/* Testi semplici - Lato */
body, 
p, 
span, 
div, 
td, 
th, 
input, 
textarea, 
select, 
label, 
.text, 
.description, 
.content, 
.message, 
.notification, 
.form-control, 
.nav-text {
    font-family: var(--font-body) !important;
    color: #ffffff !important;
}

/* Titoli - Playfair Display */
h1, 
h2, 
h3, 
h4, 
h5, 
h6, 
.title, 
.header-title, 
.section-title, 
.auth-title, 
.modal-title, 
.page-title, 
.card-title, 
.panel-title, 
.welcome-title, 
.stats-title {
    font-family: var(--font-title) !important;
    color: #ffffff !important;
}

/* Pulsanti - Bebas Neue */
button, 
.btn, 
.button, 
.action-btn, 
.submit-btn, 
.auth-btn, 
.logout-btn, 
.card-btn, 
.modal-btn, 
.cta-button, 
input[type="submit"], 
input[type="button"], 
.nav-tab, 
.tab-btn, 
.database-tab {
    font-family: var(--font-button) !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

/* Assicuriamoci che tutti i link siano bianchi */
a, 
.link {
    color: #ffffff !important;
}

/* Placeholder text bianco */
::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Badge e status con testo bianco quando necessario */
.status-badge, 
.badge, 
.tag {
    color: #ffffff !important;
}

/* Icone bianche */
i, 
.fa, 
.fas, 
.far, 
.fab {
    color: #ffffff !important;
}

/* Override specifici per elementi che potrebbero avere colori diversi */
.sidebar,
.sidebar *,
.main-content,
.main-content *,
.modal,
.modal *,
.header,
.header *,
.footer,
.footer * {
    color: #ffffff !important;
}

/* Font override per elementi già esistenti */
.data-table th,
.data-table td {
    font-family: var(--font-body) !important;
    color: #ffffff !important;
}

.stat-card h3,
.welcome h1,
.user-name {
    font-family: var(--font-title) !important;
}

/* Email templates - assicuriamoci che i testi siano bianchi anche lì */
.email-container *,
.email-body *,
.job-details * {
    color: #ffffff !important;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #371e10 #d6c2a7;
}

/* Admin panel specific overrides */
.model-name,
.photo-count,
.file-name,
.model-data-label,
.model-data-value,
.info-label,
.info-value,
.link-title,
.link-desc {
    color: #ffffff !important;
}

/* Success/Error states - keep functional colors but ensure readability */
.success {
    color: #00ff88 !important;
}

.error {
    color: #ff6b6b !important;
}

.warning {
    color: #ffd93d !important;
}

/* Specific overrides for form elements */
option {
    background-color: #250e0b !important;
    color: #ffffff !important;
}

/* Table headers and content */
thead, thead th {
    color: #ffffff !important;
}

tbody, tbody td {
    color: #ffffff !important;
}

/* Navigation elements */
.nav-item, 
.nav-link, 
.sidebar-nav {
    background: #371e10 !important;
    color: #ffffff !important;
}

/* Cards and panels */
.card, 
.panel, 
.container {
    color: #ffffff !important;
}

.card *, 
.panel *, 
.container * {
    color: #ffffff !important;
}

/* Ensure stats and numbers are visible */
.stat-number,
.stat-label,
.counter,
.value {
    color: #ffffff !important;
}

/* Time and date elements */
.time,
.date,
.timestamp {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ===== OVERRIDE GLOBALI PER TUTTI I TESTI BIANCHI ===== */

/* Selettore universale per assicurarsi che tutto sia bianco */
* {
    color: #ffffff !important;
}

/* Elementi specifici che potrebbero avere colori diversi */
.welcome,
.welcome-text,
.subtitle,
.description,
.info,
.note,
.hint,
.caption,
.label,
.value,
.name,
.email,
.phone,
.address,
.stat-content,
.stat-content h3,
.stat-content p,
.user-details,
.user-details *,
.banner-text,
.banner-text *,
.step-content,
.step-content *,
.info-content,
.info-content *,
.application-info,
.application-info *,
.card-content,
.card-content *,
.modal-content,
.modal-content *,
.section-content,
.section-content *,
.panel-content,
.panel-content * {
    color: #ffffff !important;
}

/* Form elements e inputs */
.form-group *,
.form-control,
.form-control *,
.form-label,
.form-text,
.input-group *,
.input-wrapper *,
select option,
select optgroup {
    color: #ffffff !important;
}

/* Table elements */
table,
table *,
.table,
.table *,
.data-table,
.data-table *,
tr,
tr *,
td,
td *,
th,
th * {
    color: #ffffff !important;
}

/* Notification and alert elements */
.notification,
.notification *,
.alert,
.alert *,
.message,
.message *,
.toast,
.toast *,
.banner,
.banner * {
    color: #ffffff !important;
}

/* Lists */
ul,
ul *,
ol,
ol *,
li,
li *,
.list,
.list *,
.list-item,
.list-item * {
    color: #ffffff !important;
}

/* Search and filter elements */
.search-box,
.search-box *,
.filter,
.filter *,
.pagination,
.pagination * {
    color: #ffffff !important;
}

/* Status badges - mantenere colori funzionali ma assicurarsi che siano leggibili */
.status-badge.success {
    background-color: rgba(0, 184, 148, 0.3) !important;
    color: #ffffff !important;
    border-color: #00b894 !important;
}

.status-badge.error {
    background-color: rgba(225, 112, 85, 0.3) !important;
    color: #ffffff !important;
    border-color: #e17055 !important;
}

.status-badge.warning {
    background-color: rgba(253, 203, 110, 0.3) !important;
    color: #ffffff !important;
    border-color: #fdcb6e !important;
}

.status-badge.pending {
    color: #ffffff !important;
    border-color: #fdcb6e !important;
}

.status-badge.approved {
    color: #ffffff !important;
}

.status-badge.rejected {
    background-color: rgba(225, 112, 85, 0.3) !important;
    color: #ffffff !important;
    border-color: #e17055 !important;
}

/* Override per elementi che potrebbero essere nascosti o specifici */
.text-muted,
.text-secondary,
.text-light,
.text-dark,
.text-info,
.text-primary,
.small,
.small * {
    color: #ffffff !important;
    opacity: 0.9;
}

/* Media queries per mobile */
@media (max-width: 768px) {
    body, 
    p, 
    span, 
    div {
        font-size: 14px !important;
    }
    
    h1, h2, h3 {
        font-size: calc(1.2rem + 0.5vw) !important;
    }
    
    button, 
    .btn {
        font-size: 12px !important;
        letter-spacing: 0.5px !important;
    }
    
    /* Assicuriamoci che anche su mobile tutto sia bianco */
    * {
        color: #ffffff !important;
    }
}
