/* Sistema de Calidad Susanita - Estilos Principales */

/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-image: url('../img/fondo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden; /* Evitar scroll horizontal */
}

/* Colores institucionales */
:root {
    --color-primary: #D41316;
    --color-secondary: #f1b7b8;
    --color-white: #FFFFFF;
    --color-gray-light: #f8f9fa;
    --color-gray-medium: #6c757d;
    --color-gray-dark: #333;
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-info: #17a2b8;
}

/* Tipografía */
.font-quentin {
    font-family: 'QuentinPro', serif;
}

/* Layout principal */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1rem 2rem 1rem; /* top, right, bottom, left */
    min-height: calc(100vh - 5rem); /* Altura mínima sin causar scroll */
}

/* Cards y contenedores */
.content-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.page-header {
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.page-title {
    font-family: 'QuentinPro', serif;
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--color-gray-medium);
    font-size: 1rem;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-align: center;
}

.btn:hover {
    background: #b30e11;
    color: var(--color-white);
    text-decoration: none;
}

.btn-secondary {
    background: var(--color-gray-medium);
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: var(--color-success);
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: var(--color-danger);
}

.btn-danger:hover {
    background: #c82333;
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Formularios */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-gray-dark);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Tablas */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th {
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    background: var(--color-gray-light);
    font-weight: 600;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.table tbody tr:hover {
    background: var(--color-gray-light);
}

/* Estados */
.status-active {
    color: var(--color-success);
}

.status-inactive {
    color: var(--color-danger);
}

/* Utilidades */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        margin: 0 auto;
        padding: 6rem 0.5rem 1rem 0.5rem; /* top, right, bottom, left */
        min-height: calc(100vh - 6rem); /* Altura mínima sin causar scroll */
    }
    
    .content-card {
        padding: 1rem;
    }
    
    .page-header {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}
