:root {
    --primary-green: rgb(53, 142, 67);
    --primary-green-dark: rgb(45, 122, 57);
    --bg-dark: #272626;
    --bg-panel: #1e1e1e;
    --text-main: #ffffff;
    --text-muted: #ffffff;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header-nubank {
    background-color: var(--primary-green);
    color: white;
    padding: 20px 20px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.header-nubank::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23ffffff'%3E%3Cpath d='M10 10h10v10H10z'/%3E%3Cpath d='M40 15l-5 5h10z'/%3E%3Ccircle cx='65' cy='15' r='4'/%3E%3Cpath d='M15 40l3 3 3-3-3-3z'/%3E%3Crect x='35' y='40' width='12' height='8' rx='2'/%3E%3Cpath d='M60 40h12v2H60zM60 44h8v2H60z'/%3E%3Cpath d='M10 65h10v2H10zM12 60h6v12h-6z'/%3E%3Ccircle cx='40' cy='65' r='3'/%3E%3Cpath d='M65 60l4 8h-8z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 120px 120px;
    }
}

.header-nubank .container {
    position: relative;
    z-index: 1;
}

.header-nubank h1 {
    font-weight: 700;
    margin: 0;
    font-size: 2.5rem;
    letter-spacing: -1px;
}

.content-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 40px 20px;
}


.dashboard-constrained {
    width: 100%;
    max-width: 588px; /* 180*3 + 24*2 (gap-4) */
}

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 25px;
    font-size: 1.1rem;
    border: 2px solid var(--primary-green);
    border-radius: 12px;

    background-color: var(--bg-panel);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    outline: none;
    text-align: center;
    color: var(--text-main);
}

.search-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 10px 30px rgba(53, 142, 67, 0.15);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-input:focus+.search-icon {
    color: var(--primary-green);
}

/* Animação suave */
.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos Customizados para SweetAlert2 */
body.swal2-shown>.swal2-container,
.swal-blur {
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.swal2-loader {
    border-color: var(--primary-green) transparent var(--primary-green) transparent !important;
}

.text-green {
    color: var(--primary-green) !important;
}

.swal-button-custom {
    width: 140px !important;
}

/* Remover foco azul padrão do bootstrap */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green) !important;
    box-shadow: none !important;
    outline: 0 !important;
}

/* Forçar texto branco em classes muted do Bootstrap */
.text-muted {
    color: #ffffff !important;
}

/* Botão Laranja Customizado */
.btn-green {
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(53, 142, 67, 0.3);
    cursor: pointer;
}

.btn-green:hover {
    background-color: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(53, 142, 67, 0.4);
}

.btn-green:active {
    transform: translateY(0);
}

