@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4338ca;
    --secondary: #8b5cf6;
    --accent: #38bdf8;

    --background: #0b1124;
    --surface: #151e36;
    --surface-light: #1e2a47;

    --text: #f8fafc;
    --text-muted: #a5b4cf;

    --border: rgba(255,255,255,0.10);

    --success: #22c55e;
    --danger: #ef4444;

    --radius: 16px;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at 10% 10%, #25245b 0, transparent 35%),
        radial-gradient(circle at 90% 80%, #31205d 0, transparent 35%),
        var(--background);

    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* 2. CABEÇALHO */

header {
    position: relative;
    text-align: center;
    padding: 38px 20px;

    background: linear-gradient(
        120deg,
        #312e81,
        #4f46e5,
        #7c3aed
    );

    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.logo {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    color: white;
    text-shadow: 0 3px 15px rgba(0,0,0,0.2);
}

header p {
    color: #e0e7ff;
    margin-top: 5px;
    font-size: 14px;
}

/* 3. MENU DE NAVEGAÇÃO */

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;

    padding: 18px 20px;

    background: rgba(15,23,42,0.85);
    backdrop-filter: blur(15px);

    border-bottom: 1px solid var(--border);
}

nav button {
    padding: 12px 22px;

    color: var(--text-muted);
    background: transparent;

    border: 1px solid transparent;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: var(--transition);
}

nav button:hover {
    color: white;
    background: rgba(99,102,241,0.2);
    border-color: rgba(129,140,248,0.35);

    transform: translateY(-2px);
}

nav button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* 4. ÁREA PRINCIPAL */

main {
    width: min(1150px, 94%);
    margin: 35px auto;
}

/* 5. PAINÉIS E TELAS */

.tela {
    display: none;

    padding: 32px;

    background: rgba(21,30,54,0.88);
    backdrop-filter: blur(18px);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: 0 15px 45px rgba(0,0,0,0.20);
}

.tela.ativa {
    display: block;
    animation: entrar 0.4s ease;
}

.tela h1 {
    color: #c4b5fd;
    font-size: 27px;
    font-weight: 800;
    margin-bottom: 15px;
}

.tela h2 {
    color: #a5b4fc;
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 18px;
}

.tela p {
    color: var(--text-muted);
}

/* 6. CARDS DO PAINEL */

.cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin: 28px 0;
}

.card {
    position: relative;
    overflow: hidden;

    padding: 28px;

    background: linear-gradient(
        135deg,
        #3730a3,
        #6366f1,
        #7c3aed
    );

    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 18px;

    box-shadow: 0 8px 25px rgba(79,70,229,0.2);

    transition: var(--transition);
}

.card::after {
    content: "";
    position: absolute;

    width: 130px;
    height: 130px;

    right: -35px;
    top: -45px;

    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.card:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 35px rgba(99,102,241,0.35);
}

.card h3 {
    font-size: 15px;
    color: #e0e7ff;
    position: relative;
    z-index: 1;
}

.card p {
    color: white;
    font-size: 38px;
    font-weight: 800;
    margin-top: 10px;

    position: relative;
    z-index: 1;
}

/* 7. FORMULÁRIOS */

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 580px;
}

label {
    color: #c7d2fe;
    font-size: 14px;
    font-weight: 600;
    margin-top: 7px;
}

input,
select {
    width: 100%;
    padding: 14px 16px;

    background: #101a32;
    color: white;

    border: 1px solid #334155;
    border-radius: 10px;

    font-family: inherit;
    font-size: 14px;

    transition: var(--transition);
}

input::placeholder {
    color: #71809b;
}

input:hover,
select:hover {
    border-color: #6366f1;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(99,102,241,0.18);
}

select option {
    background: #151e36;
    color: white;
}

/* 8. BOTÕES DOS FORMULÁRIOS */

form button {
    margin-top: 12px;
    padding: 14px;

    background: linear-gradient(
        135deg,
        var(--primary),
        var(--secondary)
    );

    color: white;

    border: none;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
    transition: var(--transition);
}

form button:hover {
    filter: brightness(1.15);
    transform: translateY(-3px);

    box-shadow: 0 8px 22px rgba(99,102,241,0.3);
}

form button:active {
    transform: scale(0.98);
}

/* 9. CAMPO DE PESQUISA */

#pesquisa {
    margin: 12px 0 20px;
    max-width: 550px;

    background: #101a32;
}

/* 10. TABELAS */

.tabela-container {
    width: 100%;
    overflow-x: auto;

    border: 1px solid var(--border);
    border-radius: 12px;

    margin-top: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

thead {
    background: linear-gradient(
        135deg,
        #4338ca,
        #6366f1
    );
}

th {
    padding: 16px;
    color: white;

    font-size: 13px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

td {
    padding: 15px 16px;

    color: #dbeafe;
    font-size: 13px;

    border-bottom: 1px solid var(--border);
}

tbody tr {
    background: rgba(255,255,255,0.015);
    transition: var(--transition);
}

tbody tr:hover {
    background: rgba(99,102,241,0.12);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* 11. BOTÃO DE EXCLUIR */

.acao {
    padding: 8px 13px;

    color: white;
    background: #dc2626;

    border: none;
    border-radius: 7px;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
    transition: var(--transition);
}

.acao:hover {
    background: #b91c1c;
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
    transform: scale(1.05);
}

/* 12. RODAPÉ */

footer {
    margin-top: 45px;
    padding: 25px 15px;

    text-align: center;

    color: #94a3b8;
    font-size: 13px;

    background: rgba(10,16,34,0.85);
    border-top: 1px solid var(--border);
}

/* 13. ANIMAÇÕES */

@keyframes entrar {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 14. RESPONSIVIDADE */

@media (max-width: 768px) {

    .logo {
        font-size: 29px;
    }

    nav {
        gap: 8px;
    }

    nav button {
        padding: 11px 15px;
    }

    main {
        width: 95%;
        margin: 20px auto;
    }

    .tela {
        padding: 22px;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {

    header {
        padding: 28px 12px;
    }

    .logo {
        font-size: 25px;
    }

    nav {
        flex-direction: column;
    }

    nav button {
        width: 100%;
    }

    .tela {
        padding: 17px;
    }

    .tela h1 {
        font-size: 23px;
    }

    .card p {
        font-size: 32px;
    }
}

/* 15. ACESSIBILIDADE */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}