/* =========================
 *  RESET / BASE
 = *======================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;

    background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 35%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.10), transparent 35%),
    #f4f7fb;

    color: #172033;
    padding: 30px 20px;
}


/* =========================
 *  TÍTULOS
 = *======================== */

h1,
h2,
h3 {
    text-align: center;
    color: #172033;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 30px;
}

h3 {
    font-size: 22px;
}


/* =========================
 *  INFORMAÇÕES
 = *======================== */

.count-info {
    text-align: center;
    font-weight: 700;
    color: #2563eb;
    margin: 15px 0;
}


/* =========================
 *  CONTAINERS
 = *======================== */

.container {
    width: 100%;
    max-width: 850px;

    margin: 30px auto;
    padding: 30px;

    background: rgba(255, 255, 255, 0.94);

    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;

    box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.08),
    0 2px 8px rgba(15, 23, 42, 0.04);

    animation: aparecer 0.55s ease-out;

    transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.container:hover {
    transform: translateY(-3px);

    box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.12),
    0 4px 12px rgba(15, 23, 42, 0.06);
}


/* =========================
 *  FORMULÁRIO
 = *======================== */

form {
    width: 100%;
}

label {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;
    font-weight: 700;

    color: #334155;
}


/* Campos */

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {

    width: 100%;

    padding: 12px 14px;

    margin-bottom: 8px;

    border: 1px solid #cbd5e1;
    border-radius: 10px;

    background-color: #f8fafc;

    color: #172033;

    font-size: 15px;

    outline: none;

    transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}


/* Hover do campo */

input:hover,
select:hover,
textarea:hover {
    border-color: #94a3b8;
    background-color: #ffffff;
}


/* Campo selecionado */

input:focus,
select:focus,
textarea:focus {

    border-color: #2563eb;

    background-color: #ffffff;

    box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.12);

    transform: translateY(-1px);
}


/* =========================
 *  BOTÕES
 = *======================== */

button {
    width: 100%;

    margin-top: 10px;
    padding: 13px 20px;

    border: none;
    border-radius: 11px;

    background: linear-gradient(
        135deg,
        #2563eb,
        #0ea5e9
    );

    color: white;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
    0 5px 15px rgba(37, 99, 235, 0.22);

    transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}


button:hover {

    transform: translateY(-2px);

    box-shadow:
    0 10px 25px rgba(37, 99, 235, 0.30);

    filter: brightness(1.05);
}


button:active {

    transform: translateY(0) scale(0.98);

    box-shadow:
    0 3px 8px rgba(37, 99, 235, 0.20);
}


/* =========================
 *  TABELA
 = *======================== */

table {

    width: 100%;

    border-collapse: separate;
    border-spacing: 0;

    overflow: hidden;

    margin: 5px auto;

    background-color: white;

    border-radius: 12px;

    border: 1px solid #e2e8f0;

    box-shadow:
    0 6px 20px rgba(15, 23, 42, 0.06);
}


/* Cabeçalho */

th {

    padding: 15px 12px;

    background: linear-gradient(
        135deg,
        #1e3a8a,
        #2563eb
    );

    color: white;

    font-size: 14px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    border: none;
}


/* Células */

td {

    padding: 14px 12px;

    text-align: center;

    border: none;
    border-bottom: 1px solid #e2e8f0;

    color: #334155;

    transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}


/* Linhas */

tr {
    transition:
    background-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}


/* Zebra */

tbody tr:nth-child(even) td {
    background-color: #f8fafc;
}


/* Hover */

tbody tr:hover td {

    background-color: #eff6ff;

    color: #172033;
}


tbody tr:hover {

    transform: scale(1.005);

    box-shadow:
    0 4px 15px rgba(37, 99, 235, 0.08);
}


/* Remove borda da última linha */

tbody tr:last-child td {
    border-bottom: none;
}


/* =========================
 *  LINKS
 = *======================== */

a {
    color: #2563eb;

    text-decoration: none;

    font-weight: 600;

    transition:
    color 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}


a:hover {
    color: #1d4ed8;
}


/* Link de excluir */

td a[href*="excluir"] {

    display: inline-block;

    padding: 7px 12px;

    background-color: #fff1f2;

    color: #e11d48;

    border: 1px solid #fecdd3;

    border-radius: 8px;

    font-size: 13px;

    transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}


td a[href*="excluir"]:hover {

    background-color: #e11d48;

    color: white;

    transform: translateY(-2px);

    box-shadow:
    0 5px 12px rgba(225, 29, 72, 0.22);
}


td a[href*="excluir"]:active {
    transform: scale(0.96);
}


/* =========================
 *  BOX
 = *======================== */

.box {

    width: 200px;
    height: 200px;

    background: linear-gradient(
        135deg,
        #22c55e,
        #16a34a
    );

    color: white;

    font-size: 20px;
    font-weight: 700;

    display: flex;

    justify-content: center;
    align-items: center;

    border-radius: 16px;

    box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.12);

    transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}


.box:hover {

    transform:
    translateY(-8px)
    scale(1.03);

    box-shadow:
    0 18px 35px rgba(0, 0, 0, 0.16);
}


.box:nth-child(2) {

    background: linear-gradient(
        135deg,
        #3b82f6,
        #2563eb
    );
}


.box:nth-child(3) {

    background: linear-gradient(
        135deg,
        #f97316,
        #ea580c
    );
}


/* =========================
 *  ANIMAÇÕES
 = *======================== */

@keyframes aparecer {

    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================
 *  SCROLLBAR
 = *======================== */

::-webkit-scrollbar {
    width: 9px;
}

::-webkit-scrollbar-track {
    background: #eef2f7;
}

::-webkit-scrollbar-thumb {

    background: #94a3b8;

    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}


/* =========================
 *  RESPONSIVO
 = *======================== */

@media (max-width: 700px) {

    body {
        padding: 15px 10px;
    }

    .container {

        padding: 20px 15px;

        margin: 20px auto;

        border-radius: 14px;
    }

    table {

        font-size: 13px;

        display: block;

        overflow-x: auto;

        white-space: nowrap;
    }

    th,
    td {
        padding: 11px 9px;
    }

    h2 {
        font-size: 24px;
    }
}
