
/* BASE HTML */
<style>
    body {
        margin: 0;
        font-family: Arial, sans-serif;
        background: linear-gradient(135deg, #bfbfbf, #bfbfbf);
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

	.header {
		background: linear-gradient(135deg, var(--cor-primaria), var(--cor-secundaria));
		color: white;
		padding: 22px 15px 16px;
		text-align: center;
		box-shadow: 0 4px 10px rgba(0,0,0,0.15);
	}

    .header img {
        margin-bottom: 8px;
    }

	.header h2 {

		margin: 0;

		font-weight: 700;

		letter-spacing: 0.5px;

		font-size: 30px;
	}

	.container {
		flex: 1;
		padding: 30px 20px;
		max-width: 900px;
		margin: 20px auto;

		background: #bfbfbf; /* 🔥 cor suave azulada */
		border-radius: 12px;

		box-shadow: 0 6px 20px rgba(0,0,0,0.05);
	}

    h3 {
        color: #0d47a1;
        margin-bottom: 20px;
    }

    .card {
        background: white;
        padding: 20px;
        margin-bottom: 25px;
        border-radius: 14px;
        box-shadow: 0 6px 18px rgba(0,0,0,0.08);
        border-left: 5px solid var(--cor-primaria); /* 🔥 destaque lateral */
        transition: 0.2s;
    }

    .card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 22px rgba(0,0,0,0.12);
    }

    label {
        margin-right: 15px;
        font-weight: 500;
    }

    input[type="radio"] {
        margin-right: 5px;
    }

    button {
        background: linear-gradient(90deg, var(--cor-primaria), var(--cor-secundaria));
        color: white;
        border: none;
        padding: 14px 22px;
        border-radius: 8px;
        cursor: pointer;
        font-weight: bold;
        font-size: 15px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
        transition: 0.2s;
    }

    button:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(0,0,0,0.2);
    }
	
	.nivel-alto {
		color: #2e7d32;
		font-weight: bold;
	}

	.nivel-medio {
		color: #f9a825;
		font-weight: bold;
	}

	.nivel-baixo {
		color: #c62828;
		font-weight: bold;
	}

    /* 📱 Responsivo */
    @media (max-width: 600px) {
        .container {
            padding: 20px 12px;
        }

        .card {
            padding: 15px;
        }

        button {
            width: 100%;
        }
    }
	
@media (max-width: 600px) {
    .resumo-cards {
        flex-direction: column;
        gap: 10px; /* 🔥 melhora respiro */
    }
}

@media (max-width: 600px) {
    .resumo-geral {
        padding: 15px; /* 🔥 evita ficar apertado */
    }
}

@media (max-width: 600px) {
    .texto-geral {
        font-size: 14px;
        line-height: 1.6;
    }
}

@media (max-width: 600px) {
    .competencia-card {
        padding: 12px;
    }

    .info-topo {
        flex-wrap: wrap;
        gap: 6px;
    }
}

@media (max-width: 600px) {

    .menu-card {
        font-size: 14px;
        padding: 10px;
    }

    .acoes-botoes button {
        padding: 5px 8px;
        font-size: 12px;
    }

    table {
        font-size: 12px;
    }

}

@media (max-width: 600px) {

    .acoes-botoes {
        flex-direction: column; /* 🔥 vertical no mobile */
        align-items: center;
    }

}
	
	
/* ===== FORM MELHORADO ===== */

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.form-group input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    transition: 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.15);
}

.form-actions {
    margin-top: 10px;
}

.form-group textarea {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* ===== SELECT PADRÃO ===== */

.form-group select {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: 0.2s;
}

.form-group select:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.15);
}

.numero-destaque {
    font-size: 42px;
    font-weight: bold;
    margin: 10px 0;
    color: #0f172a;
}

.texto-geral {
    margin-top: 15px;
    line-height: 1.7;
    font-size: 15px;
}

