/* ============================================================
   VOULUTAR — Public Pages Premium CSS
   Dark-first, mobile-first, martial arts aesthetic
   ============================================================ */

/* ── Tokens (Dark Mode Public) ─────────────────────────────── */
:root {
    --pub-bg:           #0A0A12;
    --pub-bg-2:         #0F0F1A;
    --pub-surface:      #13131E;
    --pub-surface-2:    #1A1A28;
    --pub-surface-3:    #20202F;
    --pub-border:       rgba(255,255,255,0.08);
    --pub-border-hover: rgba(230,57,70,0.35);

    --accent:           #E63946;
    --accent-hover:     #FF4757;
    --accent-dim:       rgba(230,57,70,0.15);
    --accent-glow:      0 0 30px rgba(230,57,70,0.25);
    --accent-glow-lg:   0 0 60px rgba(230,57,70,0.18);

    --text-white:       #F0F0F8;
    --text-muted:       #8A8C9E;
    --text-subtle:      #5A5C6E;

    --shadow-card:      0 8px 32px rgba(0,0,0,0.5);
    --shadow-hover:     0 16px 48px rgba(0,0,0,0.7);

    --radius-card:      16px;
    --radius-btn:       12px;
    --radius-badge:     8px;
    --radius-full:      9999px;

    --transition:       all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset base para páginas públicas ─────────────────────── */
.pub-page {
    font-family: 'Segoe UI Variable', 'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif;
    background: var(--pub-bg);
    color: var(--text-white);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

body.pub-page { display: flex; flex-direction: column; }
.pub-main { flex: 1; min-height: calc(100vh - 68px); }
.pub-flash-wrap { padding-top: 20px; }

.pub-skip-link {
    position: fixed;
    z-index: 2000;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    border-radius: 9px;
    color: #fff;
    background: var(--accent);
    text-decoration: none;
    transform: translateY(-150%);
}
.pub-skip-link:focus { transform: translateY(0); }

.pub-page a:focus-visible,
.pub-page button:focus-visible,
.pub-page input:focus-visible,
.pub-page select:focus-visible,
.pub-page textarea:focus-visible {
    outline: 3px solid rgba(255,107,119,.75);
    outline-offset: 3px;
}

/* ── Global box-sizing reset inside public pages ────────────── */
/* Ensures padding doesn't cause elements to overflow their container */
.pub-page *,
.pub-page *::before,
.pub-page *::after {
    box-sizing: border-box;
}

/* Prevent inputs from overflowing their wrapper (critical fix for CakePHP) */
.pub-page input,
.pub-page select,
.pub-page textarea,
.pub-page button {
    max-width: 100%;
}

/* ── Navbar Premium ─────────────────────────────────────────── */
.pub-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 18, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--pub-border);
    padding: 0 24px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pub-nav-links {
    position: absolute;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 6px;
    transform: translateX(-50%);
}
.pub-nav-links a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 0 12px;
    border-radius: 9px;
    color: #8f91a3;
    text-decoration: none;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 650;
}
.pub-nav-links a:hover { color: #f3f3f8; background: rgba(255,255,255,.04); }

.pub-nav-brand {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-white);
}

.pub-nav-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--accent-glow);
    flex-shrink: 0;
}

.pub-nav-brand .brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #FFFFFF 0%, #A0A0C0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pub-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pub-btn-ghost {
    background: transparent;
    border: 1px solid var(--pub-border);
    color: var(--text-muted);
    min-height: 44px;
    padding: 8px 14px;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.pub-btn-ghost:hover {
    border-color: var(--pub-border-hover);
    color: var(--text-white);
    background: var(--accent-dim);
}

.pub-btn-primary {
    background: var(--accent);
    border: none;
    color: #fff;
    min-height: 44px;
    padding: 8px 8px;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(230,57,70,0.3);
    white-space: nowrap;
}
.pub-btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(230,57,70,0.45);
    color: #fff;
}

.pub-btn-primary-lg {
    background: var(--accent);
    border: none;
    color: #fff;
    padding: 16px 28px;
    border-radius: var(--radius-btn);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 24px rgba(230,57,70,0.4);
    width: 100%;
}
.pub-btn-primary-lg:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(230,57,70,0.55);
    color: #fff;
}

.pub-btn-secondary-lg {
    background: transparent;
    border: 1px solid var(--pub-border);
    color: var(--text-muted);
    padding: 16px 28px;
    border-radius: var(--radius-btn);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}
