?/* =========================================================
   Estilo2.css - Estilos compartilhados das páginas internas
   (sub-navegação, cards, tabelas, formulários e botões)
   ========================================================= */

@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* --- Sub-navegação (container simples) --- */
.sub-nav-container {
    background-color: #E8EDEF;
    padding: 15px 0;
    border-radius: 0 0 12px 12px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.btn-sub-nav {
    background-color: white;
    color: #1F3A45;
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 8px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s;
    margin-right: 5px;
    margin-bottom: 5px;
    display: inline-block;
    text-decoration: none;
}

.btn-sub-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    color: #0B4F6C;
}

.btn-sub-nav-active {
    background-color: #0B4F6C !important;
    color: white !important;
}

.btn-back-custom {
    padding-left: 20px;
    padding-right: 20px;
}

@media (max-width: 768px) {
    .sub-nav-container {
        padding: 10px;
        gap: 8px;
    }

    .btn-sub-nav {
        flex-grow: 1;
        text-align: center;
        font-size: 0.85rem !important;
        padding: 8px 15px !important;
        white-space: nowrap;
    }
}

/* --- Sub-navegação (variante full-width, usada em Monotipos/Avob) --- */
.main-content-wrapper {
    padding-top: 0 !important;
    padding-bottom: 40px;
}

.sub-nav-full-width {
    background-color: #e8edef;
    width: 100vw;
    margin-left: -50vw;
    left: 50%;
    position: relative;
    padding: 10px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    text-align: center;
    margin-top: -50px;
}

.sub-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.btn-sub-active {
    background-color: #0b4f6c;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    font-weight: 700;
    border-color: white;
}

/* --- Navegação interna (abas secundárias dentro da página) --- */
.internal-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    flex-wrap: wrap;
}

.btn-internal {
    background-color: transparent;
    color: #555;
    border: 1px solid #ddd;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-internal:hover {
    background-color: #f0f0f0;
    color: #0B4F6C;
    border-color: #0B4F6C;
}

/* --- Cabeçalho de destaque (ex.: título da Regata/Ranking) --- */
.regata-header-card {
    background-color: #0B4F6C;
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.regata-header-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* --- Cards de conteúdo --- */
.content-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 25px;
    height: 100%;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #0B4F6C;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.card-subtitle {
    font-size: 1.1rem;
    color: #0B4F6C;
    font-weight: 700;
    margin-bottom: 15px;
    display: block;
}

/* --- Cards com tabela (GridView responsivo) --- */
.custom-table-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 0;
}

.custom-table-card-50 {
    background: white;
    border-radius: 12px;
    border: 1.2px solid rgba(0,0,0,0.05);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: block;
    max-width: 50%;
}

/* Variante de card usada em páginas administrativas (ex.: Torneios) */
.admin-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 20px;
    border: 1px solid rgba(0,0,0,0.05);
}

.custom-table-header {
    background-color: white;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: white;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.table-responsive-wrapper {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 0;
}

.table {
    width: 100%;
    margin-bottom: 0;
    white-space: nowrap;
}

.table tbody td, .table thead th {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
    color: #1F3A45;
    font-weight: 600;
}

.custom-table-card th a {
    color: aliceblue !important;
    text-decoration: none;
}

.custom-table-card th {
    background-color: #0b4f6c !important;
    color: aliceblue !important;
}

.table-responsive-wrapper .table-custom {
    white-space: nowrap;
    margin-bottom: 0;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,0.03);
}

@media (max-width: 768px) {
    .table tbody td, .table thead th {
        padding: 10px 8px !important;
        font-size: 0.85rem !important;
    }

    .table {
        padding-right: 15px;
    }

    .regata-header-card {
        padding: 1.5rem;
    }

    .regata-header-title {
        font-size: 1.4rem;
    }
}

/* --- Formulários --- */
.form-label-custom {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
}

.form-control-custom {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.95rem;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.form-control-custom:focus {
    border-color: #0B4F6C;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(11, 79, 108, 0.25);
}

.form-check-input-custom {
    margin-right: 8px;
}

/* --- ListBox Estilizado --- */
.listbox-custom {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 5px;
    font-size: 0.95rem;
    color: #333;
    min-height: 350px;
}

/* --- Tabela customizada (DetailsView / tabelas simples) --- */
.table-custom {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    border: 1px solid #eee;
}

.table-custom th {
    background-color: #0B4F6C;
    color: white;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.table-custom td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 0.9rem;
}

.table-custom tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* --- Botões de ação --- */
.btn-action {
    background-color: #0B4F6C;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-right: 5px;
    margin-top: 10px;
    transition: background 0.2s;
}

.btn-action:hover {
    background-color: #093e55;
}

/* --- Layout flexível em linhas/colunas --- */
.row-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.col-flex-4 {
    flex: 0 0 350px;
    max-width: 100%;
}

.col-flex-6 {
    flex: 1;
    min-width: 250px;
}

.col-flex-8 {
    flex: 1;
    min-width: 0;
}

.d-flex-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 768px) {
    .row-flex {
        flex-direction: column;
    }

    .col-flex-4, .col-flex-6, .col-flex-8 {
        width: 100%;
    }

    .sub-nav-full-width {
        margin-top: 0;
    }
}

/* --- Estilização do Calendar --- */
.calendar-style {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    width: 100%;
}

.calendar-style table {
    width: 100%;
}

.calendar-header {
    background-color: #0B4F6C;
    color: white;
    font-weight: bold;
    padding: 5px;
}

