:root {
    --primary-dark: #0A2540;
    --primary-blue: #1a4d8c;
    --accent-orange: #F5A623;
    --accent-orange-dark: #e09515;
    --gray-light: #F8F9FA;
    --text-gray: #4a5568;
}

/* Estilos generales compartidos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: #1a1a2e;
    line-height: 1.5;
}

a {
    text-decoration: none;
}

/* Utilidades */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animaciones */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: var(--accent-orange);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-orange-dark);
}

/* Botones generales */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    text-align: center;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--accent-orange);
    color: white;
}
.btn-primary:hover {
    background: var(--accent-orange-dark);
}

.btn-secondary {
    background: var(--primary-blue);
    color: white;
}
.btn-secondary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: #16a34a;
    color: white;
}
.btn-success:hover {
    background: #15803d;
}

.btn-danger {
    background: #dc2626;
    color: white;
}
.btn-danger:hover {
    background: #b91c1c;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}
.card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

/* Inputs */
.input-group {
    margin-bottom: 1rem;
}
.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
    font-size: 0.9rem;
}
.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.1);
}

/* Tablas */
.table-responsive {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
table th {
    background: var(--gray-light);
    padding: 0.8rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary-dark);
    border-bottom: 2px solid #e2e8f0;
}
table td {
    padding: 0.8rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success {
    background: #dcfce7;
    color: #16a34a;
}
.badge-warning {
    background: #fef3c7;
    color: #92400e;
}
.badge-danger {
    background: #fee2e2;
    color: #dc2626;
}
.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.alert-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}
.alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Modal */
.modal-overlay {
    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;
    backdrop-filter: blur(4px);
}
.modal-overlay.active {
    display: flex;
}
.modal {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: fadeInUp 0.3s ease-out;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.modal-header h2 {
    color: var(--primary-dark);
    margin: 0;
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: all 0.3s;
}
.modal-close:hover {
    color: var(--primary-dark);
    transform: rotate(90deg);
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Flex */
.flex {
    display: flex;
}
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.flex-wrap {
    flex-wrap: wrap;
}
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }
.gap-3 { gap: 3rem; }

/* Responsive */
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    .modal {
        padding: 1.5rem;
        width: 95%;
    }
    .flex-between {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
}

/* Estilos adicionales para el cotizador */
.tag-peso {
    font-size: 0.6rem;
    background: #dbeafe;
    color: #1e40af;
    padding: 0.1rem 0.5rem;
    border-radius: 50px;
    display: inline-block;
    margin-top: 0.3rem;
}

.precio-personalizado {
    font-size: 0.7rem;
    background: #dbeafe;
    color: #1e40af;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    display: inline-block;
}

.tag-pxv {
    font-size: 0.6rem;
    background: #fef3c7;
    color: #92400e;
    padding: 0.1rem 0.5rem;
    border-radius: 50px;
    display: inline-block;
    margin-top: 0.3rem;
}