.pub-btn-secondary-lg:hover {
    border-color: var(--pub-border-hover);
    color: var(--text-white);
}

.pub-btn-dashboard {
    background: var(--pub-surface-2);
    border: 1px solid var(--pub-border);
    color: var(--text-white);
    min-height: 44px;
    padding: 8px 14px;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pub-btn-dashboard:hover {
    background: var(--pub-surface-3);
    color: var(--text-white);
}

/* ── Botão Enviar Comprovante (navbar) ─────────────────────── */
.pub-btn-receipt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    min-height: 44px;
    border-radius: var(--radius-btn);
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
}
.pub-btn-receipt:hover {
    background: var(--accent-hover);
    color: #fff;
    opacity: 1;
}

/* ── Hero Section ──────────────────────────────────────────── */
.pub-hero {
    padding: 64px 20px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pub-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(230,57,70,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.pub-hero-title {
    font-size: clamp(28px, 7vw, 52px);
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #FFFFFF 0%, #C0C0D8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pub-hero-subtitle {
    font-size: clamp(15px, 3vw, 18px);
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto 32px;
}

.pub-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-dim);
    border: 1px solid rgba(230,57,70,0.3);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #FF8A8A;
    margin-bottom: 24px;
}

.pub-hero-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
}

/* ── Competitions Grid ──────────────────────────────────────── */
.pub-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.pub-section-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 8px;
}

.pub-section-title {
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-white);
    margin-bottom: 24px;
}

.pub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 64px;
}

@media (min-width: 600px) {
    .pub-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (min-width: 900px) {
    .pub-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

/* ── Competition Card ───────────────────────────────────────── */
.comp-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
}

.comp-card:hover {
    border-color: var(--pub-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
}

.comp-card-thumb {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #1A0A10 0%, #2A1020 50%, #0F0F1A 100%);
}

.comp-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.comp-card:hover .comp-card-thumb img {
    transform: scale(1.05);
}

.comp-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1A0A10 0%, #2A1020 60%, #0D0D1A 100%);
    gap: 8px;
}

.comp-card-thumb-placeholder .placeholder-icon {
    font-size: 36px;
    color: rgba(230,57,70,0.4);
}

.comp-card-thumb-placeholder .placeholder-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    padding: 0 16px;
    line-height: 1.3;
}

.comp-card-date-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(10,10,18,0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--pub-border);
    border-radius: var(--radius-badge);
    padding: 6px 10px;
    text-align: center;
    line-height: 1;
}

.comp-card-date-badge .badge-day {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
    display: block;
}

.comp-card-date-badge .badge-month {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.comp-card-status {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-full);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #10B981;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comp-card-status::before {
    content: '';
    width: 5px;
    height: 5px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

.comp-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comp-card-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.comp-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comp-card-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.comp-card-meta-item i {
    font-size: 14px;
    color: var(--text-subtle);
    flex-shrink: 0;
}

.comp-card-cta {
    background: var(--accent-dim);
    border: 1px solid rgba(230,57,70,0.25);
    color: var(--accent);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    display: block;
    margin-top: auto;
}

.comp-card-cta:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    text-decoration: none;
}

/* ── Empty State ─────────────────────────────────────────────── */
.pub-empty {
    text-align: center;
    padding: 80px 20px;
}

.pub-empty-icon {
    font-size: 64px;
    color: var(--text-subtle);
    margin-bottom: 16px;
}

.pub-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.pub-empty-text {
    font-size: 15px;
    color: var(--text-subtle);
}

/* ── Competition Detail Page ─────────────────────────────────── */
.comp-hero {
    position: relative;
    height: clamp(240px, 45vw, 420px);
    overflow: hidden;
    background: linear-gradient(135deg, #1A0A10 0%, #2A1020 50%, #0F0F1A 100%);
}

.comp-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comp-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10,10,18,0.98) 0%, rgba(10,10,18,0.4) 60%, transparent 100%);
}

.comp-hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #150A0F 0%, #200D1A 40%, #0A0A15 100%);
    position: relative;
}

.comp-hero-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(230,57,70,0.12) 0%, transparent 70%);
}

.comp-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px;
}

@media (min-width: 768px) {
    .comp-hero-content { padding: 40px; }
}

