/* K7AR WebCluster modern shell. Display-only layer over the retained Web Forms application. */
:root {
    --ink: #152d40;
    --muted: #596e7c;
    --teal: #00796f;
    --navy: #102c3d;
    --line: #d7e3e9;
    --paper: #fff;
    --wash: #f0f5f7;
}
body.webcluster-shell {
    padding: 0;
    background: var(--wash);
    color: var(--ink);
    font:
        14px/1.45 "Segoe UI",
        system-ui,
        -apple-system,
        sans-serif;
}
.webcluster-shell * {
    box-sizing: border-box;
}
.shell-width {
    width: calc(100% - 40px);
    max-width: 1480px;
    margin: 0 auto;
}
.site-header {
    background: var(--navy);
    border-bottom: 3px solid #13a89d;
    color: #fff;
}
.header-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
}
.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    color: #fff !important;
    flex-shrink: 0;
}
.site-brand strong {
    display: block;
    font-size: 21px;
    letter-spacing: -0.5px;
    line-height: 1.3;
}
.site-brand small {
    display: block;
    color: #bbd2dd;
    font-size: 11px;
    letter-spacing: 0.035em;
    margin-top: 2px;
}
.brand-mark {
    display: flex;
    align-items: center;
    gap: 3px;
    width: 32px;
    height: 30px;
}
.brand-mark i {
    display: block;
    width: 5px;
    background: #54d5c4;
    border-radius: 2px;
    height: 12px;
}
.brand-mark i:nth-child(2) {
    height: 22px;
}
.brand-mark i:nth-child(3) {
    height: 30px;
}
.brand-mark i:nth-child(4) {
    height: 18px;
}
.site-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.site-nav a {
    color: #c9dce6;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    padding: 9px 13px;
    border-radius: 6px;
}
.site-nav a:hover {
    color: #fff;
    background: #234556;
}
.site-nav a[aria-current="page"] {
    color: #fff;
    background: #2b4d5c;
    box-shadow: inset 0 -2px #54d5c4;
}
.body-content {
    padding: 0 0 20px;
    min-height: calc(100vh - 143px);
}
.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 24px 0 18px;
}
.page-heading h1 {
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.8px;
    margin: 2px 0 6px;
    font-weight: 650;
}
.page-heading p {
    margin: 0;
    color: var(--muted);
}
.page-heading .eyebrow {
    font-size: 10px;
    color: var(--teal);
    font-weight: 750;
    letter-spacing: 0.13em;
    margin: 0 0 5px;
}
.live-heading {
    margin: 18px 0 12px;
}
.live-heading h1 {
    margin-bottom: 0;
}
.refresh-note {
    font-size: 12px;
}
.operator-message {
    background: #fff5dd;
    border-left: 3px solid #d29b22;
    padding: 9px 13px;
    margin-bottom: 10px;
    border-radius: 5px;
}
.source-toolbar {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
    margin: 0;
    padding: 8px 12px;
    gap: 8px 12px;
}
.source-toolbar > strong {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-right: 5px;
}
.source-toolbar > span {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #f7fafb;
    padding: 5px 9px;
    gap: 6px;
}
.source-toolbar > span:has(input:checked) {
    background: #e5f6f2;
    border-color: #84c8be;
    color: #005d55;
}
.source-toolbar label {
    margin: 0;
    font-size: 13px;
    cursor: pointer;
}
.source-toolbar input[type="checkbox"] {
    margin: 0;
    accent-color: var(--teal);
    width: 15px;
    height: 15px;
    cursor: pointer;
}
.active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 12px;
    background: #e7eff3;
    border: 1px solid var(--line);
    border-top: 0;
    border-left: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    padding: 7px 12px;
    margin: 0 0 12px;
}
.active-filters > strong {
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--muted);
    flex-shrink: 0;
}
.active-filters p {
    margin: 0;
    font-size: 12px;
    flex: 1;
    min-width: 180px;
}
.active-filters a {
    color: var(--teal);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}
