* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body.login-body {
    background: #f4f6f9;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.login-card h1 {
    font-size: 28px;
    color: #1f2937;
    margin-bottom: 8px;
    text-align: center;
}

.subtitulo {
    text-align: center;
    color: #6b7280;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0 12px;
    outline: none;
    transition: border 0.2s;
}

.form-group input:focus {
    border-color: #2563eb;
}

.btn-primary {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.alerta-erro {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
* {
    box-sizing: border-box;
}

body.app-body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;
    color: #1f2937;
}

.topbar {
    background: #1f2937;
    color: #fff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar h1 {
    margin: 0;
    font-size: 22px;
}

.topbar-subtitle {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #cbd5e1;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-topbar {
    text-decoration: none;
    background: #374151;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.btn-topbar-danger {
    background: #b91c1c;
}

.page-container {
    max-width: 1300px;
    margin: 24px auto;
    padding: 0 16px 32px;
}

.card-section {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

.card-header-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.card-header h2 {
    margin: 0;
    font-size: 20px;
}

.card-body {
    padding: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    background: #fff;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2563eb;
}

.mt-16 {
    margin-top: 16px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 950px;
}

.items-table th,
.items-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}

.items-table th {
    background: #f9fafb;
    font-size: 14px;
    color: #374151;
}

.item-input {
    width: 100%;
    min-height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
}

.btn-primary,
.btn-secondary,
.btn-warning,
.btn-remove {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-remove {
    background: #dc2626;
    color: white;
}

.btn-remove:hover {
    background: #b91c1c;
}

.totais-box {
    margin-top: 20px;
    padding: 18px;
    border-radius: 12px;
    background: #f9fafb;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.total-label {
    font-size: 16px;
    font-weight: bold;
    color: #374151;
}

.total-value {
    font-size: 26px;
    font-weight: bold;
    color: #111827;
}

.actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.actions-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 1100px) {
    .form-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 14px 16px;
    }

    .card-body,
    .card-header {
        padding: 16px;
    }

    .total-value {
        font-size: 22px;
    }

    .actions-row,
    .actions-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .actions-row button,
    .actions-right button {
        width: 100%;
    }
}
.timeline {
    position: relative;
    margin-top: 8px;
    padding-left: 24px;
    border-left: 2px solid #dbe3ea;
}

.timeline-item {
    position: relative;
    padding: 0 0 18px 12px;
}

.timeline-dot {
    position: absolute;
    left: -31px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2563eb;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 1px #cbd5e1;
}

.timeline-content {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
}

.timeline-header {
    font-size: 15px;
    color: #111827;
    margin-bottom: 4px;
}

.timeline-meta {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.timeline-observacao {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    white-space: pre-wrap;
}

.btn-warning {
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-warning:hover {
    background: #d97706;
}

/* ajustes para tela de celular */
@media (max-width: 640px) {
    .acoes-tabela {
        flex-direction: column;
        align-items: stretch;
    }

    .acoes-tabela {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-tabela {
    min-width: auto !important;
    width: auto !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    line-height: 1.2;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .acoes-tabela {
        flex-direction: row;
        align-items: center;
    }

    .btn-tabela {
        width: auto !important;
    }
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dashboard-card a {
    margin-top: 12px;
}
}
.form-group small {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}
.anexos-bloco {
    margin-bottom: 24px;
}

.anexos-titulo {
    margin: 0 0 14px 0;
    font-size: 18px;
    color: #1f2937;
}

.galeria-fotos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.foto-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.foto-thumb {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #e5e7eb;
}

.foto-info {
    padding: 12px;
}

.foto-nome {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
    word-break: break-word;
}

.foto-data {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
}

.foto-acoes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