.comp-hero-org {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.comp-hero-title {
    font-size: clamp(24px, 5vw, 42px);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 16px;
}

.comp-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.comp-hero-tag {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-full);
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── Competition Body ────────────────────────────────────────── */
.comp-body {
    padding: 32px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .comp-body {
        display: grid;
        grid-template-columns: 1fr 340px;
        gap: 32px;
        padding: 40px;
    }
}

/* ── Info Cards ──────────────────────────────────────────────── */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.info-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: var(--radius-card);
    padding: 20px 16px;
    transition: var(--transition);
}

.info-card:hover {
    border-color: var(--pub-border-hover);
}

.info-card-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-subtle);
    margin-bottom: 8px;
}

.info-card-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.3;
}

.info-card-icon {
    font-size: 20px;
    color: var(--accent);
    margin-bottom: 10px;
}

/* ── Sidebar CTA Box ─────────────────────────────────────────── */
.comp-cta-box {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: var(--radius-card);
    padding: 28px 24px;
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .comp-cta-box { margin-bottom: 0; }
}

.comp-cta-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.3px;
}

.comp-cta-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.comp-cta-divider {
    height: 1px;
    background: var(--pub-border);
}

.comp-cta-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.comp-cta-detail i {
    width: 32px;
    height: 32px;
    background: var(--pub-surface-2);
    border: 1px solid var(--pub-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--accent);
    flex-shrink: 0;
}

.comp-cta-detail strong {
    color: var(--text-white);
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.comp-cta-detail span {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Registration Page ───────────────────────────────────────── */
.reg-page {
    min-height: calc(100vh - 64px);
    padding: 32px 20px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

.reg-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(800px, 100vw);
    max-width: 100%;
    height: 300px;
    background: radial-gradient(ellipse at center top, rgba(230,57,70,0.10) 0%, transparent 70%);
    pointer-events: none;
}

/* Mobile browsers can create a scrollable layout viewport from an absolute
   decorative layer or a long form control even when no card looks oversized. */
html.pub-page,
body.pub-page,
body.pub-page main {
    max-width: 100%;
    overflow-x: hidden;
}

.reg-page,
.reg-header,
.reg-card,
.reg-card-section,
.reg-card-section form,
.participation-grid,
.participation-card,
.pix-box,
.pix-key-box {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.reg-page * { min-width: 0; }
.reg-page select,
.reg-page input,
.reg-page textarea,
.reg-page button { max-width: 100%; }

.reg-steps-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto 32px;
    box-sizing: border-box;
}

.reg-header {
    width: 100%;
    max-width: 520px;
    text-align: center;
    margin-bottom: 32px;
}

.reg-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 20px;
    transition: var(--transition);
}
.reg-back-link:hover {
    color: var(--accent);
    text-decoration: none;
}

.reg-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-dim);
    border: 1px solid rgba(230,57,70,0.25);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.reg-title {
    font-size: clamp(22px, 6vw, 32px);
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--text-white);
    margin-bottom: 8px;
}

.reg-comp-name {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ── Registration Card ────────────────────────────────────── */
.reg-card {
    width: 100%;
    max-width: 520px;
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    box-sizing: border-box;
}

.reg-card-section {
    padding: 28px 24px;
    border-bottom: 1px solid var(--pub-border);
    box-sizing: border-box;
    width: 100%;
}

.reg-card-section:last-child {
    border-bottom: none;
}

.reg-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-subtle);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reg-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--pub-border);
}

/* ── CakePHP form helper wrapper fix ───────────────────────── */
/* CakePHP wraps each field in <div class="input text required"> etc. */
/* These must not create width overflow or break the layout */
.reg-card-section .input,
.reg-card-section div.input {
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

.reg-card-section .input:last-child {
    margin-bottom: 0;
}

/* ── Form Fields ─────────────────────────────────────────────── */
.reg-form-group {
    margin-bottom: 20px;
    box-sizing: border-box;
    min-width: 0; /* critical: prevents grid items from overflowing */
}

.reg-form-group:last-child {
    margin-bottom: 0;
}

/* ── Two-column grid for date + gender ──────────────────────── */
.reg-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 0;
}

@media (max-width: 480px) {
    .reg-two-col { grid-template-columns: 1fr; }
}

.reg-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.reg-form-label .required {
    color: var(--accent);
    margin-left: 2px;
}

.reg-select,
.reg-input {
    width: 100%;
    min-width: 0;        /* prevents grid overflow */
    box-sizing: border-box;
    background: var(--pub-bg-2);
    border: 1px solid var(--pub-border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--text-white);
    font-family: inherit;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    display: block;
}

