/* =========================================================
   FELIZ FARMA SERVIÇOS - STYLE.CSS
   ========================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #222;
}

/* MENU LATERAL */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: #0b5aa9;
    color: #fff;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 12px rgba(0,0,0,.18);
    z-index: 999;
}

.sidebar-logo {
    text-align: center;
    margin-bottom: 18px;
}

.sidebar-logo img,
.logo-sidebar {
    width: 155px !important;
    max-width: 155px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

.sidebar-user {
    background: rgba(255,255,255,.14);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 18px;
}

.sidebar-user strong {
    display: block;
    font-size: 15px;
}

.sidebar-user span {
    display: block;
    font-size: 13px;
    margin-top: 4px;
    opacity: .85;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-menu a {
    color: #fff !important;
    text-decoration: none !important;
    font-weight: bold;
    padding: 11px 12px;
    border-radius: 8px;
    display: block;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,.16);
}

.sidebar-menu .sair {
    margin-top: 12px;
    background: rgba(0,0,0,.16);
}

.sidebar-version {
    margin-top: auto;
    font-size: 12px;
    opacity: .8;
    text-align: center;
    line-height: 1.4;
}

/* LAYOUT */

.container {
    margin: 30px 30px 30px 270px;
    max-width: calc(100% - 300px);
    padding: 0 16px;
}

h1 {
    color: #001f4d;
    font-size: 34px;
    margin: 0 0 24px;
}

h2,
h3 {
    color: #001f4d;
}

/* CARDS */

.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    margin-bottom: 22px;
}

.card.destaque {
    border-left: 6px solid #0b5aa9;
}

/* GRID */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    align-items: start;
}

/* FORMULÁRIOS */

label {
    display: block;
    margin-bottom: 4px;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    margin: 6px 0 12px;
    border: 1px solid #c9d3e1;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #0b5aa9;
    box-shadow: 0 0 0 3px rgba(11,90,169,.12);
}

textarea {
    min-height: 90px;
    resize: vertical;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.checkbox-linha {
    margin: 15px 0;
}

.checkbox-linha label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* BUSCAS */

.form-busca,
.busca-linha {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-busca input,
.busca-linha input {
    flex: 1;
    margin: 0;
}

.resultado-busca {
    margin-top: 18px;
}

/* BOTÕES */

.btn,
button.btn,
a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #0b5aa9;
    color: #fff !important;

    border: 0;
    border-radius: 7px;

    padding: 7px 12px;

    cursor: pointer;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none !important;
    line-height: 1.1;

    box-shadow: 0 2px 5px rgba(0,0,0,.10);
    transition: .18s ease;
}

.btn:hover {
    opacity: .92;
    transform: translateY(-1px);
}
.btn-red {
    background: #b00020 !important;
}

.btn-gray {
    background: #6c757d !important;
}

.form-acoes {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* TABELAS */

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid #e6ebf2;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #f0f4f9;
    color: #001f4d;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

tr:hover td {
    background: #fafcff;
}

/* ALERTAS */

.alert {
    padding: 12px;
    background: #fff3cd;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 5px solid #ffc107;
}

.small {
    color: #666;
    font-size: 13px;
}

/* CLIENTE / ATENDIMENTO */

.cliente-resumo {
    margin-top: 15px;
}

.cliente-resumo h2 {
    margin-bottom: 15px;
}

.cliente-resumo p {
    font-size: 16px;
    margin: 8px 0;
}

.cliente-encontrado {
    border-left: 6px solid #0b5aa9;
}

.cliente-nao-encontrado {
    border-left: 6px solid #b00020;
}

/* APLICAÇÃO */

#formAplicacao label {
    font-weight: bold;
    font-size: 13px;
    color: #001f4d;
}

/* LOGIN */

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-card {
    max-width: 450px;
    width: 90%;
    text-align: center;
}

.login-logo {
    width: 450px;
    max-width: 100%;
    height: auto;
}

/* RESPONSIVO */

@media (max-width: 900px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .sidebar-logo img,
    .logo-sidebar {
        width: 140px !important;
        max-width: 140px !important;
    }

    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-version {
        display: none;
    }

    .container {
        margin: 25px auto;
        max-width: 1100px;
        padding: 0 16px;
    }

    .form-busca,
    .busca-linha {
        flex-direction: column;
        align-items: stretch;
    }
}
/* =========================================================
   SENHA / PRIMEIRO ACESSO
   ========================================================= */

.login-card .password-box {
    position: relative !important;
    width: 100% !important;
    margin: 6px 0 10px !important;
    text-align: left !important;
}

.login-card .password-box input {
    width: 100% !important;
    height: 44px !important;
    padding: 10px 46px 10px 12px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.login-card .password-box .toggle-password {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
    font-size: 16px !important;
    color: #6c757d !important;
    z-index: 20 !important;
    user-select: none !important;
    line-height: 1 !important;
}

.login-card .password-box .toggle-password:hover {
    color: #0b5aa9 !important;
}

.password-strength {
    margin: 4px 0 16px;
}

.strength-bar {
    width: 100%;
    height: 8px;
    background: #e1e7ef;
    border-radius: 999px;
    overflow: hidden;
}

#strength-fill {
    width: 0;
    height: 100%;
    border-radius: 999px;
    transition: width .35s ease, background .35s ease;
}

#strength-text {
    display: block;
    margin-top: 7px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
}

