/* IMPORTANDO GOOGLE FONT */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* =========================
   RESET + BASE
========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient( 135deg, var(--verde-medio) 0%, #9bd7d2 70%, var(--amarelo) 80% );
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    font-family: 'Inter', sans-serif;
    min-height: 100%;
    overflow-y: auto;
}

/* =========================
   TEXT SELECTION
========================= */

::selection {
    background: rgba(0, 117, 124, .28);
    color: #005961;
}

::-moz-selection {
    background: rgba(0, 117, 124, .28);
    color: #005961;
}

/* =========================
   TITULOS
========================= */

h1,
h2,
.user {
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    font-weight: 600;
}

/* =========================
   LAYOUT
========================= */

.app {
    display: flex;
    min-height: 100dvh;
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: 240px;
    background: var(--verde-inova);
    color: var(--branco);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.logo {
    width: 170px;
    margin-bottom: 20px;
}

.user {
    font-size: 20px;
    margin: 20px 0 40px;
    color: var(--amarelo-escuro);
}

/* =========================
   MENU
========================= */

.menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .menu a {
        color: var(--branco);
        text-decoration: none;
        padding: 14px;
        border-radius: 8px;
        transition: 0.25s;
        font-family: 'Cinzel', serif;
        font-size: 14px;
        font-weight: bold;
    }

        .menu a:hover {
            background: var(--amarelo);
            color: var(--verde-escuro);
        }

        .menu a.active {
            background: var(--verde-medio);
            color: var(--verde-escuro);
        }

/* =========================
   HAMBURGER
========================= */

.hamburger {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 30px;
    height: 25px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1020;
}

    .hamburger span {
        display: block;
        height: 3px;
        width: 100%;
        background: var(--branco);
        margin: 5px 0;
        border-radius: 2px;
        transition: 0.3s;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

/* =========================
   OVERLAY
========================= */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 1000;
}

    .overlay.active {
        opacity: 1;
        pointer-events: all;
    }

/* =========================
   MAIN
========================= */

.main {
    flex: 1;
    padding: 20px;
}

/* =========================
   HEADER
========================= */

.header {
    display: flex;
    gap: 30px;
    margin-bottom: 37px;
}

    .header a {
        text-decoration: none;
        color: var(--verde-escuro);
        font-family: 'Cinzel', serif;
        font-weight: bold;
        position: relative;
    }

        .header a.active {
            color: var(--amarelo-escuro);
        }


/* =========================
   CONTENT
========================= */

.content {
    background: var(--amarelo);
    padding: 20px;
    border-radius: 10px;
}

    .content h2 {
        margin-bottom: 25px;
        color: var(--verde-escuro);
    }

/* =========================
   FORM
========================= */

.form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

    .form > .filter-bar,
    .form > .table-container {
        grid-column: 1 / -1;
    }

.form-section {
    grid-column: 1 / -1;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

    .form-section h3 {
        font-size: 12px;
        text-transform: uppercase;
        margin: 10px 0;
        color: var(--verde-escuro);
    }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field {
    display: flex;
    flex-direction: column;
}

    .field label {
        font-size: 11px;
        margin-bottom: 4px;
        color: var(--cinza);
    }

    .field input,
    .field select,
    .field textarea {
        padding: 10px;
        border-radius: 6px;
        border: 2px solid var(--ciano-claro);
        background: var(--branco);
        color: var(--verde-escuro);
        font-size: 14px;
        appearance: none;
    }

        .field input:focus,
        .field select:focus,
        .field textarea:focus {
            outline: none;
            border-color: var(--verde-medio);
            box-shadow: 0 0 0 2px rgba(86,195,202,0.2);
        }

        .field input:disabled,
        .field select:disabled,
        .field textarea:disabled {
            background: #f5f5f5;
            color: #999;
            cursor: not-allowed;
        }

    .field textarea {
        resize: vertical;
        min-height: 90px;
    }

    .field.full {
        grid-column: 1 / -1;
    }

.hidden-field {
    display: none;
}

/* =========================
   BUTTON
========================= */

.btn-primary {
    grid-column: 1 / -1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: var(--verde-escuro);
    color: var(--branco);
    font-weight: bold;
    cursor: pointer;
    transition: 0.25s;
}

    .btn-primary:hover {
        background: var(--verde-medio);
        color: var(--verde-escuro);
    }

    .btn-primary:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

/* =========================
   FILTER BAR
========================= */

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.4);
    padding: 12px;
    border-radius: 10px;
    backdrop-filter: blur(6px);
}

    .filter-bar input,
    .filter-bar select {
        padding: 10px 12px;
        border-radius: 8px;
        border: 2px solid var(--ciano-claro);
        font-size: 14px;
        background: var(--branco);
        color: var(--verde-escuro);
        min-width: 180px;
        transition: 0.2s;
    }

        .filter-bar input:focus,
        .filter-bar select:focus {
            outline: none;
            border-color: var(--verde-medio);
            box-shadow: 0 0 0 2px rgba(86,195,202,0.2);
        }

