/* SailingSA Main Stylesheet — MOBILE-FIRST: base = mobile, @media (min-width: …) = tablet/desktop */

:root {
    --primary-color: #6B2C91;
    --secondary-color: #DC143C;
    --text-color: #1e293b;
    --bg-color: #f5f7fa;
    --white: #ffffff;
    --border-color: #ddd;
    /* Page box standard (intro + all cards): duplicated across class/sailor/regatta pages */
    --box-border: 2px solid #001f3f;
    --box-radius: 8px;
    --box-shadow: 0 1px 3px rgba(0, 31, 63, 0.08);
    --box-body-text: #334155;
    --box-body-size: 0.9rem;
    --box-heading-color: #001f3f;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
    overflow-y: scroll;
    scroll-behavior: smooth;
}
body {
    overflow-x: hidden;
    overflow-y: visible;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #1e293b;
    line-height: 1.6;
}

main {
    background: transparent;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0.75rem 12px;
}
@media (min-width: 768px) {
    .container {
        padding: 12px;
    }
}

/* Table horizontal scroll on mobile */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Hide less important columns on mobile; show from 600px up */
.hide-mobile {
    display: none !important;
}
@media (min-width: 600px) {
    .hide-mobile {
        display: revert !important;
    }
    th.hide-mobile,
    td.hide-mobile {
        display: table-cell !important;
    }
}

/* Cards: same as .home-intro-box (page box standard) – mobile first */
.card {
    background: var(--white);
    border: var(--box-border);
    border-radius: var(--box-radius);
    box-shadow: var(--box-shadow);
    padding: 0.5rem 0.75rem;
    line-height: 1.35;
    transition: box-shadow 0.2s;
    margin-bottom: 16px;
}
.card:hover {
    box-shadow: 0 4px 12px rgba(0, 31, 63, 0.12);
}
.card .table td {
    font-size: var(--box-body-size);
    color: var(--box-body-text);
}
.card .table td a {
    color: var(--box-heading-color);
}
@media (min-width: 600px) {
    .card {
        padding: 0.5rem 0.85rem;
    }
}

/* Minimum touch target for buttons */
button,
.btn,
[role="button"] {
    min-height: 44px;
}

/* Tables: site match; mobile-friendly: 1 line per cell only (nowrap), .table-container scrolls horizontally */
.table thead th {
    min-height: 44px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    text-align: left;
    border-bottom: var(--box-border);
    color: var(--box-heading-color);
    font-size: var(--box-body-size);
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}

/* Auto Scrapes table: single line on mobile, no wrap */
#v3-scrape-status-table {
    table-layout: fixed;
    width: 100%;
    font-size: 12px;
    white-space: nowrap;
}
#v3-scrape-status-table thead th,
#v3-scrape-status-table tbody td {
    padding: 4px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#v3-scrape-status-table thead th:nth-child(1),
