:root {
    --bg: #f6f7f3;
    --ink: #18201b;
    --muted: #627065;
    --panel: #ffffff;
    --line: #dfe5dd;
    --primary: #2f6f5e;
    --primary-dark: #245548;
    --accent: #b85c38;
    --warn: #aa7b20;
    --danger: #a43f45;
    --blue: #376da3;
    --shadow: 0 16px 40px rgba(24, 32, 27, .08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px clamp(18px, 5vw, 56px);
    border-bottom: 1px solid var(--line);
    background: #fffdf8;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: clamp(28px, 4vw, 44px);
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 18px;
}

.layout,
.admin-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

.panel,
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel {
    padding: 24px;
}

form {
    display: grid;
    gap: 16px;
}

label,
legend {
    color: var(--ink);
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    margin-top: 7px;
    border: 1px solid #cbd5ce;
    border-radius: 6px;
    padding: 12px 13px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

.hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

textarea {
    resize: vertical;
}

fieldset {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checks label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 400;
}

.checks input {
    width: auto;
    margin: 0;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0 16px;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.primary {
    background: var(--primary);
    color: #fff;
}

.primary:hover {
    background: var(--primary-dark);
}

.secondary {
    background: #eef4f1;
    color: var(--primary-dark);
    border-color: #cbded6;
}

.ghost {
    background: transparent;
    border-color: var(--line);
}

.notice {
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.success {
    background: #e8f5ef;
    border: 1px solid #b9dccd;
}

.error {
    background: #fae8e8;
    border: 1px solid #e5b7b7;
}

.stats {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.stats div,
.status-grid div {
    display: grid;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fbfcf8;
}

.stats strong,
.status-grid strong {
    font-size: 30px;
}

.stats span,
.status-grid span,
.muted {
    color: var(--muted);
}

.lookup {
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.ticket {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.queue {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 48px;
}

.section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.card {
    padding: 18px;
}

.card-head,
.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.position,
.code {
    color: var(--muted);
    font-weight: 800;
}

.services,
.note {
    color: var(--muted);
}

.note {
    border-left: 3px solid var(--primary);
    padding-left: 10px;
}

.proof-box {
    display: grid;
    gap: 3px;
    margin: 12px 0;
    border: 1px solid #cbded6;
    border-radius: 8px;
    padding: 12px;
    background: #f3faf6;
}

.proof-box strong {
    color: var(--primary-dark);
}

.proof-box span {
    color: var(--ink);
    font-size: 14px;
}

.attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.attachments strong {
    width: 100%;
}

.attachments a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--primary-dark);
    background: #eef4f1;
    font-weight: 700;
    text-decoration: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.recebida {
    background: var(--blue);
}

.em_analise {
    background: var(--warn);
}

.em_desenvolvimento {
    background: var(--accent);
}

.aprovada {
    background: var(--primary);
}

.concluida {
    background: #59665d;
}

.nao_atendida {
    background: var(--danger);
}

.login-panel {
    max-width: 440px;
    margin: 60px auto;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.demand-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.demand-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
}

.admin-form {
    align-self: start;
}

.empty {
    padding: 20px;
    color: var(--muted);
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 8px;
}

@media (max-width: 900px) {
    .layout,
    .demand-row {
        grid-template-columns: 1fr;
    }

    .cards,
    .status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .topbar,
    .section-title,
    .admin-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .grid.two,
    .checks,
    .cards,
    .status-grid,
    .lookup {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 18px;
    }
}
