
        * { box-sizing: border-box; }
        body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 1200px; margin: 0 auto; padding: 0.5rem; background: #f5f5f5; }
        .container { background: white; padding: 0.85rem; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
        h1 { color: #1a5c2e; margin-bottom: 0.1rem; font-size: 1.35rem; }
        .subtitle { color: #666; margin-bottom: 0.5rem; font-size: 0.85rem; }
        .form-section { background: #f8f9fa; padding: 0.85rem; border-radius: 6px; margin-bottom: 0.75rem; }
        .section-header { display: flex; justify-content: space-between; align-items: center; background: #1a5c2e; color: white; padding: 0.45rem 1rem; border-radius: 8px; margin-bottom: 0.5rem; cursor: pointer; user-select: none; }
        .section-header h2 { margin: 0; font-size: 0.95rem; color: white; }
        .section-header .toggle-icon { font-size: 1rem; font-weight: 700; }
        .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 0.6rem; }
        .form-group { display: flex; flex-direction: column; }
        label { margin-bottom: 0.3rem; font-weight: 500; font-size: 0.8rem; }
        .required { color: #dc3545; }
        input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="datetime-local"] { padding: 0.4rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.85rem; }
        .event-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 0.6rem; }
        .event-card { background: white; padding: 0.6rem; border-radius: 6px; border: 2px solid #e9ecef; }
        .event-card h3 { margin: 0 0 0.35rem; color: #1a5c2e; font-size: 0.9rem; }
        .event-subtitle { color: #666; font-size: 0.8rem; margin-bottom: 0.6rem; }
        .price-note { color: #1a5c2e; font-weight: 600; font-size: 0.8rem; margin-bottom: 0.6rem; }
        .checkbox-group { display: flex; flex-direction: column; gap: 0.45rem; }
        .checkbox-label { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; border: 2px solid #dee2e6; border-radius: 5px; cursor: pointer; transition: all 0.2s; }
        .checkbox-label:hover { border-color: #1a5c2e; background: #f0fff4; }
        .checkbox-label input:checked + span { color: #1a5c2e; font-weight: 600; }
        .checkbox-label input { width: 1.1rem; height: 1.1rem; accent-color: #1a5c2e; }
        .skin-type { display: flex; align-items: center; gap: 0.4rem; }
        .skin-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }
        .skin-badge.gross { background: #e8f5e9; color: #1a5c2e; }
        .skin-badge.net { background: #e3f2fd; color: #1565c0; }
        .skin-badge.kitty { background: #fff3e0; color: #e65100; }
        .skin-price { color: #666; font-size: 0.75rem; }
        .total-price { font-weight: 700; color: #1a5c2e; font-size: 0.9rem; margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid #dee2e6; }
        .btn { width: 100%; padding: 0.5rem; background: #1a5c2e; color: white; border: none; border-radius: 4px; font-size: 0.85rem; cursor: pointer; margin-top: 0.5rem; }
        .btn:hover { background: #154823; }
        .btn:disabled { background: #94a3a8; cursor: not-allowed; }
        .btn-secondary { background: #6c757d; margin-top: 0.3rem; }
        .btn-secondary:hover { background: #5a6268; }
        .btn-success { background: #28a745; }
        .btn-success:hover { background: #218838; }
        
        /* Table styles */
        .table-container { overflow-x: auto; margin-top: 0; }
        .mobile-cards { display: none; }
        table { width: 100%; border-collapse: collapse; font-size: 0.68rem; }
        th, td { padding: 0.3rem 0.35rem; text-align: left; border-bottom: 1px solid #dee2e6; }
        th { background: #f8f9fa; font-weight: 600; color: #333; font-size: 0.65rem; border-right: 1px solid #e9ecef; }
        th:last-child { border-right: none; }
        td { border-right: 1px solid #f0f0f0; }
        td:last-child { border-right: none; }
        tr:hover { background: #f8f9fa; }
        /* Zebra striping for readability */
        tbody tr:nth-child(even) { background: #fafafa; }
        tbody tr:nth-child(even):hover { background: #f0f0f0; }
        /* Amount column alignment */
        .amount-cell { text-align: center; }
        th.num-col, td.num-col { width: 0.5rem; text-align: center; white-space: nowrap; }
        th.name-col, td.name-col { width: 9rem; }
        /* Freeze Name column (signups table only) */
        #tableContainer table { position: relative; }
        #tableContainer td:nth-child(1), #tableContainer th:nth-child(1) {
            position: sticky;
            left: 0;
            z-index: 1;
            min-width: 120px;
        }
        #tableContainer th:nth-child(1) { background: #f8f9fa; z-index: 2; }
        #tableContainer tbody td:nth-child(1) { background: #fff; }
        #tableContainer tbody tr:nth-child(even) td:nth-child(1) { background: #fafafa; }
        #tableContainer tbody tr:hover td:nth-child(1) { background: #f0f0f0; }
        #tableContainer tfoot td:nth-child(1) { position: sticky; left: 0; z-index: 1; }
        #tableContainer tfoot tr:nth-child(1) td:nth-child(1) { background: #f8f9fa; }
        #tableContainer tfoot tr:nth-child(2) td:nth-child(1) { background: #d4edda; }
        /* Freeze Player column (payouts score-entry grid) */
        #scoreGrid th.sg-name, #scoreGrid td.sg-name {
            position: sticky;
            left: 0;
            z-index: 3;
            background: #f8f9fa;
            box-shadow: 1px 0 0 #c8d3cc;
        }
        #scoreGrid tbody td.sg-name { background: #fff; }
        #scoreGrid tbody tr:nth-child(even) td.sg-name { background: #fafafa; }
        #scoreGrid tbody tr:hover td.sg-name { background: #f0f0f0; }
        @media (max-width: 768px) {
            /* Keep the sticky name column from swallowing the screen on phones */
            #scoreGrid th.sg-name, #scoreGrid td.sg-name { max-width: 40vw; }
            #scoreGrid td.sg-name { overflow-x: hidden; text-overflow: ellipsis; }
            /* Stack tournament/day selectors (inline grid-template-columns overrides the global mobile rule) */
            #payoutsSection .form-row { grid-template-columns: 1fr !important; }
        }
        /* Contact columns (Email, Phone) toggled via contactVisible */
        .hide-contact td:nth-child(3), .hide-contact th:nth-child(3),
        .hide-contact td:nth-child(4), .hide-contact th:nth-child(4) { display: none; }
        #tableContainer td:nth-child(3), #tableContainer th:nth-child(3) { white-space: nowrap; min-width: 130px; }
        .sort-th { cursor: pointer; user-select: none; }
        .sort-th:hover { background: #e9ecef; }
        .sort-arrow { font-size: 0.6rem; margin-left: 0.2rem; }
        .badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 9999px; font-size: 0.6rem; font-weight: 500; }
        .badge-gross { background: #e8f5e9; color: #1a5c2e; }
        .badge-net { background: #e3f2fd; color: #1565c0; }
        .badge-kitty { background: #fff3e0; color: #e65100; }
        .badge-paid { background: #d4edda; color: #155724; }
        .badge-unpaid { background: #f8d7da; color: #721c24; }
        .actions { display: flex; gap: 0.3rem; flex-wrap: wrap; }
        .btn-sm { padding: 0.2rem 0.45rem; font-size: 0.65rem; }
        .btn-danger { background: #dc3545; }
        .btn-danger:hover { background: #c82333; }
        .btn-warning { background: #ffc107; color: #333; }
        .loading { text-align: center; padding: 1rem; color: #666; font-size: 0.8rem; }
        .error { color: #dc3545; text-align: center; padding: 0.5rem; font-size: 0.8rem; }
        .success { color: #1a5c2e; text-align: center; padding: 0.5rem; font-size: 0.8rem; }
        .x-mark { color: #1a5c2e; font-weight: bold; text-align: center; }
        
        /* Modal styles */
        .modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
        .modal { background: white; border-radius: 8px; padding: 1rem; width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
        .modal h3 { margin: 0 0 0.6rem; color: #1a5c2e; font-size: 1rem; }
        .modal .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.5rem; }
        .modal .form-group { display: flex; flex-direction: column; }
        .modal label { margin-bottom: 0.2rem; font-weight: 500; font-size: 0.75rem; }
        .modal input[type="text"] { padding: 0.35rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.8rem; }
        .modal .checkbox-group { display: flex; flex-wrap: wrap; gap: 0.35rem; }
        .modal .checkbox-label { display: flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.5rem; border: 2px solid #dee2e6; border-radius: 4px; cursor: pointer; font-size: 0.75rem; }
        .modal .checkbox-label:hover { border-color: #1a5c2e; background: #f0fff4; }
        .modal .checkbox-label input { width: 0.9rem; height: 0.9rem; accent-color: #1a5c2e; }
        .modal .skin-badge { display: inline-block; padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.6rem; font-weight: 600; }
        .modal .skin-badge.gross { background: #e8f5e9; color: #1a5c2e; }
        .modal .skin-badge.net { background: #e3f2fd; color: #1565c0; }
        .modal .skin-badge.kitty { background: #fff3e0; color: #e65100; }
        .modal .skin-price { color: #666; font-size: 0.65rem; }
        .modal-actions { display: flex; gap: 0.4rem; margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid #dee2e6; }
        .modal-actions .btn { flex: 1; }
        .amount-cell { text-align: center; font-weight: 500; color: #1a5c2e; }
        
        /* Mobile responsive */
        @media (max-width: 768px) {
            body { padding: 0.35rem; max-width: 100%; }
            .container { padding: 0.6rem; }
            h1 { font-size: 1.15rem; }
            .subtitle { font-size: 0.75rem; margin-bottom: 0.5rem; }
            .form-section { padding: 0.6rem; margin-bottom: 0.5rem; }
            .form-row { grid-template-columns: 1fr; gap: 0.4rem; }
            .event-cards { grid-template-columns: 1fr; gap: 0.4rem; margin-bottom: 0.4rem; }
            .event-card { padding: 0.5rem; }
            .event-card h3 { font-size: 0.85rem; }
            .checkbox-label { padding: 0.45rem; }
            .skin-badge { font-size: 0.65rem; }
            .skin-price { font-size: 0.7rem; }
            .total-price { font-size: 0.85rem; }
            .btn { padding: 0.5rem; font-size: 0.85rem; }
            
            /* Hide table on mobile, show cards instead */
            .desktop-table { display: none !important; }
            .mobile-cards { display: block !important; }
            
            /* Signup cards */
            .signup-card { background: white; border: 1px solid #dee2e6; border-radius: 8px; padding: 0.5rem; margin-bottom: 0.4rem; }
            .signup-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; }
            .signup-card-name { font-weight: 700; font-size: 0.85rem; color: #333; }
            .signup-card-bets { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem; margin-bottom: 0.3rem; }
            .signup-card-day { font-size: 0.65rem; }
            .signup-card-day-title { font-weight: 600; color: #1a5c2e; font-size: 0.6rem; text-transform: uppercase; margin-bottom: 0.15rem; }
            .signup-card-bet-row { display: flex; gap: 0.3rem; flex-wrap: wrap; font-size: 0.6rem; }
            .signup-card-bet-item { display: inline-flex; align-items: center; gap: 0.15rem; padding: 0.1rem 0.3rem; border-radius: 3px; background: #f0f0f0; }
            .signup-card-bet-item.active { background: #e8f5e9; color: #1a5c2e; font-weight: 600; }
            .signup-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.3rem; padding-top: 0.3rem; border-top: 1px solid #eee; }
            .signup-card-amount { font-weight: 700; color: #1a5c2e; font-size: 0.75rem; }
            .signup-card-actions { display: flex; gap: 0.25rem; flex-wrap: wrap; }
            .signup-card-actions .btn-sm { padding: 0.2rem 0.4rem; font-size: 0.6rem; }
            
            /* Totals cards */
            .totals-card { border-radius: 8px; padding: 0.5rem; margin-bottom: 0.35rem; font-size: 0.7rem; }
            .totals-card.all { background: #f8f9fa; border: 1px solid #e9ecef; }
            .totals-card.paid { background: #d4edda; border: 1px solid #c3e6cb; }
            .totals-card-title { font-weight: 700; margin-bottom: 0.25rem; }
            .totals-card-row { display: flex; justify-content: space-between; padding: 0.1rem 0; }
            .totals-card-row span:last-child { font-weight: 600; }
            
            /* Modal: full width on mobile */
            .modal { width: 95%; padding: 0.75rem; max-height: 85vh; }
            .modal .form-row { grid-template-columns: 1fr; gap: 0.35rem; }
            
            /* Admin panel buttons stack */
            #adminPanel { flex-direction: column; gap: 0.5rem; }
            #adminPanel .btn { margin-left: 0; }
        }
        
        @media (max-width: 480px) {
            h1 { font-size: 1rem; }
            .container { padding: 0.5rem; border-radius: 6px; }
            .checkbox-label { padding: 0.4rem; font-size: 0.8rem; }
            .checkbox-label input { width: 0.95rem; height: 0.95rem; }
            .signup-card { padding: 0.4rem; }
            .signup-card-name { font-size: 0.75rem; }
            .signup-card-bets { gap: 0.25rem; }
            .signup-card-actions .btn-sm { padding: 0.15rem 0.35rem; font-size: 0.55rem; }
            .badge { font-size: 0.55rem; padding: 0.1rem 0.4rem; }
        }

        /* Admin toolbar inside All Signups header */
        .signups-header { display: flex; justify-content: space-between; align-items: center; background: #1a5c2e; color: white; padding: 0.5rem 1rem; border-radius: 8px; margin-bottom: 0.5rem; position: relative; }
        .signups-header h2 { margin: 0; font-size: 1rem; color: white; }
        .site-topbar { position: sticky; top: 0; z-index: 900; background: #1a5c2e; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.4rem 0.9rem; margin: -0.5rem -0.5rem 0.7rem; box-shadow: 0 1px 5px rgba(0,0,0,0.18); }
        .site-topbar .topbar-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.9rem; }
        .site-topbar .topbar-brand img { width: 26px; height: auto; border-radius: 5px; }
        .topbar-admin { position: relative; }
        .admin-toolbar-btn { background: rgba(255,255,255,0.2); color: white; border: 1px solid rgba(255,255,255,0.3); padding: 0.3rem 0.7rem; border-radius: 5px; cursor: pointer; font-size: 0.75rem; font-weight: 600; transition: background 0.2s; white-space: nowrap; }
        .admin-toolbar-btn:hover { background: rgba(255,255,255,0.35); }
        .admin-toolbar-panel { position: absolute; top: 100%; right: 0; margin-top: 0.4rem; background: white; color: #333; box-shadow: 0 6px 28px rgba(0,0,0,0.28); padding: 1.25rem; width: min(96vw, 1100px); min-width: min(96vw, 900px); border: 1px solid #e0e0e0; z-index: 950; overflow-y: auto; max-height: 85vh; border-radius: 8px; }
        .admin-toolbar-panel .form-row { grid-template-columns: 1fr 1fr; gap: 0.65rem 0.9rem; margin-bottom: 0.65rem; }
        .admin-toolbar-panel h3 { color: #333; }
        .admin-toolbar-panel label { color: #333; font-size: 0.75rem; margin-bottom: 0.2rem; }
        .admin-panel-layout { display: grid; grid-template-columns: 118px 1fr; gap: 0.9rem; align-items: start; }
        .admin-toolbar-actions { display: flex; flex-direction: column; gap: 0.3rem; border-right: 1px solid #ececec; padding-right: 0.65rem; position: sticky; top: 8px; align-self: start; }
        .admin-toolbar-actions .btn.active-tab { box-shadow: 0 0 0 3px #1a5c2e inset; font-weight: 700; }
        .admin-toolbar-actions .btn { padding: 0.4rem 0.35rem; font-size: 0.68rem; width: 100%; text-align: center; }
        #exportScope { width: 100%; max-width: none !important; font-size: 0.68rem; padding: 0.3rem 0.25rem; }
        .admin-panel-content { min-width: 0; }
        .course-detail-closed { display: none; }
        .settings-field-group { margin-bottom: 0.5rem; }
        .settings-field-group label { display: block; font-weight: 600; font-size: 0.7rem; color: #333; margin-bottom: 0.2rem; }
        .filter-btn.active { background: rgba(255,255,255,0.45); border-color: rgba(255,255,255,0.6); }
        @media (max-width: 768px) {
            .signups-header { padding: 0.45rem 0.6rem; }
            .signups-header h2 { font-size: 0.9rem; }
            .admin-toolbar-btn { padding: 0.25rem 0.55rem; font-size: 0.7rem; }
            .admin-toolbar-panel { min-width: auto; max-width: none; right: -0.5rem; left: -0.5rem; padding: 0.75rem; }
            .admin-toolbar-panel .form-row { grid-template-columns: 1fr; gap: 0.35rem; }
            .admin-panel-layout { grid-template-columns: 1fr; }
            .admin-toolbar-actions { flex-direction: row; flex-wrap: wrap; border-right: none; padding-right: 0; top: 0; background: #fff; z-index: 60; padding: 0.35rem; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
            .admin-toolbar-actions .btn { width: auto; }
        }
        @media (max-width: 480px) {
            .signups-header { flex-direction: column; gap: 0.35rem; align-items: stretch; }
            .signups-header h2 { text-align: center; }
            .admin-toolbar-btn { width: 100%; text-align: center; }
            .admin-toolbar-panel { right: 0; left: 0; min-width: auto; max-width: none; }
        }
     