/* =================== FUENTE PARA TITULOS =================== */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&display=swap');

/* =================== RESET + BASE =================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

/* Títulos */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
    letter-spacing: 0.4px;
}

/* =================== BODY =================== */
body {
    background: #E6F3FF;
    color: #002B5B;
}

body.fondo-claro {
    background: #F4F7FB;
}

/* =================== HEADERS =================== */
header {
    background: #073B78;
    color: #fff;
    padding: 14px 16px;
    font-size: 1.3rem;
}

.main-header {
    background: #073B78;
    color: #fff;
    padding: 18px 16px;
    text-align: center;
}

.main-header h1 {
    font-size: 1.6rem;
}

/* Topbar panel */
.topbar {
    background: #073B78;
    color: #fff;
    padding: 10px 16px;
}

.topbar-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.topbar-title {
    font-size: 1.25rem;
}

/* =================== LAYOUT =================== */
.page-wrapper {
    padding: 12px 0 24px;
}

.container {
    width: 95%;
    max-width: 1000px;
    margin: 10px auto;
}

/* =================== CARDS =================== */
.card {
    background: #ffffff;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.card-title {
    margin-bottom: 10px;
}

.card.filtros {
    margin-bottom: 18px;
}

/* =================== BOTONES =================== */
.btn,
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
    white-space: nowrap;
}

.btn,
.btn-primary {
    background: #0055A4;
    color: #fff;
}

.btn-secondary {
    background: #C6D8EE;
    color: #032B52;
}

.btn-outline {
    background: transparent;
    border: 1px solid #0055A4;
    color: #0055A4;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 0.8rem;
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-outline:hover {
    filter: brightness(0.95);
}

/* Grupo de botones */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.btn-group a {
    min-width: 160px;
}

/* =================== BADGES =================== */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge-ok {
    background: #DFF5E3;
    color: #2E7D32;
}

.badge-off {
    background: #FFE0E0;
    color: #B71C1C;
}

/* =================== TABLAS =================== */
table,
.tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background: #073B78;
    color: #ffffff;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid #E2EAF5;
    text-align: left;
}

table tr:hover,
.tabla tr:hover {
    background: #EEF5FF;
}

.table-wrapper {
    overflow-x: auto;
}

/* =================== FILTROS =================== */
.filters-row,
.filtros-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.filter-group label {
    font-size: 0.95rem;
}

.filtro-item {
    display: flex;
    flex-direction: column;
}

.filtro-item input[type="text"] {
    min-width: 220px;
}

.filtro-check {
    margin-left: 10px;
}

.check-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.filtro-boton {
    margin-left: auto;
}

/* Inputs filtros */
.card.filtros input[type="text"],
.card.filtros input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #c7c7d6;
    background-color: #F8F4E3;
    color: #2c3e50;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.card.filtros input::placeholder {
    color: #999;
}

.card.filtros input:hover {
    border-color: #5ACBEB;
}

.card.filtros input:focus {
    border-color: #1b3b5a;
    box-shadow: 0 0 0 2px rgba(90,203,235,0.25);
    background-color: #fff;
    outline: none;
}

/* =================== STOCK =================== */
.stock-negativo {
    color: #B71C1C;
    font-weight: bold;
}

.stock-cero {
    color: #E65100;
    font-weight: bold;
}

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

    header,
    .main-header {
        text-align: center;
        font-size: 1.1rem;
    }

    .container {
        width: 98%;
    }

    .filters-row,
    .filtros-grid {
        flex-direction: column;
        align-items: stretch;
    }

    th, td {
        font-size: 0.85rem;
        padding: 8px;
    }

    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        width: 100%;
        font-size: 1rem;
        padding: 12px;
    }

    .btn-sm {
        width: auto;
        font-size: 0.9rem;
        padding: 8px 14px;
    }

    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .filtro-boton {
        margin-left: 0;
        width: 100%;
    }

    .filtro-item input[type="text"] {
        min-width: 100%;
    }
}

/* ================= HERO BUTTON FIX ================= */

.hero .btn {
    background: #ffffff;
    color: #073B78;
    font-weight: 600;
}

.hero .btn-primary {
    background: #0055A4;
    color: #ffffff;
}

.hero .btn-outline {
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
}

.hero .btn-secondary {
    background: #E6F3FF;
    color: #073B78;
}

.hero .btn:hover {
    filter: brightness(0.95);
}

