/* Base44-inspired Override CSS - Massima Priorità */

/* Variabili CSS con !important per garantire coerenza */
:root {
    --bs-body-font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
    --bs-primary: #2563eb !important;
    --bs-secondary: #0ea5e9 !important;
    --bs-info: #38bdf8 !important;
    --bs-success: #10b981 !important;
    --bs-warning: #f59e0b !important;
    --bs-danger: #ef4444 !important;
    --bs-light: #f8fafc !important;
    --bs-dark: #0f172a !important;
    --accent: #fb923c !important;
    --radius-xl: 1.25rem !important;
    --radius-2xl: 1.5rem !important;
    --elev-1: 0 10px 30px rgba(2, 6, 23, 0.06) !important;
    --elev-2: 0 20px 50px rgba(2, 6, 23, 0.08) !important;
    --grad-hero: linear-gradient(135deg, #c7f9cc 0%, #a0e7e5 35%, #ffe29a 70%, #ffd6a5 100%) !important;
    --grad-card: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.55)) !important;
    --grad-primary: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%) !important;
    --grad-cta: linear-gradient(135deg, #fb923c 0%, #f59e0b 100%) !important;
}

/* Override completo per garantire che il tema base44-inspired abbia priorità */
body {
    font-family: var(--bs-body-font-family) !important;
    /* Lo sfondo viene gestito da dashboard-customization.css con effetto grigio non uniforme */
}

/* Navbar con stile base44-inspired */
.navbar {
    backdrop-filter: saturate(140%) blur(8px) !important;
    background: rgba(255,255,255,.6) !important;
    box-shadow: var(--elev-1) !important;
}

/* Bottoni con stile base44-inspired */
.btn {
    border-radius: 999px !important;
    font-weight: 600 !important;
}

.btn-primary {
    background-image: var(--grad-primary) !important;
    border: none !important;
    box-shadow: 0 10px 20px rgba(37, 99, 235, .25) !important;
    color: white !important;
}

.btn-accent {
    color: var(--bs-dark) !important;
    background: transparent !important;
    background-image: var(--grad-cta) !important;
    border: none !important;
    box-shadow: 0 10px 20px rgba(245, 158, 11, .25) !important;
}

/* Card con stile base44-inspired */
.card {
    border: 1px solid rgba(148,163,184,.2) !important;
    border-radius: var(--radius-xl) !important;
    transition: all 0.3s ease !important;
}

.glass-card {
    background: var(--grad-card) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(148,163,184,.25) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--elev-1) !important;
}

/* Hero section */
.hero {
    background: var(--grad-hero) !important;
    border-bottom-left-radius: var(--radius-2xl) !important;
    border-bottom-right-radius: var(--radius-2xl) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Icon pill */
.icon-pill {
    width: 44px !important;
    height: 44px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
    color: var(--bs-dark) !important;
    background: #a5f3fc !important;
}

/* Badge accent */
.badge-accent {
    background: var(--accent) !important;
    color: var(--bs-dark) !important;
    font-weight: 700 !important;
}

/* ========================================
   OVERRIDE GLOBALE: TUTTO IL TESTO IN NERO
   ======================================== */

/* Testo base del body */
body, html {
    color: #000000 !important;
}

/* Tutti i testi generici */
*, *::before, *::after {
    color: #000000 !important;
}

/* Titoli */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: #000000 !important;
}

/* Paragrafi e testi */
p, span, div, a, label, small, strong, em, i, b {
    color: #000000 !important;
}

/* Link */
a, a:hover, a:focus, a:active, a:visited {
    color: #000000 !important;
}

/* Testi nelle tabelle */
table, th, td, thead, tbody, tfoot {
    color: #000000 !important;
}

/* Form elements */
.form-control, .form-select, .form-check-label, .form-label {
    color: #000000 !important;
}

/* Input placeholder */
.form-control::placeholder, .form-select::placeholder {
    color: #666666 !important;
}

/* Navigation */
.nav-link, .navbar-nav .nav-link, .navbar-brand {
    color: #000000 !important;
}

/* Dropdown */
.dropdown-item, .dropdown-menu {
    color: #000000 !important;
}

/* Card content */
.card, .card-body, .card-header, .card-footer, .card-title, .card-text {
    color: #000000 !important;
}

/* List items */
.list-group-item, ul, ol, li {
    color: #000000 !important;
}

/* Alert text */
.alert, .alert-info, .alert-success, .alert-warning, .alert-danger {
    color: #000000 !important;
}

/* Modal content */
.modal-content, .modal-header, .modal-body, .modal-footer, .modal-title {
    color: #000000 !important;
}

/* Badge text (mantieni solo il testo nero, non il background) */
.badge {
    color: #000000 !important;
}

/* Button text */
.btn {
    color: #000000 !important;
}

/* Breadcrumb */
.breadcrumb, .breadcrumb-item {
    color: #000000 !important;
}

/* Pagination */
.page-link, .pagination {
    color: #000000 !important;
}

/* Sidebar e menu */
.sidebar, .sidebar-nav, .menu-item {
    color: #000000 !important;
}

/* Footer */
.footer, footer {
    color: #000000 !important;
}

/* Text utilities override */
.text-primary, .text-secondary, .text-success, .text-info, 
.text-warning, .text-danger, .text-light, .text-dark,
.text-muted, .text-white {
    color: #000000 !important;
}

/* Specifico per elementi che potrebbero avere colori diversi */
.navbar-toggler-icon {
    color: #000000 !important;
}

/* Progress bar text */
.progress-bar {
    color: #000000 !important;
}

/* Toast notifications */
.toast, .toast-body, .toast-header {
    color: #000000 !important;
}

/* Tooltip */
.tooltip, .tooltip-inner {
    color: #000000 !important;
}

