:root {
    --primary: #e30613;
    --primary-dark: #a80000;
    --dark: #050505;
    --dark-soft: #0d0d0d;
    --surface: #141414;
    --surface-light: #1d1d1d;
    --text-muted: #a7a7a7;
    --border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(227, 6, 19, 0.12), transparent 32rem),
        linear-gradient(180deg, #030303 0%, #080808 45%, #000000 100%);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent 80%);
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.font-racing {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: -0.03em;
}

.text-racing {
    color: var(--primary);
}

.section-padding {
    padding: 20px 0 60px;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
}

.section-eyebrow::before {
    content: "";
    width: 36px;
    height: 3px;
    background: var(--primary);
    display: inline-block;
}

.section-title {
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    line-height: 0.95;
    margin-bottom: 24px;
}

.section-description {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.navbar {
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    transition: 0.3s ease;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 1.35rem;
    font-weight: 700;
}

.navbar-brand img {
    height: 140px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.06);
}

.navbar-nav .nav-link {
    position: relative;
    color: rgba(255,255,255,0.82);
    font-family: 'Oswald', sans-serif;
    font-size: 0.98rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: 0.25s ease;
}

.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 2px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #ffffff;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.navbar-toggler {
    box-shadow: none !important;
}

.btn-racing-main,
.btn-racing-outline {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 13px 30px;
    border-radius: 0;
    border: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    overflow: hidden;
    transform: skewX(-10deg);
    transition: 0.3s ease;
}

.btn-racing-main > *,
.btn-racing-outline > * {
    transform: skewX(10deg);
}

.btn-racing-main {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(227, 6, 19, 0.28);
}

.btn-racing-main:hover {
    background: #ffffff;
    color: #000000;
    transform: skewX(-10deg) translateY(-2px);
}

.btn-racing-outline {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(227, 6, 19, 0.75);
}

.btn-racing-outline:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: skewX(-10deg) translateY(-2px);
}

.btn-racing-submit {
    background: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary);
}

.btn-racing-submit:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.racing-alert {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    padding: 14px 16px;
    font-weight: 700;
}

.racing-alert-error {
    border-color: rgba(227, 6, 19, 0.55);
    background: rgba(227, 6, 19, 0.14);
}

.hero-site {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 150px 0 20px;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.72) 42%, rgba(0,0,0,0.28) 100%),
        linear-gradient(0deg, #050505 0%, rgba(0,0,0,0.2) 38%, rgba(0,0,0,0.35) 100%),
        url('https://listaarea45.com.br/site/assets/img/bg-header.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-site::before {
    content: "";
    position: absolute;
    right: -180px;
    top: 0;
    width: 48%;
    height: 100%;
    background: rgba(227, 6, 19, 0.88);
    clip-path: polygon(30% 0, 100% 0, 72% 100%, 0 100%);
    opacity: 0.12;
}

.hero-site::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 140px;
    background: linear-gradient(0deg, var(--dark) 0%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding: 9px 15px;
    background: rgba(227, 6, 19, 0.14);
    border: 1px solid rgba(227, 6, 19, 0.38);
    color: var(--primary);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero-title {
    font-size: clamp(3.3rem, 9vw, 7.8rem);
    line-height: 0.88;
    margin-bottom: 24px;
}

.hero-title span {
    color: var(--primary);
}

.hero-description {
    max-width: 620px;
    color: rgba(255,255,255,0.78);
    font-size: 1.1rem;
    line-height: 1.85;
    margin-bottom: 34px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-stats {
    position: relative;
    z-index: 2;
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--border);
    background: rgba(10,10,10,0.74);
    backdrop-filter: blur(12px);
}

.hero-stat {
    padding: 24px;
    border-right: 1px solid var(--border);
}

.hero-stat:last-child {
    border-right: 0;
}

.hero-stat strong {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: var(--primary);
    line-height: 1;
}

.hero-stat span {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.racing-card {
    position: relative;
    height: 100%;
    background: linear-gradient(180deg, var(--surface-light), var(--surface));
    border: 1px solid var(--border);
    overflow: hidden;
    transition: 0.35s ease;
}

.racing-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.2), transparent 38%);
    opacity: 0;
    transition: 0.35s ease;
    pointer-events: none;
}

.racing-card:hover {
    transform: translateY(-10px);
    border-color: rgba(227, 6, 19, 0.65);
    box-shadow: 0 24px 70px rgba(0,0,0,0.45);
}

.racing-card:hover::before {
    opacity: 1;
}

.card-img-wrapper {
    position: relative;
    height: 255px;
    overflow: hidden;
    background: #080808;
}

.card-img-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.72), transparent 55%);
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s ease;
}

.racing-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.card-badge-racing {
    position: absolute;
    left: 20px;
    bottom: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--primary);
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.card-content {
    position: relative;
    z-index: 2;
    padding: 28px;
}

.card-content h3 {
    min-height: 4.2rem;
    display: flex;
    align-items: flex-start;
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 12px;
}

.card-content p {
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 0;
}

.racing-strip {
    position: relative;
    padding: 26px 0;
    background: var(--primary);
    color: #ffffff;
    overflow: hidden;
}

.racing-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(0,0,0,0.22) 0,
        rgba(0,0,0,0.22) 10px,
        transparent 10px,
        transparent 22px
    );
    opacity: 0.35;
}

.racing-strip-content {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: clamp(1.25rem, 3vw, 2rem);
    letter-spacing: 0.04em;
}

footer {
    position: relative;
    background: linear-gradient(180deg, #080808 0%, #030303 100%);
    border-top: 1px solid var(--border);
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    right: -160px;
    bottom: -160px;
    width: 360px;
    height: 360px;
    background: rgba(227, 6, 19, 0.14);
    border-radius: 50%;
    filter: blur(30px);
}

.footer-logo {
    height: 150px;
    width: auto;
    object-fit: contain;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.footer-link {
    display: block;
    color: var(--text-muted);
    margin-bottom: 10px;
    transition: 0.25s ease;
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.social-link {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    color: #ffffff;
    transition: 0.25s ease;
}

.social-link:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-3px);
}

.ranking-hero {
    position: relative;
    padding: 180px 0 70px;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.82) 58%, rgba(227,6,19,0.2) 100%),
        repeating-linear-gradient(
            -45deg,
            rgba(255,255,255,0.05) 0,
            rgba(255,255,255,0.05) 1px,
            transparent 1px,
            transparent 18px
        );
    overflow: hidden;
}

.ranking-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -80px;
    width: 48%;
    height: 220px;
    background: var(--primary);
    clip-path: polygon(16% 0, 100% 0, 84% 100%, 0 100%);
    opacity: 0.2;
}

.ranking-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 36px;
}