/* ========================================
LOGIN
======================================== */

.login-box input:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(0, 74, 171, 0.15);
}

.login-box input::placeholder {
    color: #999;
}

.login-box {
    max-width: 400px;
    margin: 40px auto; /* 👈 centraliza horizontal */
    text-align: center;
	padding: 25px;
}

.login-box input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 12px;

    border-radius: 6px;
    border: 1px solid #ccc;

    font-size: 14px;
    outline: none;

    box-sizing: border-box; /* 👈 ESSA LINHA RESOLVE */
}

.login-box button {
    width: 100%;
}

.logo-cliente {

    max-height: 92px;
    max-width: 260px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 15px;
}

.logo-rb {

    height: 155px;

    width: auto;

    object-fit: contain;

    margin-bottom: 12px;
}

/* ========================================
BOTÃO CADASTRO
======================================== */

.btn-cadastro{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    width:100%;

    height:54px;

    margin-top:8px;

    border-radius:12px;

    background:#1976d2;

    color:white;

    text-decoration:none;

    font-size:16px;

    font-weight:700;

    box-shadow:0 4px 14px rgba(25,118,210,0.22);

    transition:0.2s;
}

.btn-cadastro:hover{

    opacity:0.96;

    transform:translateY(-1px);
}

.powered {
    text-align: center;
    font-size: 12px;
    color: #aaa;
    margin: 20px 0 10px 0;
}

.powered strong {
    color: var(--cor-primaria);
    font-weight: bold;
}

.acoes-botoes {
    display: flex;
    flex-direction: row; /* 🔥 horizontal no desktop */
    gap: 6px;
    align-items: center;
}

