* {
    box-sizing: border-box;
}


body {

    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f3f4f6;

    color: #111827;
}


header {

    background: #111827;

    color: white;

    padding: 30px 20px;
}


.header-inner {

    max-width: 1400px;

    margin: auto;
}


header h1 {

    margin: 0;

    font-size: 36px;
}


header p {

    margin: 8px 0 0;

    color: #d1d5db;
}


main {

    max-width: 1400px;

    margin: auto;

    padding: 25px;
}


/* =====================================================
   ESTADÍSTICAS
===================================================== */

.stats {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;

    margin-bottom: 25px;
}


.stat-card {

    background: white;

    padding: 22px;

    border-radius: 12px;

    box-shadow:
        0 2px 8px
        rgba(0,0,0,.07);

    text-align: center;
}


.stat-card strong {

    display: block;

    font-size: 32px;

    margin-bottom: 5px;
}


.stat-card span {

    color: #6b7280;
}


/* =====================================================
   PANELES
===================================================== */

.panel {

    background: white;

    border-radius: 12px;

    padding: 22px;

    margin-bottom: 25px;

    box-shadow:
        0 2px 8px
        rgba(0,0,0,.07);
}


.panel h2 {

    margin-top: 0;
}


/* =====================================================
   FORMULARIO
===================================================== */

.form-grid {

    display: grid;

    grid-template-columns:
        repeat(6, 1fr);

    gap: 12px;
}


label {

    display: block;

    font-size: 13px;

    font-weight: bold;

    margin-bottom: 5px;
}


input,
select {

    width: 100%;

    padding: 11px;

    border:
        1px solid #d1d5db;

    border-radius: 7px;

    font-size: 14px;

    background: white;
}


.buttons {

    display: flex;

    gap: 10px;

    margin-top: 18px;
}


button {

    border: none;

    border-radius: 7px;

    padding:
        11px 22px;

    font-size: 15px;

    cursor: pointer;
}


.primary {

    background: #111827;

    color: white;
}


.secondary {

    background: #6b7280;

    color: white;
}


/* =====================================================
   TABLAS
===================================================== */

.table-wrapper {

    overflow-x: auto;
}


table {

    width: 100%;

    border-collapse: collapse;
}


th {

    background: #111827;

    color: white;

    padding: 11px;

    text-align: left;

    white-space: nowrap;
}


td {

    padding: 10px;

    border-bottom:
        1px solid #e5e7eb;

    white-space: nowrap;
}


tr:hover {

    background: #f9fafb;
}


/* =====================================================
   ORIGEN
===================================================== */

.origin {

    display: inline-block;

    padding:
        4px 8px;

    border-radius: 15px;

    font-size: 11px;

    font-weight: bold;
}


.origin-national {

    background: #dbeafe;

    color: #1e40af;
}


.origin-provincial {

    background: #ede9fe;

    color: #5b21b6;
}


/* =====================================================
   ESTADOS
===================================================== */

.badge {

    display: inline-block;

    padding:
        5px 9px;

    border-radius: 15px;

    font-size: 11px;

    font-weight: bold;
}


.good {

    background: #dcfce7;

    color: #166534;
}


.regular {

    background: #fef9c3;

    color: #854d0e;
}


.bad {

    background: #fed7aa;

    color: #9a3412;
}


.terrible {

    background: #fee2e2;

    color: #991b1b;
}


.no-data {

    background: #e5e7eb;

    color: #374151;
}


/* =====================================================
   RANKINGS
===================================================== */

.rankings {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 25px;
}


.red-text {

    color: #b91c1c;

    font-weight: bold;
}


.orange-text {

    color: #c2410c;

    font-weight: bold;
}


.section-title {

    display: flex;

    align-items: center;

    justify-content: space-between;
}


#resultCount {

    color: #6b7280;

    font-size: 14px;
}


/* =====================================================
   FOOTER
===================================================== */

footer {

    text-align: center;

    color: #6b7280;

    padding: 30px;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media(max-width: 1100px) {

    .form-grid {

        grid-template-columns:
            repeat(3, 1fr);
    }

}


@media(max-width: 800px) {

    .stats {

        grid-template-columns:
            repeat(2, 1fr);
    }


    .rankings {

        grid-template-columns: 1fr;
    }

}


@media(max-width: 550px) {

    main {

        padding: 12px;
    }


    .stats {

        grid-template-columns: 1fr;
    }


    .form-grid {

        grid-template-columns: 1fr;
    }


    header h1 {

        font-size: 28px;
    }

}