#match-text {
    display: block;
    margin: 6px 0 14px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
}
/* =========================================================
   ATENDIMENTO / BUSCAR CLIENTE - COMPACTO
   ========================================================= */

.atendimento-card {
    padding: 18px 20px;
}

.atendimento-card h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.cliente-resumo.compacto {
    margin-top: 0;
}

.cliente-resumo.compacto h2 {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.2;
}

.cliente-dados-linha {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    font-size: 15px;
    margin-bottom: 12px;
}

.cliente-dados-linha span {
    display: inline-flex;
    gap: 5px;
}

.acoes-compactas {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 6px;
}

.btn-sm {
    padding: 6px 11px !important;
    min-width: auto !important;
    min-height: 30px !important;
    font-size: 13px !important;
    border-radius: 7px !important;
    line-height: 1.1 !important;
}
/* =========================================================
   CLIENTES - COMPACTO
   ========================================================= */

.clientes-card {
    padding: 18px 20px;
}

.clientes-card h3 {
    margin: 0 0 16px;
    font-size: 18px;
}

.clientes-busca {
    align-items: center;
}

.clientes-busca input {
    height: 38px;
}

.clientes-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.clientes-grid label {
    font-weight: bold;
    font-size: 13px;
    color: #001f4d;
}

.clientes-grid input {
    height: 38px;
    padding: 8px 10px;
    margin: 5px 0 0;
}

.clientes-table th,
.clientes-table td {
    padding: 9px 10px;
}

.tabela-acoes {
    margin: 0;
}

.tabela-acoes .btn-sm {
    white-space: nowrap;
}
/* =========================================================
   APLICACOES - COMPACTO
   ========================================================= */

.aplicacao-card {
    padding: 18px 20px;
}

.aplicacao-card h3 {
    margin: 0 0 16px;
    font-size: 18px;
}

.aplicacao-busca {
    align-items: center;
}

.aplicacao-busca input {
    height: 38px;
}

.aplicacao-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.aplicacao-grid label,
.aplicacao-loja label,
#formAplicacao > label {
    font-weight: bold;
    font-size: 13px;
    color: #001f4d;
}

.aplicacao-grid input,
.aplicacao-grid select,
.aplicacao-loja select {
    height: 38px;
    padding: 8px 10px;
    margin: 5px 0 0;
}

.aplicacao-loja {
    margin-bottom: 18px;
}

#formAplicacao textarea {
    min-height: 62px;
    padding: 8px 10px;
    margin: 5px 0 10px;
}

.aplicacao-check {
    margin: 12px 0;
}

.aplicacao-table th,
.aplicacao-table td {
    padding: 9px 10px;
}
/* =========================================================
   DASHBOARD - BUSCA AJAX CLIENTE
   ========================================================= */

.atendimento-ajax-card {
    padding: 20px;
}

.atendimento-ajax-card h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.atendimento-ajax-card p {
    margin-top: 0;
    color: #555;
}

.ajax-search-box {
    position: relative;
    margin-top: 14px;
}

.ajax-search-box input {
    height: 42px;
    font-size: 15px;
    margin: 0;
}

.ajax-resultados {
    display: none;
    margin-top: 10px;
    border: 1px solid #e1e7ef;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.ajax-loading,
.ajax-vazio {
    padding: 12px;
    font-size: 14px;
    color: #555;
}

.ajax-cliente-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border-bottom: 1px solid #edf1f6;
}

.ajax-cliente-card:last-child {
    border-bottom: 0;
}

