:root {
    /* Colores principales - Paleta cálida */
    --primary-color: #FF9800;
    --primary-dark: #8D4925;
    --primary-light: #FFC340;
    --primary-muted: rgba(255, 152, 0, 0.15);

    /* Fondos (Modo oscuro por defecto) */
    --bg-dark: #1A0D05;
    --bg-darker: #120900;
    --bg-card: #3D1E0A;
    --bg-hover: #5A2E12;

    /* Textos */
    --text-primary: #F5E6D3;
    --text-secondary: #C4A882;
    --text-muted: #8A6545;

    /* Bordes */
    --border-color: #7A3D20;
    --border-radius: 8px;

    /* Estados */
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;

    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.7);

    /* Transiciones */
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.col-8 {
    width: 100%;
}

.input-group {
    display: flex;
    gap: 4%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Contenedores */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

/* Tarjetas */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Formularios */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Checkboxes personalizados */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-darker);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-group:hover {
    background: var(--bg-hover);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.checkbox-group i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    background: #FF9800;
    color: #fff;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

/* Grid - Mobile First */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.col {
    flex: 1;
    padding: 0 0.5rem;
}

/* Mobile: All columns full width by default */
.col-6,
.col-4,
.col-3,
.col-2 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 0.5rem;
    margin-bottom: 1rem;
}

/* Tablet: 768px and up */
@media (min-width: 768px) {
    .col-6 {
        flex: 0 0 50%;
        margin-bottom: 0;
    }

    .col-4 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 0;
    }

    .col-3 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 0;
    }

    .col-2 {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 0;
    }
}

/* Desktop: 1024px and up */
@media (min-width: 1024px) {
    .col-4 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }

    .col-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-2 {
        flex: 0 0 16.666%;
        max-width: 16.666%;
    }
}

/* Tablas - Mobile First */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.table th,
.table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-darker);
    font-weight: 600;
    color: var(--primary-color);
}

.table tr:hover {
    background: var(--bg-hover);
}

/* Tablet and up: Larger table text */
@media (min-width: 768px) {
    .table {
        font-size: 1rem;
    }

    .table th,
    .table td {
        padding: 0.75rem;
    }
}

/* Alertas */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    border: 1px solid var(--info);
    color: var(--info);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: #000;
}

.badge-primary {
    background: var(--primary-color);
    color: #000;
}

/* Utilidades */
.text-center {}

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

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.justify-between {
    justify-content: space-between;
}

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

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {

    .col-6,
    .col-4,
    .col-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .table {
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
    }
}

/* Loading spinner */
.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--info);
}

.modal-close:hover {
    color: var(--danger);
}

/* Additional Utilities */
.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.filters-form .row {
    align-items: flex-end;
}

.content-header {
    display: grid;
    /* justify-content: space-between; */
    /* align-items: flex-start; */
    /* margin-bottom: 2rem; */
}

@media (max-width: 768px) {
    .content-header {
        flex-direction: column;
        gap: 1rem;
    }

    .content-header .btn {
        width: 100%;
    }

    .input-group {
        display: grid;
        row-gap: 13%;
    }
}