:root {
    --primary: #d32f2f; /* Red - Sindicato Color */
    --secondary: #212121; /* Black - Sindicato Color */
    --light-gray: #f5f5f5; /* Lead/Light Gray - Sindicato Color */
    --dark-gray: #616161; /* Lead/Dark Gray */
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-hover: 0 10px 15px rgba(0,0,0,0.4);
    --radius: 8px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    /*background-color: var(--light-gray);
    color: var(--secondary);*/
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Auth Pages */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    background-image: url(../images/Fondo_SINTRAMIN.jpg);
    /*background-size: cover;*/
    /*background-repeat: no-repeat;*/
    /*background-attachment: fixed;  */
        background-repeat: no-repeat;   /* Evita que se repita */
        background-position: center;    /* Centra la imagen */
        background-size: cover;         /* Cubre toda la pantalla */
        background-attachment: fixed;   /* Fija la imagen al hacer scroll */

}

.login-card {
    background: var(--white);
    /*background: rgba(255, 255, 255, 0.9);  /*Fondo Transparente*/ 
    /*box-shadow: var(--shadow-hover);*/
    box-shadow: 0 5px 35px rgba(255, 218, 51, 0.8);
    padding: 2rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header img {
    max-width: 140px;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #b71c1c;
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.alert {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Dashboard Layout */
.wrapper {
    display: flex;
    flex: 1;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--secondary);
    color: var(--white);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1rem;
    background: #000;
    text-align: center;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #bdbdbd;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background: #333;
    color: var(--white);
    border-left-color: var(--primary);
}

.sidebar-submenu {
    list-style: none;
    background: #1a1a1a;
    padding-left: 0;
}

.sidebar-submenu li a {
    padding-left: 2.5rem;
    font-size: 0.9em;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header */
.top-header {
    background: var(--white);
    height: 60px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 10;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: bold;
    font-size: 1.2rem;
}

.header-brand img {
    height: 40px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: 600;
    color: var(--secondary);
}

.user-role {
    font-size: 0.8rem;
    color: var(--dark-gray);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

/* Content Area */
.content {
    padding: 2rem;
    flex: 1;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-title {
    font-size: 0.9rem;
    color: var(--dark-gray);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #b8b6b6;
}

.card-body {
    overflow-x: auto;   
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    font-weight: 600;
    color: var(--secondary);
    background: #f9f9f9;
}

.table tr:hover {
    background: #fafadc;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-warning { background-color: #ff9800; color: #fff; }
.btn-danger { background-color: #f44336; color: #fff; }
.btn-success { background-color: #4caf50; color: #fff; }
.btn-info { background-color: #03a9f4; color: #fff; }

/* Status Badges */
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-warning { background: #fff3e0; color: #ef6c00; }
.badge-danger { background: #ffebee; color: #c62828; }
.badge-info { background: #e1f5fe; color: #0277bd; }

/* Floating Menu Toggle (Mobile) */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* Responsive */
@media (max-width: 768px) {
    .wrapper { flex-direction: column; }
    .sidebar { width: 100%; display: none; }
    .sidebar.active { display: flex; }
    .menu-toggle { display: block; }
    span {font-size: 13px; font-weight: bold;} /* Titulo de "Sistema de Registro" de la Barra de MENU Superior, cambia de tamaño al Redimensionar */
}
