:root {
    --primary-color: #0a6644;
    --secondary-color: #aecb35;
    --bg-color: #f0f2f5;
    --text-color: #333;
    --card-bg: #fff;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* Header & Menu */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.brand {
    font-size: 1.5rem;
    font-weight: bold;
}

nav.horizontal-menu {
    display: flex;
    gap: 10px;
    padding: 0 30px;
}

nav.horizontal-menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px 4px 0 0;
    transition: background 0.3s;
    cursor: pointer;
    background-color: #e0e0e0;
    font-weight: bold;
}

nav.horizontal-menu a:hover, nav.horizontal-menu a.active {
    background-color: var(--secondary-color);
    color: #000;
}

.tabs-container {
    background-color: #d5d5d5;
    padding-top: 15px;
    border-bottom: 3px solid var(--secondary-color);
}

.logout-btn {
    background-color: transparent;
    color: white;
    border: 1px solid white;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
}
.logout-btn:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Tabs / Sections */
.section {
    display: none;
    padding: 30px;
    max-width: 95%;
    margin: 0 auto;
}

.section.active {
    display: block;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.compliance-display {
    font-size: 3rem;
    font-weight: bold;
    color: var(--secondary-color);
    text-align: center;
}

/* Tables */
.table-container {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow-x: visible;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #f8f9fa;
    color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 2px -1px rgba(0,0,0,0.1);
    background-clip: padding-box;
}

/* Buttons */
.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background-color: #064d33;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #000;
}

.btn-danger {
    background-color: #dc3545;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    min-width: 400px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Auth screens */
#auth-view {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: var(--primary-color);
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 350px;
    text-align: center;
}

.gantt-container {
    overflow-x: auto;
}

/* Print Styles */
.print-only {
    display: none;
}

@media print {
    body, html {
        height: auto !important;
        overflow: visible !important;
        background: white !important;
    }
    #app-view, #main-content {
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }
    .no-print {
        display: none !important;
    }
    .print-only {
        display: block !important;
    }
    .section {
        padding: 0;
        margin-bottom: 40px;
        display: block !important; /* Force all data sections to print sequentially */
        page-break-after: always;
    }
    #configuracion {
        display: none !important; /* Hide admin setup from the report */
    }
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .dashboard-grid {
        display: block;
    }
    .dashboard-grid .card {
        page-break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
    #print-header {
        text-align: center;
        margin-bottom: 30px;
        position: relative;
    }
    #print-logo {
        position: absolute;
        top: 0;
        left: 0;
    }
    .gantt-container {
        overflow: visible !important;
    }
    .table-container {
        overflow: visible !important;
        box-shadow: none !important;
    }
    table {
        page-break-inside: auto;
    }
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    th {
        position: static !important; /* Remove sticky for print to prevent overlapping */
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #eee;
    }
    canvas {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}

/* Utility */
.mb-3 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }

/* Dashboard Progress Lists */
.dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 500;
}

.progress-bar-container {
    background-color: #e9ecef;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    width: 100%;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
    background-color: var(--primary-color);
}


.gantt-container {
    min-height: 500px;
    background: #fff;
}

#chart-actividades {
    max-height: 400px;
}

.admin-only {
    display: none;
}


