* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    margin: 0;
    background: #f4f5f7;
    color: #1f2937;
    line-height: 1.5;
}

header {
    background: #1e3a5f;
    color: white;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 720px;
    margin: 0 auto;
}

.brand img {
    height: 36px;
    border-radius: 4px;
    background: white;
    padding: 2px;
}

.brand span {
    font-weight: 600;
    font-size: 1.05rem;
    flex: 1;
}

.logout-form {
    background: transparent;
    padding: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-form .user {
    font-size: 0.875rem;
    opacity: 0.85;
}

.logout-form button {
    padding: 0.35rem 0.75rem;
    background: rgba(255,255,255,.15);
    font-size: 0.85rem;
}

.logout-form button:hover { background: rgba(255,255,255,.25); }

.login { max-width: 360px; }

main {
    max-width: 720px;
    margin: 1rem auto;
    padding: 0 1rem 2rem;
}

h2 { margin-top: 0; }

form {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.95rem;
}

input[type=text],
input[type=email],
textarea,
select {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
}

input[type=file] {
    margin-top: 0.25rem;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

textarea { resize: vertical; }

input:focus, textarea:focus, select:focus {
    outline: 2px solid #1e3a5f;
    outline-offset: 1px;
    border-color: #1e3a5f;
}

button, .btn {
    display: inline-block;
    background: #1e3a5f;
    color: white;
    border: 0;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

button:hover, .btn:hover { background: #2c5282; }

.flash {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 0.625rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.setor {
    background: white;
    padding: 0.625rem 1rem;
    border-radius: 6px;
    border-left: 4px solid #1e3a5f;
    margin-bottom: 1rem;
}

.sucesso {
    background: #d1fae5;
    padding: 2rem 1rem;
    border-radius: 8px;
    text-align: center;
    color: #065f46;
}

table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

th, td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

th {
    background: #f9fafb;
    font-weight: 600;
    font-size: 0.875rem;
    color: #4b5563;
}

tbody tr:last-child td { border-bottom: 0; }

.filtros {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.filtros a {
    padding: 0.4rem 0.8rem;
    background: white;
    border-radius: 6px;
    text-decoration: none;
    color: #4b5563;
    font-size: 0.9rem;
    border: 1px solid #e5e7eb;
}

.filtros a.ativo {
    background: #1e3a5f;
    color: white;
    border-color: #1e3a5f;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-aberto { background: #fee2e2; color: #991b1b; }
.badge-em_atendimento { background: #fef3c7; color: #92400e; }
.badge-concluido { background: #d1fae5; color: #065f46; }

.dados {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.dados dt { font-weight: 600; color: #4b5563; }
.dados dd { margin: 0; }

.fotos {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.fotos figure {
    background: white;
    padding: 0.5rem;
    border-radius: 8px;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.fotos figcaption {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.fotos img {
    max-width: 320px;
    max-height: 240px;
    border-radius: 4px;
    display: block;
}

.acao {
    margin-top: 1.5rem;
}

.info {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.setores {
    list-style: none;
    padding: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.setores li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.setores li:last-child { border-bottom: 0; }

.setores code {
    font-size: 0.8rem;
    color: #6b7280;
    background: #f9fafb;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.vazio {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

@media (max-width: 600px) {
    table { font-size: 0.875rem; }
    th, td { padding: 0.5rem; }
    .dados { grid-template-columns: 1fr; gap: 0.25rem; }
    .dados dt { margin-top: 0.5rem; }
}
