@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
    --bg: #f3f6f4;
    --panel: #ffffff;
    --panel-soft: #edf2ef;
    --text: #122118;
    --muted: #5e6f63;
    --primary: #0d6f5a;
    --primary-strong: #085645;
    --secondary: #164c8c;
    --warning: #b87f00;
    --danger: #b42318;
    --success: #1e7a3f;
    --border: #d6e2db;
    --shadow: 0 14px 40px rgba(16, 40, 27, 0.08);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at 0 0, #dceee5 0%, #f6faf8 40%, #f3f6f4 100%);
    color: var(--text);
    font-family: 'Source Sans 3', sans-serif;
    min-height: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1180px, 92vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 2200;
    backdrop-filter: blur(6px);
    background: rgba(7, 52, 44, 0.9);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.site-header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.brand-badge {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(145deg, #29a574, #085645);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

.brand-text h1 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.06rem;
    color: #fff;
}

.brand-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2201;
}

.nav-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #f5f9f8;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 700;
    font-family: 'Source Sans 3', sans-serif;
    cursor: pointer;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.16);
}

.nav a {
    color: #f5f9f8;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}

.nav a.active,
.nav a:hover {
    background: rgba(255, 255, 255, 0.14);
}

.main-content {
    padding: 26px 0 34px;
}

.hero {
    background: linear-gradient(130deg, #0f5948 0%, #1a4b87 60%, #3f7598 100%);
    color: #fff;
    border-radius: 22px;
    padding: 30px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    right: -90px;
    top: -130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
}

.hero h2 {
    margin: 0 0 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

.hero p {
    margin: 0;
    max-width: 820px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.55;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.card h3,
.card h4 {
    margin: 0 0 10px;
    font-family: 'Montserrat', sans-serif;
}

.kpi-value {
    font-size: 1.9rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    margin: 6px 0;
}

.kpi-label {
    color: var(--muted);
    font-weight: 600;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-aberto {
    color: #fff;
    background: #d73a49;
}

.badge-em_analise {
    color: #fff;
    background: #f5a524;
}

.badge-em_execucao {
    color: #fff;
    background: #2f6fdb;
}

.badge-concluido {
    color: #fff;
    background: #1b8f3a;
}

.btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 700;
    font-family: 'Source Sans 3', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #143f72);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--secondary);
    border: 1px solid #8cb0d8;
}

.btn-danger {
    background: linear-gradient(135deg, #be2819, #911d13);
    color: #fff;
}

form {
    display: grid;
    gap: 14px;
}

.form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    font-size: 0.95rem;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #b9cdc1;
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.98rem;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #65a997;
    border-color: #65a997;
}

.notice {
    border-radius: 12px;
    padding: 12px;
    font-weight: 700;
    margin-bottom: 14px;
}

.notice-success {
    background: #ddf5e6;
    color: #0f5a32;
    border: 1px solid #88cca1;
}

.notice-error {
    background: #fbe4e2;
    color: #7f1f18;
    border: 1px solid #ebb6b1;
}

.table-wrap {
    overflow: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 860px;
}

th,
td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    background: #eaf2ed;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.map-canvas {
    width: 100%;
    min-height: 430px;
    border-radius: 14px;
    border: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.small-map {
    min-height: 300px;
}

.site-footer {
    border-top: 1px solid #c7d7cf;
    color: #335145;
    background: #eef3f0;
    margin-top: 28px;
}

.site-footer .inner {
    padding: 14px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.9rem;
}

.chart-row {
    display: grid;
    gap: 8px;
}

.chart-item {
    display: grid;
    grid-template-columns: 140px 1fr 34px;
    align-items: center;
    gap: 8px;
}

.chart-bar {
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f5948, #2f6fdb);
}

.photo-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.photo-list img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.inline-fields {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.inline-fields > * {
    flex: 1;
}

@media (max-width: 980px) {
    .grid-2,
    .grid-3,
    .grid-4,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .brand-logo {
        width: 48px;
        height: 48px;
    }

    .site-header .inner {
        align-items: center;
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav {
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding-top: 10px;
        margin-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
    }

    .nav.is-open {
        display: flex;
    }

    .nav a,
    .nav form,
    .nav form .btn {
        width: 100%;
    }

    .nav a,
    .nav form .btn {
        text-align: left;
        justify-content: flex-start;
    }

    .nav-admin-link {
        display: none;
    }

    .map-canvas {
        min-height: 360px;
    }

    .chart-item {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 981px) {
    .nav {
        display: flex !important;
    }

    .nav.is-open {
        display: flex;
    }
}
