* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

html,
body {
    overflow-x: hidden;
}

body {
    background: #eef3f9;
    color: #1c2a39;
}

a {
    text-decoration: none;
}

.bg-login {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f3f95, #1e57b8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 480px;
}

.login-box {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.18);
    padding: 35px;
}

.login-topo {
    text-align: center;
    margin-bottom: 25px;
}

.logo-kadan {
    height: 70px;
    margin-bottom: 10px;
}

.logo-cliente {
    height: 70px;
    display: block;
    margin: 0 auto 15px auto;
}

.login-topo h1 {
    color: #0f3f95;
    font-size: 28px;
    margin-bottom: 8px;
}

.login-topo p {
    color: #5d6a78;
}

.form-login .campo,
.form-box .campo {
    margin-bottom: 16px;
}

.campo label {
    display: block;
    font-weight: bold;
    margin-bottom: 7px;
    color: #0e2d57;
}

.campo input,
.campo select,
.campo textarea {
    width: 100%;
    border: 1px solid #c8d5e6;
    border-radius: 14px;
    padding: 12px 14px;
    outline: none;
    background: #fff;
    font-size: 14px;
}

.campo textarea {
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

.btn-azul {
    background: #0f4bb5;
    color: #fff;
}

.btn-cinza {
    background: #d9e1ec;
    color: #203046;
}

.btn-editar {
    background: #f3b600;
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
}

.btn-excluir {
    background: #d93c3c;
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
}

.btn-sair {
    background: #ffffff;
    color: #0f4bb5;
    padding: 10px 16px;
}

.btn-buscar {
    background: #173f8a;
    color: #fff;
    white-space: nowrap;
}

.alerta {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-weight: bold;
}

.alerta-sucesso {
    background: #dff4df;
    color: #1d6b1d;
}

.alerta-erro {
    background: #ffe1e1;
    color: #b32626;
}

.layout {
    min-height: 100vh;
}

.topo-sistema {
    background: #114ba8;
    color: #fff;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom-left-radius: 22px;
    border-bottom-right-radius: 22px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.topo-esquerda {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logos-topo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topo-logo-kadan,
.topo-logo-cliente {
    height: 48px;
    background: #fff;
    border-radius: 12px;
    padding: 5px;
}

.topo-sistema h1 {
    font-size: 28px;
    margin-bottom: 4px;
}

.menu-lateral {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    padding: 18px 24px 0 24px;
}

.menu-lateral a {
    background: #ffffff;
    color: #114ba8;
    height: 60px;
    padding: 8px 10px;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    border: 1px solid #dbe5f1;
    transition: all 0.2s ease;
}

.menu-lateral a:hover {
    background: #114ba8;
    color: #ffffff;
    border-color: #114ba8;
}

.conteudo {
    padding: 24px;
}

.cabecalho-pagina {
    margin-bottom: 22px;
}

.cabecalho-pagina h2 {
    color: #123e8d;
    font-size: 28px;
    margin-bottom: 5px;
}

.cabecalho-pagina p {
    color: #667587;
}

.linha-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.cards-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.card-info {
    background: #fff;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border-top: 8px solid #114ba8;
}

.card-titulo {
    color: #114ba8;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 18px;
}

.card-numero {
    font-size: 42px;
    font-weight: bold;
    color: #0a326f;
    margin-bottom: 8px;
}

.card-texto {
    color: #687787;
}

.painel-box,
.tabela-box,
.form-box {
    background: #fff;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.painel-titulo {
    background: #123e8d;
    color: #fff;
    padding: 14px 18px;
    border-radius: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}

.painel-conteudo {
    color: #415264;
    font-size: 15px;
    line-height: 1.6;
}

.tabela {
    width: 100%;
    border-collapse: collapse;
}

.tabela th,
.tabela td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e4ebf3;
    font-size: 14px;
}

.tabela th {
    background: #edf3fb;
    color: #123e8d;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.campo-span-2 {
    grid-column: span 2;
}

.campo-span-3 {
    grid-column: span 3;
}

.acoes-form {
    margin-top: 10px;
    display: flex;
    gap: 12px;
}

.linha-input-botao {
    display: flex;
    gap: 10px;
}

.footer-sistema {
    text-align: center;
    padding: 18px;
    color: #6f7d8a;
}

@media (max-width: 1100px) {
    .cards-dashboard,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }

    .campo-span-3,
    .campo-span-2 {
        grid-column: span 2;
    }

    .menu-lateral {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .cards-dashboard,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .campo-span-3,
    .campo-span-2 {
        grid-column: span 1;
    }

    .topo-sistema,
    .linha-between,
    .topo-esquerda,
    .linha-input-botao {
        flex-direction: column;
        align-items: stretch;
    }

    .menu-lateral {
        grid-template-columns: repeat(2, 1fr);
    }
}

.input-maiusculo {
    text-transform: uppercase;
}

.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    height: 46px !important;
    border: 1px solid #c8d5e6 !important;
    border-radius: 14px !important;
    padding: 8px 10px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px !important;
    color: #1c2a39 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px !important;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.campo-span-4 {
    grid-column: span 4;
}

.box-secundario {
    background: #fff;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    margin-top: 18px;
}

.subtitulo-box {
    background: #123e8d;
    color: #fff;
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: bold;
    margin-bottom: 16px;
}

.tabela-itens input,
.tabela-itens select,
.tabela-itens textarea {
    min-width: 100%;
}

.btn-add-linha {
    background: #198754;
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
}

.btn-remover-linha {
    background: #d93c3c;
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

.resumo-totais {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.card-total {
    background: #f7faff;
    border: 1px solid #d8e5f4;
    border-radius: 18px;
    padding: 18px;
}

.card-total strong {
    display: block;
    margin-bottom: 8px;
    color: #123e8d;
}

.assinaturas-os {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.assinatura-linha {
    border-top: 1px solid #000;
    text-align: center;
    padding-top: 8px;
}

@media (max-width: 1100px) {
    .grid-4,
    .resumo-totais {
        grid-template-columns: 1fr 1fr;
    }

    .campo-span-4 {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .grid-4,
    .resumo-totais,
    .assinaturas-os {
        grid-template-columns: 1fr;
    }

    .campo-span-4 {
        grid-column: span 1;
    }
}