.reg-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%238A8C9E' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

.reg-select option {
    background: #1A1A28;
    color: var(--text-white);
}

.reg-select:focus,
.reg-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230,57,70,0.15);
    background: var(--pub-surface-2);
}

.reg-select:hover,
.reg-input:hover {
    border-color: rgba(255,255,255,0.15);
}

/* ── PIX Box ─────────────────────────────────────────────────── */
.pix-box {
    background: var(--pub-bg-2);
    border: 1px solid rgba(230,57,70,0.2);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.pix-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.pix-icon-wrap {
    width: 40px;
    height: 40px;
    background: var(--accent-dim);
    border: 1px solid rgba(230,57,70,0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

.pix-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
}

.pix-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.pix-key-box {
    background: var(--pub-surface-2);
    border: 1px solid var(--pub-border);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.pix-key-label {
    font-size: 12px;
    color: var(--text-subtle);
    margin-bottom: 2px;
}

.pix-key-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.pix-copy-btn {
    background: var(--pub-surface-3);
    border: 1px solid var(--pub-border);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.pix-copy-btn:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

/* ── File Upload ─────────────────────────────────────────────── */
.file-upload-area {
    border: 2px dashed var(--pub-border);
    border-radius: 14px;
    padding: 32px 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.file-upload-area:hover,
.file-upload-area.dragover,
.file-upload-area.has-file {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.file-upload-icon {
    font-size: 32px;
    color: var(--text-subtle);
    margin-bottom: 10px;
}

.file-upload-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.file-upload-hint {
    font-size: 12px;
    color: var(--text-subtle);
}

/* ── Auth Gate ─────────────────────────────────────────────── */
.auth-gate {
    text-align: center;
    padding: 40px 20px;
}

.auth-gate-icon {
    width: 80px;
    height: 80px;
    background: var(--pub-surface-2);
    border: 1px solid var(--pub-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--accent);
    margin: 0 auto 20px;
}

.auth-gate-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 8px;
}

.auth-gate-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.auth-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Athlete Badge ─────────────────────────────────────────── */
.athlete-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--pub-bg-2);
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 12px;
    padding: 14px 16px;
}

.athlete-badge-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent) 0%, #FF6B6B 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.athlete-badge-info {
    flex: 1;
}

.athlete-badge-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-white);
}

.athlete-badge-role {
    font-size: 12px;
    color: #10B981;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.athlete-badge-role::before {
    content: '';
    width: 5px;
    height: 5px;
    background: #10B981;
    border-radius: 50%;
}

/* ── Footer ──────────────────────────────────────────────────── */
.pub-footer {
    background: var(--pub-surface);
    border-top: 1px solid var(--pub-border);
    padding: 44px 24px 22px;
    color: #87899a;
    font-size: 13px;
}

.pub-footer-inner {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(420px, 1.25fr);
    gap: 70px;
    width: min(1180px, 100%);
    margin: 0 auto;
}
.pub-footer-brand p { max-width: 310px; margin: 17px 0 0; color: #858799; line-height: 1.6; }
.pub-footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.pub-footer-links div { display: grid; align-content: start; gap: 10px; }
.pub-footer-links strong { margin-bottom: 3px; color: #d6d7e0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.pub-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    width: min(1180px, 100%);
    margin: 38px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--pub-border);
    color: #6d6f81;
    font-size: 11px;
}

.pub-footer a {
    color: var(--text-muted);
    text-decoration: none;
}
.pub-footer a:hover {
    color: var(--accent);
}

/* ── Flash Messages ──────────────────────────────────────────── */
.message,
.pub-flash-wrap .message {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}
.message.hidden {
    display: none !important;
}
.pub-flash-success,
.message.success {
    background: rgba(16,185,129,0.14);
    border: 1px solid rgba(16,185,129,0.35);
    color: #6EE7B7;
	padding:10px
}
.pub-flash-error,
.message.error {
    background: rgba(230,57,70,0.14);
    border: 1px solid rgba(230,57,70,0.35);
    color: #FF9E9E;
	padding:10px
}
.pub-flash-warning,
.message.warning {
    background: rgba(245,158,11,0.14);
    border: 1px solid rgba(245,158,11,0.35);
    color: #FCD34D;
	padding:10px
}
.pub-flash-info,
.message.info {
    background: rgba(59,130,246,0.14);
    border: 1px solid rgba(59,130,246,0.35);
    color: #93C5FD;
	padding:10px
}