/* =========================
   BOTÕES GERENCIAR
========================= */

.filter-bar .btn-filter_ger,
.filter-bar .btn-clear_ger {
    height: 40px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

/* BUSCAR */

.filter-bar .btn-filter_ger {
    border: none;
    background: var(--verde-escuro);
    color: var(--branco);
}

    .filter-bar .btn-filter_ger:hover {
        background: var(--verde-medio);
        color: var(--verde-escuro);
    }

/* LIMPAR */

    .filter-bar .btn-clear_ger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 40px;
        padding: 0 16px;
        border-radius: 8px;
        border: 2px solid var(--verde-medio);
        background: transparent;
        color: var(--verde-escuro);
        font-size: 13px;
        font-weight: bold;
        text-decoration: none;
        cursor: pointer;
        transition: 0.2s;
    }

    .filter-bar .btn-clear_ger:hover {
        background: var(--amarelo);
    }

/* =========================
   TABELA
========================= */

.table-container {
    margin-top: 20px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: var(--branco);
    border-radius: 10px;
}

    /* CABEÇALHO */

    .table thead {
        background: var(--verde-inova);
        color: var(--branco);
        font-family: 'Cinzel', serif;
        letter-spacing: 0.5px;
    }

    .table th {
        padding: 14px;
        text-align: left;
        font-size: 13px;
    }

    /* LINHAS */

    .table td {
        padding: 12px 14px;
        font-size: 14px;
        color: var(--verde-escuro);
        border-bottom: 1px solid rgba(0,0,0,0.05);
        white-space: nowrap;
    }

    /* ZEBRA */

    .table tbody tr:nth-child(even) {
        background: #f9f9f9;
    }

    /* HOVER */

    .table tbody tr:hover {
        background: rgba(95,168,168,0.12);
        transition: 0.2s;
    }

/* STATUS */

.status {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

    .status.ativo {
        background: rgba(76,175,80,0.15);
        color: #2e7d32;
    }

    .status.inativo {
        background: rgba(244,67,54,0.15);
        color: #c62828;
    }

/* BOTÃO AÇÃO */

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    background: var(--verde-medio);
    color: var(--verde-escuro);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s;
}

    .btn-action:hover {
        background: var(--amarelo);
    }

/* =========================
   ALERTAS
========================= */

.alert-success {
    background: #d1fae5;
    color: #065f46;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.input-erro {
    border: 2px solid #dc2626 !important;
}

.mensagem-erro {
    grid-column: 2;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    margin-top: -6px;
    padding-right: 4px;
    text-align: right;
}
.validation-summary-errors ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.validation-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.validation-summary li {
    margin-bottom: 6px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    /* SIDEBAR */

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--verde-inova);
        z-index: 1010;
    }

    .logo {
        width: 130px;
        margin: 0 auto;
        display: block;
    }

    .user {
        display: none;
    }

    /* HAMBURGER */

    .hamburger {
        display: block;
        position: fixed;
        top: 18px;
        left: 16px;
        z-index: 1020;
    }

    /* MENU */

    .menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 350px;
        height: 100vh;
        background: var(--verde-inova);
        padding: 80px 20px;
        transition: 0.3s;
        z-index: 1015;
    }

        .menu.active {
            left: 0;
        }

    /* MAIN */

    .main {
        margin-top: 70px;
    }

    /* HEADER */

    .header {
        display: flex;
        justify-content: space-around;
        gap: 10px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

        .header a {
            font-size: 13px;
        }

    /* FORM */

    .form,
    .form-grid {
        grid-template-columns: 1fr;
    }

    /* FILTER BAR */

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        background: rgba(255,255,255,0.6);
        backdrop-filter: blur(4px);
    }

        .filter-bar input,
        .filter-bar select {
            width: 100%;
            min-width: 100%;
        }

    .btn-filter_ger,
    .btn-clear_ger {
        width: 100%;
    }

    /* TABLE */

    .table {
        min-width: 600px;
    }

        .table th,
        .table td {
            padding: 10px;
            font-size: 12px;
        }

    .btn-action {
        padding: 5px 8px;
        font-size: 11px;
    }

    .status {
        font-size: 11px;
        padding: 4px 8px;
    }

    .table td:nth-child(1) {
        white-space: normal;
    }

    .table th:nth-child(4),
    .table td:nth-child(4) {
        display: none;
    }
}
