/* =========================================================
   FAROELOTTO - RESULT HISTORY
   ========================================================= */

.result-history-section {
    margin-top: var(--space-xl);
}


.result-history-card {
    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #081522,
            #040D18
        );

    border: 1px solid var(--color-border-soft);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-card);
}


/* =========================================================
   HEADER
   ========================================================= */

.history-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: var(--space-md);

    padding: 20px 22px;

    border-bottom: 1px solid var(--color-border-soft);
}


.history-title-area {
    display: flex;

    align-items: center;

    gap: 11px;
}


.history-title-icon {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 34px;
    height: 34px;

    flex-shrink: 0;

    border-radius: var(--radius-sm);

    background: rgba(245, 196, 81, 0.08);

    border: 1px solid rgba(245, 196, 81, 0.16);

    color: var(--color-gold);

    font-size: 17px;

    font-weight: 800;
}


.history-title-area h2 {
    color: var(--color-white);

    font-size: var(--font-lg);

    font-weight: 800;

    letter-spacing: 0.3px;
}


.history-title-area p {
    margin-top: 2px;

    color: var(--color-text-muted);

    font-size: var(--font-xs);
}


/* =========================================================
   VIEW ALL
   ========================================================= */

.history-view-all {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 34px;

    padding: 0 13px;

    border-radius: var(--radius-sm);

    border: 1px solid rgba(245, 196, 81, 0.18);

    background: rgba(245, 196, 81, 0.05);

    color: var(--color-gold);

    font-size: var(--font-xs);

    font-weight: 800;

    letter-spacing: 0.4px;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast);
}


.history-view-all:hover {
    background: rgba(245, 196, 81, 0.10);

    border-color: rgba(245, 196, 81, 0.30);
}

/* =========================================================
   HISTORY ACTIONS
   ========================================================= */

.history-actions {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 10px;
}


/* =========================================================
   SEARCH
   ========================================================= */

.history-search {
    position: relative;

    display: flex;

    align-items: center;

    width: 220px;
    height: 36px;
}


.history-search input {
    width: 100%;
    height: 100%;

    padding:
        0 34px
        0 34px;

    background:
        rgba(3, 10, 20, 0.65);

    border: 1px solid var(--color-border-soft);

    border-radius: var(--radius-sm);

    outline: none;

    color: var(--color-text);

    font-family: inherit;

    font-size: var(--font-xs);

    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}


.history-search input::placeholder {
    color: var(--color-text-muted);
}


.history-search input:focus {
    border-color:
        rgba(245, 196, 81, 0.45);

    background:
        rgba(3, 10, 20, 0.85);

    box-shadow:
        0 0 0 3px
        rgba(245, 196, 81, 0.06);
}


/* =========================================================
   SEARCH ICON
   ========================================================= */

.history-search-icon {
    position: absolute;

    left: 11px;

    color: var(--color-text-muted);

    font-size: 15px;

    line-height: 1;

    pointer-events: none;

    z-index: 1;
}


/* =========================================================
   CLEAR BUTTON
   ========================================================= */

.history-search-clear {
    position: absolute;

    right: 7px;

    display: none;

    align-items: center;

    justify-content: center;

    width: 22px;
    height: 22px;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.05);

    color: var(--color-text-muted);

    font-family: inherit;

    font-size: 15px;

    line-height: 1;

    cursor: pointer;
}


.history-search-clear:hover {
    background:
        rgba(245, 196, 81, 0.10);

    color: var(--color-gold);
}

/* =========================================================
   TABLE
   ========================================================= */

.history-table-wrapper {
    width: 100%;

    overflow-x: auto;
}


.history-table {
    width: 100%;

    min-width: 650px;
}


.history-table th {
    padding: 14px 20px;

    background: rgba(3, 10, 20, 0.35);

    color: var(--color-text-muted);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.8px;

    text-align: left;

    white-space: nowrap;
}


.history-table td {
    padding: 14px 20px;

    border-top: 1px solid var(--color-border-soft);

    color: var(--color-text-soft);

    font-size: var(--font-sm);

    white-space: nowrap;
}


.history-table tbody tr {
    transition:
        background var(--transition-fast);
}


.history-table tbody tr:hover {
    background: rgba(245, 196, 81, 0.025);
}


/* =========================================================
   PERIOD
   ========================================================= */

.history-period {
    color: var(--color-text) !important;

    font-weight: 700;
}


.history-new-badge {
    display: inline-flex;

    align-items: center;

    margin-left: 7px;

    padding: 3px 6px;

    border-radius: 999px;

    background: rgba(239, 68, 68, 0.10);

    border: 1px solid rgba(239, 68, 68, 0.22);

    color: #ff7777;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 0.5px;
}


/* =========================================================
   RESULT NUMBERS
   ========================================================= */

.history-result {
    display: flex;

    align-items: center;

    gap: 7px;
}