.ranking-title {
    margin-bottom: 18px;
}

.ranking-season {
    min-width: 220px;
    padding: 24px;
    border: 1px solid rgba(227, 6, 19, 0.55);
    background: rgba(12,12,12,0.82);
    text-align: right;
}

.ranking-season span,
.podium-label,
.podium-stats span,
.ranking-board-meta,
.ranking-table th {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ranking-season span {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.ranking-season strong {
    display: block;
    color: var(--primary);
    font-family: 'Oswald', sans-serif;
    font-size: 4rem;
    line-height: 0.95;
}

.ranking-section {
    padding-top: 70px;
}

.ranking-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 22px;
    margin-bottom: 46px;
}

.podium-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 360px;
    background: linear-gradient(180deg, #202020 0%, #111111 100%);
    border: 1px solid var(--border);
    overflow: hidden;
}

.podium-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(227, 6, 19, 0.28), transparent 42%),
        repeating-linear-gradient(
            -45deg,
            rgba(255,255,255,0.04) 0,
            rgba(255,255,255,0.04) 1px,
            transparent 1px,
            transparent 14px
        );
    pointer-events: none;
}

.podium-card-1 {
    min-height: 420px;
    border-color: rgba(227, 6, 19, 0.72);
    box-shadow: 0 24px 70px rgba(227, 6, 19, 0.18);
}

.podium-card-2 {
    min-height: 382px;
}

/* Pódio clássico: o 1º no meio, o 2º à esquerda e o 3º à direita (a ordem no HTML segue 1, 2, 3 para leitores de tela e celular) */
.podium-card-2 { order: 1; }
.podium-card-1 { order: 2; }
.podium-card-3 { order: 3; }

.podium-position {
    position: relative;
    z-index: 2;
    padding: 22px 24px 0;
}

.podium-position span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 64px;
    background: var(--primary);
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-size: 2.15rem;
    line-height: 1;
    transform: skewX(-10deg);
}

.podium-body {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding: 30px 24px;
}

.podium-label {
    color: var(--primary);
    font-size: 0.86rem;
}

.podium-body h2 {
    margin: 12px 0 8px;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 0.95;
}

.podium-body p {
    margin: 0;
    color: var(--text-muted);
}

.podium-stats {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.22);
}

.podium-stats div {
    padding: 16px;
    border-right: 1px solid var(--border);
}

.podium-stats div:last-child {
    border-right: 0;
}

.podium-stats strong {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 1.45rem;
    line-height: 1;
}

.podium-stats span {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.ranking-board {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(29,29,29,0.94), rgba(13,13,13,0.96));
}

.ranking-board-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding: 34px;
    border-bottom: 1px solid var(--border);
}

.ranking-board-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.ranking-board-meta span {
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: #101010;
}

.ranking-table-wrap {
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.ranking-table th {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.ranking-table tbody tr {
    transition: 0.24s ease;
}

.ranking-table tbody tr:hover {
    background: rgba(227, 6, 19, 0.08);
}

.ranking-table tbody tr:last-child td {
    border-bottom: 0;
}

.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 38px;
    background: #080808;
    border: 1px solid rgba(227, 6, 19, 0.42);
    color: var(--primary);
    font-family: 'Oswald', sans-serif;
    transform: skewX(-10deg);
}

.ranking-points {
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-size: 1.35rem;
}

.gallery-list-hero {
    position: relative;
    padding: 180px 0 76px;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.94) 0%, rgba(0,0,0,0.76) 55%, rgba(227,6,19,0.18) 100%),
        url('https://listaarea45.com.br/site/assets/img/bg-header.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.gallery-list-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 140px;
    background: linear-gradient(0deg, var(--dark) 0%, transparent 100%);
}

.gallery-list-hero .container {
    position: relative;
    z-index: 2;
}

.gallery-list-title {
    margin-bottom: 20px;
}

.gallery-list-section {
    padding-top: 76px;
}

.gallery-list-card {
    min-height: 100%;
}

.gallery-list-cover {
    position: relative;
    display: block;
    height: 265px;
    overflow: hidden;
    background: #080808;
}

.gallery-list-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.72), transparent 58%);
}

.gallery-list-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s ease;
}

.gallery-list-card:hover .gallery-list-cover img {
    transform: scale(1.08);
}

.gallery-list-count {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--primary);
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.gallery-list-content h2 {
    min-height: 4.4rem;
    display: flex;
    align-items: flex-start;
    margin: 10px 0 12px;
    font-size: 1.75rem;
    line-height: 1.2;
}

.gallery-list-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.9rem;
}

.events-list-hero {
    position: relative;
    padding: 180px 0 76px;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.94) 0%, rgba(0,0,0,0.78) 56%, rgba(227,6,19,0.16) 100%),
        url('https://listaarea45.com.br/site/assets/img/bg-header.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.events-list-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 140px;
    background: linear-gradient(0deg, var(--dark) 0%, transparent 100%);
}

.events-list-hero .container {
    position: relative;
    z-index: 2;
}

.events-list-title {
    margin-bottom: 20px;
}

.events-list-section {
    padding-top: 76px;
}

.events-list-section .card-content h2 {
    min-height: 4.2rem;
    display: flex;
    align-items: flex-start;
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 12px;
}

.contact-hero,
.rules-hero {
    position: relative;
    padding: 180px 0 76px;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.78) 56%, rgba(227,6,19,0.16) 100%),
        url('https://listaarea45.com.br/site/assets/img/bg-header.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.contact-hero::after,
.rules-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 140px;
    background: linear-gradient(0deg, var(--dark) 0%, transparent 100%);
}

.contact-hero .container,
.rules-hero .container {
    position: relative;
    z-index: 2;
}

.contact-title,
.rules-title {
    margin-bottom: 20px;
}

.contact-section,
.rules-section {
    padding-top: 76px;
}

.contact-card,
.rules-list,
.rules-preview,
.contact-action-panel {
    position: relative;
    background: linear-gradient(180deg, var(--surface-light), var(--surface));
    border: 1px solid var(--border);
    overflow: hidden;
}

.contact-card {
    padding: 32px;
}

.contact-card::before,
.contact-action-panel::before,
.rules-list::before,
.rules-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.18), transparent 42%);
    pointer-events: none;
}

.contact-icon {
    position: relative;
    z-index: 2;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    background: var(--primary);
    color: #ffffff;
    font-size: 1.4rem;
    transform: skewX(-10deg);
}

.contact-card h2,
.rules-list h2,
.rules-preview h2,
.contact-action-panel h2 {
    position: relative;
    z-index: 2;
    margin-bottom: 14px;
    font-size: 1.85rem;
}

