body {
    background-color: #f0f2f5;
    font-family: Arial;
    overflow-x: hidden;
}

.form-control[type="date"],
.form-control[type="month"] {
    cursor: pointer;
}

.form-control[type="date"]::-webkit-calendar-picker-indicator,
.form-control[type="month"]::-webkit-calendar-picker-indicator {
    padding: 5px;
    border-radius: 4px;
    background-color: #eaf2fb;
    cursor: pointer;
}

.senha-wrapper {
    position: relative;
}

.senha-input {
    padding-right: 45px;
}

.senha-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    color: #212529;
    font-size: 1.2rem;
    line-height: 1;
}

.login-page {
    background: linear-gradient(135deg, #eef2f7, #dfe7f1);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.logo-img {
    width: 180px;
    display: block;
    margin: 0 auto 25px auto;
}

.input-custom {
    height: 50px;
    border-radius: 12px;
    padding-left: 15px;
}

.btn-login {
    height: 50px;
    border-radius: 12px;
    font-weight: 500;
}

.eye-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    color: #6c757d;
    font-size: 1rem;
    padding: 0;
}

.login-card label {
    font-size: 0.85rem;
    font-weight: 600;
}

.eye-btn {
    position: absolute;
    right: 18px;
    top: 54px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #6c757d;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
}

.link-cadastro {
    font-size: 0.9rem;
    text-decoration: none;
    color: #0d6efd;
    font-weight: 500;
}

.link-cadastro:hover {
    text-decoration: underline;
}

.eye-btn:hover {
    color: #0d6efd;
}

.eye-btn:hover {
    color: #0d6efd;
}

.cadastro-page .login-container {
    max-width: 650px;
}

.cadastro-page .login-card {
    max-height: 90vh;
    overflow: auto;
}

.clientes-box {
    background: #fff;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.clientes-box table th {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
}

.clientes-box {
    background: #fff;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.clientes-box table {
    margin-bottom: 0;
}

.clientes-box thead th {
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 700;
    border-bottom: 1px solid #e5e7eb;
}

.clientes-box tbody td {
    font-size: 0.92rem;
    vertical-align: middle;
    padding: 14px 8px;
}

.clientes-box table tbody tr:nth-child(odd) td {
    --bs-table-bg: #ffffff;
    background-color: #ffffff;
}

.clientes-box table tbody tr:nth-child(even) td {
    --bs-table-bg: #f5f7fa;
    background-color: #f5f7fa;
}

.clientes-box table {
    background-color: transparent;
}

.clientes-box tbody tr {
    transition: 0.2s ease;
}

.clientes-box tbody tr td {
    transition: background-color 0.2s ease, color 0.2s ease;
}

.clientes-box tbody tr:hover td {
    background-color: #e9f2ff !important;
    cursor: pointer;
}

#painelCliente .offcanvas-header {
    border-bottom: 1px solid #e5e7eb;
}

#painelCliente .offcanvas-title {
    font-weight: 700;
}

#painelCliente small {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cliente-seletor {
    position: relative;
}

.cliente-seletor-icone {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    color: #6b7280;
    transform: translateY(-50%);
    pointer-events: none;
}

.cliente-seletor-input {
    padding-left: 38px;
}

.cliente-seletor-input:focus:not(.is-invalid) {
    border-color: #ced4da;
    box-shadow: none;
}

.cliente-seletor-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1050;
    width: max(100%, 420px);
    max-width: min(560px, calc(100vw - 48px));
    overflow: hidden;
    border: 1px solid #d8dee7;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .16);
}

.cliente-seletor-busca {
    position: relative;
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.cliente-seletor-busca i {
    position: absolute;
    top: 50%;
    left: 22px;
    z-index: 1;
    color: #6b7280;
    transform: translateY(-50%);
    pointer-events: none;
}

.cliente-seletor-busca input {
    padding-left: 36px;
}

.cliente-seletor-opcoes {
    max-height: 300px;
    overflow-y: auto;
    padding: 6px;
    background: #fff;
}

.cliente-seletor-opcao {
    display: grid;
    grid-template-columns: minmax(54px, auto) 1fr;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 5px;
    background: #fff;
    color: #212529;
    text-align: left;
    cursor: pointer;
}

.cliente-seletor-opcao:hover,
.cliente-seletor-opcao.selecionado {
    background: #f3f7fb;
}

.cliente-seletor-opcao strong {
    color: #172033;
}

.cliente-seletor-opcao span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.cliente-seletor-vazio {
    padding: 20px 12px;
    color: #6b7280;
    text-align: center;
}

@media (max-width: 576px) {
    .cliente-seletor-menu {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .app-main>.container-fluid {
        padding-right: 0;
        padding-left: 0;
    }

    .app-main h1 {
        font-size: 1.75rem;
    }

    .app-main h2 {
        font-size: 1.5rem;
    }

    .app-main h3 {
        font-size: 1.35rem;
    }

    .app-main>.container-fluid>.d-flex.justify-content-between,
    .app-main>.container-fluid>.d-flex.flex-wrap.justify-content-between {
        align-items: stretch !important;
        flex-direction: column;
    }

    .app-main>.container-fluid>.d-flex.justify-content-between>.d-flex,
    .app-main>.container-fluid>.d-flex.flex-wrap.justify-content-between>.d-flex {
        flex-wrap: wrap;
    }

    .clientes-box,
    .parcelamento-box {
        padding: 14px;
        border-radius: 8px;
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive>.table {
        width: max-content;
        min-width: 720px;
    }

    .table-responsive .btn {
        flex: 0 0 auto;
    }

    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 16px;
    }

    textarea.form-control {
        min-height: 96px;
    }

    .modal {
        padding: 0 !important;
    }

    .modal-dialog {
        width: auto;
        max-width: none;
        margin: 8px;
    }

    .modal-dialog-centered {
        min-height: calc(100dvh - 16px);
    }

    .modal-content {
        max-height: calc(100dvh - 16px);
        border-radius: 8px;
    }

    .modal-body {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .modal-footer {
        flex-wrap: wrap;
        gap: 8px;
    }

    .modal-footer>* {
        margin: 0;
    }

    .offcanvas {
        max-width: 100vw;
    }

    .login-page {
        min-height: 100dvh;
        height: auto;
        padding: 16px;
    }

    .login-card {
        padding: 24px 18px;
        border-radius: 10px;
    }

    .logo-img {
        width: min(160px, 55vw);
    }
}