#v3-scrape-status-table tbody td:nth-child(1) { width: 11%; min-width: 0; }  /* Scrape Name */
#v3-scrape-status-table thead th:nth-child(2),
#v3-scrape-status-table tbody td:nth-child(2) { width: 10%; min-width: 0; }  /* Last Success */
#v3-scrape-status-table thead th:nth-child(3),
#v3-scrape-status-table tbody td:nth-child(3) { width: 10%; min-width: 0; }  /* Next Run */
#v3-scrape-status-table thead th:nth-child(4),
#v3-scrape-status-table tbody td:nth-child(4) { width: 8%; min-width: 0; }   /* Countdown */
#v3-scrape-status-table thead th:nth-child(5),
#v3-scrape-status-table tbody td:nth-child(5) { width: 8%; min-width: 0; }  /* Status */
#v3-scrape-status-table thead th:nth-child(6),
#v3-scrape-status-table tbody td:nth-child(6) { width: 6%; min-width: 0; }   /* New Records */
#v3-scrape-status-table thead th:nth-child(7),
#v3-scrape-status-table tbody td:nth-child(7) { width: 8%; min-width: 0; }   /* Target Table */
#v3-scrape-status-table thead th:nth-child(8),
#v3-scrape-status-table tbody td:nth-child(8) { width: 8%; min-width: 0; }   /* Batch ID */
#v3-scrape-status-table thead th:nth-child(9),
#v3-scrape-status-table tbody td:nth-child(9) { width: 9%; min-width: 0; }   /* Links */
#v3-scrape-status-table thead th:nth-child(10),
#v3-scrape-status-table tbody td:nth-child(10) { width: 12%; min-width: 0; } /* Actions */
@media (max-width: 599px) {
    #v3-scrape-status-table {
        font-size: 11px;
        table-layout: fixed;
        white-space: nowrap;
    }
    #v3-scrape-status-table thead th,
    #v3-scrape-status-table tbody td {
        padding: 3px 4px;
        white-space: nowrap;
    }
    #v3-auto-scrapes-card .table-container {
        overflow-x: hidden;
    }
    #v3-scrape-status-table thead th:nth-child(1),
    #v3-scrape-status-table tbody td:nth-child(1) { width: 18%; }
    #v3-scrape-status-table thead th:nth-child(2),
    #v3-scrape-status-table tbody td:nth-child(2) { width: 10%; }
    #v3-scrape-status-table thead th:nth-child(3),
    #v3-scrape-status-table tbody td:nth-child(3) { width: 10%; }
    #v3-scrape-status-table thead th:nth-child(4),
    #v3-scrape-status-table tbody td:nth-child(4) { width: 5%; }
    #v3-scrape-status-table thead th:nth-child(5),
    #v3-scrape-status-table tbody td:nth-child(5) { width: 8%; }
    #v3-scrape-status-table thead th:nth-child(6),
    #v3-scrape-status-table tbody td:nth-child(6) { width: 4%; }
    #v3-scrape-status-table thead th:nth-child(7),
    #v3-scrape-status-table tbody td:nth-child(7) { width: 7%; }
    #v3-scrape-status-table thead th:nth-child(8),
    #v3-scrape-status-table tbody td:nth-child(8) { width: 7%; }
    #v3-scrape-status-table thead th:nth-child(9),
    #v3-scrape-status-table tbody td:nth-child(9) { width: 10%; }
    #v3-scrape-status-table thead th:nth-child(10),
    #v3-scrape-status-table tbody td:nth-child(10) { width: 11%; }
}

.card .table a {
    color: var(--box-heading-color);
    font-weight: 600;
    text-decoration: none;
}
.card .table a:hover {
    text-decoration: underline;
}

.sort-indicator {
    font-size: 1em;
    margin-left: 2px;
    user-select: none;
}

/* Stats links: exact match to site .profile-card-value / .sailor-career-regatta-history a */
.class-stats a.stats-link {
    display: block;
    font-size: var(--box-body-size);
    color: var(--box-heading-color);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 0.5rem;
    cursor: pointer;
}
.class-stats a.stats-link:hover {
    text-decoration: underline;
}
.class-stats a.stats-link:last-child {
    margin-bottom: 0;
}

/* Section titles in cards: exact match to site .profile-card-header */
.card .section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--box-heading-color);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: 2px solid #001f3f;
    padding-bottom: 0.35rem;
    margin: 0 0 0.4rem 0;
}

.cell-nowrap {
    white-space: nowrap;
}

/* Main layout: News24-style PC with ad slots (top banner + left | center | right) */
.main-content {
    display: block;
    width: 100%;
    padding-top: 25px;
}

.ad-banner-top {
    width: 100%;
    min-height: 40px;
    background: #e8eef4;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-banner-top .ad-slot-placeholder {
    width: 100%;
    max-width: 970px;
    min-height: 40px;
}

.layout-three-col {
    display: flex;
    width: 100%;
    max-width: 100%;
}

.ad-column-left,
.ad-column-right {
    flex-shrink: 0;
    width: 160px;
    min-width: 160px;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f0f4f8;
    border-left: 1px solid var(--border-color);
}

.ad-column-left {
    border-left: none;
    border-right: 1px solid var(--border-color);
}

.main-column {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
}

.main-column .container {
    overflow: visible;
}

/* Ad slot placeholders (replace with ad code; hide .ad-slot-placeholder when using real ads) */
.ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ad-slot-placeholder {
    background: #e8ecf0;
    border: 1px dashed #b0b8c0;
    border-radius: 4px;
}

.ad-slot-vertical {
    min-height: 320px;
    width: 100%;
    max-width: 160px;
}

@media (max-width: 1023px) {
    .ad-column-left,
    .ad-column-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .ad-banner-top {
        min-height: 32px;
    }
    .ad-banner-top .ad-slot-placeholder {
        min-height: 32px;
    }
}

/* Header — dark blue navy; all text and links in header must be white */
.site-header {
    position: relative;
    z-index: 1000;
    background: #001f3f; /* Navy blue */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
}