/* ── Account Conflict Callout Box ────────────────────────────── */
.reg-conflict-box {
    background: linear-gradient(135deg, rgba(230,57,70,0.12) 0%, rgba(20,20,32,0.95) 100%);
    border: 1px solid rgba(230,57,70,0.4);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    box-shadow: 0 8px 24px rgba(230,57,70,0.1);
    animation: fadeInSlide 0.3s ease-out;
}
.reg-conflict-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(230,57,70,0.2);
    border: 1px solid rgba(230,57,70,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #FF6B6B;
    flex-shrink: 0;
}
.reg-conflict-body {
    flex: 1;
}
.reg-conflict-title {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    color: #FFF;
}
.reg-conflict-text {
    margin: 0 0 14px 0;
    font-size: 13.5px;
    color: var(--text-muted, #A1A1AA);
    line-height: 1.5;
}
.reg-conflict-text strong {
    color: #FFF;
}
.reg-conflict-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.reg-btn-login-now {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: var(--accent, #E63946);
    color: #FFF;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}
.reg-btn-login-now:hover {
    background: #D62839;
    transform: translateY(-1px);
    color: #FFF;
}
.reg-btn-forgot-pw {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #E4E4E7;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}
.reg-btn-forgot-pw:hover {
    background: rgba(255,255,255,0.14);
    color: #FFF;
}

/* ── Inline Field Validation & Error States ────────────────── */
.reg-input.is-invalid,
.reg-select.is-invalid,
.reg-form-group.has-error .reg-input,
.reg-form-group.has-error .reg-select,
.reg-form-group.has-error .ts-control,
.ts-wrapper.is-invalid .ts-control {
    border-color: #EF4444 !important;
    background-color: rgba(239,68,68,0.06) !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.18) !important;
}

/* ── Mandatory Fields Highlight Card ────────────────────────── */
.reg-mandatory-banner {
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.35);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #FDE68A;
    font-size: 13.5px;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.reg-mandatory-banner i {
    font-size: 18px;
    color: #F59E0B;
    flex-shrink: 0;
    margin-top: 1px;
}
.reg-mandatory-banner strong {
    color: #FFF;
}

.reg-mandatory-subcard {
    background: var(--pub-surface-1, rgba(255,255,255,0.03));
    border: 1px solid var(--pub-border, rgba(255,255,255,0.1));
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
}
.reg-field-helper {
    font-size: 12px;
    color: var(--text-subtle, #A1A1AA);
    margin-top: 5px;
    display: block;
    line-height: 1.4;
}

.field-error-message {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #F87171;
    margin-top: 6px;
    line-height: 1.4;
}
.field-error-message i {
    font-size: 13px;
    flex-shrink: 0;
}
.field-error-message a {
    color: #60A5FA;
    text-decoration: underline;
    margin-left: 4px;
    font-weight: 700;
}

.reg-error-summary {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #FCA5A5;
    font-size: 13.5px;
}
.reg-error-summary strong {
    color: #FFF;
    display: block;
    margin-bottom: 6px;
}
.reg-error-summary ul {
    margin: 0;
    padding-left: 18px;
}
.reg-error-summary li {
    margin-top: 3px;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive tweaks ───────────────────────────────────────── */
@media (max-width: 480px) {
    .pub-nav-actions .pub-btn-ghost span { display: none; }
    .pub-hero { padding: 48px 16px 36px; }
    .info-grid { grid-template-columns: 1fr; }
    .reg-card-section { padding: 20px 18px; }
}

@media (max-width: 900px) {
    .pub-nav-links { display: none; }
    .pub-footer-inner { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 560px) {
    .pub-nav { padding-inline: 14px; }
    .pub-footer-links { grid-template-columns: 1fr 1fr; }
    .pub-footer-bottom { flex-direction: column; }
	.pub-btn-receipt .pp-btn-label { display: none; }
    .pub-btn-receipt { padding-inline: 10px; }
}

@media (max-width: 380px) {
    .pub-nav { padding-inline: 10px; }
    .pub-nav-actions { gap: 5px; }
    .pub-btn-ghost { padding-inline: 10px; }
    .pub-btn-primary { width: 44px; padding: 0; justify-content: center; }
    .pub-btn-primary span { display: none; }
    .pub-nav-brand .brand-name { font-size: 18px; }

}

@media (prefers-reduced-motion: reduce) {
    .pub-page *,
    .pub-page *::before,
    .pub-page *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