.webcluster-shell .panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 2px 5px #14334705;
    background: #fff;
    margin: 0 0 12px;
    overflow: hidden;
}
.spot-data-grid {
    margin: 0;
    border: 0 !important;
    background: #fff !important;
    color: var(--ink) !important;
}
.spot-data-grid > tbody > tr > th,
.spot-data-grid > thead > tr > th {
    background: #1b3d4e !important;
    color: #eaf4f8 !important;
    border: 0 !important;
    border-right: 1px solid #3b5766 !important;
    font-size: 12px !important;
    font-weight: 600;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    vertical-align: middle;
}
.spot-data-grid > tbody > tr:not(:has(th)) {
    background: #fff !important;
    color: var(--ink) !important;
}
.spot-data-grid > tbody > tr:nth-child(odd):not(:has(th)) {
    background: #f1f6f8 !important;
}
.spot-data-grid > tbody > tr > td {
    border: 0 !important;
    border-right: 1px solid #e3ecf0 !important;
    border-bottom: 1px solid #e4edf1 !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}
.spot-data-grid > tbody > tr:hover:not(:has(th)) {
    background: #e2f3ef !important;
}
.spot-data-grid > tbody > tr > td[colspan] {
    padding: 9px 12px !important;
    font-family: "Segoe UI", system-ui, sans-serif !important;
    color: var(--muted);
    font-size: 13px;
}
.spot-data-grid > tbody > tr > td[colspan] a {
    display: inline-block;
    padding: 4px 10px;
    background: #e7eff3;
    color: #185462;
    border-radius: 4px;
    text-decoration: none;
    margin: 0 2px;
}
.column-size-tools {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 12px;
    font-size: 11px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}
.column-size-tools button {
    font-size: 11px;
    padding: 2px 7px;
    border-color: var(--line);
    border-radius: 4px;
    color: #355969;
}
.column-resize-handle::after {
    border-color: #6d8c9b;
}
.column-resize-handle:hover::after,
.column-resize-handle:focus::after {
    border-color: #5be0c9;
}
.spot-table-scroll {
    padding: 0;
    scrollbar-color: #92b1bc #edf3f5;
    scrollbar-width: thin;
}
.callsign-lookup {
    color: #096c77;
    font-weight: 600;
    text-decoration: none;
}
.callsign-lookup:hover,
.callsign-lookup:focus {
    color: #004a55;
    text-decoration: underline;
}
.spot-source-badge {
    display: inline-block;
    padding: 0 5px;
    border-radius: 3px;
    background: #e9eff3;
    color: #38586a;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
.spot-source-badge[data-source^="Human/"] {
    background: #dff3ec;
    color: #166448;
}
.spot-source-badge[data-source="CW"],
.spot-source-badge[data-source="RTTY"] {
    background: #e9e7f7;
    color: #55458b;
}
.spot-source-badge[data-source="FT8"],
.spot-source-badge[data-source="FT4"] {
    background: #e3eefb;
    color: #235c9c;
}
.table-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 7px;
    border-bottom: 1px solid var(--line);
}
.table-section-heading h2 {
    font-size: 14px;
    font-weight: 650;
    margin: 0;
}
.table-section-heading span {
    font-size: 11px;
    color: var(--muted);
}
.filter-intro {
    margin: 0 0 18px;
    color: var(--muted);
}
.filter-layout {
    gap: 16px;
}
.filter-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 5px #14334705;
}
.filter-card legend {
    font-size: 15px;
    font-weight: 650;
    color: var(--ink);
    padding: 0 7px;
}
.filter-card p {
    font-size: 13px;
    margin: 8px 0 12px;
    color: var(--muted);
}
.country-options {
    border-color: #b9cdd7;
    border-radius: 5px;
    font-size: 13px;
    color: var(--ink);
    background: #fbfdfe;
    line-height: 1.5;
    padding: 6px;
}
.country-options option {
    padding: 3px 5px;
}
.filter-label {
    font-size: 13px;
    color: var(--ink);
}
.continent-options,
.band-options {
    line-height: 2.2;
}
.continent-options input,
.band-options input {
    accent-color: var(--teal);
    margin-right: 3px;
}
.filter-clear {
    font-size: 12px;
    border-color: var(--line);
    color: #356473;
    border-radius: 5px;
    padding: 5px 9px;
}
.filter-help {
    font-size: 12px;
    color: var(--muted);
}
.filter-actions {
    margin: 18px 0 24px;
    gap: 9px;
}
.webcluster-shell .btn {
    border-radius: 5px;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 14px;
}
.webcluster-shell .btn-primary {
    background: var(--teal);
    border-color: var(--teal);
}
.webcluster-shell .btn-primary:hover {
    background: #00655d;
    border-color: #00655d;
}
.webcluster-shell .btn-default {
    border-color: #bfd0d9;
    color: #325567;
    background: #fff;
}
.webcluster-shell .form-control {
    height: 40px;
    border-color: #b9cdd7;
    border-radius: 5px;
    box-shadow: none;
}
.webcluster-shell .form-control:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px #00847522;
}
.content-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 22px;
    box-shadow: 0 2px 5px #14334705;
}
.content-card h2 {
    font-size: 20px;
    letter-spacing: -0.3px;
    line-height: 1.3;
    margin: 8px 0 14px;
    font-weight: 650;
}
.content-card p {
    color: var(--muted);
    margin: 0 0 13px;
}
.content-card p:last-child {
    margin-bottom: 0;
}
.search-card {
    max-width: 640px;
}
.search-card h2 {
    margin-top: 0;
}
.search-card .form-control {
    font-family: Consolas, "Courier New", monospace;
    max-width: 360px;
    margin: 7px 0 12px;
}
.search-card .filter-actions {
    margin-bottom: 0;
}
.about-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.card-kicker {
    font-size: 10px;
    letter-spacing: 0.1em;
    font-weight: 750;
    color: var(--teal);
}
.text-link {
    color: var(--teal);
    font-weight: 650;
}
.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
}
.site-footer a {
    color: var(--muted);
}
.skip-link {
    position: absolute;
    left: 12px;
    top: -100px;
    z-index: 100;
    background: #fff;
    color: #102c3d;
    padding: 10px;
}
.skip-link:focus {
    top: 10px;
}
.webcluster-shell a:focus-visible,
.webcluster-shell button:focus-visible,
.webcluster-shell input:focus-visible,
.webcluster-shell select:focus-visible {
    outline: 2px solid #009e8d;
    outline-offset: 3px;
}
@media (min-width: 1600px) {
    .shell-width {
        width: calc(100% - 64px);
    }
}
@media (max-width: 900px) {
    .header-layout {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 15px 0 10px;
    }
    .site-nav {
        width: 100%;
    }
    .site-nav a {
        padding: 7px 10px;
    }
    .about-layout {
        grid-template-columns: 1fr;
    }
    .site-brand strong {
        font-size: 20px;
    }
}
@media (max-width: 600px) {
    .shell-width {
        width: calc(100% - 24px);
    }
    .page-heading {
        margin: 18px 0 14px;
        align-items: flex-start;
    }
    .page-heading h1 {
        font-size: 24px;
    }
    .live-heading {
        margin: 14px 0 10px;
    }
    .refresh-note {
        font-size: 10px;
        max-width: 95px;
        text-align: right;
        padding-top: 18px;
    }
    .source-toolbar {
        gap: 6px;
        padding: 8px;
    }
    .source-toolbar > strong {
        width: 100%;
    }
    .source-toolbar > span {
        padding: 4px 7px;
    }
    .source-toolbar label {
        font-size: 12px;
    }
    .active-filters {
        padding: 7px 9px;
    }
    .column-size-tools span {
        max-width: 230px;
        font-size: 10px;
    }
    .filter-card {
        padding: 13px;
    }
    .content-card {
        padding: 18px;
    }
    .site-footer {
        flex-direction: column;
        gap: 4px;
    }
}
@media (prefers-reduced-motion: no-preference) {
    .site-nav a,
    .callsign-lookup,
    .btn {
        transition:
            background-color 0.12s,
            color 0.12s;
    }
}
/* NG7M follow-up: denser data rows, retaining 15px fixed-width text. */
.spot-data-grid > tbody > tr > td:not([colspan]) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.15;
}
.spot-data-grid > tbody > tr > td:not([colspan]) * {
    line-height: 1.15;
}
/* NG7M: centered headers and a visible State column on narrow viewports. */
.spot-data-grid th {
    text-align: center !important;
}
.spot-data-grid.columns-sized .spot-state-column {
    position: sticky !important;
    right: 0;
    z-index: 1;
    box-shadow: -2px 0 4px #14334715;
}
.spot-data-grid > tbody > tr > td.spot-state-column {
    background: inherit;
}
.spot-data-grid.columns-sized th.spot-state-column {
    z-index: 3;
}
/* Last divider stays inside the table so it cannot create phantom overflow. */
.spot-data-grid.columns-sized th:last-child .column-resize-handle {
    right: 0;
}
.spot-table-scroll {
    overflow-x: auto;
}
/* Keep Time at the right edge and State immediately beside it during scrolling. */
.spot-data-grid.columns-sized .spot-time-column {
    position: sticky !important;
    right: 0;
    z-index: 1;
}
.spot-data-grid > tbody > tr > td.spot-time-column {
    background: inherit;
}
.spot-data-grid.columns-sized th.spot-time-column {
    z-index: 3;
}
/* Compact, equal-height table headers; full labels remain in their titles. */
.spot-data-grid > tbody > tr > th,
.spot-data-grid > thead > tr > th {
    height: 22px;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
}
.spot-data-grid th .column-header-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: inherit !important;
    line-height: inherit !important;
}
/* Join the filter summary directly to the main table controls. */
.active-filters {
    margin-bottom: 0;
    border-radius: 0;
}
.active-filters + .panel {
    border-top: 0;
    border-radius: 0 0 8px 8px;
}
/* NG7M: stronger contrast for paging links and disabled paging labels. */
.spot-data-grid > tbody > tr > td[colspan] a {
    color: #123c52 !important;
    border: 1px solid #536f80;
    background: #fff;
    font-weight: 600;
}
.spot-data-grid > tbody > tr > td[colspan] a:hover,
.spot-data-grid > tbody > tr > td[colspan] a:focus {
    background: #dceef0;
    border-color: #245966;
}
.spot-data-grid > tbody > tr > td[colspan] span {
    display: inline-block;
    padding: 4px 10px;
    margin: 0 2px;
    color: #435e6c !important;
    border: 1px solid #718b99;
    border-radius: 4px;
    background: #edf2f5;
}
/* NG7M: compact paging beside the column reset control, with a small fallback row. */
.column-size-tools {
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.column-size-tools > span:first-child {
    margin-right: auto;
}
.spot-page-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}
.spot-page-controls a,
.spot-page-controls span {
    display: inline-block;
    font:
        600 11px/1.3 "Segoe UI",
        sans-serif;
    padding: 2px 7px;
    border: 1px solid #536f80;
    border-radius: 4px;
    color: #123c52;
    background: #fff;
    text-decoration: none;
    white-space: nowrap;
}
.spot-page-controls span {
    color: #435e6c;
    border-color: #718b99;
    background: #edf2f5;
}
.spot-page-controls a:hover,
.spot-page-controls a:focus {
    background: #dceef0;
    border-color: #245966;
}
.spot-data-grid tr.spot-grid-pager[hidden] {
    display: none !important;
}
.spot-data-grid tr.spot-grid-pager > td {
    padding: 2px 7px !important;
}
.spot-data-grid tr.spot-grid-pager a,
.spot-data-grid tr.spot-grid-pager span {
    padding: 2px 7px !important;
}