.contact-card p,
.rules-file p {
    position: relative;
    z-index: 2;
    color: var(--text-muted);
    line-height: 1.75;
}

.contact-card a {
    position: relative;
    z-index: 2;
    display: inline-flex;
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contact-card a:hover,
.rules-file a:hover {
    color: var(--primary);
}

.contact-action-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 34px;
}

.contact-action-panel > *,
.rules-list > *,
.rules-preview > * {
    position: relative;
    z-index: 2;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

.rules-list {
    padding: 30px;
}

.rules-file {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
}

.rules-file h3 {
    margin-bottom: 6px;
    font-size: 1.2rem;
}

.rules-file p {
    margin: 0;
    font-size: 0.92rem;
}

.rules-file a {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(227, 6, 19, 0.5);
    color: #ffffff;
}

.rules-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.rules-preview-header span {
    display: block;
    color: var(--primary);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
}

.rules-preview-header h2 {
    margin: 4px 0 0;
}

.rules-preview iframe {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: min(78vh, 820px);
    min-height: 560px;
    border: 0;
    background: #101010;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 18px;
        padding: 18px;
        background: rgba(0,0,0,0.92);
        border: 1px solid var(--border);
    }

    .hero-site {
        min-height: auto;
        padding-top: 135px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .hero-stat {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .hero-stat:last-child {
        border-bottom: 0;
    }

    .ranking-hero-grid,
    .ranking-podium {
        grid-template-columns: 1fr;
    }

    .ranking-season {
        width: 100%;
        text-align: left;
    }

    .podium-card,
    .podium-card-1,
    .podium-card-2 {
        min-height: 320px;
    }

    /* Empilhado no celular: volta para 1º, 2º, 3º */
    .podium-card-1,
    .podium-card-2,
    .podium-card-3 {
        order: 0;
    }

    .gallery-list-hero {
        padding-top: 140px;
    }

    .events-list-hero {
        padding-top: 140px;
    }

    .contact-hero,
    .rules-hero {
        padding-top: 140px;
    }

    .contact-action-panel,
    .rules-preview-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .section-padding {
        padding: 20px 0 78px;
    }

    .navbar-brand img {
        height: 58px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-racing-main,
    .btn-racing-outline {
        width: 100%;
    }

    .card-img-wrapper {
        height: 215px;
    }

    .ranking-hero {
        padding-top: 132px;
    }

    .gallery-list-hero {
        padding-top: 124px;
    }

    .events-list-hero {
        padding-top: 124px;
    }

    .contact-hero,
    .rules-hero {
        padding-top: 124px;
    }

    .gallery-list-cover {
        height: 220px;
    }

    .contact-card,
    .rules-list,
    .contact-action-panel {
        padding: 24px;
    }

    .rules-preview iframe {
        min-height: 430px;
    }

    .ranking-board-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 24px;
    }

    .ranking-board-meta {
        justify-content: flex-start;
    }

    .podium-stats {
        grid-template-columns: 1fr;
    }

    .podium-stats div {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .podium-stats div:last-child {
        border-bottom: 0;
    }
}

/* PAGINACAO */
.racing-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.racing-pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.racing-pagination-list {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.racing-pagination-list a,
.racing-pagination-list span {
    position: relative;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #101010;
    border: 1px solid var(--border);
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    line-height: 1;
    overflow: hidden;
    transition: 0.25s ease;
}

.racing-pagination-list a::before,
.racing-pagination-list span::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.35), transparent 55%);
    opacity: 0;
    transition: 0.25s ease;
}

.racing-pagination-list a:hover {
    border-color: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.racing-pagination-list a:hover::before {
    opacity: 1;
}

.racing-pagination-list a > *,
.racing-pagination-list span > * {
    position: relative;
    z-index: 2;
}

.racing-pagination-list li.active span {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 12px 32px rgba(227, 6, 19, 0.3);
}

.racing-pagination-list li.disabled span {
    color: #555555;
    background: #080808;
    cursor: not-allowed;
}

.racing-pagination-list li.dots span {
    color: var(--text-muted);
    background: transparent;
    border-color: transparent;
    min-width: 26px;
    padding: 0 4px;
}

@media (max-width: 767.98px) {
    .racing-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .racing-pagination-list {
        flex-wrap: wrap;
        gap: 6px;
    }

    .racing-pagination-list a,
    .racing-pagination-list span {
        min-width: 38px;
        height: 38px;
        padding: 0 11px;
        font-size: 0.85rem;
    }
}

/* ADMIN */
.admin-body,
.login-body {
    min-height: 100vh;
    background: #050505;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.95), rgba(0,0,0,0.72)),
        url('https://listaarea45.com.br/site/assets/img/bg-header.jpg');
    background-size: cover;
    background-position: center;
}

.login-panel {
    width: min(100%, 460px);
    padding: 36px;
    background: linear-gradient(180deg, var(--surface-light), var(--surface));
    border: 1px solid var(--border);
}

.login-panel img {
    height: 92px;
    width: auto;
    display: block;
    margin-bottom: 22px;
}

.login-panel img {
    display: block;
    height: 130px;
    width: auto;
    margin: 0 auto 18px;
}

.login-panel h1,
.login-panel > p {
    text-align: center;
}

.login-panel h1 {
    margin-bottom: 10px;
    font-size: 2.4rem;
}

.login-panel p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    width: 280px;
    padding: 24px;
    background: #080808;
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.admin-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    padding: 4px 0 8px;
}

.admin-brand img {
    display: block;
    height: 160px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.admin-nav {
    display: grid;
    gap: 8px;
}

.admin-nav a,
.admin-logout,
.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    background: #101010;
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: 0.25s ease;
}

.admin-nav a {
    justify-content: flex-start;
}

.admin-nav a:hover,
.admin-nav a.active,
.admin-logout:hover,
.admin-button:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* Menu em grupos recolhíveis (details/summary nativos, sem JavaScript) */
.admin-nav-group {
    border: 1px solid var(--border);
    background: #101010;
}

.admin-nav-group > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.admin-nav-group > summary::-webkit-details-marker {
    display: none;
}

.admin-nav-group > summary:hover {
    background: rgba(255, 255, 255, 0.06);
}

.admin-nav-group > summary span {
    flex: 1;
}

.admin-nav-chevron {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.admin-nav-group[open] > summary .admin-nav-chevron {
    transform: rotate(180deg);
}

.admin-nav-group[open] > summary {
    border-bottom: 1px solid var(--border);
}

.admin-nav-sub {
    display: grid;
    gap: 0;
    background: #0a0a0a;
}

/* Subitens: mais compactos e recuados, sem a caixa dos itens principais */
.admin-nav .admin-nav-sub a {
    min-height: 38px;
    padding: 8px 14px 8px 28px;
    border: 0;
    border-left: 3px solid transparent;
    background: transparent;
    font-size: 0.92rem;
}

.admin-nav .admin-nav-sub a:hover,
.admin-nav .admin-nav-sub a.active {
    border-left-color: var(--primary);
    background: rgba(227, 6, 19, 0.18);
}

.admin-main {
    min-height: 100vh;
    margin-left: 280px;
    padding: 28px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 18px 22px;
    background: linear-gradient(180deg, var(--surface-light), var(--surface));
    border: 1px solid var(--border);
}

.admin-topbar span {
    display: block;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.admin-topbar strong {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
}

.admin-logout {
    cursor: pointer;
}

.admin-alert {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: rgba(227, 6, 19, 0.14);
    border: 1px solid rgba(227, 6, 19, 0.42);
    color: #ffffff;
}

.admin-alert-error {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.admin-grid {
    display: grid;
    gap: 18px;
}

.admin-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card {
    background: linear-gradient(180deg, var(--surface-light), var(--surface));
    border: 1px solid var(--border);
    padding: 24px;
}

.admin-card > span {
    display: block;
    color: var(--text-muted);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-card > strong {
    display: block;
    margin-top: 8px;
    color: var(--primary);
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    line-height: 1;
}

/* Cabeçalho de cartão: título à esquerda; TODAS as ações agrupadas à direita (nada solto no meio) */
.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.admin-card-header > :first-child {
    margin-right: auto; /* o título absorve o espaço livre e empurra as ações para a direita */
}

.admin-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.admin-card-header h1,
.admin-card-header h2 {
    margin: 0;
}

.admin-card-header a:not(.admin-button) {
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.admin-list {
    display: grid;
    gap: 10px;
}

.admin-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    background: #101010;
    border: 1px solid var(--border);
}

.admin-list span,
.admin-list p {
    color: var(--text-muted);
    margin: 0;
}

.admin-muted {
    color: var(--text-muted);
}

.admin-code {
    display: inline-flex;
    max-width: 260px;
    padding: 6px 8px;
    overflow: hidden;
    background: #080808;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: monospace;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-info-grid div {
    padding: 16px;
    background: #101010;
    border: 1px solid var(--border);
}

.admin-info-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
}

.admin-info-grid strong,
.admin-info-grid a {
    display: block;
    overflow-wrap: anywhere;
    color: #ffffff;
}

.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.admin-photo-card {
    background: #101010;
    border: 1px solid var(--border);
    overflow: hidden;
}

.admin-photo-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #080808;
}

.admin-photo-card div {
    padding: 10px;
}

.admin-photo-card strong {
    display: block;
    margin-bottom: 4px;
    font-family: 'Oswald', sans-serif;
}

.admin-photo-card span {
    display: block;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-import-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-import-card {
    padding: 24px;
    background: #101010;
    border: 1px solid var(--border);
}

.admin-import-card .contact-icon {
    margin-bottom: 18px;
}

.admin-import-card h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.admin-folder-picker {
    display: inline-flex;
    margin-bottom: 14px;
}

.admin-folder-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.admin-folder-picker span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    background: #080808;
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: 0.25s ease;
}

.admin-folder-picker:hover span {
    background: var(--primary);
    border-color: var(--primary);
}

.admin-folder-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.admin-upload-progress {
    display: grid;
    gap: 8px;
}

.admin-upload-progress-bar {
    height: 10px;
    background: #080808;
    border: 1px solid var(--border);
    overflow: hidden;
}

.admin-upload-progress-bar span {
    display: block;
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 0.2s ease;
}

.admin-upload-log {
    max-height: 210px;
    margin-top: 14px;
    overflow-y: auto;
    border: 1px solid var(--border);
    background: #080808;
}

.admin-upload-log:empty {
    display: none;
}

.admin-upload-log-item {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.admin-upload-log-item:last-child {
    border-bottom: 0;
}

.admin-upload-log-item.success {
    color: #8fd19e;
}

.admin-upload-log-item.error {
    color: #ff8f8f;
}

.admin-upload-log-item.muted {
    color: var(--text-muted);
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table th {
    color: var(--text-muted);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
}

.admin-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.admin-actions a,
.admin-actions button {
    border: 0;
    padding: 0;
    background: transparent;
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.admin-actions button {
    color: var(--primary);
}

.admin-icon-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border) !important;
    background: #101010 !important;
    color: #ffffff !important;
    padding: 0 !important;
}

.admin-icon-button::after {
    display: none;
}

.admin-icon-button:hover,
.admin-icon-button:focus {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.admin-dropdown-menu {
    min-width: 190px;
    padding: 8px;
    border: 1px solid var(--border);
    background: #101010;
}

.admin-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.admin-dropdown-menu .dropdown-item:hover,
.admin-dropdown-menu .dropdown-item:focus {
    background: var(--primary);
    color: #ffffff;
}

.admin-dropdown-menu .dropdown-item > i{
    padding-left: 10px !important;
}

.admin-stats-compact {
    margin: 0 0 24px;
}

.admin-lote-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.admin-lote-summary > div {
    padding: 16px;
    background: #101010;
    border: 1px solid var(--border);
}

.admin-lote-summary strong,
.admin-lote-summary span,
.admin-table td span {
    display: block;
}

.admin-lote-summary span,
.admin-table td span {
    color: var(--text-muted);
    font-size: 0.86rem;
    margin-top: 4px;
}

.admin-code-cell {
    max-width: 210px;
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
}

.admin-status {
    display: inline-flex !important;
    width: fit-content;
    padding: 5px 9px;
    border: 1px solid var(--border);
    background: #151515;
    color: #ffffff !important;
    font-family: 'Oswald', sans-serif;
    font-size: 0.78rem !important;
    line-height: 1;
    text-transform: uppercase;
}

.admin-status-pago {
    border-color: rgba(29, 185, 84, 0.55);
    background: rgba(29, 185, 84, 0.14);
}

.admin-status-usado {
    border-color: rgba(80, 160, 255, 0.55);
    background: rgba(80, 160, 255, 0.14);
}

.admin-status-aguardando-pagamento,
.admin-status-pagamento-identificado {
    border-color: rgba(255, 193, 7, 0.55);
    background: rgba(255, 193, 7, 0.12);
}

.admin-status-reembolsado {
    border-color: rgba(167, 139, 250, 0.55);
    background: rgba(167, 139, 250, 0.14);
}

.admin-status-erro-pagamento,
.admin-status-pagamento-expirado,
.admin-status-cancelado {
    border-color: rgba(227, 6, 19, 0.55);
    background: rgba(227, 6, 19, 0.14);
}

.admin-validation {
    display: grid;
    gap: 8px;
    padding: 28px;
    border: 1px solid var(--border);
    background: #101010;
    text-align: center;
}

.admin-validation span {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
    text-transform: uppercase;
}

.admin-validation strong {
    color: var(--text-muted);
    font-size: 1rem;
}

.admin-validation-valid {
    border-color: rgba(29, 185, 84, 0.6);
    background: rgba(29, 185, 84, 0.12);
}

.admin-validation-warning {
    border-color: rgba(245, 180, 0, 0.6);
    background: rgba(245, 180, 0, 0.12);
}

.admin-validation-used,
.admin-validation-invalid {
    border-color: rgba(227, 6, 19, 0.55);
    background: rgba(227, 6, 19, 0.12);
}

.admin-total-strip {
    display: flex;
    align-items: stretch;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.admin-total-strip .admin-stat-card {
    min-width: 150px;
    flex: 1 0 150px;
}

.admin-report-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 18px;
    margin-top: 24px;
}

.admin-chart-card {
    min-height: 320px;
    padding: 18px;
    border: 1px solid var(--border);
    background: #101010;
}

.admin-chart-card h2 {
    margin: 0 0 16px;
    font-size: 1.25rem;
}

.admin-chart-wide {
    grid-column: 1 / -1;
    min-height: 260px;
}

.admin-pagination {
    margin-top: 24px;
}

.admin-pagination-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.admin-pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.admin-pagination-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.admin-pagination-list a,
.admin-pagination-list span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    background: #101010;
    border: 1px solid var(--border);
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    line-height: 1;
    transition: 0.25s ease;
}

.admin-pagination-list a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.admin-pagination-list li.active span {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.admin-pagination-list li.disabled span {
    background: #080808;
    border-color: var(--border);
    color: #555555;
    cursor: not-allowed;
}

.admin-pagination-list li.dots span {
    min-width: 22px;
    padding: 0 4px;
    border-color: transparent;
    background: transparent;
    color: var(--text-muted);
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        position: static;
        width: auto;
    }

    .admin-brand img {
        height: 110px;
    }

    .admin-main {
        margin-left: 0;
        padding: 18px;
    }

    .admin-stats,
    .admin-dashboard-grid,
    .admin-import-grid,
    .admin-info-grid,
    .admin-report-grid {
        grid-template-columns: 1fr;
    }

    .admin-topbar,
    .admin-list a {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-card-header > :first-child {
        flex: 1 0 100%;
    }

    .admin-actions {
        justify-content: flex-start;
    }
}

/* ==========================================================================
   FORMULÁRIOS — sistema único (painel, login e site)
   Grade de 12 colunas; campos ocupam 3, 6, 9 ou 12 colunas (.fcol-3/.fcol-6/.fcol-9/.fcol-12).
   (prefixo fcol- evita conflito com as classes .col-N do Bootstrap, que definem width)
   A responsividade segue a LARGURA DO PRÓPRIO FORMULÁRIO (container query), então o mesmo
   formulário funciona em tela cheia (painel) e em coluna estreita (checkout do site).
   ========================================================================== */
.form {
    --f-h: 46px;
    --f-bg: rgba(0, 0, 0, 0.38);
    --f-border: rgba(255, 255, 255, 0.16);
    --f-border-hover: rgba(255, 255, 255, 0.32);
    --f-gap-x: 16px;
    --f-gap-y: 20px;
    --f-label-h: 24px; /* altura do rótulo (0.82rem) + espaço até o campo */

    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--f-gap-y) var(--f-gap-x);
    align-items: start;
    container-type: inline-size;
    container-name: form;
}

.admin-body .form {
    --f-bg: #080808;
    --f-border: var(--border);
}

.fcol-3 { grid-column: span 3; }
.fcol-6 { grid-column: span 6; }
.fcol-9 { grid-column: span 9; }
.fcol-12 { grid-column: span 12; }

/* Tablet / coluna média: campos de 3 viram 6 e os de 9 ocupam a linha toda */
@container form (max-width: 760px) {
    .form > .fcol-3 { grid-column: span 6; }
    .form > .fcol-9 { grid-column: span 12; }
}

/* Celular / coluna estreita: um campo por linha */
@container form (max-width: 520px) {
    .form > .fcol-3,
    .form > .fcol-6,
    .form > .fcol-9 { grid-column: span 12; }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.field-label {
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
}

.field-req {
    margin-left: 4px;
    color: var(--primary);
}

.field-control {
    display: block;
    width: 100%;
    min-height: var(--f-h);
    padding: 11px 14px;
    border: 1px solid var(--f-border);
    border-radius: 0;
    background: var(--f-bg);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.98rem;
    letter-spacing: 0;
    text-transform: none;
    color-scheme: dark;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field-control::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.field-control:hover:not(:disabled):not([readonly]) {
    border-color: var(--f-border-hover);
}

.field-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.2);
}

.field-control:disabled,
.field-control[readonly] {
    opacity: 0.6;
    cursor: not-allowed;
}

textarea.field-control {
    min-height: calc(var(--f-h) * 2.4);
    resize: vertical;
    line-height: 1.5;
}

select.field-control {
    padding-right: 40px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='1.6' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

select.field-control option {
    background: #111111;
    color: #ffffff;
}

input[type='file'].field-control {
    padding: 8px 10px;
    cursor: pointer;
}

input[type='file'].field-control::file-selector-button {
    margin-right: 12px;
    padding: 8px 14px;
    border: 1px solid var(--f-border-hover);
    background: #1a1a1a;
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.field-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.field-error {
    color: #ff7b83;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.4;
}

.field.has-error .field-control {
    border-color: #e5484d;
    background-color: rgba(229, 72, 77, 0.07);
}

.field.has-error .field-control:focus {
    box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.25);
}

/* Caixa de seleção / liga-desliga: mesma altura dos campos, alinhada pela base da linha */
.field-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    min-width: 0;
    min-height: var(--f-h);
    padding: 11px 14px;
    border: 1px solid var(--f-border);
    background: var(--f-bg);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

/* Caixa de seleção que divide a linha com campos que têm rótulo: desce a altura do rótulo para alinhar pelo topo do campo */
.field-inline {
    padding-top: var(--f-label-h);
}

.field-check:hover {
    border-color: var(--f-border-hover);
}

.field-check:has(input:checked) {
    border-color: rgba(227, 6, 19, 0.6);
    background: rgba(227, 6, 19, 0.1);
}

.field-check:has(input:focus-visible) {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.2);
}

.field-check input {
    flex: none;
    display: grid;
    place-content: center;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-radius: 4px;
    background: transparent;
    appearance: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.field-check input[type='radio'] {
    border-radius: 50%;
}

.field-check input:checked {
    border-color: var(--primary);
    background: var(--primary);
}

.field-check input[type='checkbox']:checked::after {
    content: '';
    width: 10px;
    height: 5px;
    margin-top: -2px;
    border: solid #ffffff;
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg);
}

.field-check input[type='radio']:checked::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
}

.field-check-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: 0;
}

.field-check-text small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.field.has-error .field-check {
    border-color: #e5484d;
}

/* Bloco recolhível (ex.: confirmar uma ação sensível). O <summary> usa o visual de botão */
.form-collapse > summary {
    display: inline-flex;
    cursor: pointer;
    list-style: none;
}

.form-collapse > summary::-webkit-details-marker {
    display: none;
}

.form-collapse[open] > summary {
    margin-bottom: 4px;
}

/* Campo + botão que andam juntos em qualquer largura (ex.: cupom + "Aplicar"). Use junto de .fcol-N */
.field-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.field-row > .field {
    flex: 1 1 auto;
    min-width: 0;
}

.field-row > .field-row-btn {
    flex: none;
    margin-top: var(--f-label-h);
    min-height: var(--f-h);
    padding-left: 22px;
    padding-right: 22px;
}

/* Quebra de linha explícita entre grupos de campos relacionados */
.form-break {
    grid-column: 1 / -1;
    height: 0;
    margin: -8px 0;
}

/* Seção: título + divisória, ocupa a linha toda */
.form-section {
    grid-column: 1 / -1;
    margin-top: 6px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.form-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.form-section-title {
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-section-hint {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
    text-transform: none;
}

/* Cartão que agrupa campos repetidos (ex.: lotes, participantes) */
.form-group-card {
    grid-column: 1 / -1;
    padding: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
}

.form-group-card > .form {
    --f-gap-y: 16px;
}

/* Barra de ações: botões à direita, sempre numa linha própria */
.form-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}

.form-actions-start {
    justify-content: flex-start;
}

/* Em formulários longos a barra acompanha a rolagem (padrão de salvar sempre à mão) */
.form-actions-sticky {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 0 -4px;
    padding: 14px 4px;
    border-top: 1px solid var(--border);
    background: linear-gradient(to top, #141414 70%, rgba(20, 20, 20, 0.88));
    backdrop-filter: blur(6px);
}

/* Célula de ação alinhada à base dos campos (barras de filtro) */
.field-action {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    align-self: end;
    flex-wrap: wrap;
}

/* Botões que ocupam a célula inteira (ex.: "Buscar" ao lado de um campo) */
.field-action > .admin-button,
.field-action > button,
.field-action > .btn-racing-main,
.field-action > .btn-racing-outline {
    flex: 1;
    justify-content: center;
    min-height: var(--f-h);
}

/* Campo de senha com botão de mostrar/ocultar (acrescentado por forms.js) */
.field-input-wrap {
    position: relative;
}

.field-input-wrap .field-control {
    padding-right: 48px;
}

.field-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 46px;
    height: var(--f-h);
    border: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.field-toggle:hover,
.field-toggle:focus-visible {
    color: #ffffff;
    outline: none;
}

/* Texto de ajuda solto dentro do grid */
.form-note {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Estado de carregamento (o envio do formulário evita clique duplo) */
.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.75;
}

.is-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: form-spin 0.7s linear infinite;
}

@keyframes form-spin {
    to { transform: rotate(360deg); }
}

/* Editor de texto (Summernote) dentro do padrão */
.form .note-editor {
    border: 1px solid var(--f-border);
    background: #ffffff;
    color: #111111;
    font-family: 'Inter', sans-serif;
    text-transform: none;
    letter-spacing: 0;
}

.form .note-toolbar { background: #f5f5f5; border-bottom: 1px solid #dddddd; }
.form .note-editable { min-height: 220px; color: #111111; background: #ffffff; line-height: 1.6; }
.form .note-editable * { color: inherit; }
.form .note-modal-content,
.form .note-dropdown-menu { color: #111111; }
.form .note-btn { min-height: 32px; border-radius: 0; }

@media (prefers-reduced-motion: reduce) {
    .field-control,
    .field-check { transition: none; }
    .is-loading::after { animation-duration: 2s; }
}


/* ==========================================================================
   BOTÕES — cores por CONTEXTO (a cor diz o que o botão faz)
     verde   = confirmar / salvar / concluir        (fa-check, fa-floppy-disk…)
     azul    = novo / adicionar / aplicar / editar    (fa-plus, fa-pen, fa-tag…)
     vermelho= cancelar / excluir / fechar / sair    (fa-xmark, fa-trash…)
     amarelo = atenção: ação que pede cuidado        (fa-key, fa-right-left, fa-rotate-right…)
     roxo    = informação: filtrar / buscar / exportar / relatórios (fa-filter, fa-magnifying-glass, fa-file-csv…)
     cinza   = neutro / secundário / navegação       (fa-arrow-left, fa-rotate-left…)
   Uso: <a class="admin-button btn-green">…</a>  ·  <x-form.submit color="blue">…</x-form.submit>
   Funciona no painel (.admin-button, .admin-icon-button, .admin-logout) e no tema do site (.btn-racing-*).
   ========================================================================== */
:root {
    --btn-green: #15803d;  --btn-green-dk: #116a32;
    --btn-blue: #2f6fed;   --btn-blue-dk: #2358c9;
    --btn-red: #e30613;    --btn-red-dk: #b3050f;
    --btn-yellow: #f2b705; --btn-yellow-dk: #cf9c00;
    --btn-purple: #7c4dff; --btn-purple-dk: #6439e0;
    --btn-gray: #2d2d2d;   --btn-gray-dk: #424242; --btn-gray-bd: #505050;
}

.btn-green  { --btn: var(--btn-green);  --btn-dk: var(--btn-green-dk);  --btn-bd: var(--btn-green);  --btn-fg: #ffffff; }
.btn-blue   { --btn: var(--btn-blue);   --btn-dk: var(--btn-blue-dk);   --btn-bd: var(--btn-blue);   --btn-fg: #ffffff; }
.btn-red    { --btn: var(--btn-red);    --btn-dk: var(--btn-red-dk);    --btn-bd: var(--btn-red);    --btn-fg: #ffffff; }
.btn-yellow { --btn: var(--btn-yellow); --btn-dk: var(--btn-yellow-dk); --btn-bd: var(--btn-yellow); --btn-fg: #161616; }
.btn-purple { --btn: var(--btn-purple); --btn-dk: var(--btn-purple-dk); --btn-bd: var(--btn-purple); --btn-fg: #ffffff; }
.btn-gray   { --btn: var(--btn-gray);   --btn-dk: var(--btn-gray-dk);   --btn-bd: var(--btn-gray-bd); --btn-fg: #ffffff; }

/* Painel: sem cor definida o botão é cinza (neutro). "Sair" é sempre vermelho. */
.admin-button,
.admin-logout {
    border: 1px solid var(--btn-bd, var(--btn-gray-bd));
    background: var(--btn, var(--btn-gray));
    color: var(--btn-fg, #ffffff);
}

.admin-logout {
    --btn: var(--btn-red);
    --btn-dk: var(--btn-red-dk);
    --btn-bd: var(--btn-red);
    --btn-fg: #ffffff;
}

.admin-button:hover,
.admin-button:focus-visible,
.admin-logout:hover,
.admin-logout:focus-visible {
    border-color: var(--btn-dk, var(--btn-gray-dk));
    background: var(--btn-dk, var(--btn-gray-dk));
    color: var(--btn-fg, #ffffff);
    outline: none;
}

.admin-button:focus-visible,
.admin-logout:focus-visible,
.admin-icon-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
}

.admin-button:disabled,
.admin-button[aria-disabled='true'] {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-button > i,
.admin-logout > i {
    flex: none;
}

/* Botões só com ícone (ações de tabela) */
.admin-icon-button {
    border: 1px solid var(--btn-bd, var(--btn-gray-bd)) !important;
    background: var(--btn, var(--btn-gray)) !important;
    color: var(--btn-fg, #ffffff) !important;
}

.admin-icon-button:hover,
.admin-icon-button:focus {
    border-color: var(--btn-dk, var(--btn-gray-dk)) !important;
    background: var(--btn-dk, var(--btn-gray-dk)) !important;
}

/* Tema do site (botões inclinados): o vermelho continua sendo a marca; as cores de contexto são opcionais */
.btn-racing-main:is(.btn-green, .btn-blue, .btn-red, .btn-yellow, .btn-purple, .btn-gray) {
    background: var(--btn);
    color: var(--btn-fg);
    box-shadow: 0 18px 40px color-mix(in srgb, var(--btn) 32%, transparent);
}

.btn-racing-main:is(.btn-green, .btn-blue, .btn-red, .btn-yellow, .btn-purple, .btn-gray):hover {
    background: var(--btn-dk);
    color: var(--btn-fg);
}

.btn-racing-outline:is(.btn-green, .btn-blue, .btn-red, .btn-yellow, .btn-purple, .btn-gray) {
    border-color: var(--btn);
    color: #ffffff;
}

.btn-racing-outline:is(.btn-green, .btn-blue, .btn-red, .btn-yellow, .btn-purple, .btn-gray):hover {
    border-color: var(--btn);
    background: var(--btn);
    color: var(--btn-fg);
}

/* Botão ao lado de campo (ex.: cupom): compacto, não espreme o campo em telas estreitas */
.field-row > .field-row-btn {
    min-width: 0;
    padding-left: 16px;
    padding-right: 16px;
}


/* ==========================================================================
   MENU DO PERFIL (topo do painel)
   ========================================================================== */
.admin-user {
    position: relative;
}

.admin-user-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 320px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.admin-user-trigger:hover,
.admin-user-trigger[aria-expanded='true'] {
    border-color: var(--btn-gray-bd);
    background: rgba(255, 255, 255, 0.09);
}

.admin-user-trigger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.35);
}

.admin-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.admin-user-info strong,
.admin-user-info small {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-info strong {
    font-size: 0.95rem;
}

.admin-user-info small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.admin-user-caret {
    flex: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.admin-user-trigger[aria-expanded='true'] .admin-user-caret {
    transform: rotate(180deg);
}

.admin-user-menu {
    min-width: 320px;
    color: #ffffff; /* o Bootstrap define texto escuro no dropdown: aqui o tema do painel manda */
    margin-top: 8px !important;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: #101010;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.admin-user-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 10px 12px;
}

.admin-user-card strong {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.admin-user-card small {
    color: var(--text-muted);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.admin-user-role {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border: 1px solid var(--border);
    font-family: 'Oswald', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-user-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-family: 'Oswald', sans-serif;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-user-menu .dropdown-item i {
    width: 18px;
    color: var(--text-muted);
    text-align: center;
}

.admin-user-menu .dropdown-item:hover,
.admin-user-menu .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.admin-user-menu .dropdown-divider {
    margin: 6px 0;
    border-color: var(--border);
}

.admin-user-menu .admin-user-sair,
.admin-user-menu .admin-user-sair i {
    color: #ff6b73;
}

.admin-user-menu .admin-user-sair:hover {
    background: rgba(227, 6, 19, 0.16);
}

@media (max-width: 700px) {
    /* Telas pequenas: o e-mail some do topo (continua visível no menu aberto) */
    .admin-user-info small {
        display: none;
    }

    .admin-user-info strong {
        max-width: 140px;
    }
}

/* ==========================================================================
   TEMA CLARO DO PAINEL — sobrepõe só o painel; o escuro é o padrão e o site público não muda
   ========================================================================== */
html[data-theme='light'] .admin-body {
    --border: rgba(17, 24, 39, 0.12);
    --text-muted: #6b7280;
    --surface: #ffffff;
    --surface-light: #ffffff;
    --btn-gray: #e5e7eb;
    --btn-gray-dk: #d1d5db;
    --btn-gray-bd: #cbd5e1;
    --btn-fg: #111827;
    background: #f1f3f6;
    color: #111827;
    color-scheme: light;
}

html[data-theme='light'] .admin-body.admin-body::before {
    display: none;
}

html[data-theme='light'] .admin-body .btn-gray {
    --btn-fg: #111827;
}

/* Menu lateral */
html[data-theme='light'] .admin-sidebar {
    border-right-color: #e5e7eb;
    background: #ffffff;
}

html[data-theme='light'] .admin-brand {
    margin-bottom: 22px;
    background: transparent;
}

/* Sem o fundo preto: o contorno escuro nas letras brancas mantém a logo legível sobre o claro */
html[data-theme='light'] .admin-brand img {
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.9)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

html[data-theme='light'] .admin-nav > a,
html[data-theme='light'] .admin-nav-group {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #111827;
}

html[data-theme='light'] .admin-nav > a:hover {
    border-color: #d1d5db;
    background: #eef0f4;
    color: #111827;
}

html[data-theme='light'] .admin-nav > a.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

html[data-theme='light'] .admin-nav-group > summary {
    color: #111827;
}

html[data-theme='light'] .admin-nav-group > summary:hover {
    background: rgba(17, 24, 39, 0.05);
}

html[data-theme='light'] .admin-nav-sub {
    background: #ffffff;
}

html[data-theme='light'] .admin-nav .admin-nav-sub a {
    background: transparent;
    color: #111827;
}

html[data-theme='light'] .admin-nav .admin-nav-sub a:hover,
html[data-theme='light'] .admin-nav .admin-nav-sub a.active {
    border-left-color: var(--primary);
    background: rgba(227, 6, 19, 0.1);
    color: #111827;
}

/* Cartões, topo e blocos internos */
html[data-theme='light'] .admin-topbar,
html[data-theme='light'] .admin-card {
    border-color: #e5e7eb;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
}

html[data-theme='light'] .admin-list a,
html[data-theme='light'] .admin-info-grid div,
html[data-theme='light'] .admin-photo-card,
html[data-theme='light'] .admin-import-card,
html[data-theme='light'] .admin-lote-summary > div,
html[data-theme='light'] .admin-validation,
html[data-theme='light'] .admin-chart-card,
html[data-theme='light'] .form-group-card {
    border-color: #e5e7eb;
    background: #f9fafb;
}

html[data-theme='light'] .admin-code,
html[data-theme='light'] .admin-folder-picker span,
html[data-theme='light'] .admin-upload-progress-bar,
html[data-theme='light'] .admin-upload-log,
html[data-theme='light'] .admin-photo-card img {
    border-color: #e5e7eb;
    background: #f3f4f6;
    color: #111827;
}

html[data-theme='light'] .admin-info-grid strong,
html[data-theme='light'] .admin-info-grid a,
html[data-theme='light'] .admin-actions a:not(.admin-icon-button),
html[data-theme='light'] .admin-card-header a:not(.admin-button),
html[data-theme='light'] .admin-folder-picker span {
    color: #111827;
}

html[data-theme='light'] .admin-alert {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #111827;
}

html[data-theme='light'] .admin-alert-error {
    border-color: #fda4af;
    background: #fff1f2;
}

/* Status (chips): os neutros ficam claros; os coloridos mantêm o tom próprio */
html[data-theme='light'] .admin-status {
    color: #111827 !important;
}

html[data-theme='light'] .admin-status:not([class*='admin-status-']) {
    background: #f3f4f6;
}

/* Paginação */
html[data-theme='light'] .admin-pagination-list a,
html[data-theme='light'] .admin-pagination-list span {
    border-color: #e5e7eb;
    background: #ffffff;
    color: #111827;
}

html[data-theme='light'] .admin-pagination-list li.active span {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

html[data-theme='light'] .admin-pagination-list li.disabled span {
    background: #f3f4f6;
}

/* Menus suspensos (ações da tabela e menu do perfil) */
html[data-theme='light'] .admin-dropdown-menu,
html[data-theme='light'] .admin-user-menu {
    border-color: #e5e7eb;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.14);
}

html[data-theme='light'] .admin-dropdown-menu .dropdown-item,
html[data-theme='light'] .admin-user-menu .dropdown-item {
    color: #111827;
}

html[data-theme='light'] .admin-dropdown-menu .dropdown-item:hover,
html[data-theme='light'] .admin-dropdown-menu .dropdown-item:focus,
html[data-theme='light'] .admin-user-menu .dropdown-item:hover,
html[data-theme='light'] .admin-user-menu .dropdown-item:focus {
    background: #f3f4f6;
    color: #111827;
}

html[data-theme='light'] .admin-user-menu .admin-user-sair,
html[data-theme='light'] .admin-user-menu .admin-user-sair i {
    color: #b91c1c;
}

html[data-theme='light'] .admin-user-menu .admin-user-sair:hover {
    background: #fee2e2;
}

html[data-theme='light'] .admin-user-trigger {
    background: #f9fafb;
}

html[data-theme='light'] .admin-user-trigger:hover,
html[data-theme='light'] .admin-user-trigger[aria-expanded='true'] {
    background: #eef0f4;
}

/* Formulários */
html[data-theme='light'] .admin-body .form {
    --f-bg: #ffffff;
    --f-border: #d1d5db;
    --f-border-hover: #9ca3af;
}

html[data-theme='light'] .admin-body .field-label,
html[data-theme='light'] .admin-body .form-section-title,
html[data-theme='light'] .admin-body .field-check-text {
    color: #111827;
}

html[data-theme='light'] .admin-body .field-control {
    color: #111827;
    color-scheme: light;
}

html[data-theme='light'] .admin-body .field-control::placeholder {
    color: #9ca3af;
}

html[data-theme='light'] .admin-body select.field-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23374151' stroke-width='1.6' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
}

html[data-theme='light'] .admin-body select.field-control option {
    background: #ffffff;
    color: #111827;
}

html[data-theme='light'] .admin-body input[type='file'].field-control::file-selector-button {
    border-color: #cbd5e1;
    background: #f3f4f6;
    color: #111827;
}

html[data-theme='light'] .admin-body .field-check input {
    border-color: rgba(17, 24, 39, 0.4);
}

html[data-theme='light'] .admin-body .field.has-error .field-control {
    background-color: #fef2f2;
}

html[data-theme='light'] .admin-body .field-error {
    color: #b91c1c;
}

html[data-theme='light'] .admin-body .field-toggle:hover,
html[data-theme='light'] .admin-body .field-toggle:focus-visible {
    color: #111827;
}

html[data-theme='light'] .admin-body .form-actions-sticky {
    background: linear-gradient(to top, #ffffff 70%, rgba(255, 255, 255, 0.9));
}

html[data-theme='light'] .admin-body .admin-button:focus-visible,
html[data-theme='light'] .admin-body .admin-logout:focus-visible,
html[data-theme='light'] .admin-body .admin-icon-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

/* Tema claro: o texto de apoio dentro de uma caixa marcada (fundo rosado) precisa de mais contraste */
html[data-theme='light'] .admin-body .field-check-text small {
    color: #4b5563;
}

/* ==========================================================================
   MINIATURAS DOS CARROS (ranking do site e do painel)
   ========================================================================== */
.car-thumb {
    display: block;
    flex: none;
    width: 76px;
    height: 52px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    background: #111111;
    object-fit: cover;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.car-thumb-sm {
    width: 56px;
    height: 38px;
    border-width: 1px;
    border-radius: 8px;
}

.car-thumb-lg {
    width: 100%;
    max-width: 160px;
    height: 108px;
    border-radius: 12px;
}

.car-thumb-podium {
    width: 104px;
    height: 64px;
    border-color: rgba(227, 6, 19, 0.7);
    border-radius: 12px;
}

.rank-pos,
.podium-position {
    display: flex;
    align-items: center;
    gap: 14px;
}

.car-cell {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.ranking-table tr:hover .car-thumb {
    border-color: var(--primary);
    transform: scale(1.04);
}

html[data-theme='light'] .admin-body .car-thumb {
    border-color: #d1d5db;
}