.calendar-day-header {
    background-color: #f8f9fa;
    color: #555;
    font-size: 0.85rem;
}

.calendar-day {
    padding: 8px;
    text-align: center;
    border: 1px solid #f0f0f0;
}

.calendar-selected {
    background-color: #0B4F6C;
    color: white;
    border-radius: 50%;
}

/* --- DetailsView limpo --- */
.details-view-style {
    width: 100%;
    border: none;
}

.details-view-style td, .details-view-style th {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.details-view-style tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* --- Validação de formulário --- */
.erro-email {
    border: 2px solid red;
    background-color: #ffe6e6;
}

/* =========================================================
   Sub-navegação variante "outline" (usada dentro de
   .sub-nav-full-width, ex.: Avob/Medicoes, MonoDefault, MonoDetalhes)
   ========================================================= */
.sub-nav-full-width .btn-sub-nav {
    background-color: white;
    color: #0b4f6c;
    border: 1px solid #0B4F6C;
    border-radius: 50px;
    padding: 6px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
}

.sub-nav-full-width .btn-sub-nav:hover {
    background-color: white;
    color: #0B4F6C;
    transform: translateY(-2px);
}

/* --- Utilitários de layout flexível adicionais --- */
.col-flex-2 {
    flex: 1;
    max-width: 150px;
}

.col-flex-12 {
    flex: 100%;
}

/* --- Grid de relatórios/listagem com tabela de largura fixa ---
   (ex.: Default, Relatorios, Timoneiros, MonoTimoneiros) */
.custom-table-card {
    width: 100%;
    max-width: 100%;
}

.custom-table-card-50 {
    width: 500px;
    max-width: 100%;
}

.grid-outer-table {
    width: 100%;
    table-layout: fixed;
}

@media
    .table {
        padding-right: 10px;
    }

    .table img {
        width: 22px !important;
        height: auto;
    }

    /* Reset de tabelas GridView em telas pequenas */
    .grid-mobile-reset,
    .grid-mobile-reset > tbody,
    .grid-mobile-reset > tbody > tr,
    .grid-mobile-reset > tbody > tr > td {
        display: block !important;
        width: 100% !important;
        border: none !important;
        box-sizing: border-box !important;
    }
}

/* --- Layout "tabela flexível" em 2 colunas (Avob/NovaMedicao, Avob/MedidasDetalhe) --- */
.tabela-flex {
    border: 2px solid #ccc;
    padding: 15px;
    background: #fafafa;
}

.col-50 {
    flex: 1;
    width: 50%;
    padding: 20px;
}

.col-50.left {
    background: #f0f0f0;
}

.col-50.right {
    background: #d0e0f0;
}

.form-label-title {
    display: block;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
}

/* =========================================================
   Cabeçalho de página genérico (About, Contact)
   ========================================================= */
.page-header-card {
    background-color: #0B4F6C;
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.page-subtitle {
    opacity: 0.9;
    font-size: 1rem;
    margin-top: 5px;
    display: block;
}

/* --- Página "Sobre" --- */
.about-content-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-bottom: 30px;
    color: #444;
    line-height: 1.6;
    font-size: 1rem;
}

.about-content-card p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.subtitle {
    color: #0B4F6C;
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.btn-donate-mp {
    display: inline-block;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
    margin: 10px 0 20px 0;
}

.btn-donate-mp:hover {
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.partners-section {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.partners-group {
    margin-bottom: 30px;
}

.partners-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    font-weight: 700;
    margin-bottom: 15px;
    display: block;
}

.partners-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.partners-logos a {
    display: inline-block;
    transition: transform 0.2s;
}

.partners-logos a:hover {
    transform: scale(1.05);
}

.partners-logos img {
    max-height: 70px;
    max-width: 100%;
    filter: grayscale(10%);
    transition: filter 0.3s;
}

.partners-logos img:hover {
    filter: grayscale(0%);
}

@media (max-width: 768px) {
    .about-content-card {
        padding: 20px;
    }

    .partners-logos {
        justify-content: center;
    }

    .partners-label {
        text-align: center;
    }
}

/* --- Página "Contato" --- */
.contact-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 40px 30px;
    text-align: center;
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    transition: transform 0.2s;
    border-top: 4px solid #0B4F6C;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.icon-circle {
    width: 70px;
    height: 70px;
    background-color: #E8EDEF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    color: #0B4F6C;
    font-size: 1.8rem;
}

.contact-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #1F3A45;
    margin-bottom: 15px;
    font-weight: 700;
}

.contact-text {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-link {
    color: #0B4F6C;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.contact-link:hover {
    color: #093e55;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .contact-grid {
        flex-direction: column;
        align-items: center;
    }

    .contact-card {
        width: 100%;
    }
}

/* =========================================================
   Gerenciar conta (Account/Manage.aspx)
   ========================================================= */
.manage-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 60vh;
    padding-bottom: 40px;
}

.manage-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.manage-header {
    background-color: #0B4F6C;
    color: white;
    padding: 25px;
    text-align: center;
}

.manage-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.manage-body {
    padding: 30px;
}

.user-info {
    background-color: #F8FAFB;
    border-left: 4px solid #0B4F6C;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 4px;
    color: #555;
}

.user-name-highlight {
    font-weight: bold;
    font-size: 1.1rem;
    color: #0B4F6C;
}

.error-message {
    display: block;
    margin-top: 10px;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 768px) {
    .manage-card {
        margin: 0 15px;
    }
}
