﻿/* ===========================================================
   RESET SEGURO
=========================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #f0f1f3 !important;
    color: #222;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
}

footer {
    opacity: 0.6;
    text-align: right;
    padding-right: 16px;
}

/* ===========================================================
   FORM-CARD
=========================================================== */
.form-card {
    width: 100%;
    max-width: min(1200px, 95vw); /* cresce até 1200px */
    margin: 30px auto;
    background: #e8edf3;
    padding: clamp(18px, 2vw, 30px); /* padding responsivo */
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

    .form-card h3 {
        margin-bottom: 20px;
        font-weight: bold;
        color: #333;
    }

    .form-card label {
        display: block;
        margin-bottom: 6px;
        font-weight: bold;
        color: #333;
    }

/* ===========================================================
   LOGIN – AJUSTE DE LARGURA DO CARD
=========================================================== */
.login-page .form-card {
    max-width: 450px !important; /* ajuste fino */
}

/* ===========================================================
   BOTÕES – AGORA COM ESPAÇO ENTRE ELES
=========================================================== */
.btn {
    padding: 12px 18px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: white !important;
    background: #013b7e !important;
    transition: 0.2s !important;
    margin: 6px !important; /* evita botões colados */
}

    .btn:hover {
        background: #0250b3 !important;
    }

.btn-danger {
    background: #c62828 !important;
}

.btn-success {
    background: #2e7d32 !important;
}

/* BOTÃO COBRANÇA (FORÇADO) */
.btn-cobranca {
    background-color: #f0ad4e !important;
    border-color: #eea236 !important;
    color: #212529 !important;
}

    .btn-cobranca:hover {
        background-color: #ec971f !important;
        border-color: #d58512 !important;
        color: #212529 !important;
    }

/* Container do check */
.cobranca-check {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}

    /* Checkbox alinhado */
    .cobranca-check input[type="checkbox"] {
        margin: 0;
        position: relative;
        top: 0;
    }

/* Texto mais claro */
.cobranca-texto {
    color: #9aa0a6; /* cinza claro */
    font-size: 0.85rem;
}

/* ===========================================================
   RADIOBUTTONS
=========================================================== */
.situacao-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.radio-item {
    display: flex;
    gap: 8px;
    align-items: center;
    cursor: pointer;
}

/* ===========================================================
   TÍTULO COM DEGRADÊ
=========================================================== */
.brand-title-gradient {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(180deg, #013b7e 0%, #3a7bd5 50%, #90c3ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.30);
}

/* ===========================================================
   CONTEÚDO
=========================================================== */
.content-wrapper {
    background: #e1e2e4 !important;
    min-height: 100vh;
    margin-left: 220px;
    transition: margin-left .3s ease;
}

#txtNomeCompleto {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.text-left-force {
    text-align: left !important;
}

/* ===========================================================
   DROPDOWN AUTOCOMPLETE
=========================================================== */
.autocomplete-box {
    position: absolute;
    background: #fff;
    border: 1px solid #ced4da;
    max-height: 220px;
    overflow-y: auto;
    z-index: 999999; /* 🔥 acima de tudo */
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
}

    .autocomplete-item:hover {
        background: #f1f1f1;
    }

/* ===========================================================
   CHART (gráficos)
=========================================================== */
.date-wrapper {
    position: relative;
}

    .date-wrapper .form-control {
        padding-right: 38px;
    }

.date-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    z-index: 5;
}

    .date-icon:hover {
        color: #000;
    }

/* ===========================================================
   CHART (gráficos)
=========================================================== */
.chart-box {
    background: white;
    padding: 12px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

    .chart-box canvas {
        max-height: 260px !important;
    }

/* ===========================================================
   ITENS DE CADASTRO
=========================================================== */
.item-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    background: #f4f6f9;
    padding: 12px;
    border-radius: 10px;
    margin-top: 10px;
}

    .item-box label {
        font-weight: bold;
    }