.acoes-botoes button {
    width: 38px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* cores padrão */
.btn-editar {
    background: #0d6efd;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-success {
    background: #198754;
    color: white;
}

.grid-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.menu-card {
    display: block;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    color: #333;
    transition: 0.2s;
}

.menu-card:hover {
    background: #e0e0e0;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    min-width: 250px;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.btn-gestao {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
}

.header {
    position: relative;
}

.header-actions {
    position: absolute;
    right: 20px;
    top: 20px;
}

.btn-home {
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    transition: 0.2s;
}

.btn-home:hover {
    background: rgba(255,255,255,0.4);
}

.btn-disabled {
    background: #ccc;
    color: #666;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: not-allowed;
}

.btn-warning {
    background: #ffc107;
    color: #333;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: default;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-weight: bold;
}

/* 🔥 CONFIGURAÇÃO DO SISTEMA (HOME RB) */
.menu-card-config {
    background: #f4f6f8;
    border-radius: 10px;
    padding: 15px;
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: 0.2s;
    border: 1px solid #e0e0e0;
}

.menu-card-config:hover {
    background: #e3f2fd;
    transform: translateY(-2px);
}

.menu-card-config .icon {
    font-size: 22px;
}

.menu-card-config .title {
    font-weight: bold;
}

.menu-card-config .desc {
    font-size: 12px;
    color: #666;
}

.filtro-lotes {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.filtro-lotes select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.filtro-lotes button {
    padding: 8px 12px;
    border: none;
    background: var(--cor-primaria);
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 600px) {

    table thead {
        display: none;
    }

    table, table tbody, table tr, table td {
        display: block;
        width: 100%;
    }

    table tr {
        margin-bottom: 15px;
        background: #fff;
        border-radius: 10px;
        padding: 10px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

    table td {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid #eee;
    }

    table td:last-child {
        border-bottom: none;
    }

}


/* ========================================
   PAGE: LOTES
======================================== */

.page-lotes .desktop-only {
    display: block;
}

.page-lotes .mobile-only {
    display: none;
}

/* 🔥 MOBILE */
@media (max-width: 768px) {

    .page-lotes .desktop-only {
        display: none;
    }

    .page-lotes .mobile-only {
        display: block;
    }

    /* 🔥 CONTAINER */
    .page-lotes.container {
        max-width: 100%;
        margin: 10px;
        padding: 15px;
    }

    /* 🔥 FILTRO */
    .page-lotes .filtro-lotes {
        flex-direction: column;
        gap: 8px;
    }

    .page-lotes .filtro-lotes button {
        width: 100%;
    }

    /* 🔥 CARD */
    .page-lotes .lote-card {
        background: #fff;
        border-radius: 12px;
        padding: 14px;
        margin-bottom: 14px;
        box-shadow: 0 6px 18px rgba(0,0,0,0.08);
        border-left: 5px solid var(--cor-primaria);
    }

    /* 🔝 TOPO */
    .page-lotes .lote-topo {
        display: flex;
        justify-content: space-between;
        margin-bottom: 8px;
    }

    .page-lotes .lote-id {
        font-size: 12px;
        color: #777;
    }

    .page-lotes .lote-teste {
        font-weight: bold;
        color: var(--cor-primaria);
    }

    /* 👤 CLIENTE */
    .page-lotes .lote-cliente {
        font-size: 14px;
        margin-bottom: 10px;
        color: #333;
    }

    /* 📊 STATS */
    .page-lotes .lote-stats {
        display: flex;
        gap: 6px;
    }

    .page-lotes .stat {
        flex: 1;
        background: #f1f3f5;
        border-radius: 8px;
        padding: 8px;
        text-align: center;
        font-size: 11px;
    }

    .page-lotes .stat strong {
        display: block;
        font-size: 16px;
    }

    .page-lotes .stat.usados {
        background: #fff3cd;
    }

    .page-lotes .stat.disponivel {
        background: #d4edda;
    }

}
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--cor-primaria);
    color: white;
    padding: 10px;
    text-align: left;
}

.table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.table tr:hover {
    background: #f5f5f5;
}

.btn-sm {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    background: #1976d2;
    color: white;
    transition: 0.2s;
}

.btn-sm:hover {
    opacity: 0.85;
}

.btn-sm.danger {
    background: #c62828;
}

.btn-sm.success {
    background: #2e7d32;
}

.acoes-usuario {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

/* 📱 MOBILE */
@media (max-width: 768px) {

    .acoes-usuario {
        justify-content: space-between;
        width: 100%;
    }

}

    .btn-sm {
        padding: 6px 8px;
        font-size: 13px;
    }

}

.topo-usuarios {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* MOBILE */
@media (max-width: 768px) {
    .topo-usuarios {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .topo-usuarios .btn {
        width: 100%;
        text-align: center;
    }
}

.acoes-usuario {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

/* BOTÕES PADRÃO */
.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-size: 16px;
}

/* CORES */
.btn-icon.edit {
    background: #1976d2;
}

.btn-icon.danger {
    background: #c62828;
}

.btn-icon.success {
    background: #2e7d32;
}

/* MOBILE */
@media (max-width: 768px) {

    .acoes-usuario {
        justify-content: flex-start;
        gap: 6px;
    }

    .btn-icon {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    background: var(--cor-primaria);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
}
.alert-success-usuariolist {
    background: #e8f5e9;
    border-left: 5px solid #2e7d32;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
    color: #2e7d32;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.kpi-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.kpi-card span {
    font-size: 14px;
    color: #555;
}

.kpi-card h2 {
    margin-top: 8px;
    color: var(--cor-primaria);
}

.kpi-card.destaque {
    background: #fff3e0;
}

/* MOBILE */
@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.btn-logout {
    margin-left: 10px;
    background: #c62828;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.btn-logout:hover {
    background: #b71c1c;
}


/* ========================================
FORM RESPONSIVO - CADASTRO PELO CLIENTE
======================================== */
.form-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:20px;
}

.form-group{

    display:flex;

    flex-direction:column;
}

.form-group label{

    margin-bottom:8px;

    font-size:14px;

    font-weight:600;

    color:#154360;
}

.form-group input,
.form-group select{

    width:100%;
	max-width:100%;

    height:52px;

    padding:0 16px;

    border:1px solid #dfe6e9;

    border-radius:12px;

    background:#fff;

    font-size:15px;

    transition:0.2s;
}

.form-group input:focus,
.form-group select:focus{

    outline:none;

    border-color:#1976d2;

    box-shadow:0 0 0 4px rgba(25,118,210,0.10);
}

/* ========================================
CADASTRO PÚBLICO
======================================== */

.cadastro-bloco{

    margin-bottom:40px;
}

.cadastro-bloco h3{

    margin-bottom:22px;

    color:#154360;

    font-size:22px;

    font-weight:700;
}

.cadastro-opcional{

    margin-top:35px;

    margin-bottom:45px;

    padding:28px;

    border-radius:18px;

    background:linear-gradient(
        135deg,
        #f8fafc,
        #eef4f9
    );

    border:1px solid #dce6f2;
}

.cadastro-opcional h4{

    margin-bottom:8px;

    color:#154360;

    font-size:18px;

    font-weight:700;
}

.cadastro-subtexto{

    margin-bottom:22px;

    color:#6b7280;

    font-size:14px;

    line-height:1.5;
}

/* ========================================
CARD CADASTRO
======================================== */

.card{

    border-radius:20px;
}

/* ========================================
BOTÃO
======================================== */

.card button{

    height:54px;

    padding:0 28px;

    border:none;

    border-radius:12px;

    background:#1976d2;

    color:#fff;

    font-size:16px;

    font-weight:700;

    cursor:pointer;

    transition:0.2s;
}

.card button:hover{

    transform:translateY(-1px);

    opacity:0.96;
}

.cadastro-bloco *,
.cadastro-opcional *{

    box-sizing:border-box;
}
/* ========================================
RESPONSIVIDADE
======================================== */

@media (max-width:768px){

    .card{

        padding:20px;
    }

    .form-grid{

        grid-template-columns:1fr;
    }

    .cadastro-bloco h3{

        font-size:20px;
    }
}

.campo-erro{

    margin-top:6px;

    color:#ef4444;

    font-size:13px;

    font-weight:500;
}

/* ========================================
USUÁRIO FORM
======================================== */

/* ========================================
USUÁRIO GRID
======================================== */

.usuario-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:22px;
}

.usuario-grid *{

    box-sizing:border-box;
}

.usuario-grid .form-group{

    min-width:0;
}

@media (max-width:768px){

    .usuario-grid{

        grid-template-columns:1fr;
    }
}

/* ========================================
CLIENTE GRID
======================================== */

.cliente-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:22px;
}

.cliente-grid *{

    box-sizing:border-box;
}

.cliente-grid .form-group{

    min-width:0;
}

@media (max-width:768px){

    .cliente-grid{

        grid-template-columns:1fr;
    }
}

/* ========================================
TESTE FORM
======================================== */

.teste-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:22px;
}

.teste-grid *{

    box-sizing:border-box;
}

.teste-grid .form-group{

    min-width:0;
}

.full-width{

    grid-column:1 / -1;
}

/* ========================================
TEXTAREA
======================================== */

textarea{

    width:100%;

    min-height:120px;

    padding:16px;

    border:1px solid #dfe6e9;

    border-radius:12px;

    resize:vertical;

    font-size:15px;

    font-family:inherit;
}

textarea:focus{

    outline:none;

    border-color:#1976d2;

    box-shadow:0 0 0 4px rgba(25,118,210,0.10);
}

/* ========================================
RESPONSIVO
======================================== */

@media (max-width:768px){

    .teste-grid{

        grid-template-columns:1fr;
    }
}

.form-help{

    display:block;

    margin-top:6px;

    font-size:13px;

    color:#7f8c8d;
}
</style>