.history-result-ball {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 30px;
    height: 30px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 25%,
            #273747,
            #0B1622 70%
        );

    border: 1px solid rgba(245, 196, 81, 0.55);

    color: var(--color-gold-light);

    font-size: 13px;

    font-weight: 800;

    box-shadow:
        0 0 9px rgba(245, 196, 81, 0.08);
}


/* =========================================================
   EMPTY
   ========================================================= */

.history-empty {
    padding: 35px 20px !important;

    color: var(--color-text-muted) !important;

    text-align: center;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.history-pagination {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    padding: 18px 20px;

    border-top: 1px solid var(--color-border-soft);
}


.history-page-button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 34px;

    height: 34px;

    padding: 0 9px;

    border-radius: var(--radius-sm);

    border: 1px solid var(--color-border-soft);

    background: rgba(255, 255, 255, 0.02);

    color: var(--color-text-soft);

    font-size: var(--font-xs);

    font-weight: 700;

    transition:
        color var(--transition-fast),
        background var(--transition-fast),
        border-color var(--transition-fast);
}


.history-page-button:hover {
    color: var(--color-gold);

    border-color: var(--color-border);

    background: rgba(245, 196, 81, 0.06);
}


.history-page-button.active {
    background: var(--color-gold);

    border-color: var(--color-gold);

    color: #111;

    box-shadow:
        0 0 15px rgba(245, 196, 81, 0.18);
}

/* =========================================================
   PAGINATION ELLIPSIS
   ========================================================= */

.history-page-ellipsis {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 28px;

    height: 34px;

    color: var(--color-text-muted);

    font-size: var(--font-xs);

    font-weight: 700;

    user-select: none;
}

/* =========================================================
   MOBILE
   ========================================================= */

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {

    .history-header {
        padding: 18px 16px;

        align-items: flex-start;

        flex-direction: column;

        gap: 14px;
    }


    .history-title-area {
        width: 100%;
    }


    .history-title-area h2 {
        font-size: 16px;
    }


    .history-title-area p {
        font-size: 11px;
    }


    .history-actions {
        width: 100%;

        align-items: stretch;

        flex-direction: column;

        gap: 9px;
    }


    .history-search {
        width: 100%;

        height: 38px;
    }


    .history-view-all {
        width: fit-content;

        min-height: 34px;

        align-self: flex-start;
    }


    .history-table-wrapper {
        width: 100%;

        overflow-x: auto;

        -webkit-overflow-scrolling: touch;
    }


    .history-table {
        min-width: 650px;
    }


    .history-table th,
    .history-table td {
        padding-left: 14px;

        padding-right: 14px;
    }


    .history-result {
        gap: 6px;
    }


    .history-result-ball {
        width: 28px;

        height: 28px;

        font-size: 12px;
    }


    .history-pagination {
        padding: 16px 12px;

        gap: 5px;

        overflow-x: auto;

        justify-content: flex-start;
    }


    .history-page-button {
        flex-shrink: 0;

        min-width: 32px;

        height: 32px;
    }

}

/* =========================================================
   FAROELOTTO - HISTORY PAGE HERO
   ========================================================= */

.history-page-hero {
    width: 100%;
    margin-bottom: var(--space-xl);
}

.history-page-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 0 0;
}

.history-page-kicker {
    display: inline-block;

    margin-bottom: 8px;

    color: var(--color-gold);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.2px;
}

.history-page-hero h1 {
    margin: 0;

    color: var(--color-white);

    font-size: 30px;
    font-weight: 800;

    line-height: 1.2;
}

.history-page-hero p {
    margin-top: 8px;

    color: var(--color-text-muted);

    font-size: var(--font-sm);
}


/* =========================================================
   HISTORY PAGE - DESKTOP SPACING
   ========================================================= */

@media (min-width: 901px) {

    .history-page-hero {
        padding-top: 6px;
    }

}


/* =========================================================
   HISTORY PAGE - MOBILE
   ========================================================= */

@media (max-width: 650px) {

    .history-page-hero {
        margin-bottom: 20px;
    }

    .history-page-hero-inner {
        padding: 0 16px;
    }

    .history-page-kicker {
        font-size: 9px;
    }

    .history-page-hero h1 {
        font-size: 24px;
    }

    .history-page-hero p {
        font-size: 12px;
        line-height: 1.5;
    }

}

/* =========================================================
   HISTORY PAGE WRAPPER
   ========================================================= */

.history-page-wrapper {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}


/* =========================================================
   HISTORY PAGE CARD ALIGNMENT
   ========================================================= */

.history-page-wrapper .result-history {
    width: 100%;
}


/* =========================================================
   HISTORY PAGE RESPONSIVE
   ========================================================= */

@media (max-width: 650px) {

    .history-page-wrapper {
        width: calc(100% - 24px);
    }

}