/* Medal Arena country dashboard - isolated to .country-page */
.country-page {
    --country-ink: #13243b;
    --country-secondary: #66758a;
    --country-accent: #1468ac;
    --country-border: #e5eaf1;
    --country-soft: #f5f8fc;
    --country-surface: #fff;
    color: var(--country-ink);
    padding-bottom: 3rem;
}
.country-page *, .country-page *::before, .country-page *::after { box-sizing: border-box; }
.country-page a { text-decoration: none; }
.country-page a:focus-visible, .country-page button:focus-visible,
.country-page input:focus-visible, .country-page select:focus-visible {
    outline: 3px solid rgba(20,104,172,.3); outline-offset: 3px;
}
.country-page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid var(--country-border);
    border-radius: 22px;
    background: linear-gradient(118deg, #fff 42%, #eef5ff 100%);
    padding: 30px 34px 28px;
    margin-bottom: 18px;
    box-shadow: 0 10px 36px rgba(30,57,92,.045);
}
.country-page-hero::after {
    content: "";
    z-index: -1;
    position: absolute;
    right: -86px;
    top: -95px;
    width: 310px;
    height: 310px;
    border-radius: 50%;
    border: 54px solid rgba(20,104,172,.05);
}
.country-page .breadcrumb-item a { color: var(--country-secondary); }
.country-page .breadcrumb-item.active { color: var(--country-ink); }
.country-page-heading { display: flex; gap: 26px; align-items: center; margin-bottom: 29px; }
.country-page-flag-wrap { flex: 0 0 auto; }
.country-page-flag {
    display: block; width: 112px; height: 76px; object-fit: cover;
    border: 1px solid #e2e8f1; border-radius: 12px;
    background: #f6f9fc; box-shadow: 0 6px 16px rgba(25,45,69,.06);
}
.country-page-flag-empty { display: flex; align-items: center; justify-content: center; font-size: 28px; }
.country-page-eyebrow, .country-page-kicker {
    color: var(--country-accent); letter-spacing: .115em; text-transform: uppercase;
    font-size: .69rem; line-height: 1.6; font-weight: 800;
}
.country-page h1 { color: var(--country-ink); letter-spacing: -.045em; font-size: clamp(1.9rem, 3.5vw, 3rem); line-height: 1.15; font-weight: 760; margin: 7px 0 12px; }
.country-page-details { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 17px; color: var(--country-secondary); font-size: .87rem; }
.country-page-details strong { color: var(--country-ink); }
.country-page-cycle { padding: 4px 10px; background: #eaf2fa; color: #275d87; font-size: .8rem; border-radius: 999px; font-weight: 650; }
.country-page-lead { color: var(--country-secondary); margin: 13px 0 0; font-size: .91rem; }
.country-page-overview-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.country-page-stat { background: rgba(255,255,255,.88); border: 1px solid var(--country-border); border-radius: 14px; padding: 15px 17px; min-width: 0; }
.country-page-stat span, .country-page-qualification-stats span { display:block; color: var(--country-secondary); font-size: .79rem; line-height: 1.4; }
.country-page-stat strong { display:block; font-size: 1.8rem; color: var(--country-ink); line-height: 1.35; letter-spacing: -.035em; margin-top: 4px; font-weight: 750; font-variant-numeric: tabular-nums; }
.country-page-section-nav {
    position: sticky; top: 10px; z-index: 20;
    display: flex; gap: 4px; align-items: center; overflow-x: auto; overscroll-behavior-inline: contain;
    background: rgba(255,255,255,.98); backdrop-filter: blur(10px);
    border: 1px solid var(--country-border); border-radius: 14px; padding: 7px;
    margin-bottom: 22px; box-shadow: 0 5px 23px rgba(23,43,67,.06);
    scrollbar-width: thin; white-space: nowrap;
}
.country-page-section-nav a { display: block; border-radius: 9px; color: #4e6178; padding: 10px 14px; font-size: .86rem; font-weight: 650; transition: background .16s, color .16s; }
.country-page-section-nav a:hover, .country-page-section-nav a:focus-visible { background: #eaf3fd; color: #125f9d; }
.country-page [id] { scroll-margin-top: 92px; }
.country-page-panel { background: var(--country-surface); border: 1px solid var(--country-border); border-radius: 18px; padding: 25px; box-shadow: 0 7px 25px rgba(23,43,67,.032); margin-bottom: 20px; min-width: 0; }
.country-page-panel-head { display:flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.country-page-panel h2 { font-weight: 750; letter-spacing: -.03em; color: var(--country-ink); font-size: 1.42rem; line-height: 1.25; margin: 5px 0 6px; }
.country-page-muted { color: var(--country-secondary); font-size: .87rem; line-height: 1.6; }
.country-page-text-link { white-space: nowrap; color: var(--country-accent); font-size: .83rem; font-weight: 700; margin-top: 8px; }
.country-page-text-link:hover { color: #0d4b80; text-decoration: underline; }
.country-page-qualification-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-top: 22px; }
.country-page-qualification-stats > div { border: 1px solid #e6edf5; background: var(--country-soft); border-radius: 12px; padding: 12px 13px; min-width:0; }
.country-page-qualification-stats strong { color: var(--country-ink); font-size: 1.57rem; font-weight: 740; display: block; margin-top: 5px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.country-page-help { margin: 10px 0 19px; font-size: .77rem; line-height: 1.65; color: #718298; }
.country-page-filters { display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; align-items: end; background: #f8fafd; border: 1px solid #e8edf4; border-radius: 13px; padding: 15px; }
.country-page-filters label { display:block; font-size: .77rem; color: #53687f; font-weight: 700; margin-bottom: 6px; }
.country-page-filters .form-control, .country-page-filters .form-select { border-color: #dbe4ef; background-color: #fff; font-size: .85rem; min-height: 38px; max-width:100%; }
.country-page-filters .form-control::placeholder { color:#93a1b2; }
.country-page-filter-search { grid-column: span 2; }
.country-page-filter-actions { display:flex; gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
.country-page-filter-actions .btn { font-size: .84rem; font-weight: 650; min-height: 38px; }
.country-page-filter-actions .btn-primary { background-color: var(--country-accent); border-color: var(--country-accent); }
.country-page-result-count { color: #697b91; font-size: .78rem; margin: 16px 0 5px; }
.country-page-table { --bs-table-bg: transparent; --bs-table-striped-bg: #f8fafc; width:100%; font-size: .84rem; }
.country-page-table thead th { text-transform: uppercase; font-weight: 750; color:#7a8a9c; font-size: .67rem; letter-spacing: .065em; border-bottom:1px solid #e7ecf3; padding: 11px 10px; white-space: nowrap; }
.country-page-table tbody td { padding: 14px 10px; border-bottom: 1px solid #eff2f6; vertical-align: middle; }
.country-page-table tbody tr:last-child td { border-bottom:0; }
.country-page-athlete-link, .country-page-cell-main { color: var(--country-ink); font-weight: 700; }
.country-page-athlete-link:hover { color: var(--country-accent); }
.country-page-cell-sub { display:block; margin-top: 3px; font-size:.72rem; color:#8290a1; line-height:1.45; }
.country-page-cell-sub a { color:#71849a; }
.country-page-cell-sub a:hover { color: var(--country-accent); }
.country-page-rank { font-variant-numeric: tabular-nums; font-weight: 780; font-size: 1rem; color: var(--country-ink); }
.country-page-status { display: inline-flex; align-items: center; justify-content: center; text-align: center; padding: 6px 9px; border-radius: 999px; font-weight: 700; font-size: .71rem; line-height: 1.25; white-space: nowrap; background: #eff2f6; color:#68788c; }
.country-page-status--qualified { color:#16754d; background:#e9f8f0; }
.country-page-status--almost { color:#995c14; background:#fff1db; }
.country-page-status--in_progress { color:#2465a5; background:#eaf3ff; }
.country-page-status--reserve { color:#7149a2; background:#f3ecff; }
.country-page-status--failed { color:#ad454a; background:#fff0f0; }
.country-page-status--not_started, .country-page-status--uncertain { color:#647489; background:#f0f3f7; }
.country-page-progress-number { display: block; font-size:.8rem; font-weight: 750; font-variant-numeric: tabular-nums; color:#3a516d; margin-bottom:5px; }
.country-page-progress { height: 6px; background: #e8eef6; border-radius: 999px; width: 100%; min-width: 65px; overflow:hidden; }
.country-page-progress span { display: block; background: linear-gradient(90deg,#68b5ed,#176eaf); height: 100%; border-radius: inherit; }
.country-page-mobile-statuses { display: none; }
.country-page-pagination { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:18px; color:#61738a; font-size:.78rem; }
.country-page-pagination > * { min-width: 74px; text-align: center; }
.country-page-empty { background:var(--country-soft); border:1px dashed #d5e0ec; border-radius: 12px; padding: 22px; color:#66778b; font-size: .88rem; }
.country-page-empty strong { color:#42566d; font-weight: 700; }
.country-page-empty p { font-size:.8rem; margin-top:5px; }
.country-page-sport-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.country-page-sport-link { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px; border:1px solid var(--country-border); background:#f9fbfe; border-radius:12px; color:var(--country-ink); font-size:.88rem; font-weight: 690; transition: background .15s, border .15s; }
.country-page-sport-link:hover { background:#edf6ff; border-color:#cce3f8; }
.country-page-sport-link strong { background:#e9f3fc; color:#1f669e; border-radius:999px; padding:5px 8px; font-size:.82rem; white-space:nowrap; }
.country-page-sport-link small { font-weight:600; font-size:.65rem; }
.country-page-athlete-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.country-page-athlete-card { display:flex; position:relative; align-items:center; gap:12px; min-width:0; min-height:94px; border:1px solid var(--country-border); border-radius:12px; background:#fff; padding:12px; transition: border-color .15s, background .15s; }
.country-page-athlete-card:hover { background:#f9fcff; border-color:#bfdaf1; }
.country-page-athlete-card img, .country-page-athlete-placeholder { width:54px; height:64px; flex: 0 0 54px; object-fit:cover; border-radius:9px; background:#f1f5fa; }
.country-page-athlete-placeholder { display:flex; justify-content:center; align-items:center; color:#9eadbe; font-size:22px; }
.country-page-athlete-copy { display:flex; min-width:0; flex-direction:column; gap:3px; padding-right:12px; }
.country-page-athlete-copy strong { color:var(--country-ink); font-size:.87rem; font-weight:730; line-height:1.3; }
.country-page-athlete-copy span { color:#63768d; font-size:.75rem; }
.country-page-athlete-copy small { color:#8898a9; font-size:.7rem; }
.country-page-card-arrow { color:#9eafc2; font-size:.9rem; align-self:flex-start; margin-left:auto; }
.country-page-medal { display:inline-flex; padding:5px 8px; margin:2px; border-radius:7px; color:#6b5817; background:#fff4c8; font-weight:700; font-size:.71rem; }
.country-page-medal--silver { color:#61748a; background:#edf1f5; }
.country-page-medal--bronze { color:#9e6634; background:#f9ede0; }
.country-page-medal--quota { color:#1c7a53; background:#e6f8ed; }
.country-page-sidebar-panel h2 { font-size:1.28rem; }
.country-page-description { color:#53677e; font-size:.9rem; overflow-wrap:anywhere; line-height:1.7; }
.country-page-description img { max-width:100%; height:auto; }
.country-page-news-item { padding:12px 0; border-bottom:1px solid #edf0f4; }
.country-page-news-item:first-child { padding-top:3px; }
.country-page-news-item:last-child { padding-bottom:0; border-bottom:none; }
.country-page-news-item a { display:block; font-size:.88rem; line-height:1.45; font-weight:700; color:var(--country-ink); }
.country-page-news-item a:hover { color:var(--country-accent); }
.country-page-news-item time { display:block; margin-top:7px; font-size:.74rem; color:#93a0af; }
.country-page-sidebar-note { margin:0 4px; padding:13px 16px; border-left:3px solid #b9d8f2; color:#708198; font-size:.79rem; line-height:1.65; }
.country-page-sidebar-note strong { color:#405c78; }
@media (max-width: 1199px) {
    .country-page-section-nav { position:relative; top:auto; }
}
@media (max-width: 991px) {
    .country-page-desktop-table { display:none; }
    .country-page-mobile-statuses { display:grid; gap:10px; margin-top:16px; }
    .country-page-mobile-status { padding:15px; border:1px solid var(--country-border); border-radius:12px; background:#fff; }
    .country-page-mini-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:15px 0 13px; }
    .country-page-mini-metrics > span { display:block; background:#f6f8fb; padding:8px; border-radius:8px; font-size:.69rem; color:#708198; }
    .country-page-mini-metrics strong { display:block; font-size: .98rem; color:var(--country-ink); margin-top:2px; }
    .country-page-mobile-progress-label { color:#6a7d91; font-size:.74rem; margin-bottom:6px; }
    .country-page-panel { padding:22px; }
}
@media (max-width: 700px) {
    .country-page-hero { padding:22px 18px; border-radius:16px; }
    .country-page-heading { align-items:flex-start; gap:15px; margin-bottom:19px; }
    .country-page-flag { width:77px; height:53px; border-radius:9px; }
    .country-page h1 { font-size: 1.75rem; margin:4px 0 9px; }
    .country-page-eyebrow { font-size:.62rem; }
    .country-page-lead { font-size:.8rem; }
    .country-page-details { gap:7px; font-size:.75rem; }
    .country-page-overview-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .country-page-stat { padding:13px; }
    .country-page-stat strong { font-size:1.55rem; }
    .country-page-section-nav { margin-bottom:17px; }
    .country-page-section-nav a { padding:9px 11px; font-size:.78rem; }
    .country-page-panel { padding:18px; border-radius:14px; }
    .country-page-panel-head { flex-wrap:wrap; gap:8px; }
    .country-page-panel h2 { font-size:1.27rem; }
    .country-page-qualification-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .country-page-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:12px; }
    .country-page-filter-search { grid-column: span 2; }
    .country-page-filter-actions { grid-column: span 2; }
    .country-page-filters .btn { flex:1; }
    .country-page-sport-grid, .country-page-athlete-grid { grid-template-columns:1fr; }
}
@media (max-width: 430px) {
    .country-page-hero { padding:18px 15px; }
    .country-page-heading { gap:12px; }
    .country-page-flag { width:66px; height:47px; }
    .country-page h1 { font-size:1.58rem; }
    .country-page-panel { padding:16px; }
    .country-page-status { font-size:.65rem; }
    .country-page-pagination > * { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .country-page *, .country-page *::before, .country-page *::after { transition:none !important; scroll-behavior:auto !important; }
}