/* Popover */
.popover, .popover-body, .popover-header {
    color: #000000 !important;
}

/* Elementi specifici dell'applicazione timesheet */
.timesheet-table, .project-card, .task-item, .employee-info {
    color: #000000 !important;
}

/* Override per eventuali classi personalizzate */
.custom-text, .info-text, .status-text, .description-text {
    color: #000000 !important;
}

/* Elementi di input e select */
input, textarea, select, option {
    color: #000000 !important;
}

/* Elementi di navigazione specifica */
.nav-tabs .nav-link, .nav-pills .nav-link {
    color: #000000 !important;
}

/* Accordion */
.accordion, .accordion-item, .accordion-header, .accordion-body, .accordion-button {
    color: #000000 !important;
}

/* Offcanvas */
.offcanvas, .offcanvas-header, .offcanvas-body, .offcanvas-title {
    color: #000000 !important;
}

/* Carousel */
.carousel, .carousel-caption, .carousel-item {
    color: #000000 !important;
}

/* Collapse */
.collapse, .collapsing {
    color: #000000 !important;
}

/* Spinner e loading */
.spinner-border, .spinner-grow {
    color: #000000 !important;
}

/* Close button */
.btn-close {
    color: #000000 !important;
}

/* Figure e caption */
figure, figcaption, .figure-caption {
    color: #000000 !important;
}

/* Mark e highlight */
mark, .mark {
    color: #000000 !important;
}

/* Code e pre */
code, pre, .code, .pre {
    color: #000000 !important;
}

/* Blockquote */
blockquote, .blockquote {
    color: #000000 !important;
}

/* Display utilities */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    color: #000000 !important;
}

/* Lead text */
.lead {
    color: #000000 !important;
}

/* ========================================
   SFONDO GRADIENTE COME NEL LOGIN
   ======================================== */

/* Contenuto principale trasparente per mostrare lo sfondo grigio non uniforme */
.main-content {
    background: transparent !important;
    position: relative !important;
}

/* Alternative per selettori più specifici */
body .main-content,
.wrapper .main-content {
    background: transparent !important;
}

/* Contenuto principale trasparente */
.main-content-collapsed {
    background: transparent !important;
}

/* ========================================
   SOLO DIV CON BORDI ARROTONDATI TRASPARENTI
   ======================================== */

/* Selettore per elementi con border-radius */
[style*="border-radius"], 
.rounded, .rounded-sm, .rounded-md, .rounded-lg, .rounded-xl, .rounded-xxl,
.rounded-1, .rounded-2, .rounded-3, .rounded-4, .rounded-5,
.card, .glass-card, .modal-content, .alert, .dropdown-menu,
.btn, .badge, .progress, .toast, .popover {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

/* Form controls con bordi arrotondati */
.form-control, .form-select {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(5px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
}

/* Hover effects per elementi arrotondati */
.card:hover, .btn:hover, .dropdown-item:hover, .list-group-item:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-2px) !important;
}

/* Elementi specifici con border-radius definito nel CSS */
.accordion-item, .nav-tabs .nav-link, .nav-pills .nav-link,
.pagination .page-link, .breadcrumb {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(5px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Stati attivi per elementi arrotondati */
.nav-tabs .nav-link.active, .nav-pills .nav-link.active,
.pagination .page-link:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

/* ========================================
   MIGLIORAMENTI SOLO PER ELEMENTI ARROTONDATI
   ======================================== */

/* Input group con bordi arrotondati */
.input-group-text.rounded, .input-group-text {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(5px) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Close button arrotondato */
.btn-close {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(5px) !important;
    border-radius: 50% !important;
}

/* Carousel con bordi arrotondati */
.carousel-inner {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(5px) !important;
    border-radius: 15px !important;
}

/* Miglioramenti per il testo su sfondo gradiente */
h1, h2, h3, h4, h5, h6 {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Placeholder più visibili su sfondo gradiente */
.form-control::placeholder, .form-select::placeholder {
    color: rgba(0, 0, 0, 0.7) !important;
}

/* Miglioramenti per la leggibilità */
.text-muted {
    color: rgba(0, 0, 0, 0.8) !important;
}

/* Tabelle SOLO se hanno bordi arrotondati */
.table.rounded, .table[style*="border-radius"] {
    background: rgba(255, 255, 255, 0.1) !important;
}

.table.rounded thead th, .table[style*="border-radius"] thead th {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
}

.table.rounded tbody tr:hover, .table[style*="border-radius"] tbody tr:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* ========================================
   STILI PER LE SEZIONI DEL MENU SIDEBAR
   ======================================== */

/* Intestazioni delle sezioni del menu */
.nav-header {
    position: relative !important;
    margin-top: 20px !important;
    margin-bottom: 10px !important;
    padding: 8px 15px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(5px) !important;
    border-left: 3px solid rgba(255, 255, 255, 0.3) !important;
}

.nav-header small {
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    opacity: 0.9 !important;
}

/* Effetto hover per le intestazioni */
.nav-header:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-left-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateX(2px) !important;
    transition: all 0.3s ease !important;
}

/* Separatori tra sezioni */
.nav-header::after {
    content: '' !important;
    position: absolute !important;
    bottom: -5px !important;
    left: 15px !important;
    right: 15px !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
}

/* Stili specifici per le icone delle sezioni */
.nav-header i {
    opacity: 0.8 !important;
    margin-right: 8px !important;
}

/* Animazione per la sidebar collassata */
.sidebar-collapsed .nav-header {
    padding: 8px 5px !important;
    text-align: center !important;
}

.sidebar-collapsed .nav-header small {
    display: none !important;
}

.sidebar-collapsed .nav-header i {
    margin-right: 0 !important;
    font-size: 1rem !important;
}