/* NG7M: group titles sit inside their cards, clear of the rounded borders. */
.filter-card .filter-group-title {
    font-size: 15px;
    font-weight: 650;
    color: var(--ink);
    margin: 0 0 10px;
    line-height: 1.3;
}
.band-mode-options {
    display: block;
    line-height: 1.8;
}
.band-mode-options label {
    display: inline-block;
    min-width: 72px;
    margin: 0 12px 4px 4px;
}
.band-mode-options input {
    accent-color: var(--teal);
}
.quick-filter {
    position: relative;
    font-size: 12px;
    min-width: 110px;
}
.quick-filter summary {
    cursor: pointer;
    border: 1px solid #7893a2;
    border-radius: 5px;
    padding: 4px 8px;
    background: #fff;
    color: var(--ink);
    max-width: 190px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quick-filter[open] summary {
    border-color: var(--teal);
}
.quick-filter-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 20;
    width: 280px;
    max-width: calc(100vw - 40px);
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    box-shadow: 0 5px 18px #14334725;
}
.quick-filter-menu p {
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 8px;
}
.quick-filter-menu input {
    accent-color: var(--teal);
    margin: 0 4px 0 0;
}
.quick-band-options label {
    display: inline-block;
    width: 60px;
    margin: 0 0 7px;
}
.quick-mode-options label {
    display: inline-block;
    width: 205px;
    margin: 0 0 7px;
}
.quick-filter-apply {
    font-size: 12px;
    padding: 4px 9px;
    color: #fff;
    background: var(--teal);
    border: 1px solid #005e57;
    border-radius: 5px;
}
.quick-filter summary:focus-visible {
    outline: 2px solid #009e8d;
    outline-offset: 3px;
}
@media (max-width: 600px) {
    .quick-filter-menu {
        position: static;
        margin-top: 4px;
    }
    .quick-filter[open] {
        width: 100%;
    }
    .source-toolbar .page-size-control {
        margin-left: 0 !important;
    }
}

