/* Copa Poliedro - Album da Cultura (estilo v22) */
:root {
    --blue: #003B7A;
    --blue2: #0057B8;
    --green: #00A859;
    --yellow: #FFD200;
    --white: #ffffff;
    --soft: #F4F8FC;
    --dark: #0F1F33;
    --muted: #6B7A90;
    --card: #ffffff;
    --danger: #D64545;
    --success: #13A36B;
    --shadow: 0 18px 45px rgba(0, 39, 84, .14);
    --radius: 22px;
    --font: 'Inter', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--dark);
    background:
        radial-gradient(circle at top left, rgba(255,210,0,.22), transparent 28%),
        radial-gradient(circle at top right, rgba(0,168,89,.16), transparent 32%),
        linear-gradient(180deg, #F7FBFF 0%, #EEF5FB 100%);
    min-height: 100vh;
    line-height: 1.6;
    font-size: 15px;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(14px);
    background: rgba(255,255,255,.82);
    border-bottom: 1px solid rgba(0,59,122,.08);
}

.nav-container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    color: var(--blue);
    text-decoration: none;
}

.brand img {
    height: 58px;
    background: white;
    padding: 6px 10px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    font-size: 16px;
}

.brand-text small {
    font-size: 12px;
    opacity: .7;
    font-weight: 500;
}

nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-link {
    border: 0;
    background: transparent;
    color: var(--blue);
    font-weight: 750;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: .2s;
}

.nav-link:hover, .nav-link.active {
    background: #E8F2FF;
}

.admin-link { color: var(--blue) !important; font-weight: 900; }

/* Container */
.container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 28px 18px 70px;
}

/* Buttons */
.btn {
    border: 0;
    border-radius: 15px;
    padding: 13px 18px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0,0,0,.12);
    transition: .2s transform, .2s opacity;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    line-height: 1.4;
}

.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--yellow); color: #143052; }
.btn-secondary { background: rgba(255,255,255,.16); color: var(--blue); border: 1px solid rgba(0,59,122,.26); }
.btn-blue { background: var(--blue2); color: #fff; }
.btn-blue:hover { background: var(--blue); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #008F4A; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B03636; }
.btn-small { padding: 8px 14px; font-size: 13px; }

/* Cards */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,59,122,.07);
}

.card h3 {
    margin: 0 0 16px;
    color: var(--blue);
    font-size: 18px;
}

/* Grids */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Hero */
.hero {
    overflow: hidden;
    position: relative;
    border-radius: 32px;
    padding: 42px;
    background:
        linear-gradient(135deg, rgba(0,59,122,.96), rgba(0,87,184,.88)),
        repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 10px, transparent 10px 20px);
    color: white;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 30px;
}

.hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -90px;
    width: 310px;
    height: 310px;
    border-radius: 50%;
    background: rgba(255,210,0,.22);
}

.hero h1 {
    font-size: clamp(30px, 4vw, 56px);
    line-height: 1.02;
    margin: 18px 0 14px;
    letter-spacing: -1.6px;
}

.hero p { font-size: 18px; line-height: 1.55; opacity: .92; max-width: 720px; }

.kicker {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: rgba(255,255,255,.15);
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
}

.cup { font-size: 95px; text-align: center; filter: drop-shadow(0 15px 15px rgba(0,0,0,.22)); }

.cup-card {
    width: min(350px, 100%);
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 28px;
    padding: 22px;
    text-align: center;
    backdrop-filter: blur(8px);
}

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.mini-stats div { background: rgba(255,255,255,.12); border-radius: 16px; padding: 12px; }
.mini-stats strong { display: block; font-size: 24px; color: var(--yellow); }

/* Section titles */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 14px;
    margin: 26px 0 16px;
}

.section-title h2 {
    font-size: 30px;
    margin: 0;
    color: var(--blue);
    letter-spacing: -.7px;
}

.section-title p { margin: 6px 0 0; color: var(--muted); }

/* Forms */
label {
    font-weight: 850;
    color: var(--blue);
    font-size: 14px;
    display: block;
    margin-top: 14px;
    margin-bottom: 4px;
}

input, select, textarea {
    width: 100%;
    border: 1px solid #D9E5F2;
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    background: #FBFDFF;
    outline: none;
    margin-top: 7px;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--blue2);
    box-shadow: 0 0 0 3px rgba(0,87,184,.1);
}

textarea { min-height: 92px; resize: vertical; }

/* Progress */
.progress-bar {
    height: 16px;
    background: #E4EDF7;
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--yellow));
    transition: .5s;
    border-radius: 999px;
}