/* Force white text in dark header — header background is dark navy */
.site-header,
.site-header * {
    color: #ffffff !important;
}

/* Desktop navigation – .nav-inline controlled by CSS so mobile can hide it */
.site-header .nav-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-right: auto;
}

.site-header .menu-btn {
    display: flex;
    flex-shrink: 0;
}

.site-header nav a {
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: none;
}

/* Mobile overlay menu — actual class in DOM is .nav-menu-overlay (not .navMenuOverlay) */
.nav-menu-overlay a {
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: none;
}

.nav-menu-overlay a:hover,
.site-header nav a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Mobile menu links — force white on :visited/:active so browsers don’t apply purple/blue */
.nav-menu-overlay a,
.nav-menu-overlay a:visited,
.nav-menu-overlay a:active {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}
.nav-menu-overlay a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Higher specificity: overlay is inside .site-header — beats any other link rule on mobile */
.site-header .nav-menu-overlay a,
.site-header .nav-menu-overlay a:link,
.site-header .nav-menu-overlay a:visited,
.site-header .nav-menu-overlay a:active {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}
.site-header .nav-menu-overlay a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .site-header {
        padding: 0.6rem 0;
        min-height: auto;
    }
    /* User/auth block on its own row so it doesn’t overlap nav */
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .site-header .container {
        gap: 0.35rem;
        padding: 0 0.5rem 0 0.1rem;
        flex-wrap: nowrap;
        overflow: visible;
    }
    
    .logo {
        flex-shrink: 0;
        min-width: auto;
    }
    
    .header-auth {
        flex-shrink: 0;
        min-width: 0;
    }
    
    /* On mobile, hide inline nav and use the hamburger overlay instead. */
    .site-header .nav-inline {
        display: none !important;
    }
    .site-header nav a {
        font-size: 12px;
        white-space: nowrap;
    }
}

.logo img {
    height: 40px;
    width: auto;
    max-width: none;
    object-fit: contain;
}

@media (max-width: 768px) {
    .logo img {
        height: 26px;
    }
}

.header-refresh-btn {
    margin-left: 0.75rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
}
.header-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.main-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex: 1;
}

.main-nav a {
    color: #ffffff; /* White text for navy background */
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.main-nav a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Header Auth (Login Status / Login Box) - Far right, next to menu */
.header-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: 0.75rem;
}

@media (max-width: 768px) {
    .header-auth {
        gap: 0.35rem;
        margin-left: auto;
        margin-right: 0;
        flex-shrink: 0;
        min-width: 0;
    }
    
    .header-auth .btn-primary {
        flex-shrink: 0 !important;
        min-width: auto !important;
        max-width: none !important;
        width: auto !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
        font-size: 0.68rem !important;
        padding: 0.35rem 0.55rem !important;
        line-height: 1.1 !important;
    }
}

@media (max-width: 480px) {
    .header-auth .btn-primary {
        font-size: 0.64rem !important;
        padding: 0.32rem 0.5rem !important;
        white-space: nowrap !important;
    }
}

#loggedInStatus {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    margin-left: 0;
}


.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    line-height: 1.3;
    margin-left: 0;
}

.user-name {
    color: #ffffff;
    font-weight: 600;
    white-space: nowrap;
}

.user-name-value {
    color: #ffffff !important; /* White for name */
    font-size: inherit; /* Same font size as parent (.user-name) */
    font-weight: inherit; /* Same font weight as parent */
}

.user-sas-id {
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

.sas-id-value {
    color: #ffffff; /* White for SAS ID number */
}

@media (max-width: 768px) {
    #loggedInStatus {
        gap: 0.35rem;
        flex-wrap: nowrap;
    }
    
    .user-info {
        display: none;
    }
    
    .user-name {
        font-size: 0.75rem !important;
        font-weight: 600 !important;
    }
    
    .user-name-value {
        color: #ffffff !important; /* White for name */
        font-size: inherit !important; /* Same font size as .user-name */
        font-weight: inherit !important; /* Same font weight as .user-name */
    }
    
    .user-sas-id {
        font-size: 0.65rem !important;
        opacity: 1;
        color: rgba(255, 255, 255, 0.85) !important; /* White for SAS ID: text */
    }
    
    /* Ensure SAS ID number is white on mobile */
    .sas-id-value {
        color: #ffffff !important; /* White for SAS ID number - same as desktop */
    }
}


