/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 24px;
}

.company-name {
    color: #e0e0e0;
    font-size: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    color: #e0e0e0;
    font-size: 13px;
}

/* Breadcrumb */
.breadcrumb {
    background: white;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
}

.breadcrumb a {
    color: #1e3c72;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
}

.site-footer p {
    margin: 5px 0;
    font-size: 13px;
    color: #bdc3c7;
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1e3c72;
}

.page-header h1 {
    color: #1e3c72;
    font-size: 28px;
    margin-bottom: 5px;
}

.page-header p {
    color: #666;
    font-size: 14px;
}

/* Módulos Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.module-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.module-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.module-card h3 {
    color: #1e3c72;
    font-size: 18px;
    margin-bottom: 10px;
}

.module-card p {
    color: #666;
    font-size: 13px;
    margin-bottom: 20px;
    min-height: 40px;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #1e3c72;
    color: white;
}

.btn-primary:hover {
    background: #2a5298;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.85) 0%, rgba(42, 82, 152, 0.85) 100%),
                url('/assets/images/login-bg.jpg') center/cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #1e3c72;
    font-size: 32px;
    margin-bottom: 5px;
}

.login-header p {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.login-header small {
    color: #999;
    font-size: 12px;
}

.login-form {
    margin-top: 30px;
}

.login-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    text-align: center;
}

.login-info small {
    color: #666;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.login-footer p {
    color: #999;
    font-size: 12px;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Alertas */
.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 13px;
}

.alert-error {
    background: #fadbd8;
    color: #c0392b;
    border: 1px solid #e74c3c;
}

.alert-success {
    background: #d5f4e6;
    color: #229954;
    border: 1px solid #27ae60;
}

.alert-info {
    background: #d6eaf8;
    color: #2874a6;
    border: 1px solid #3498db;
}

.alert-warning {
    background: #fcf3cf;
    color: #b9770e;
    border: 1px solid #f39c12;
}

/* Tablas */
.table-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: #f8f9fa;
}

table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #1e3c72;
    border-bottom: 2px solid #dee2e6;
    font-size: 13px;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    font-size: 13px;
}

table tbody tr:hover {
    background: #f8f9fa;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.card-header h2 {
    color: #1e3c72;
    font-size: 20px;
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Actions */
.actions {
    display: flex;
    gap: 5px;
}

.actions a,
.actions button {
    padding: 5px 10px;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .modules-grid {
        grid-template-columns: 1fr;
    }

    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
        justify-content: center;
    }
}

/* Utilidades */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #27ae60;
    color: white;
}

.badge-danger {
    background: #e74c3c;
    color: white;
}

.badge-warning {
    background: #f39c12;
    color: white;
}

.badge-info {
    background: #3498db;
    color: white;
}