/* Stats */
.stat {
    border-radius: 20px;
    padding: 18px;
    background: linear-gradient(180deg, #fff, #F5FAFF);
    border: 1px solid #E1ECF8;
    text-align: center;
}

.stat b {
    font-size: 30px;
    color: var(--blue);
    display: block;
}

/* Album / Stickers */
.album {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.sticker {
    min-height: 405px;
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(180deg, #fff, #EEF7FF);
    border: 2px solid rgba(255,210,0,.72);
    padding: 14px;
    text-align: center;
    box-shadow: 0 16px 30px rgba(0,59,122,.10);
    transform-style: preserve-3d;
    transition: .28s transform, .28s box-shadow;
}

.sticker:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 0 24px 45px rgba(0,59,122,.22);
}

.sticker.locked {
    filter: grayscale(.88);
    opacity: .72;
}

.sticker::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 14%, rgba(255,210,0,.38), transparent 18%),
        radial-gradient(circle at 82% 12%, rgba(0,168,89,.30), transparent 17%),
        linear-gradient(135deg, rgba(0,168,89,.12), rgba(255,210,0,.12));
    opacity: .9;
    pointer-events: none;
}

.sticker .photo {
    width: 100%;
    height: 235px;
    min-height: 235px;
    border-radius: 18px;
    border: 3px solid rgba(255,210,0,.82);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(circle at 50% 25%, rgba(255,255,255,.75), transparent 18%),
        linear-gradient(180deg, #CDEEFF 0%, #EFFFFE 42%, #009B4E 43%, #007A3D 100%);
    box-shadow: inset 0 -45px 0 rgba(0,168,89,.82);
}

.stadium {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 18px;
}

.crowd {
    position: absolute;
    top: 68px;
    width: 100%;
    height: 24px;
    background:
        radial-gradient(circle, #FFD200 0 3px, transparent 4px) 0 0/18px 12px,
        radial-gradient(circle, #0057B8 0 3px, transparent 4px) 9px 6px/18px 12px,
        radial-gradient(circle, #00A859 0 3px, transparent 4px) 4px 12px/18px 12px;
    opacity: .9;
    z-index: 2;
}

.field-lines {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 68px;
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 18px, rgba(0,0,0,.02) 18px 36px),
        linear-gradient(180deg, #00A859, #007A3D);
    z-index: 2;
}

.field-lines::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 12px;
    width: 58px;
    height: 34px;
    transform: translateX(-50%);
    border: 2px solid rgba(255,255,255,.78);
    border-radius: 50%;
}

.soccer-ball {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, #111 0 5px, transparent 6px),
        radial-gradient(circle at 24% 28%, #111 0 4px, transparent 5px),
        radial-gradient(circle at 72% 30%, #111 0 4px, transparent 5px),
        radial-gradient(circle at 30% 76%, #111 0 4px, transparent 5px),
        radial-gradient(circle at 76% 74%, #111 0 4px, transparent 5px),
        #fff;
    border: 2px solid #111;
    animation: ballFloat 2.4s ease-in-out infinite;
    z-index: 4;
}

.flag {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 46px;
    height: 30px;
    border-radius: 7px;
    background: linear-gradient(135deg, #009B4E 0 35%, #FFD200 36% 64%, #0057B8 65%);
    box-shadow: 0 8px 15px rgba(0,0,0,.12);
    animation: wave 2.2s ease-in-out infinite;
    z-index: 4;
}

.confetti {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle, #FFD200 0 2px, transparent 3px) 12px 18px/44px 44px,
        radial-gradient(circle, #00A859 0 2px, transparent 3px) 30px 8px/52px 52px,
        radial-gradient(circle, #0057B8 0 2px, transparent 3px) 16px 34px/58px 58px;
    opacity: .55;
    animation: confettiMove 4s linear infinite;
    z-index: 1;
}

.value-character {
    position: relative;
    z-index: 5;
    width: auto !important;
    height: auto !important;
    max-width: 92%;
    max-height: 170px;
    object-fit: contain;
    object-position: center;
    image-rendering: auto;
    filter: drop-shadow(0 13px 14px rgba(0,0,0,.20));
    animation: bounce 2.6s ease-in-out infinite;
}

.sticker h3 {
    font-size: 17px;
    margin: 14px 0 6px;
    color: var(--blue);
    position: relative;
    z-index: 3;
}

.sticker .tag, .sticker p, .sticker b {
    position: relative;
    z-index: 3;
}

.tag {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #E8F4FF;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
}

.lock {
    position: absolute;
    inset: 0;
    background: rgba(15,31,51,.48);
    display: grid;
    place-items: center;
    color: white;
    font-size: 44px;
    z-index: 9;
}

@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ballFloat { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(20deg); } }
@keyframes wave { 0%,100% { transform: rotate(-4deg) skewX(0); } 50% { transform: rotate(4deg) skewX(-8deg); } }
@keyframes confettiMove { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 44px 44px, 52px 52px, 58px 58px; } }

/* Missions */
.mission {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 16px;
    align-items: center;
    border: 1px solid #E1ECF8;
    border-radius: 20px;
    padding: 16px;
    background: #FBFDFF;
    margin-bottom: 12px;
}

.mission:hover { border-color: var(--blue2); }

.mission-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: #EAF6FF;
    font-size: 28px;
}

.mission h4 { margin: 0 0 6px; color: var(--blue); }
.mission p { margin: 0; color: var(--muted); font-size: 14px; }

/* Pills */
.pill {
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 900;
    display: inline-block;
}

.pending { background: #FFF5D6; color: #8B6500; }
.approved { background: #DFF8ED; color: #087245; }
.rejected { background: #FEE2E2; color: #991B1B; }
.blocked { background: #EDF1F7; color: #6B7A90; }

/* Value Tabs */
.value-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.value-tabs a {
    border: 1px solid #D9E5F2;
    background: white;
    border-radius: 999px;
    padding: 10px 13px;
    font-weight: 850;
    cursor: pointer;
    color: var(--blue);
    text-decoration: none;
    font-size: 13px;
    transition: .2s;
}

.value-tabs a:hover { border-color: var(--blue2); background: #E8F2FF; }

.value-tabs a.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

/* Tables */
table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
th { text-align: left; color: var(--muted); font-size: 13px; padding: 0 12px; }
td { background: white; padding: 14px 12px; border-top: 1px solid #E5EFF9; border-bottom: 1px solid #E5EFF9; }
td:first-child { border-left: 1px solid #E5EFF9; border-radius: 14px 0 0 14px; }
td:last-child { border-right: 1px solid #E5EFF9; border-radius: 0 14px 14px 0; }

/* Admin Items */
.admin-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid #E1ECF8;
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 12px;
    background: #fff;
}

.admin-item:hover { border-color: var(--blue2); }

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.admin-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #E1ECF8;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
}
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #F0F4FA;
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #F7FAFF; }

/* Toast */
.toast {
    padding: 16px 18px;
    border-radius: 18px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
}

.toast-success { background: #DFF8ED; color: #087245; border: 1px solid #B0EFCF; }
.toast-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }

/* Mission state banners */
.mission-done-banner {
    background: #DFF8ED;
    color: #087245;
    border: 1px solid #B0EFCF;
    border-radius: 14px;
    padding: 18px 20px;
    font-weight: 600;
    font-size: 15px;
}
.mission-pending-banner {
    background: #FEF9EC;
    color: #92610A;
    border: 1px solid #FDDFA0;
    border-radius: 14px;
    padding: 18px 20px;
    font-weight: 600;
    font-size: 15px;
}

/* Modal overlay */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-box {
    background: #fff;
    border-radius: 28px;
    padding: 40px 48px;
    max-width: 460px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: modalPop .35s ease;
}
.modal-trophy {
    font-size: 64px;
    margin-bottom: 12px;
    line-height: 1;
}
.modal-box h2 { color: var(--blue); margin-bottom: 12px; }
.modal-box p { color: #374151; margin-bottom: 8px; }
.modal-box .btn { margin-top: 20px; }

@keyframes modalPop {
    from { transform: scale(.85); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* Certificate */
.certificate {
    text-align: center;
    border: 3px solid var(--yellow);
    border-radius: 28px;
    padding: 28px;
    background: linear-gradient(135deg, #fff, #F7FBFF);
    margin-top: 28px;
}

.certificate h2 { color: var(--blue); }

/* Footer */
footer {
    text-align: center;
    padding: 32px 24px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid rgba(0,59,122,.08);
    background: rgba(255,255,255,.6);
}

/* Responsive */
@media (max-width: 930px) {
    .hero { grid-template-columns: 1fr; }
    .grid-3, .grid-2, .album { grid-template-columns: 1fr; }
    nav { display: flex; overflow: auto; max-width: 100%; }
    .mission, .admin-item { grid-template-columns: 1fr; }
    .hero { padding: 28px; }
    .sticker .photo { height: 250px; }
    .value-character { max-height: 185px; }
}

@media (max-width: 600px) {
    .nav-container { padding: 12px 16px; flex-wrap: wrap; }
    .container { padding: 20px 16px 60px; }
    .card { padding: 18px; }
}