.quick-filter-menu {
    max-height: 340px;
    overflow-y: auto;
}
.quick-band-options br,
.band-mode-options br {
    display: none;
}

/* NG7M: reduce banner space while preserving the title, subtitle and icon sizes. */
.header-layout {
    min-height: 56px;
}
@media (max-width: 900px) {
    .header-layout {
        min-height: 0;
        gap: 6px;
        padding: 8px 0 6px;
    }
    .site-nav a {
        padding: 5px 10px;
    }
}

/* Override legacy inline pager colors after moving controls out of the grid. */
.spot-page-controls a {
    color: #102c3d !important;
    border-color: #355363 !important;
    background: #fff !important;
    font-weight: 700;
}
.spot-page-controls a:hover,
.spot-page-controls a:focus {
    color: #102c3d !important;
    background: #dceef0 !important;
    border-color: #163e4d !important;
}
.spot-page-controls span {
    color: #435e6c !important;
    border-color: #718b99 !important;
    background: #edf2f5 !important;
}

/* The toolbar's 15px dimensions belong only to checkboxes, not submit buttons. */
.source-toolbar .quick-filter-apply {
    width: auto;
    height: auto;
    min-height: 28px;
    line-height: 1.3;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #102c3d !important;
    background: #fff !important;
    border: 1px solid #355363;
    border-radius: 5px;
}
.source-toolbar .quick-filter-apply:hover,
.source-toolbar .quick-filter-apply:focus {
    background: #dceef0 !important;
    border-color: #163e4d;
}

/* Pair native checkbox labels and align choices consistently across both filter pages. */
.quick-band-options,.quick-mode-options,.band-mode-options{display:grid;gap:8px 12px;line-height:1.35}
.quick-band-options{grid-template-columns:repeat(3,minmax(0,1fr))}
.quick-mode-options{grid-template-columns:1fr}
.band-mode-options{grid-template-columns:repeat(auto-fit,minmax(100px,1fr));margin-bottom:12px}
.band-mode-options[id$="modeList"]{grid-template-columns:1fr}
.choice-option{display:flex;align-items:center;gap:7px;min-width:0}
.choice-option input[type="checkbox"]{flex:0 0 15px;width:15px;height:15px;margin:0!important}
.choice-option label{display:block;width:auto!important;min-width:0;margin:0!important;padding:0;line-height:1.35;font-size:13px;font-weight:400}
.quick-filter-menu .filter-clear{margin-top:10px}
