:root {
    --verde-escuro: #0b572d;
    --verde-vivo: #1aa35a;
    --verde-agua: #3dbe8c;
    --ouro: #d4a017;
    --fundo: #eef6f1;
    --superficie: #ffffff;
    --texto: #143325;
    --muted: #5c7366;
    --grad-nav: linear-gradient(90deg, #0b572d, #1aa35a);
    --grad-pagina: linear-gradient(180deg, #d8efe3 0%, #eef6f1 28%, #f7faf8 100%);
    --grad-hero: linear-gradient(180deg, rgba(11, 87, 45, 0.15), rgba(11, 87, 45, 0.82));
    --sombra: 0 12px 32px rgba(11, 87, 45, 0.12);
    --raio: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--texto);
    background: var(--grad-pagina);
    font-family: "Segoe UI", system-ui, sans-serif;
}

body.m-0 {
    padding-top: 130px;
}

.top-banner {
    height: 80px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
    background: linear-gradient(90deg, #ffffff 0%, #e8f6ee 55%, #d4f0e0 100%) !important;
    border-bottom: 1px solid rgba(11, 87, 45, 0.08);
}
.logo-img { max-height: 60px; }
.titulo-central {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--verde-escuro);
    letter-spacing: 0.04em;
}

@media (max-width: 576px) {
    .titulo-central {
        left: auto;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        text-align: right;
    }
    .logo-img { max-height: 40px; }
}

.faixa-inicial,
.navbar-thin {
    background: var(--grad-nav) !important;
    color: #fff;
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
    position: fixed;
    top: 80px;
    width: 100%;
    z-index: 1020;
    min-height: 44px;
}
.faixa-inicial {
    text-align: center;
    font-size: 1.15em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-nav .nav-item .nav-link {
    border-left: 1px solid rgba(255, 255, 255, 0.22);
    border-right: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.92em;
    padding-left: 1rem;
    padding-right: 1rem;
    color: #fff !important;
    border-radius: 0;
}
.navbar-dark .navbar-nav .nav-link:hover {
    background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(212,160,23,.35));
}

main.container {
    max-width: 1140px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.page-head h1, .page-head h4 {
    margin: 0;
    font-weight: 700;
}
.page-kicker {
    color: var(--muted);
    font-size: 0.92rem;
    margin: 0 0 0.2rem;
}

.card-app {
    background: var(--superficie);
    border: 1px solid rgba(11, 87, 45, 0.08);
    border-radius: var(--raio);
    box-shadow: var(--sombra);
    overflow: hidden;
}
.card-app .card-body { padding: 1.25rem 1.4rem; }

.btn-success, .btn-app {
    background: var(--grad-nav) !important;
    border: 0 !important;
    color: #fff !important;
    border-radius: 999px !important;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    font-weight: 600;
}
.btn-success:hover, .btn-app:hover { filter: brightness(1.08); }
.btn-ouro {
    background: linear-gradient(90deg, #d4a017, #e8c04a) !important;
    border: 0 !important;
    color: #143325 !important;
    border-radius: 999px !important;
    font-weight: 700;
}
.btn-outline-success {
    border-radius: 999px !important;
    border-color: var(--verde-vivo) !important;
    color: var(--verde-escuro) !important;
}
.btn-outline-secondary, .btn-outline-danger {
    border-radius: 999px !important;
}

.form-control, .form-select {
    border-radius: 12px !important;
    border-color: rgba(11, 87, 45, 0.18) !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--verde-vivo) !important;
    box-shadow: 0 0 0 0.2rem rgba(26, 163, 90, 0.18) !important;
}

.login-wrap {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--superficie);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--sombra);
    overflow: hidden;
}
.login-card::before {
    content: "";
    display: block;
    height: 6px;
    margin: -2rem -2rem 1.5rem;
    background: var(--grad-nav);
}

.btn-google {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: #fff;
    border: 1px solid #d5e3da;
    border-radius: 50px;
    text-decoration: none;
    color: #444;
    font-weight: 500;
}
.btn-google:hover { background: #f4faf6; }
.google-icon { width: 24px; height: 24px; }

.hero-torneio {
    position: relative;
    border-radius: var(--raio);
    aspect-ratio: 1600 / 640;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: var(--grad-nav);
    box-shadow: var(--sombra);
}
.hero-torneio img.hero-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: var(--verde-escuro);
}
.hero-torneio .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    padding: 2rem;
    background: var(--grad-hero);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.hero-torneio h1, .hero-torneio h4 { color: #fff; }

.card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1600 / 640;
    overflow: hidden;
    background: linear-gradient(135deg, var(--verde-escuro), var(--verde-agua));
}
.card-media-quad {
    aspect-ratio: 1;
    background: #fff;
}
.card-media-sm {
    width: 200px;
    flex: 0 0 200px;
    aspect-ratio: 1600 / 640;
}
.card-media img,
.card-media .ph-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.thumb-mod,
.logo-inst {
    width: 88px;
    height: 88px;
    min-width: 88px;
    min-height: 88px;
    flex: 0 0 88px;
    border-radius: 16px;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #eef6f1;
    border: 1px solid rgba(11,87,45,.1);
}
.logo-inst {
    border-radius: 20px;
    background: #fff;
}
.thumb-mod-sm {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    flex: 0 0 48px;
    border-radius: 12px;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #eef6f1;
    border: 1px solid rgba(11,87,45,.1);
}
.logo-inst-sm {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    object-fit: cover;
    object-position: center;
    display: inline-block;
    vertical-align: middle;
    background: #fff;
}
.ph-img {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    letter-spacing: .04em;
    background: linear-gradient(135deg, var(--verde-escuro), var(--verde-agua));
}
.thumb-mod.ph-img,
.thumb-mod-sm.ph-img {
    width: 88px;
    height: 88px;
}
.thumb-mod-sm.ph-img {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    flex: 0 0 48px;
}

.box-vinculo {
    min-height: 100px;
    border: 2px dashed rgba(26, 163, 90, 0.45);
    border-radius: var(--raio);
    padding: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(232,246,238,.9));
}
.chip-item {
    background: var(--grad-nav);
    color: #fff;
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}
.chip-item .chip-date { width: auto; min-width: 140px; }
.chip-thumb {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    background: #fff;
}
.btn-chip-x {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
}
.cor-bola {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: inline-block;
    box-shadow: 0 0 0 1px rgba(11,87,45,.2);
}
.select2-container { width: 100% !important; }

.table-app {
    background: var(--superficie);
    border-radius: var(--raio);
    overflow: hidden;
    box-shadow: var(--sombra);
}
.table-app table { margin: 0; }
.table-app thead th {
    background: linear-gradient(90deg, rgba(11,87,45,.08), rgba(26,163,90,.06));
    color: var(--verde-escuro);
    border: 0;
    font-weight: 700;
}

.preview-img {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--fundo);
    border: 1px solid rgba(11,87,45,.1);
}
.preview-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.preview-capa {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1600 / 640;
}
.preview-quad {
    width: 160px;
    height: 160px;
    aspect-ratio: 1;
}

.alert { border-radius: 14px; }

.inst-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    font-weight: 600;
}
