/*! SmartPack - Main Stylesheet */

/* 1. Variables y configuraciones base */
@import 'base/variables.css';
@import 'base/reset.css';
@import 'base/typography.css';

/* 2. Componentes reutilizables */
@import 'components/buttons.css';
@import 'components/forms.css';

/* 3. Estructura y layout */
@import 'layout/grid.css';
@import 'layout/header.css';

/* 4. Utilidades */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

/* 5. Estilos específicos para la aplicación */
body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-100);
}

/* Contenedor principal */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Tarjetas */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

/* Alertas */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Tablas */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--gray-700);
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid var(--gray-200);
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--gray-200);
    background-color: var(--gray-50);
}

.table tbody + tbody {
    border-top: 2px solid var(--gray-200);
}

/* Formularios */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}

/* Footer */
.footer {
    background-color: var(--gray-800);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: white;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Estilos para la página de carga */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--gray-200);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