/* ===========================================================
   GRIDVIEW PADRÃO
=========================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table td, .table th {
    white-space: nowrap !important;
}

.grid-produto-nome {
    white-space: normal !important;
    word-break: break-word;
    max-width: 250px; /* ajuste conforme sua coluna */
}
/* ===========================================================
   DASHBOARD — CARDS COM DEGRADÊ AZUL-CINZA
=========================================================== */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.card.card-info {
    background: linear-gradient(160deg, #ffffff 0%, #f1f4f9 40%, #e3e9f4 100%);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    text-align: center;
}

    .card.card-info h3 {
        font-size: 16px;
        font-weight: bold;
        color: #013b7e;
    }

.card-value {
    font-size: 30px;
    font-weight: bold;
    color: #013b7e;
    margin-top: 5px;
}

/* ===========================================================
   DASHBOARD – GRIDVIEW COM DEGRADÊ (OPÇÃO 1 TELA 1)
=========================================================== */
.dashboard-grid {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 6px !important;
    font-size: 15px;
}

    .dashboard-grid th {
        background: linear-gradient( 145deg, #f1f3f7 0%, #e1e8f3 50%, #d8e2ef 100% );
        color: #013b7e;
        font-weight: bold;
        padding: 12px;
        border-radius: 6px 6px 0 0;
        text-align: left;
    }

    .dashboard-grid td {
        background: linear-gradient( 145deg, #ffffff 0%, #f4f6fa 40%, #e9eef7 100% );
        padding: 10px 12px;
        border: 1px solid #d7dee9;
    }

    .dashboard-grid tr:nth-child(even) td {
        background: linear-gradient( 145deg, #f9fafc 0%, #edf2f9 40%, #e4eaf3 100% );
    }

    .dashboard-grid tr:hover td {
        background: linear-gradient( 145deg, #eef3fa 0%, #e3ebf7 40%, #d9e4f2 100% ) !important;
        cursor: pointer;
    }

    .dashboard-grid tr td:first-child {
        border-radius: 6px 0 0 6px;
    }

    .dashboard-grid tr td:last-child {
        border-radius: 0 6px 6px 0;
    }

/* ===========================================================
   SIDEBAR FIXA / MINI / RETRÁTIL
=========================================================== */
.main-sidebar {
    background: #013b7e !important;
    width: 250px !important;
    transition: width .3s ease, margin-left .3s ease;
}

.sidebar {
    overflow-x: hidden !important;
}

/* Modo mini (AdminLTE aplica .sidebar-collapse ao body) */
.sidebar-mini.sidebar-collapse .main-sidebar {
    width: 80px !important;
}

.sidebar-mini.sidebar-collapse .brand-text,
.sidebar-mini.sidebar-collapse .nav-link p {
    display: none !important;
}

.sidebar-mini.sidebar-collapse .nav-sidebar .nav-link i {
    width: 100%;
    text-align: center;
    margin-right: 0 !important;
}

/* Conteúdo acompanha */
.sidebar-collapse .content-wrapper {
    margin-left: 80px !important;
}

/* ===========================================================
   MOBILE
=========================================================== */
/* ===========================================================
   MOBILE — AJUSTES FINAIS (DASHBOARD + FORM + LOGIN)
=========================================================== */
@media (max-width: 780px) {

    /* SIDEBAR */
    .main-sidebar {
        margin-left: -250px !important;
        position: fixed !important;
        height: 100vh !important;
        z-index: 1050;
    }

    .sidebar-open .main-sidebar {
        margin-left: 0 !important;
    }

    .content-wrapper {
        margin-left: 0 !important;
        padding: 10px;
    }

    /* =========================
       DASHBOARD — CARDS
    ========================= */
    .metric-row > div {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .small-box {
        margin-bottom: 14px;
    }

        .small-box h3 {
            font-size: 22px;
        }

        .small-box p {
            font-size: 14px;
        }

    /* =========================
       GRÁFICOS
    ========================= */
    .chart-box {
        padding: 10px;
        margin-bottom: 20px;
    }

        .chart-box canvas {
            width: 100% !important;
            height: 220px !important;
            max-height: 220px !important;
        }

    /* =========================
       TABELAS
    ========================= */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 13px;
    }

    th, td {
        padding: 6px 8px !important;
        white-space: nowrap !important;
    }

    /* =========================
       FORMULÁRIOS
    ========================= */
    .form-control {
        font-size: 16px !important; /* evita zoom iOS */
        padding: 10px 12px;
    }

    .btn {
        width: 100%;
        font-size: 16px !important;
        padding: 12px !important;
        margin: 6px 0 !important;
    }

    /* =========================
       LOGIN
    ========================= */
    .login-page .form-card {
        margin: 16px;
        padding: 20px;
    }

    /* =========================
       FOOTER
    ========================= */
    footer {
        text-align: center;
        padding: 10px 0;
        font-size: 12px;
    }
}

/* MOBILE MUITO PEQUENO */
@media (max-width: 360px) {

    .brand-title-gradient {
        font-size: 16px !important;
    }

    .small-box h3 {
        font-size: 20px;
    }
}