.btn-logout {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff; /* White text for navy background */
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.2s;
}

@media (max-width: 768px) {
    .btn-logout {
        padding: 0.32rem 0.5rem;
        font-size: 0.68rem;
        min-width: auto;
        line-height: 1.1;
    }
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.25);
}

.menu-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    transition: background 0.2s;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    min-width: 32px;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .menu-btn {
        display: flex;
        padding: 0.28rem 0.5rem;
    }
}

.menu-icon {
    width: auto;
    height: auto;
    background: none;
    position: static;
    display: block;
    line-height: 1;
}

.menu-icon::before {
    content: "▾";
    display: block;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
}

.menu-btn[aria-expanded="true"] .menu-icon::before {
    content: "▴";
}

.nav-menu-overlay {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% - 1px);
    right: 0.75rem;
    left: auto;
    width: auto;
    z-index: 900;
    background: #0b2a45; /* dark overlay so white links are visible */
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 0.35rem 0;
    min-width: 160px;
    max-width: calc(100vw - 1.5rem);
    max-height: min(60vh, 320px);
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.nav-menu-overlay a {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    -webkit-tap-highlight-color: rgba(255,255,255,0.2);
    touch-action: manipulation;
}
.nav-menu-overlay a:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.1);
}
.header-auth {
    position: relative;
    z-index: 1100;
}

/* Mobile navigation layout — grid below header; overlay below header (z-index 900) */
@media (max-width: 768px) {
    .nav-menu-overlay {
        position: absolute;
        top: calc(100% - 1px);
        right: 0.75rem;
        left: auto;
        width: auto;
        min-width: 160px;
        max-width: calc(100vw - 1.5rem);
        max-height: min(60vh, 320px);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0.35rem 0;
        text-align: left;
        background: #0b2a45;
        border-radius: 8px;
        z-index: 900;
        border: 1px solid rgba(255,255,255,0.2);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    .site-header .nav-menu-overlay a,
    .nav-menu-overlay a {
        color: #ffffff !important;
        font-weight: 700 !important;
        text-decoration: none !important;
        text-align: left;
        display: block;
        padding: 0.55rem 1rem;
        white-space: nowrap;
    }
}

/* Buttons */
.btn-primary {
    background: #6b4cff;
    color: #ffffff;
    font-weight: 700;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

@media (max-width: 768px) {
    .btn-primary {
        padding: 0.5rem 0.6rem;
        font-size: 0.7rem;
        min-width: auto;
        flex-shrink: 0;
        width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .btn-primary {
        padding: 0.35rem 0.5rem;
        font-size: 0.65rem;
        min-width: auto;
        flex-shrink: 0;
        width: auto;
        max-width: none;
    }
}

.btn-primary:hover {
    color: #ffffff;
    opacity: 0.9;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-tertiary {
    background: #ccc;
    color: var(--text-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-google {
    background: #DC143C;
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.btn-facebook {
    background: #1877F2;
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.btn-email {
    background: #808080;
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.btn-username {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

/* Purple "Your Sailing Results" button in header */
.sailing-results-header-btn {
    background: #6B2C91;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-right: 0.75rem;
}

@media (max-width: 768px) {
    .sailing-results-header-btn {
        padding: 0.4rem 0.75rem;
        font-size: 12px;
    }
}

.sailing-results-header-btn:hover {
    background: #7B3CA1;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-container {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
}

.popup-state {
    display: block;
}

.popup-state.hidden {
    display: none;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.verification-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.loading-spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type="text"],
input[type="email"],
select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .popup-container {
        width: 95%;
        padding: 1.5rem;
    }
    
    /* Additional mobile header compactness */
    .container {
        padding: 0 0.75rem;
    }
    
    /* Very small screens - make header even more compact */
    @media (max-width: 480px) {
        .site-header .container {
            padding: 0 0.5rem;
            gap: 0.3rem;
        }
        
        #loggedInStatus {
            gap: 0.35rem;
        }
        
        .btn-logout {
            padding: 0.3rem 0.5rem;
            font-size: 0.7rem;
        }
        
        .logo img {
            height: 28px;
            width: auto;
            max-width: none;
        }
    }
}

/* Events audit: new-from-last-scrape highlight */
.event-row-new {
    background-color: #e6ffe6;
    font-weight: 600;
}
.event-row-new td {
    color: #0a7a0a;
}
.badge-new {
    background: #2ecc71;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

