*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:'Poppins',sans-serif;
    background:radial-gradient(circle at top, #1f2937 0, #020617 55%, #000 100%);
    color:#f9fafb;
    -webkit-font-smoothing:antialiased;
}

.topbar{
    background:rgba(37,99,235,0.95);
    padding:6px 16px;
    text-align:center;
    font-size:12px;
    letter-spacing:0.08em;
    text-transform:uppercase;
    color:#e5e7eb;
}

header{
    position:sticky;
    top:0;
    z-index:20;
    backdrop-filter:blur(20px);
    background:linear-gradient(to right, rgba(15,23,42,0.9), rgba(30,64,175,0.9));
    border-bottom:1px solid rgba(148,163,184,0.25);
    padding:14px 6vw;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:24px;
}

.logo{
    font-size:20px;
    font-weight:700;
    letter-spacing:0.16em;
    text-transform:uppercase;
    color:#e5e7eb;
}

nav{
    display:flex;
    align-items:center;
    gap:8px;
    flex:1;
    justify-content:center;
    overflow-x:auto;
    padding:4px 0;
}

nav::-webkit-scrollbar{
    height:4px;
}
nav::-webkit-scrollbar-thumb{
    background:rgba(148,163,184,0.6);
    border-radius:999px;
}

nav button{
    background:rgba(15,23,42,0.6);
    border:1px solid transparent;
    color:#e5e7eb;
    padding:8px 18px;
    border-radius:999px;
    cursor:pointer;
    font-size:13px;
    font-weight:500;
    white-space:nowrap;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

nav button:hover{
    background:rgba(30,64,175,0.85);
    border-color:rgba(96,165,250,0.7);
    transform:translateY(-1px);
}

nav button.active{
    background:linear-gradient(135deg,#2563eb,#22c55e);
    border-color:transparent;
    color:#f9fafb;
}

.admin-area{
    display:flex;
    align-items:center;
    gap:8px;
}

.admin-area button{
    padding:7px 14px;
    border:none;
    border-radius:999px;
    cursor:pointer;
    font-weight:600;
    font-size:12px;
    letter-spacing:0.06em;
    text-transform:uppercase;
    transition:background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.login-btn{
    background:#0f172a;
    color:#e5e7eb;
    border:1px solid rgba(148,163,184,0.5);
}

.logout-btn{
    background:#b91c1c;
    color:#f9fafb;
}

.admin-area button:hover{
    transform:translateY(-1px);
    box-shadow:0 8px 16px rgba(15,23,42,0.35);
}

.hero{
    position:relative;
    min-height:260px;
    background:
        linear-gradient(135deg, rgba(15,23,42,0.85), rgba(37,99,235,0.8)),
        url("https://cdn.discordapp.com/attachments/1352233540728787014/1476267262615748741/banner.gif?ex=69a08087&is=699f2f07&hm=e9b546ddd4884f466a3d1519b3639c2473bd9a4154ff450b7793a31dc4445323&")
        center/cover no-repeat;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:40px 6vw 56px;
}

.hero-overlay{
    max-width:960px;
    width:100%;
    text-align:center;
    color:#e5e7eb;
}

.hero-title{
    font-size:32px;
    font-weight:700;
    letter-spacing:0.08em;
    text-transform:uppercase;
    margin-bottom:10px;
}

.hero-highlight{
    color:#60a5fa;
}

.hero-subtitle{
    font-size:14px;
    color:#cbd5f5;
    max-width:640px;
    margin:0 auto;
}

.container{
    width:92%;
    max-width:1240px;
    margin:32px auto 64px;
}

section{
    display:none;
    margin-bottom:40px;
}

section.active{
    display:block;
}

section h2{
    margin-bottom:18px;
    color:#e5e7eb;
    font-size:18px;
    font-weight:600;
    letter-spacing:0.12em;
    text-transform:uppercase;
    display:inline-flex;
    align-items:center;
    gap:8px;
}

section h2::before{
    content:"";
    width:32px;
    height:2px;
    border-radius:999px;
    background:linear-gradient(90deg,#2563eb,#22c55e);
}

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:24px;
}

.card{
    background:radial-gradient(circle at top left, rgba(37,99,235,0.2), rgba(15,23,42,0.95));
    border-radius:18px;
    overflow:hidden;
    border:1px solid rgba(30,64,175,0.7);
    box-shadow:0 18px 40px rgba(15,23,42,0.55);
    transition:
        transform 0.18s ease-out,
        box-shadow 0.18s ease-out,
        border-color 0.18s ease-out,
        background 0.18s ease-out;
}

.card.disponivel{
    border-color:rgba(34,197,94,0.9);
    box-shadow:0 20px 46px rgba(22,163,74,0.55);
}

.card:hover{
    transform:translateY(-4px);
    box-shadow:0 24px 60px rgba(15,23,42,0.8);
}

.card img{
    width:100%;
    height:200px;
    object-fit:cover;
    display:block;
}

.card .info{
    padding:16px 16px 18px;
}

.card .info h3{
    font-size:16px;
    margin-bottom:4px;
}

.card .info p{
    font-size:13px;
    color:#cbd5f5;
    margin-bottom:12px;
}

.actions{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.details-btn,
.concurso-btn,
.edit-btn,
.status-btn{
    border:none;
    padding:8px 12px;
    border-radius:999px;
    cursor:pointer;
    font-size:12px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:0.06em;
    transition:background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.details-btn{
    background:rgba(59,130,246,0.18);
    color:#bfdbfe;
    border:1px solid rgba(59,130,246,0.7);
}

.details-btn:hover{
    background:rgba(59,130,246,0.35);
    transform:translateY(-1px);
    box-shadow:0 10px 18px rgba(37,99,235,0.5);
}

.concurso-btn{
    background:rgba(234,179,8,0.18);
    color:#fde047;
    border:1px solid rgba(234,179,8,0.7);
}

.concurso-btn:hover{
    background:rgba(234,179,8,0.35);
    transform:translateY(-1px);
    box-shadow:0 10px 18px rgba(234,179,8,0.5);
}

.edit-btn{
    background:rgba(168,85,247,0.18);
    color:#e9d5ff;
    border:1px solid rgba(168,85,247,0.7);
}

.edit-btn:hover{
    background:rgba(168,85,247,0.35);
    transform:translateY(-1px);
    box-shadow:0 10px 18px rgba(168,85,247,0.5);
}

.status-btn{
    min-width:120px;
    color:#f9fafb;
}

.status-indisponivel{
    background:#b91c1c;
}

.status-disponivel{
    background:#16a34a;
}

.status-btn:hover:not(:disabled){
    transform:translateY(-1px);
    box-shadow:0 10px 18px rgba(15,23,42,0.6);
}

.status-btn:disabled{
    opacity:0.55;
    cursor:not-allowed;
    box-shadow:none;
}

.modal{
    position:fixed;
    inset:0;
    width:100%;
    height:100%;
    background:rgba(15,23,42,0.85);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:30;
}

.modal-content{
    background:rgba(15,23,42,0.96);
    border-radius:18px;
    padding:24px 22px 22px;
    width:90%;
    max-width:380px;
    box-shadow:0 24px 60px rgba(15,23,42,0.95);
    border:1px solid rgba(148,163,184,0.55);
}

.modal-content h3{
    margin-bottom:6px;
}

.modal-content input{
    width:100%;
    padding:10px 11px;
    margin-top:10px;
    border-radius:10px;
    border:1px solid rgba(148,163,184,0.7);
    background:#020617;
    color:#e5e7eb;
    font-size:13px;
}

.modal-content input:focus{
    outline:none;
    border-color:#3b82f6;
    box-shadow:0 0 0 1px rgba(59,130,246,0.5);
}

.modal-content button{
    margin-top:15px;
    padding:9px 14px;
    border:none;
    border-radius:999px;
    cursor:pointer;
    font-size:12px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:0.06em;
}

.modal-content button:first-of-type{
    background:#2563eb;
    color:#f9fafb;
}

.modal-content button:last-of-type{
    background:#0f172a;
    color:#e5e7eb;
    border:1px solid rgba(148,163,184,0.7);
}

.modal-edit{
    max-width:520px;
}

.modal-edit label{
    display:block;
    margin-top:14px;
    margin-bottom:6px;
    font-size:12px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:0.06em;
    color:#cbd5e1;
}

.modal-edit select{
    width:100%;
    padding:10px 11px;
    border-radius:10px;
    border:1px solid rgba(148,163,184,0.7);
    background:#020617;
    color:#e5e7eb;
    font-size:13px;
    cursor:pointer;
}

.modal-edit select:focus{
    outline:none;
    border-color:#3b82f6;
    box-shadow:0 0 0 1px rgba(59,130,246,0.5);
}

.modal-edit textarea{
    width:100%;
    padding:10px 11px;
    margin-top:0;
    border-radius:10px;
    border:1px solid rgba(148,163,184,0.7);
    background:#020617;
    color:#e5e7eb;
    font-size:13px;
    font-family:'Poppins',sans-serif;
    resize:vertical;
}

.modal-edit textarea:focus{
    outline:none;
    border-color:#3b82f6;
    box-shadow:0 0 0 1px rgba(59,130,246,0.5);
}

.modal-actions{
    display:flex;
    gap:10px;
    margin-top:20px;
}

.modal-actions .btn-primary{
    background:#2563eb;
    color:#f9fafb;
    flex:1;
}

.modal-actions .btn-primary:hover{
    background:#1d4ed8;
    transform:translateY(-1px);
    box-shadow:0 10px 18px rgba(37,99,235,0.5);
}

.modal-actions .btn-secondary{
    background:#0f172a;
    color:#e5e7eb;
    border:1px solid rgba(148,163,184,0.7);
    flex:1;
}

.modal-actions .btn-secondary:hover{
    background:#1e293b;
    transform:translateY(-1px);
}

#concursoLinkBtn{
    background:#eab308;
    color:#0f172a;
    font-weight:700;
    margin-top:12px;
    margin-bottom:8px;
}

#concursoLinkBtn:hover{
    background:#ca8a04;
    transform:translateY(-1px);
    box-shadow:0 10px 18px rgba(234,179,8,0.5);
}

.login-error{
    color:#f97373;
    margin-top:8px;
    font-size:12px;
    min-height:18px;
}

/* ---------- Responsividade ---------- */

@media (max-width:900px){
    header{
        flex-wrap:wrap;
        justify-content:space-between;
        padding:12px 4vw;
        row-gap:10px;
    }

    .logo{
        font-size:18px;
    }

    .hero{
        padding:28px 4vw 40px;
        min-height:220px;
    }

    .hero-title{
        font-size:26px;
    }

    .container{
        margin-top:24px;
        width:94%;
    }
}

@media (max-width:600px){
    header{
        flex-direction:column;
        align-items:flex-start;
    }

    nav{
        width:100%;
        justify-content:flex-start;
    }

    .admin-area{
        align-self:flex-end;
    }

    .hero-title{
        font-size:22px;
    }

    .hero-subtitle{
        font-size:13px;
    }

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