/* Card de Usuário (Quadrado) */
.user-card {
    background-color: var(--bg-panel);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(53, 142, 67, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    width: 180px;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.user-card:hover {
    transform: translateY(-5px);
}

.products-list-card {
    background-color: var(--bg-panel);
    border-radius: 20px;
    border: 1px solid rgba(53, 142, 67, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.products-list-card:hover {
    transform: translateY(-2px);
}


.user-avatar {
    font-size: 3.2rem;
    color: var(--primary-green);
    margin-bottom: 8px;
    line-height: 1;
}

.user-name {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 2px;
}

.company-name {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.logout-link {
    color: var(--primary-green);
    font-size: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.logout-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* --- ESTILOS DE LOGIN --- */
.login-page-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-dark);
    padding: 40px 20px;
}

.login-card {
    background-color: var(--bg-panel);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(53, 142, 67, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.login-logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--primary-green);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.login-title {
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.login-label {
    color: var(--primary-green);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 8px;
    display: block;
}

.login-input {
    background-color: #272626 !important;
    border: 1px solid #444 !important;
    color: white !important;
    padding: 12px 18px !important;
    border-radius: 12px !important;

    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-input:focus {
    border-color: var(--primary-green) !important;
    background-color: #2a2a2a !important;
    box-shadow: 0 0 0 3px rgba(53, 142, 67, 0.1) !important;
    outline: none;
}

.login-input::placeholder {
    color: #666;
}

.btn-login {
    background-color: var(--primary-green);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-login:hover:not(:disabled) {
    background-color: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(53, 142, 67, 0.4);
}

.btn-login:disabled {
    background-color: #444;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.error-message {
    color: #ff4444;
    font-size: 0.85rem;
    margin-top: 15px;
    background: rgba(255, 68, 68, 0.1);
    padding: 10px;
    border-radius: 8px;
}

/* Botão Baixar Pequeno (Login) */
.btn-download-small {
    background-color: transparent;
    color: var(--primary-green);
    border: 1px solid rgba(53, 142, 67, 0.4);
    padding: 6px 15px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-download-small:hover {
    background-color: rgba(53, 142, 67, 0.1);
    border-color: var(--primary-green);
    transform: translateY(-1px);
}

/* Responsividade: Dashboard */
@media (max-width: 576px) {
    .dashboard-constrained {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
        gap: 15px !important;
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
    }

    .user-card {
        width: calc(50% - 10px) !important;
        height: auto !important;
        min-height: 180px;
        padding: 20px 10px !important;
    }
    
    .user-avatar i {
        font-size: 2.2rem !important;
    }
    
    .user-name {
        font-size: 0.9rem !important;
    }

    .user-card:nth-child(3) {
        width: 100% !important;
    }

    .content-container {
        padding-top: 40px;
    }

    .th-min-name {
        min-width: 450px !important; /* Aproximadamente 50 caracteres */
    }
}


/* Classes de Posicionamento e Limpeza (Migradas do Dashboard) */
.dashboard-cards-row {
    margin-bottom: 80px;
}

.product-count-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-green);
}

.checkbox-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Checkbox Customizado Laranja */
.custom-checkbox .form-check-input {
    background-color: #272626 !important;
    border-color: #444 !important;
    cursor: pointer;
}

.custom-checkbox .form-check-input:checked {
    background-color: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
}

.custom-checkbox .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(53, 142, 67, 0.25) !important;
    border-color: var(--primary-green) !important;
}

/* Estilos da Tabela de Produtos */
.search-input-small {
    background-color: #272626 !important;
    border: 1px solid #444 !important;
    color: white !important;
    padding: 8px 15px;
    border-radius: 8px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-input-small:focus {
    width: 250px;
    border-color: var(--primary-green) !important;
}

.custom-table-scroll::-webkit-scrollbar {
    width: 6px;
}

.custom-table-scroll::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.custom-table-scroll::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

.custom-table-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

.table-dark {
    --bs-table-bg: #1e1e1e;
    --bs-table-hover-bg: #252525;
}

#productsTable thead th {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 15px;
    color: var(--primary-green);
}

#productsTable tbody td {
    font-size: 0.85rem;
    padding: 12px 15px;
    color: #efefef;
    border-bottom: 1px solid rgba(53, 142, 67, 0.3);
}

/* Classes Utilitárias para Substituir Estilos Inline */
.info-block-item {
    min-width: 150px;
}

.vertical-divider {
    height: 100px;
}

.inner-table-card {
    background-color: #151515;
    border-radius: 12px;
    border: 1px solid rgba(53, 142, 67, 0.8);
    overflow: hidden;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
}

.table-scroll-container {
    max-height: 800px;
    overflow-y: auto;
}

.sticky-thead-dark {
    background-color: #151515;
    z-index: 10;
}

.th-min-name {
    min-width: 200px;
}

/* Modais SweetAlert Adicionais */
.foto-container {
    flex-shrink: 0;
    width: 120px;
}

.foto-img {
    object-fit: cover; 
    aspect-ratio: 1/1; 
    display: block;
}

.swal-input-dark {
    background-color: #272626 !important;
    color: white !important;
    border-color: var(--primary-green) !important;
    border-radius: 12px !important;
}



.text-s { font-size: 0.8rem !important; }
.text-sm { font-size: 0.85rem !important; }
.text-md { font-size: 0.9rem !important; }

.text-overflow-clamp {
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
}

.border-opacity-10 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

@media (max-width: 576px) {
    .search-table-wrapper {
        width: 100%;
        margin-top: 10px;
    }
    
    .search-input-small {
        width: 100%;
    }
}

.text-increase {
    font-size: 1.2rem !important;
}

.search-group-container {
    display: flex;
    gap: 15px;
    width: 100%;
    margin-top: 5px;
    align-items: flex-end;
}

.search-group-item {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.search-label {
    color: var(--primary-green);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    margin-left: 2px;
}

.search-group-container .form-control,
.products-list-card .form-control,
.products-list-card .form-select {
    background-color: #272626 !important;
    border: 1px solid #444 !important;
    color: white !important;
    font-size: 0.85rem;
    border-radius: 12px;
    height: 42px;
}


.products-list-card .form-control:focus,
.products-list-card .form-select:focus {
    border-color: var(--primary-green) !important;
    box-shadow: 0 0 0 2px rgba(53, 142, 67, 0.1) !important;
}


.products-list-card .form-control::placeholder,
.products-list-card .form-select::placeholder {
    color: #888 !important;
    opacity: 1;
}

@media (max-width: 991px) {

    .search-group-container {
        flex-direction: column;
    }
}

.edit-cell {
    cursor: pointer !important;
    transition: background-color 0.2s ease;
}

.edit-cell:hover {
    background-color: rgba(53, 142, 67, 0.1) !important;
}

/* Botão de Excluir Estilo Badge Laranja */
.btn-delete-action {
    background-color: rgba(53, 142, 67, 0.15) !important;
    color: var(--primary-green) !important;
    border: none !important;
    border-radius: 8px !important;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.2s ease-in-out !important;
}

.btn-delete-action:hover {
    background-color: var(--primary-green) !important;
    color: white !important;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(53, 142, 67, 0.3);
}

.btn-delete-action i {
    font-size: 1.1rem;
}

/* Forçar mesma largura nos botões do SweetAlert */
.swal-button-equal-width {
    min-width: 140px !important;
}

/* Esconder setas do input number (Estoque) */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    appearance: none;
    margin: 0; 
}
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Divisória Mobile para o Card de Informações */
.info-divider {
    width: 100%;
    margin: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}