        :root {
            --primary-color: #2c3e50;
            --secondary-color: #3498db;
            --accent-color: #e74c3c;
        }
        
        body {
            background-color: #f8f9fa;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            overflow-x: hidden;
            margin: 0;
            padding: 0;
        }
        
        .navbar {
            background-color: var(--primary-color);
            padding: 1rem 0;
            margin-bottom: 2rem;
            margin-left: 0;
            margin-right: 0;
        }

        .navbar-brand {
            color: white;
            font-weight: 600;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .navbar-brand:hover {
            color: var(--secondary-color);
        }

        .navbar-text {
            color: rgba(255, 255, 255, 0.85);
            font-size: 0.9rem;
        }

        .navbar-text a {
            color: var(--secondary-color);
            text-decoration: none;
        }

        .navbar-text a:hover {
            text-decoration: underline;
        }

        /* Header padronizado (mesmo estilo do overall.html) */
        .header-section {
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            color: white;
            padding: 1.5rem;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            margin-bottom: 1.5rem;
        }

        .header-icon {
            font-size: 1.8rem;
            width: 45px;
            height: 45px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            backdrop-filter: blur(10px);
        }

        .page-title {
            font-size: 1.8rem;
            font-weight: 600;
            margin: 0;
            color: white;
        }

        .match-name {
            font-size: 1rem;
            font-weight: 400;
            margin: 0;
            color: rgba(255, 255, 255, 0.85);
        }

        .header-actions {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 0.75rem;
        }

        .header-actions .btn-group {
            display: flex;
            flex-direction: row;
            gap: 0.5rem;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .header-actions .btn-group .btn {
            border-radius: 6px;
            font-weight: 500;
            transition: all 0.3s ease;
            padding: 0.4rem 0.8rem;
            font-size: 0.85rem;
        }

        .header-actions .btn-group .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        }
        
        .card {
            border: none;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            margin-bottom: 20px;
            transition: all 0.3s ease;
        }
        
        .card-header {
            background-color: var(--primary-color);
            color: white;
            border-radius: 8px 8px 0 0 !important;
        }
        
        .table {
            font-size: 0.9rem;
        }
        
        .table th {
            background-color: #f8f9fa;
            border-top: none;
            font-weight: 600;
            color: var(--primary-color);
        }
        
        .form-control, .form-select {
            font-size: 0.85rem;
        }
        
        .form-control:focus, .form-select:focus {
            border-color: var(--secondary-color);
            box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
        }
        
        .btn-primary {
            background-color: var(--secondary-color);
            border: none;
        }
        
        .btn-primary:hover {
            background-color: #2980b9;
        }
        
        .btn-success {
            background-color: #27ae60;
            border: none;
        }
        
        .btn-success:hover {
            background-color: #229954;
        }
        
        .btn-warning {
            background-color: #f39c12;
            border: none;
        }
        
        .btn-warning:hover {
            background-color: #e67e22;
        }
        
        .stages-container {
            max-height: 400px;
            overflow-y: auto;
        }
        
        .stage-row {
            background-color: #f8f9fa;
            border-left: 4px solid var(--secondary-color);
        }
        
        .athlete-row {
            border-bottom: 2px solid #dee2e6;
        }
        
        .position-badge {
            font-size: 0.8rem;
            font-weight: 600;
        }

        /* Modal de pistas: destaque por tipo de hit (mobile e desktop) */
        #stagesModal tr.stage-row-delta > td,
        #stagesModal tr.stage-row-delta.table-warning > td {
            background-color: rgba(255, 193, 7, 0.12) !important;
        }

        #stagesModal tr.stage-row-delta > td:first-child,
        #stagesModal tr.stage-row-delta.table-warning > td:first-child {
            box-shadow: inset 4px 0 0 #ffc107;
        }

        #stagesModal tr.stage-row-delta.table-warning > td {
            background-color: rgba(255, 193, 7, 0.2) !important;
        }

        #stagesModal tr.stage-row-penalty > td,
        #stagesModal tr.stage-row-penalty.table-warning > td {
            background-color: rgba(220, 53, 69, 0.08) !important;
        }

        #stagesModal tr.stage-row-penalty > td:first-child,
        #stagesModal tr.stage-row-penalty.table-warning > td:first-child {
            box-shadow: inset 4px 0 0 #dc3545;
        }

        #stagesModal tr.stage-row-penalty.table-warning > td {
            background-color: rgba(255, 193, 7, 0.12) !important;
        }

        #stagesModal tr.stage-row-penalty.table-warning > td:first-child {
            box-shadow: inset 4px 0 0 #dc3545;
        }

        #stagesModal .stage-hit-delta,
        #stageEditModal .stage-hit-delta {
            color: #b45309;
            font-weight: 700;
        }

        #stagesModal .stage-hit-penalty,
        #stageEditModal .stage-hit-penalty {
            color: #dc3545;
            font-weight: 700;
        }

        #stagesModal .stage-modal-metrics-block {
            line-height: 1.3;
        }

        #stagesModal .stage-modal-hits {
            font-size: 0.72rem;
        }

        #stagesModal .stage-penalty-badges {
            display: inline-flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.2rem;
        }

        #stagesModal .stage-penalty-badge,
        #stagesModal .stage-delta-badge {
            font-size: 0.58rem;
            padding: 0.15em 0.4em;
        }

        #stagesModal .stage-penalty-badge i,
        #stagesModal .stage-delta-badge i {
            font-size: 0.55rem;
        }

        #stagesModal .stage-points-display,
        #stagesModal .stage-time-display {
            white-space: normal;
            line-height: 1.35;
        }

        #stagesModal .stage-vs-leader-pct,
        #stagesModal .stage-vs-leader-time {
            font-size: 0.7rem;
            font-weight: 600;
        }

        #stagesModal .stage-modal-stats-mobile {
            line-height: 1.35;
        }

        #stagesModal .stage-modal-stat {
            display: inline-block;
            margin-right: 0.5rem;
        }

        @media (max-width: 767.98px) {
            #stagesModal .modal-dialog {
                margin: 0.5rem auto;
                max-width: calc(
                    100vw - 1rem
                    - env(safe-area-inset-left, 0px)
                    - env(safe-area-inset-right, 0px)
                );
                width: 100%;
            }

            #stagesModal .modal-content {
                overflow: hidden;
            }

            #stagesModal .stages-modal-table-wrap {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                max-width: 100%;
            }

            #stagesModal .stages-modal-table {
                width: 100%;
                table-layout: fixed;
                margin-bottom: 0;
            }

            #stagesModal .stages-modal-table th,
            #stagesModal .stages-modal-table td {
                white-space: normal;
                word-break: break-word;
            }

            #stagesModal .stages-modal-table .stage-col-name {
                width: auto;
                min-width: 0;
            }

            #stagesModal .stages-modal-table .stage-col-actions {
                width: 2.75rem;
                min-width: 2.75rem;
                max-width: 2.75rem;
                padding-left: 0.25rem;
                padding-right: 0.25rem;
                text-align: center;
                vertical-align: middle;
                white-space: nowrap;
            }

            #stagesModal .stage-modal-stats-mobile {
                font-size: 0.72rem;
            }
        }

        /* Navbar inferior fixa usa z-index 1060 — modais Bootstrap ficam atrás no mobile */
        @media (max-width: 991.98px) {
            body.modal-open .modal:not(.modal-stack-on-top) {
                z-index: 1075 !important;
            }

            body.modal-open .modal-backdrop {
                z-index: 1070 !important;
            }

            body.modal-open .dm-bottom-nav {
                z-index: 1040;
            }

            #stagesModal .modal-dialog {
                max-height: calc(
                    100dvh
                    - 1rem
                    - env(safe-area-inset-top, 0px)
                    - env(safe-area-inset-bottom, 0px)
                );
                display: flex;
                flex-direction: column;
            }

            #stagesModal .modal-content {
                max-height: 100%;
                display: flex;
                flex-direction: column;
            }

            #stagesModal .modal-body {
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
                flex: 1 1 auto;
                min-height: 0;
            }

            #stagesModal .modal-footer {
                flex-shrink: 0;
                padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
            }
        }

        @media (min-width: 768px) {
            #stagesModal .stage-a-display,
            #stagesModal .stage-c-display,
            #stagesModal .stage-d-display,
            #stagesModal .stage-miss-display,
            #stagesModal .stage-ns-display,
            #stagesModal .stage-proc-display {
                text-align: center;
                vertical-align: middle;
            }

            #stagesModal th.stage-col-delta {
                color: #b45309;
            }

            #stagesModal th.stage-col-penalty {
                color: #dc3545;
            }
        }

        #stageEditModal.stage-edit-only-delta .modal-body {
            background-color: rgba(255, 193, 7, 0.06);
        }

        #stageEditModal.stage-edit-has-penalty .modal-body {
            background-color: rgba(220, 53, 69, 0.04);
        }

        #stageEditModal .stage-edit-hit-wrap.stage-edit-wrap-active-delta .form-label,
        #stageEditModal .stage-edit-hit-wrap.stage-edit-wrap-active-delta .form-control {
            color: #b45309;
            font-weight: 700;
            border-color: #ffc107;
        }

        #stageEditModal .stage-edit-hit-wrap.stage-edit-wrap-active-penalty .form-label,
        #stageEditModal .stage-edit-hit-wrap.stage-edit-wrap-active-penalty .form-control {
            color: #dc3545;
            font-weight: 700;
            border-color: #dc3545;
        }

        /* Modais empilhados sobre #stagesModal */
        #positionChangesModal.modal-stack-on-top,
        #stageEditModal.modal-stack-on-top,
        #factorEditModal.modal-stack-on-top {
            z-index: 1080 !important;
        }
        
        .loading {
            text-align: center;
            padding: 2rem;
            color: #6c757d;
        }
        
        .loading i {
            font-size: 2rem;
            margin-bottom: 1rem;
        }
        
        @media (max-width: 768px) {
            /* Container mais compacto */
            body {
                margin: 0;
                padding: 0;
            }
            
            .container {
                margin-top: 10px;
                padding: 0 2px;
                max-width: 100%;
                overflow-x: hidden;
                margin-left: 0;
                margin-right: 0;
            }
            
            .page-title {
                font-size: 1.5rem;
            }
            
            .table {
                font-size: 0.8rem;
            }
            
            .form-control, .form-select {
                font-size: 0.8rem;
            }
            
            /* Reduzir fonte da legenda no mobile */
            .alert-info {
                font-size: 0.85rem;
            }
            
            .alert-info ul {
                font-size: 0.8rem;
            }
            
            /* Reduzir fonte das explicações dos botões no mobile */
            .text-muted.small {
                font-size: 0.7rem !important;
            }

            /* Ajustes específicos para modais no mobile */
            .modal-dialog {
                margin: 0.25rem;
                max-width: calc(100% - 0.5rem);
            }

            .modal-xl {
                max-width: calc(100% - 0.5rem);
            }

            .modal-body {
                padding: 1rem;
            }

            .modal-header {
                padding: 0.75rem 1rem;
            }

            .modal-footer {
                padding: 0.75rem 1rem;
            }

            .modal-title {
                font-size: 1rem;
            }

                    /* Ajustes para tabelas no mobile */
        .table-responsive {
            font-size: 0.75rem;
            max-width: 100%;
            overflow-x: hidden;
            margin: 0;
            padding: 0;
        }

            .table th,
            .table td {
                padding: 0.5rem 0.25rem;
                font-size: 0.75rem;
                white-space: nowrap;
            }

            /* Ocultar colunas menos importantes no mobile - apenas em modais */
            .modal .table th:nth-child(6),
            .modal .table th:nth-child(7),
            .modal .table th:nth-child(8),
            .modal .table th:nth-child(9),
            .modal .table th:nth-child(10),
            .modal .table th:nth-child(11),
            .modal .table td:nth-child(6),
            .modal .table td:nth-child(7),
            .modal .table td:nth-child(8),
            .modal .table td:nth-child(9),
            .modal .table td:nth-child(10),
            .modal .table td:nth-child(11) {
                display: none;
            }

            /* Ajustar largura das colunas visíveis - apenas em modais */
            .modal .table th:nth-child(1),
            .modal .table td:nth-child(1) {
                width: 25%;
                min-width: 80px;
            }

            .modal .table th:nth-child(2),
            .modal .table td:nth-child(2),
            .modal .table th:nth-child(3),
            .modal .table td:nth-child(3),
            .modal .table th:nth-child(4),
            .modal .table td:nth-child(4),
            .modal .table th:nth-child(5),
            .modal .table td:nth-child(5) {
                width: 18.75%;
                text-align: center;
            }

            /* Ajustes para formulários no mobile */
            .form-label {
                font-size: 0.8rem;
                margin-bottom: 0.25rem;
            }

            .form-control {
                padding: 0.375rem 0.5rem;
                font-size: 0.8rem;
            }

            /* Ajustes para botões no mobile */
            .btn {
                padding: 0.375rem 0.5rem;
                font-size: 0.8rem;
            }

            .btn-sm {
                padding: 0.25rem 0.4rem;
                font-size: 0.75rem;
            }

            /* Ajustes para badges no mobile */
            .badge {
                font-size: 0.65rem;
                padding: 0.25rem 0.4rem;
            }

            /* Ajustes para informações do atleta no modal */
            .modal-body .row .col-md-3 {
                margin-bottom: 0.5rem;
            }

            .modal-body .row .col-md-3 strong {
                font-size: 0.8rem;
            }

            /* Ajustes para inputs de edição no mobile */
            .stage-time-edit,
            .stage-a-edit,
            .stage-c-edit,
            .stage-d-edit,
            .stage-miss-edit,
            .stage-ns-edit,
            .stage-proc-edit,
            .stage-points-edit,
            .stage-hf-edit {
                font-size: 0.8rem;
                padding: 0.375rem 0.5rem;
            }

            /* Ajustes para o modal de edição de fator */
            .modal-dialog {
                max-width: calc(100% - 1rem);
            }

            /* Ajustes para o modal de mudanças de posição */
            .modal-lg {
                max-width: calc(100% - 1rem);
            }
            
            /* Prevenir overflow de banners e elementos externos */
            .banner-container {
                max-width: 100%;
                overflow-x: hidden;
            }
            
            .banner-content {
                max-width: 100%;
                overflow-x: hidden;
            }
            
            #advertisement-container {
                max-width: 100%;
                overflow-x: hidden;
            }
            
            /* Forçar largura responsiva para elementos de anúncio */
            [data-ad-inline] {
                max-width: 100% !important;
                width: 100% !important;
            }
            
            /* Footer mais compacto no mobile */
            footer {
                padding: 0.75rem 0;
                margin-top: 1.5rem;
            }
            
            footer .text-light {
                font-size: 0.75rem;
            }
            
            footer .text-muted {
                font-size: 0.65rem;
            }
            
            footer .d-flex {
                flex-wrap: wrap;
                gap: 0.5rem;
            }
            
            footer .gap-3 {
                gap: 0.5rem !important;
            }
            
            /* Banner de anúncio mais compacto */
            .banner-container {
                margin-bottom: 0.75rem;
            }
            
            .banner-content {
                padding: 0.5rem;
            }
            
            /* Reduzir padding dos cards e elementos da página */
            .card {
                margin-bottom: 0.75rem;
            }
            
            .card-body {
                padding: 0.75rem;
            }
            
            .card-header {
                padding: 0.75rem;
            }
            
            .mb-4 {
                margin-bottom: 1rem !important;
            }
            
            .mt-4 {
                margin-top: 1rem !important;
            }
            
            .mb-3 {
                margin-bottom: 0.75rem !important;
            }
            
            .mt-3 {
                margin-top: 0.75rem !important;
            }
            
            .mb-2 {
                margin-bottom: 0.5rem !important;
            }
            
            .mt-2 {
                margin-top: 0.5rem !important;
            }
            
            .p-3 {
                padding: 0.75rem !important;
            }
            
            .p-2 {
                padding: 0.5rem !important;
            }
            
            .py-3 {
                padding-top: 0.75rem !important;
                padding-bottom: 0.75rem !important;
            }
            
            .py-2 {
                padding-top: 0.5rem !important;
                padding-bottom: 0.5rem !important;
            }
            
            /* Reduzir padding lateral do seletor de divisão */
            .card-body .row {
                margin-left: 0;
                margin-right: 0;
            }
            
            .card-body .col-md-6 {
                padding-left: 0.25rem;
                padding-right: 0.25rem;
            }
            
            .card-body .col-md-6 .row {
                margin-left: 0;
                margin-right: 0;
            }
            
            .card-body .col-md-6 .col-md-6 {
                padding-left: 0.125rem;
                padding-right: 0.125rem;
            }
            
            /* Reduzir padding de todas as divs de conteúdo */
            .row {
                margin-left: 0;
                margin-right: 0;
            }
            
            .col, .col-md-6, .col-md-4, .col-md-3, .col-md-2, .col-md-1 {
                padding-left: 0.25rem;
                padding-right: 0.25rem;
            }
            
            /* Reduzir padding de elementos específicos */
            .alert {
                padding: 0.5rem;
            }
            
            .form-control, .form-select {
                padding-left: 0.5rem;
                padding-right: 0.5rem;
            }
            
            .btn {
                padding-left: 0.5rem;
                padding-right: 0.5rem;
            }
        }

        @media (max-width: 576px) {
            /* Container mais compacto */
            body {
                margin: 0;
                padding: 0;
            }
            
            .container {
                margin-top: 5px;
                padding: 0 2px;
                max-width: 100%;
                overflow-x: hidden;
                margin-left: 0;
                margin-right: 0;
            }
            
            /* Ajustes ainda mais específicos para telas muito pequenas */
            .modal-dialog {
                margin: 0.125rem;
                max-width: calc(100% - 0.25rem);
            }

            .modal-body {
                padding: 0.75rem;
            }

            .modal-header {
                padding: 0.5rem 0.75rem;
            }

            .modal-footer {
                padding: 0.5rem 0.75rem;
            }

            .modal-title {
                font-size: 0.9rem;
            }

            /* Ocultar ainda mais colunas em telas muito pequenas - apenas em modais */
            .modal .table th:nth-child(4),
            .modal .table td:nth-child(4) {
                display: none;
            }

            /* Ajustar largura das colunas restantes - apenas em modais */
            .modal .table th:nth-child(1),
            .modal .table td:nth-child(1) {
                width: 35%;
            }

            .modal .table th:nth-child(2),
            .modal .table td:nth-child(2),
            .modal .table th:nth-child(3),
            .modal .table td:nth-child(3),
            .modal .table th:nth-child(5),
            .modal .table td:nth-child(5) {
                width: 21.67%;
            }

            /* Ajustar tamanho dos botões */
            .btn {
                font-size: 0.75rem;
                padding: 0.375rem 0.5rem;
            }
            
            /* Melhorar visualização das informações do atleta */
            .modal-body .row .col-md-3 {
                padding-bottom: 0.25rem;
                margin-bottom: 0.25rem;
            }
            
            /* Ajustar tabelas */
            .table {
                font-size: 0.7rem;
            }
            
            .table th,
            .table td {
                padding: 0.25rem 0.125rem;
            }
            
            /* Melhorar visualização dos badges */
            .badge {
                font-size: 0.6rem;
                padding: 0.2rem 0.3rem;
                margin-right: 0.125rem;
                margin-bottom: 0.125rem;
            }
            
            /* Ajustar inputs */
            .form-control {
                font-size: 0.75rem;
                padding: 0.25rem 0.375rem;
            }
            
            /* Melhorar visualização das informações extras */
            .d-md-none .text-muted {
                font-size: 0.65rem;
            }
            
            /* Ajustar alertas */
            .alert {
                padding: 0.5rem;
                font-size: 0.8rem;
            }
            
            .alert small {
                font-size: 0.75rem;
            }
        }
        
        /* Regras para telas muito pequenas (320px) */
        @media (max-width: 320px) {
            /* Container mais compacto */
            body {
                margin: 0;
                padding: 0;
            }
            
            .container {
                margin-top: 2px;
                padding: 0 2px;
                max-width: 100%;
                overflow-x: hidden;
                margin-left: 0;
                margin-right: 0;
            }
            
            /* Ajustes ainda mais específicos para telas muito pequenas */
            .modal-dialog {
                margin: 0.0625rem;
                max-width: calc(100% - 0.125rem);
            }

            .modal-body {
                padding: 0.5rem;
            }

            .modal-header {
                padding: 0.375rem 0.5rem;
            }

            .modal-footer {
                padding: 0.375rem 0.5rem;
            }

            .modal-title {
                font-size: 0.8rem;
            }
            
            /* Ajustar tabelas */
            .table {
                font-size: 0.65rem;
            }
            
            .table th,
            .table td {
                padding: 0.125rem 0.1rem;
            }
            
            /* Ajustar botões */
            .btn {
                font-size: 0.7rem;
                padding: 0.25rem 0.375rem;
            }
            
            /* Ajustar inputs */
            .form-control {
                font-size: 0.7rem;
                padding: 0.2rem 0.25rem;
            }
            
            /* Ajustar alertas */
            .alert {
                padding: 0.375rem;
                font-size: 0.75rem;
            }
            
            /* Reduzir ainda mais padding dos cards e elementos da página */
            .card {
                margin-bottom: 0.25rem;
            }
            
            .card-body {
                padding: 0.25rem;
            }
            
            .card-header {
                padding: 0.25rem;
            }
            
            .mb-4 {
                margin-bottom: 0.5rem !important;
            }
            
            .mt-4 {
                margin-top: 0.5rem !important;
            }
            
            .mb-3 {
                margin-bottom: 0.25rem !important;
            }
            
            .mt-3 {
                margin-top: 0.25rem !important;
            }
            
            .mb-2 {
                margin-bottom: 0.125rem !important;
            }
            
            .mt-2 {
                margin-top: 0.125rem !important;
            }
            
            .p-3 {
                padding: 0.25rem !important;
            }
            
            .p-2 {
                padding: 0.125rem !important;
            }
            
            .py-3 {
                padding-top: 0.25rem !important;
                padding-bottom: 0.25rem !important;
            }
            
            .py-2 {
                padding-top: 0.125rem !important;
                padding-bottom: 0.125rem !important;
            }
            
            /* Footer ainda mais compacto em telas muito pequenas */
            footer {
                padding: 0.25rem 0;
                margin-top: 0.5rem;
            }
            
            footer .text-light {
                font-size: 0.65rem;
            }
            
            footer .text-muted {
                font-size: 0.55rem;
            }
            
            footer .d-flex {
                flex-wrap: wrap;
                gap: 0.2rem;
            }
            
            footer .gap-3 {
                gap: 0.2rem !important;
            }
            
            /* Reduzir ainda mais padding lateral do seletor de divisão */
            .card-body .row {
                margin-left: 0;
                margin-right: 0;
            }
            
            .card-body .col-md-6 {
                padding-left: 0.125rem;
                padding-right: 0.125rem;
            }
            
            .card-body .col-md-6 .row {
                margin-left: 0;
                margin-right: 0;
            }
            
            .card-body .col-md-6 .col-md-6 {
                padding-left: 0.0625rem;
                padding-right: 0.0625rem;
            }
            
            /* Reduzir ainda mais padding de todas as divs de conteúdo */
            .row {
                margin-left: 0;
                margin-right: 0;
            }
            
            .col, .col-md-6, .col-md-4, .col-md-3, .col-md-2, .col-md-1 {
                padding-left: 0.125rem;
                padding-right: 0.125rem;
            }
            
            /* Reduzir ainda mais padding de elementos específicos */
            .alert {
                padding: 0.375rem;
            }
            
            .form-control, .form-select {
                padding-left: 0.25rem;
                padding-right: 0.25rem;
            }
            
            .btn {
                padding-left: 0.25rem;
                padding-right: 0.25rem;
            }
        }
        
        .table-warning {
            background-color: rgba(255, 193, 7, 0.1) !important;
        }
        
        .table-warning:hover {
            background-color: rgba(255, 193, 7, 0.2) !important;
        }
        
        .table-info {
            background-color: rgba(13, 202, 240, 0.1) !important;
        }
        
        .table-info:hover {
            background-color: rgba(13, 202, 240, 0.2) !important;
        }
        
        .text-warning {
            color: #ffc107 !important;
        }
        
        .text-info {
            color: #0dcaf0 !important;
        }
        
        .text-success {
            color: #198754 !important;
        }
        
        .text-danger {
            color: #dc3545 !important;
        }
        
        .modified-indicator {
            font-size: 0.8em;
            font-weight: bold;
        }

        /* Estilos para o botão de penalidades */
        .penalty-tooltip {
            transition: all 0.2s ease;
        }

        .penalty-tooltip:hover {
            transform: scale(1.1);
        }

        /* Ajustes para mobile */
        @media (max-width: 768px) {
            .penalty-tooltip {
                font-size: 0.9rem !important;
                padding: 0.3rem;
                margin: 0.1rem;
                background-color: rgba(220, 53, 69, 0.1);
                border-radius: 50%;
                display: inline-block;
                min-width: 1.8rem;
                min-height: 1.8rem;
                text-align: center;
                line-height: 1.2rem;
            }
        }

        @media (max-width: 576px) {
            .penalty-tooltip {
                font-size: 1rem !important;
                padding: 0.4rem;
                min-width: 2rem;
                min-height: 2rem;
                line-height: 1.2rem;
            }
        }

        /* Estilos adicionais para melhorar experiência mobile */
        @media (max-width: 768px) {
            /* Melhorar espaçamento dos cards */
            .card {
                margin-bottom: 15px;
            }
            
            .card-body {
                padding: 1rem;
            }
            
            /* Ajustar header da página */
            .header-section {
                margin-bottom: 1.5rem;
            }
            
            .page-title {
                margin-bottom: 0.5rem;
            }
            
            .match-name {
                font-size: 1rem;
            }
            
            /* Melhorar layout dos botões */
            .btn-group {
                width: 100%;
            }
            
            .btn-group .btn {
                flex: 1;
            }
            
            /* Ajustar seletor de divisão */
            .form-select {
                margin-bottom: 1rem;
            }
            
            /* Melhorar layout dos botões de ação */
            .col-md-6 .btn {
                margin-bottom: 0.5rem;
            }
            
            /* Ajustar tabela principal */
            .table-responsive {
                border-radius: 0.375rem;
                overflow: hidden;
                max-width: 100%;
                margin: 0;
                padding: 0;
            }
            
            /* Melhorar visualização dos badges */
            .badge {
                margin-right: 0.25rem;
                margin-bottom: 0.25rem;
            }
            
            /* Ajustar espaçamento dos ícones */
            .fas {
                margin-right: 0.25rem;
            }
            
            /* Melhorar legibilidade dos textos pequenos */
            .small, small {
                line-height: 1.3;
            }
            
            /* Ajustar padding dos modais */
            .modal-content {
                border-radius: 0.5rem;
            }
            
            /* Melhorar visualização das informações do atleta no modal */
            .modal-body .row .col-md-3 {
                border-bottom: 1px solid #dee2e6;
                padding-bottom: 0.5rem;
            }
            
            .modal-body .row .col-md-3:last-child {
                border-bottom: none;
            }
            
            /* Ajustar inputs nos modais */
            .modal-body .form-control {
                font-size: 0.875rem;
            }
            
            /* Melhorar visualização das tabelas nos modais */
            .modal-body .table {
                font-size: 0.75rem;
            }
            
            .modal-body .table th,
            .modal-body .table td {
                padding: 0.375rem 0.25rem;
            }
            
            /* Ajustar botões nos modais */
            .modal-body .btn-sm {
                padding: 0.25rem 0.375rem;
                font-size: 0.7rem;
            }
            
            /* Melhorar visualização das informações extras no mobile */
            .d-md-none .text-muted {
                font-size: 0.7rem;
                line-height: 1.2;
            }
            
            /* Ajustar botão de edição no mobile */
            .d-md-none .edit-stages-btn {
                font-size: 0.75rem;
                padding: 0.375rem 0.5rem;
                width: 100%;
                margin-top: 0.5rem;
            }
            
            /* Ajustar badge de posição no mobile */
            .d-md-none .position-badge {
                font-size: 0.7rem;
                padding: 0.25rem 0.4rem;
                min-width: 35px;
            }
            
            /* Ajustar larguras das colunas da tabela principal no mobile */
            #athletesContainer .table th:nth-child(2),
            #athletesContainer .table td:nth-child(2) {
                width: 42%;
            }

            #athletesContainer .table th:nth-child(8),
            #athletesContainer .table td:nth-child(8) {
                width: 58%;
            }
            
            /* Ajustar alertas */
            .alert {
                padding: 0.75rem;
                font-size: 0.875rem;
            }
            
            .alert small {
                font-size: 0.8rem;
            }
        }

        @media (max-width: 576px) {
            /* Ajustes ainda mais específicos para telas muito pequenas */
            .container {
                padding-left: 0.125rem;
                padding-right: 0.125rem;
            }
            
            /* Reduzir ainda mais o espaçamento */
            .card-body {
                padding: 0.75rem;
            }
            
            .modal-body {
                padding: 0.75rem;
            }
            
            /* Ajustar tamanho dos botões */
            .btn {
                font-size: 0.75rem;
                padding: 0.375rem 0.5rem;
            }
            
            /* Melhorar visualização das informações do atleta */
            .modal-body .row .col-md-3 {
                padding-bottom: 0.25rem;
                margin-bottom: 0.25rem;
            }
            
            /* Ajustar tabelas */
            .table {
                font-size: 0.7rem;
            }
            
            .table th,
            .table td {
                padding: 0.25rem 0.125rem;
            }
            
            /* Melhorar visualização dos badges */
            .badge {
                font-size: 0.6rem;
                padding: 0.2rem 0.3rem;
                margin-right: 0.125rem;
                margin-bottom: 0.125rem;
            }
            
            /* Ajustar inputs */
            .form-control {
                font-size: 0.75rem;
                padding: 0.25rem 0.375rem;
            }
            
            /* Melhorar visualização das informações extras */
            .d-md-none .text-muted {
                font-size: 0.65rem;
            }
            
            /* Ajustar alertas */
            .alert {
                padding: 0.5rem;
                font-size: 0.8rem;
            }
            
            .alert small {
                font-size: 0.75rem;
            }
        }

        /* Ajustes específicos para iPhone */
        @media (max-width: 414px) {
            .container {
                padding-left: 0.0625rem;
                padding-right: 0.0625rem;
            }

            .card-body {
                padding: 0.5rem;
            }

            .table-responsive {
                margin: 0;
                padding: 0;
                border-radius: 0;
                max-width: 100%;
            }

            .table {
                font-size: 0.65rem;
                margin: 0;
                width: 100%;
                min-width: auto;
            }

            .table th,
            .table td {
                padding: 0.25rem 0.125rem;
                font-size: 0.65rem;
                white-space: normal;
                word-wrap: break-word;
                vertical-align: top;
            }

            /* Ajustar larguras das colunas para iPhone */
            .table th:nth-child(1),
            .table td:nth-child(1) {
                width: 8%;
                min-width: 20px;
                max-width: 25px;
            }

            .table th:nth-child(2),
            .table td:nth-child(2) {
                width: 60%;
                min-width: 80px;
            }

            .table th:nth-child(3),
            .table td:nth-child(3) {
                width: 32%;
                min-width: 60px;
            }

            /* Ocultar colunas desnecessárias no iPhone */
            .table th:nth-child(4),
            .table td:nth-child(4),
            .table th:nth-child(5),
            .table td:nth-child(5) {
                display: none;
            }

            /* Ajustar larguras quando colunas estão ocultas */
            .table th:nth-child(1),
            .table td:nth-child(1) {
                width: 10%;
            }

            .table th:nth-child(2),
            .table td:nth-child(2) {
                width: 65%;
            }

            .table th:nth-child(3),
            .table td:nth-child(3) {
                width: 25%;
            }

            /* Ajustes para botões no header no iPhone */
            .header-actions .btn-group {
                flex-direction: column;
                width: 100%;
            }

            .header-actions .btn-group .btn {
                margin-bottom: 0.5rem;
                font-size: 0.7rem;
                padding: 0.375rem 0.5rem;
            }

            .header-actions .btn-group .btn:last-child {
                margin-bottom: 0;
            }

            /* Estilos específicos para estatísticas no iPhone */
            .mobile-stats {
                padding: 0.15rem 0;
            }

            .stat-row {
                margin-bottom: 0.15rem;
                padding: 0.1rem 0;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .stat-label {
                font-size: 0.6rem;
                min-width: 25px;
                font-weight: 600;
                color: #6c757d;
            }

            .mobile-stats .total-value,
            .mobile-stats .percent-value,
            .mobile-stats .psbl-value,
            .mobile-stats .pct-a-value,
            .mobile-stats .time-value {
                font-size: 0.6rem;
                font-weight: 600;
                text-align: right;
                flex: 1;
                margin-left: 0.25rem;
                word-break: break-all;
            }

            /* Ajustar badges */
            .badge {
                font-size: 0.55rem;
                padding: 0.15rem 0.25rem;
                margin-right: 0.1rem;
                margin-bottom: 0.1rem;
            }

            .position-badge {
                font-size: 0.6rem;
                padding: 0.2rem 0.3rem;
                min-width: 25px;
            }

            /* Ajustar botões */
            .btn {
                font-size: 0.65rem;
                padding: 0.25rem 0.375rem;
            }

            .btn-sm {
                font-size: 0.6rem;
                padding: 0.2rem 0.3rem;
            }

            /* Ajustar nome do atleta */
            .table td strong {
                font-size: 0.7rem;
                line-height: 1.2;
                word-wrap: break-word;
                word-break: break-word;
            }

            /* Ajustar ícones */
            .fas {
                font-size: 0.6rem;
                margin-right: 0.15rem;
            }

            /* Ajustar botão de edição no mobile */
            .d-md-none .edit-stages-btn {
                font-size: 0.65rem;
                padding: 0.25rem 0.375rem;
                width: 100%;
                margin-top: 0.25rem;
            }

            /* Ajustar alertas */
            .alert {
                padding: 0.5rem;
                font-size: 0.7rem;
            }

            .alert small {
                font-size: 0.65rem;
            }

            /* Ajustar inputs */
            .form-control {
                font-size: 0.7rem;
                padding: 0.25rem 0.375rem;
            }

            /* Ajustar seletor de divisão */
            .form-select {
                font-size: 0.7rem;
                padding: 0.25rem 0.375rem;
            }

            /* Ajustar labels */
            .form-label {
                font-size: 0.7rem;
                margin-bottom: 0.25rem;
            }

            /* Ajustar título da página */
            .page-title {
                font-size: 1.2rem;
                margin-bottom: 0.5rem;
            }

            .match-name {
                font-size: 0.9rem;
            }

            /* Ajustar header */
            .header-section {
                padding: 1rem;
                margin-bottom: 1rem;
            }

            .header-icon {
                font-size: 1.2rem;
                width: 35px;
                height: 35px;
            }

            /* Ajustar cards */
            .card {
                margin-bottom: 1rem;
            }

            .card-header {
                padding: 0.5rem;
            }

            .card-header h5 {
                font-size: 0.9rem;
                margin-bottom: 0;
            }

            /* Ajustar navbar */
            .navbar {
                padding: 0.5rem 0;
                margin-bottom: 1rem;
            }

            .navbar-brand {
                font-size: 0.9rem;
            }

            .navbar-text {
                font-size: 0.7rem;
            }
        }

        /* Ajustes para mobile em geral */
        @media (max-width: 768px) {
            .container {
                padding-left: 0.25rem;
                padding-right: 0.25rem;
            }

            .table-responsive {
                margin: 0;
                padding: 0;
                border-radius: 0;
                overflow-x: hidden;
                max-width: 100%;
            }

            .table {
                font-size: 0.7rem;
                margin: 0;
                width: 100%;
                min-width: auto;
            }

            .table th,
            .table td {
                padding: 0.375rem 0.25rem;
                font-size: 0.7rem;
                white-space: normal;
                word-wrap: break-word;
                vertical-align: top;
            }

            .header-actions .btn-group {
                width: 100%;
            }

            .header-actions .btn-group .btn {
                flex: 1;
                font-size: 0.75rem;
                padding: 0.5rem 0.75rem;
            }

            .header-actions .btn-group .btn i {
                margin-right: 0.25rem;
            }

            /* Estilos para estatísticas mobile */
            .mobile-stats {
                padding: 0.25rem 0;
            }

            .stat-row {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 0.25rem;
                padding: 0.125rem 0;
                border-bottom: 1px solid #f0f0f0;
            }

            .stat-row:last-child {
                margin-bottom: 0;
                border-bottom: none;
            }

            .stat-label {
                font-size: 0.7rem;
                font-weight: 600;
                color: #6c757d;
                min-width: 35px;
            }

            .mobile-stats .total-value,
            .mobile-stats .percent-value,
            .mobile-stats .psbl-value,
            .mobile-stats .pct-a-value,
            .mobile-stats .time-value {
                font-size: 0.7rem;
                font-weight: 600;
                text-align: right;
                flex: 1;
                margin-left: 0.5rem;
                word-break: break-all;
            }

            /* Ajustar larguras das colunas para mobile */
            .table th:nth-child(1),
            .table td:nth-child(1) {
                width: 12%;
                min-width: 30px;
            }

            .table th:nth-child(2),
            .table td:nth-child(2) {
                width: 58%;
                min-width: 70px;
            }

            .table th:nth-child(3),
            .table td:nth-child(3) {
                width: 30%;
                min-width: 60px;
            }

            #athletesContainer .table th:nth-child(2),
            #athletesContainer .table td:nth-child(2) {
                width: 40%;
            }

            #athletesContainer .table th:nth-child(8),
            #athletesContainer .table td:nth-child(8) {
                width: 60%;
            }

            /* Ajustar badges */
            .badge {
                font-size: 0.6rem;
                padding: 0.2rem 0.3rem;
                margin-right: 0.125rem;
                margin-bottom: 0.125rem;
            }

            .position-badge {
                font-size: 0.65rem;
                padding: 0.25rem 0.4rem;
                min-width: 25px;
            }

            /* Ajustar botões */
            .btn {
                font-size: 0.7rem;
                padding: 0.375rem 0.5rem;
            }

            .btn-sm {
                font-size: 0.65rem;
                padding: 0.25rem 0.375rem;
            }

            /* Ajustar nome do atleta */
            .table td strong {
                font-size: 0.75rem;
                line-height: 1.2;
                word-wrap: break-word;
                word-break: break-word;
            }

            /* Ajustar ícones */
            .fas {
                font-size: 0.65rem;
                margin-right: 0.2rem;
            }

            /* Ajustar botão de edição no mobile */
            .d-md-none .edit-stages-btn {
                font-size: 0.7rem;
                padding: 0.375rem 0.5rem;
                width: 100%;
                margin-top: 0.5rem;
            }
        }

        /* iOS Safari: evita zoom automático ao focar campos (mínimo 16px) */
        @media (max-width: 767.98px) {
            select.form-select,
            select.form-control,
            textarea.form-control,
            input.form-control,
            input[type="number"],
            input[type="text"],
            input[type="search"],
            input[type="email"],
            input[type="tel"] {
                font-size: 16px !important;
            }
        }
