* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f6fb;
    color: #10233f;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    background: linear-gradient(135deg, #10233f, #1c3d68);
    color: #fff;
    padding: 22px 32px;
    box-shadow: 0 8px 24px rgba(15, 39, 69, 0.18);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-area h1 {
    margin: 0;
    font-size: 25px;
    letter-spacing: 0.4px;
}

.logo-area p {
    margin: 6px 0 0;
    font-size: 13px;
    color: #c9d8ea;
}

.admin-link {
    background: #ffffff;
    color: #10233f;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.25);
}

.page-wrap {
    max-width: 1240px;
    margin: 22px auto;
    padding: 0 16px 40px;
}

.filter-card {
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 28px rgba(15, 39, 69, 0.07);
    margin-bottom: 18px;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: end;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #223b5f;
    margin-bottom: 8px;
}

.form-group select,
.form-group input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d2deeb;
    background: #fff;
    color: #10233f;
    border-radius: 12px;
    padding: 0 13px;
    outline: none;
    font-size: 14px;
}

.btn {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    padding: 0 18px;
    font-weight: 800;
    cursor: pointer;
    background: #10233f;
    color: #fff;
}

.notice {
    background: #fff;
    border: 1px dashed #b9c9dc;
    border-radius: 18px;
    padding: 30px;
    text-align: center;
    color: #526985;
    box-shadow: 0 10px 28px rgba(15, 39, 69, 0.05);
}

.notice strong {
    display: block;
    color: #10233f;
    font-size: 20px;
    margin-bottom: 8px;
}

.race-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.race-tab {
    min-width: 54px;
    height: 40px;
    border-radius: 12px;
    background: #e8eef6;
    color: #10233f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border: 1px solid #d5e0ed;
}

.race-tab.active {
    background: #a66b2d;
    color: #fff;
    border-color: #a66b2d;
}

.race-info {
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 39, 69, 0.07);
    margin-bottom: 18px;
}

.race-title {
    background: #f3ebe2;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.race-title strong {
    font-size: 18px;
    color: #10233f;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 20px;
    background: #eaf0f7;
    color: #10233f;
    font-size: 12px;
    font-weight: 800;
}

.badge.dark {
    background: #10233f;
    color: #fff;
}

.table-card {
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 39, 69, 0.07);
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1050px;
}

th {
    background: #f7f9fc;
    color: #3d5470;
    font-size: 12px;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #dbe4f0;
}

td {
    padding: 14px;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
    font-size: 14px;
}

tr:last-child td {
    border-bottom: 0;
}

.horse-name {
    font-weight: 900;
    color: #10233f;
    font-size: 16px;
}

.small-muted {
    color: #6b7f98;
    font-size: 12px;
    margin-top: 4px;
}

.score {
    font-weight: 900;
    color: #087a34;
}

.rank-pill {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #edf3fa;
    border: 1px solid #cbd8e7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

@media (max-width: 700px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .site-header {
        padding: 20px 16px;
    }
}