.ajax-cliente-card strong {
    display: block;
    color: #001f4d;
    margin-bottom: 3px;
}

.ajax-cliente-card span {
    display: block;
    font-size: 13px;
    color: #666;
}
.acoes-usuario{
    display:flex;
    gap:6px;
    align-items:center;
    justify-content:center;
}

.acoes-usuario form{
    display:inline-flex;
    margin:0;
}

.btn-pequeno{
    min-width:78px;
    height:34px;
    padding:0 12px;
}
.acoes-usuario form{
    margin:0;
    display:inline-block;
}
/* FORÇA BOTÕES USUÁRIOS NA MESMA LINHA */

td .acoes-usuario {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    min-width: 260px !important;
}

td .acoes-usuario form {
    display: flex !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
}

td .acoes-usuario .btn-pequeno {
    display: inline-flex !important;
    width: auto !important;
    min-width: 78px !important;
    height: 34px !important;
    padding: 0 12px !important;
    margin: 0 !important;
    white-space: nowrap !important;
}
/* =========================================================
   VISUAL V2 - PADRAO GERAL
   ========================================================= */

:root {
    --ff-azul: #003874;
    --ff-azul-2: #0b5aa9;
    --ff-fundo: #f4f7fb;
    --ff-card: #ffffff;
    --ff-texto: #1f2937;
    --ff-muted: #667085;
    --ff-borda: #e1e7ef;
    --ff-sombra: 0 8px 24px rgba(15, 23, 42, .08);
}

body {
    background: var(--ff-fundo) !important;
    color: var(--ff-texto);
}

.container {
    padding: 0 26px 40px !important;
}

h1 {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: var(--ff-azul) !important;
    margin-bottom: 20px !important;
}

h2 {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: var(--ff-azul) !important;
}

h3 {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--ff-azul) !important;
}

.card {
    background: var(--ff-card) !important;
    border: 1px solid var(--ff-borda) !important;
    border-radius: 14px !important;
    box-shadow: var(--ff-sombra) !important;
    padding: 24px !important;
}

input,
select,
textarea {
    border: 1px solid #cbd5e1 !important;
    border-radius: 9px !important;
    font-size: 14px !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--ff-azul-2) !important;
    box-shadow: 0 0 0 3px rgba(11, 90, 169, .12) !important;
}

.btn,
button.btn,
a.btn {
    background: var(--ff-azul-2) !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 10px rgba(11, 90, 169, .22) !important;
}

.btn:hover {
    transform: translateY(-1px);
    opacity: .95;
}

.btn-gray {
    background: #64748b !important;
}

.btn-red {
    background: #b42318 !important;
}

table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden;
}

th {
    background: #f1f5f9 !important;
    color: var(--ff-azul) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: .06em !important;
}

td {
    font-size: 14px !important;
    color: #111827 !important;
}

tr:hover td {
    background: #f8fbff !important;
}

.alert {
    border-radius: 10px !important;
    border-left: 5px solid #f59e0b !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

.alert.sucesso {
    background: #e8f8ef !important;
    border-left-color: #16a34a !important;
    color: #166534 !important;
}

/* Botões pequenos em tabelas */
.acoes-usuario {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
}

.acoes-usuario form {
    margin: 0 !important;
    display: inline-flex !important;
}

.btn-pequeno,
.btn-sm {
    min-height: 34px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}
/* =========================================================
   MENU V2 - CORREÇÃO FINAL FORÇADA
   ========================================================= */

html body .sidebar {
    width: 260px !important;
    background: #fff !important;
    color: #2f3a4a !important;
}

html body .sidebar .sidebar-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

html body .sidebar .sidebar-menu a {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    width: 100% !important;

    color: #2f3a4a !important;
    background: transparent !important;

    text-decoration: none !important;
    font-weight: 700 !important;

    padding: 12px 13px !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
}

html body .sidebar .sidebar-menu a:hover {
    background: #eef4ff !important;
    color: #003874 !important;
}

html body .sidebar .sidebar-menu a.ativo {
    background: linear-gradient(90deg, #0b5aa9, #0a4b8a) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(11,90,169,.18) !important;
}

html body .sidebar .sidebar-menu a.ativo:hover {
    color: #fff !important;
}

html body .sidebar .sidebar-user {
    background: #f3f6fb !important;
    color: #001f4d !important;
}

html body .sidebar .sidebar-user span {
    color: #5d6b7c !important;
}

html body .sidebar .sidebar-version {
    color: #7b8794 !important;
}