/* ==================== VARIABLES GLOBALES ==================== */
:root {
    --primary-color: #1e3c72;
    --secondary-color: #51b900;
    --tertiary-color: #ffffff;
    --bg-color: #f7f8fb;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --hover-bg: rgba(255, 255, 255, 0.1);
}

/* ==================== RESET Y BASE ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.6;
}

/* ==================== LAYOUT PRINCIPAL ==================== */
.page-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px;
}

.main-content {
    flex: 1;
    padding: 50px;
    box-sizing: border-box;
    margin-left: 250px;
    max-width: calc(100vw - 250px);
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: 250px;
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    box-sizing: border-box;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(250, 202, 49, 0.5);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.sidebar-logo img {
    border-radius: 8px;
    background: white;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar .badge {
    background-color: var(--secondary-color);
    color: var(--tertiary-color);
    border: none;
    font-weight: 600;
}

.sidebar .nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    margin-top: 20px;
}

.sidebar .nav a {
    text-decoration: none;
    color: white;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.sidebar .nav a:hover {
    background-color: var(--hover-bg);
}

.sidebar .nav a.active {
    background-color: var(--secondary-color);
    color: var(--tertiary-color);
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar .nav a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar .nav a span {
    flex: 1;
}

/* ==================== TARJETAS ==================== */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 24px rgba(30, 60, 114, 0.09);
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

/* ==================== TIPOGRAFÍA ==================== */
h1 {
    font-size: 1.8rem;
    margin: 0 0 20px;
    color: var(--primary-color);
    font-weight: 700;
}

h2 {
    font-size: 1.3rem;
    margin: 16px 0 12px;
    color: var(--primary-color);
    font-weight: 600;
}

h3 {
    font-size: 1.1rem;
    margin: 12px 0 8px;
    color: var(--text-color);
    font-weight: 600;
}

/* ==================== BOTONES ==================== */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    border: 0;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn.accent {
    background: var(--secondary-color);
    color: var(--tertiary-color);
}

.btn.full {
    width: 100%;
}

button[type="submit"] {
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

button[type="submit"]:hover {
    opacity: 0.9;
}

/* ==================== FORMULARIOS ==================== */
input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 6px 0 12px;
    background: #fff;
    font-size: 0.95rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

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

/* ==================== TABLAS ==================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 0.9rem;
    text-align: left;
}

th {
    background: #f3f6ff;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

tr:hover {
    background: #f9fafb;
}

tr:last-child td {
    border-bottom: none;
}

/* ==================== BADGES Y ESTADOS ==================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: #eef2ff;
    color: var(--tertiary-color);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.badge.success, .success {
    background: #dcfce7;
    color: #166534;
}

.badge.error, .error {
    background: #fee2e2;
    color: #991b1b;
}

.badge.warning, .warning {
    background: #fef3c7;
    color: #92400e;
}

.badge.info, .info {
    background: #dbeafe;
    color: #1e40af;
}

/* ==================== NAVEGACIÓN ==================== */
.nav {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* ==================== LISTAS DE USUARIOS ==================== */
.user-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.user-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    background-color: var(--card-bg);
    transition: box-shadow 0.2s ease;
}

.user-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.user-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.user-info > div {
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-info strong {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.user-info span {
    color: var(--text-color);
    font-size: 0.95rem;
}

.user-actions {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.action-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.action-column {
    flex: 1;
    min-width: 150px;
}

.action-column label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding-bottom: 0.25rem;
    display: block;
    margin-bottom: 6px;
}

.action-column input,
.action-column select {
    margin: 0;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* ==================== PANEL DE INFORMES ==================== */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.report-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.report-card:hover {
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.15);
    transform: translateY(-2px);
    border-color: var(--secondary-color);
}

.report-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.report-card h3 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.report-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.filters-section {
    margin-bottom: 20px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.filter-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.category-section {
    margin-bottom: 40px;
}

.category-section h2 {
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==================== UTILIDADES ==================== */
.timer {
    font-weight: bold;
    color: var(--primary-color);
    font-family: "Courier New", monospace;
}

.break-list {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

/* ==================== FOOTER ==================== */
footer {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
}

/* ==================== ANIMACIONES ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .page-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
        height: auto;
        border-radius: 0;
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 20px;
    }

    .sidebar-logo img {
        max-height: 60px;
    }
    
    .sidebar .nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .sidebar .nav a {
        flex: 0 0 auto;
        min-width: 120px;
        text-align: center;
        flex-direction: column;
        gap: 5px;
        padding: 10px;
    }

    .sidebar .nav a i {
        font-size: 1.5rem;
    }

    .sidebar .nav a span {
        font-size: 0.8rem;
    }
    
    .sidebar .nav a:hover {
        transform: none;
    }

    .user-info {
        grid-template-columns: 1fr;
    }

    .action-row {
        flex-direction: column;
    }

    .action-column {
        width: 100%;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        max-width: calc(100vw - 200px);
        padding: 30px;
    }
    
    .sidebar .nav a span {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px;
    }

    .card {
        padding: 16px;
        border-radius: 12px;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 8px;
    }
}
.report-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 10px;
}

.meta-info {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: left;
}

td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

tr:hover {
    background: #f9f9f9;
}

.btn-back {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-top: 20px;
}

.btn-back:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.user-section {
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
    padding: 15px;
    border-radius: 5px;
}

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

.center-section {
    margin-bottom: 25px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
}
