* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #eef2f6;
    color: #222;
    font-size: 16px;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.topo {
    background: linear-gradient(135deg, #1f4e78, #163a5a);
    color: white;
    padding: 22px;
    border-radius: 18px;
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.topo h1 {
    margin: 0;
    font-size: 28px;
}

.topo p {
    margin: 6px 0 0;
    opacity: 0.9;
}

.card {
    background: white;
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

h1, h2, h3 {
    margin-top: 0;
}

input, textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccd3da;
    border-radius: 12px;
    font-size: 16px;
    background: #fff;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #1f4e78;
    box-shadow: 0 0 0 3px rgba(31, 78, 120, 0.15);
}

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1f4e78;
    color: white;
    border: none;
    padding: 14px 18px;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    font-size: 16px;
    min-height: 48px;
    font-weight: bold;
}

button:hover, .btn:hover {
    background: #163a5a;
}

.btn-secundario {
    background: #6c757d;
}

.btn-secundario:hover {
    background: #555f66;
}

.btn-danger {
    background: #c0392b;
}

.btn-danger:hover {
    background: #922b21;
}

.form-linha {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.form-linha input {
    flex: 1;
}

.acoes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.caixa-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.caixa-item strong {
    font-size: 20px;
    color: #1f4e78;
}

.conteudo-item {
    background: #f8fafc;
    border-left: 5px solid #1f4e78;
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 14px;
}

.conteudo-item p {
    margin-top: 0;
    line-height: 1.5;
}

.vazio {
    color: #777;
    font-style: italic;
}

.alerta {
    background: #fff3cd;
    color: #856404;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 15px;
}

/* MOBILE / IPHONE */
@media (max-width: 700px) {
    body {
        font-size: 17px;
        background: #f4f6f8;
    }

    .container {
        padding: 14px;
    }

    .topo {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        padding: 20px;
        border-radius: 16px;
    }

    .topo h1 {
        font-size: 24px;
    }

    .topo p {
        font-size: 15px;
    }

    .card {
        padding: 18px;
        border-radius: 16px;
    }

    .form-linha {
        flex-direction: column;
    }

    button, .btn {
        width: 100%;
        min-height: 52px;
        font-size: 17px;
    }

    .acoes {
        width: 100%;
        flex-direction: column;
    }

    .caixa-item {
        flex-direction: column;
        align-items: stretch;
    }

    .caixa-item strong {
        font-size: 22px;
    }

    input, textarea {
        font-size: 17px;
        padding: 16px;
    }
}

/* IPAD / TABLET */
@media (min-width: 701px) and (max-width: 1024px) {
    .container {
        padding: 24px;
    }

    .topo h1 {
        font-size: 30px;
    }

    .card {
        padding: 24px;
    }

    button, .btn {
        min-height: 50px;
    }
}

/* IMPRESSÃO */
@media print {
    body {
        background: white;
    }

    .topo,
    button,
    .btn,
    .acoes {
        display: none !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .card,
    .relatorio-card {
        box-shadow: none !important;
        border: 1px solid #333;
        border-radius: 0;
    }
}

/* CARDS METRICAS */
	.metricas {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 16px;
		margin-bottom: 20px;
	}

	.metrica-card {
		background: white;
		border-radius: 18px;
		padding: 20px;
		box-shadow: 0 4px 14px rgba(0,0,0,0.08);
	}

	.metrica-card span {
		display: block;
		color: #666;
		font-size: 14px;
		margin-bottom: 8px;
	}

	.metrica-card strong {
		display: block;
		font-size: 28px;
		color: #1f4e78;
	}

	@media (max-width: 700px) {
		.metricas {
			grid-template-columns: 1fr;
		}

		.metrica-card strong {
			font-size: 30px;
		}
	}