/* Depósito do Cobra - v2.0.4 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

input, textarea, select {
    transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 900px;
    width: 100%;
    background: #000000;
    border: 2px solid #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    min-height: 600px;
}

.frame {
    display: none;
    padding: 40px;
    animation: fadeIn 0.3s ease-in;
}

.frame.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

h1, h2 {
    color: #ffffff;
    margin-bottom: 30px;
    text-align: center;
}

h1 {
    font-size: 32px;
    font-weight: 700;
}

h2 {
    font-size: 24px;
    font-weight: 600;
}

h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #dddddd;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.image-placeholder {
    background: linear-gradient(135deg, #FFB84D 0%, #FF8C00 100%);
    height: 400px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.button-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-main {
    background: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
    padding: 20px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-main:hover {
    background: #e0e0e0;
    color: #000000;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.5);
}

.btn-main:active {
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 20px;
}

.btn-text {
    flex: 1;
    text-align: left;
}

.btn {
    background: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
    box-shadow: 0 3px 10px rgba(255, 255, 255, 0.3);
}

.btn:hover {
    background: #e0e0e0;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.5);
}

.btn:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.btn-success:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

/* Input Groups com Labels */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Search Box */
.search-box {
    position: relative;
    margin: 20px 0;
}

.search-box input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #444;
    background: #1a1a1a;
    color: #ffffff;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.6;
}

/* Alert Messages */
.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #856404;
}

.alert-warning strong {
    display: block;
    margin-bottom: 5px;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
    line-height: 1.6;
}

.empty-state small {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #bbb;
}

.form-container {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input[type="text"],
input[type="number"],
input[type="password"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #444;
    background: #1a1a1a;
    color: #ffffff;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.lucro-display {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #28a745;
    border: 2px solid #28a745;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.2);
}


.list-container {
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
    font-size: 13px;
    line-height: 1.8;
    color: #333;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.list-container.small {
    min-height: 200px;
    max-height: 250px;
}

.venda-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.venda-column {
    display: flex;
    flex-direction: column;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Scrollbar personalizado */
.list-container::-webkit-scrollbar {
    width: 8px;
}

.list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.list-container::-webkit-scrollbar-thumb {
    background: #FFA500;
    border-radius: 10px;
}

.list-container::-webkit-scrollbar-thumb:hover {
    background: #FF8C00;
}

/* Responsividade */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .venda-container {
        grid-template-columns: 1fr;
    }

    .image-placeholder {
        height: 200px;
    }

    .container {
        border-radius: 0;
    }

    .frame {
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .btn-main {
        padding: 15px;
        font-size: 14px;
    }

    .btn-icon {
        font-size: 18px;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn {
        width: 100%;
    }

    .dashboard {
        grid-template-columns: 1fr;
    }

    .balanco-filtros {
        flex-direction: column;
        gap: 10px;
    }

    .btn-filtro {
        width: 100%;
    }

    .clientes-grid {
        grid-template-columns: 1fr;
    }

    .produtos-grid {
        gap: 10px;
    }

    .produto-card-body {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .produto-info-item {
        justify-content: space-between;
    }

    .add-produto-form {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .carrinho-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .carrinho-item-preco,
    .carrinho-item-remover {
        text-align: center;
    }

    .search-box input {
        font-size: 13px;
        padding: 12px 12px 12px 40px;
    }

    .input-group label {
        font-size: 13px;
    }
}

/* Estilos de alerta personalizados */
.alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 10001;
    min-width: 320px;
    max-width: 500px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    animation: fadeInOverlay 0.3s ease-out;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.alert h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
}

.alert p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.alert-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Estilos para Venda Interativa */
.add-produto-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.add-produto-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.add-produto-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
    align-items: center;
}

.quantidade-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    background: white;
    border-radius: 10px;
    padding: 5px;
}

.btn-quantidade {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-quantidade:hover {
    background: linear-gradient(135deg, #FF8C00 0%, #FF7700 100%);
    transform: scale(1.1);
}

.quantidade-selector input {
    width: 60px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: bold;
    padding: 5px;
}

.btn-add {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.produto-info {
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    border-radius: 10px;
    font-size: 14px;
    color: #666;
    min-height: 20px;
}

.carrinho-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    min-height: 200px;
}

.carrinho-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.carrinho-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.carrinho-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.carrinho-item:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.carrinho-item-nome {
    font-weight: 600;
    color: #333;
}

.carrinho-item-qtd {
    display: flex;
    align-items: center;
    gap: 5px;
}

.carrinho-item-qtd button {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.carrinho-item-qtd button:hover {
    background: linear-gradient(135deg, #FF8C00 0%, #FF7700 100%);
    transform: scale(1.1);
}

.carrinho-item-qtd span {
    min-width: 40px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}

.carrinho-item-preco {
    font-weight: bold;
    color: #28a745;
    text-align: right;
}

.carrinho-item-remover {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carrinho-item-remover:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
}

.carrinho-total {
    background: linear-gradient(135deg, #333 0%, #000 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: right;
    font-size: 20px;
    margin-top: 15px;
}

.carrinho-vazio {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 16px;
}

/* Responsividade para vendas */
@media (max-width: 768px) {
    .add-produto-form {
        grid-template-columns: 1fr;
    }
    
    .carrinho-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .carrinho-item-preco,
    .carrinho-item-remover {
        text-align: center;
    }
}

/* Estilos para Dashboard de Balanço */
.balanco-filtros {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.btn-filtro {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #333;
    border: 2px solid #ddd;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filtro:hover {
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-filtro.active {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: white;
    border-color: #FFA500;
    box-shadow: 0 5px 15px rgba(255, 165, 0, 0.4);
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #FFA500;
}

.dashboard-icon {
    font-size: 48px;
    opacity: 0.8;
}

.dashboard-info {
    flex: 1;
}

.dashboard-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.dashboard-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .balanco-filtros {
        flex-direction: column;
    }
    
    .btn-filtro {
        width: 100%;
    }
}

/* Lista de Produtos Modernizada */
.produtos-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.produto-card {
    background: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #444;
}

.produto-card:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 12px rgba(255, 255, 255, 0.2);
}

.produto-card-header {
    background: #ffffff;
    color: #000000;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.produto-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #FF8C00;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-editar-nome {
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.3);
    color: #FF8C00;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-editar-nome:hover {
    background: #FF8C00;
    color: white;
    border-color: #FF8C00;
}

.badge-estoque {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-estoque.normal {
    background-color: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.badge-estoque.baixo {
    background-color: rgba(255, 152, 0, 0.2);
    color: #e65100;
    border: 1px solid rgba(255, 152, 0, 0.4);
}

.badge-estoque.esgotado {
    background-color: rgba(244, 67, 54, 0.2);
    color: #c62828;
    border: 1px solid rgba(244, 67, 54, 0.4);
}

.produto-card-body {
    padding: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.produto-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.produto-label {
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

.produto-valor {
    color: #333;
    font-size: 14px;
    font-weight: 700;
}

.produto-valor.qtd {
    color: #667eea;
}

.produto-valor.preco {
    color: #4caf50;
}

.produto-valor.lucro {
    color: #2196f3;
}

.produto-valor.margem {
    color: #ff9800;
    font-weight: 700;
}

.texto-preto-listar {
    color: #000000 !important;
}

#listar .produto-card .produto-card-header h3,
#listar .produto-card .btn-editar-nome,
#listar .produto-card .badge-estoque,
#listar .produto-card .produto-label,
#listar .produto-card .produto-valor {
    color: #000000 !important;
}

#listar .produto-card .produto-info-item.preco-destaque {
    padding: 12px 20px;
    border: 2px solid #005BAC;
    border-left: 6px solid #005BAC;
    background: #ffffff;
}

#listar .produto-card .produto-info-item.preco-destaque .produto-label,
#listar .produto-card .produto-info-item.preco-destaque .produto-valor.preco {
    color: #005BAC !important;
}

#listar .produto-card .produto-info-item.preco-destaque .produto-valor.preco {
    font-size: 18px;
    font-weight: 800;
}

.produto-card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .produto-card-body {
        flex-direction: column;
        align-items: stretch;
    }
    
    .produto-info-item {
        justify-content: space-between;
    }
    
    .produto-card-footer {
        padding: 12px 15px;
    }
    
    .btn-card {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Cards de Clientes */
.clientes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.cliente-card {
    background: #1a1a1a;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #444;
}

.cliente-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

.cliente-card-header {
    background: #ffffff;
    color: #000000;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.cliente-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.cliente-info-main h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 700;
    color: #000000;
}

.cliente-id {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
}

.cliente-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cliente-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #2a2a2a;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.cliente-info-item:hover {
    background: #333333;
}

.info-icon {
    font-size: 24px;
    min-width: 30px;
}

.info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.info-label {
    font-size: 12px;
    color: #aaa;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
}

.cliente-card-footer {
    padding: 15px 20px;
    background: #2a2a2a;
    border-top: 1px solid #444;
    display: flex;
    justify-content: flex-end;
}

.btn-card {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: #ffffff;
    border: 2px solid #FFA500;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #FF8C00 0%, #FF7700 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 165, 0, 0.4);
    color: #ffffff;
}

.btn-edit:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(255, 165, 0, 0.3);
}

@media (max-width: 768px) {
    .clientes-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ESTILOS DO SCANNER DE CÓDIGO DE BARRAS
   ======================================== */

/* Seção do Scanner */
.scanner-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.btn-scanner {
    width: 100%;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    color: #667eea;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-scanner:hover {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-scanner .btn-icon {
    font-size: 24px;
}

/* Container do Scanner */
.scanner-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

#barcode-scanner,
#barcode-scanner-atualizar,
#barcode-scanner-venda {
    width: 100%;
    min-height: 300px;
    background: #000;
    position: relative;
}

#barcode-scanner video,
#barcode-scanner-atualizar video,
#barcode-scanner-venda video {
    width: 100%;
    height: auto;
    display: block;
}

#barcode-scanner canvas,
#barcode-scanner-atualizar canvas,
#barcode-scanner-venda canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.scanner-container .btn {
    width: 100%;
    margin-top: 10px;
}

/* Status do Scanner */
.scanner-status {
    margin-top: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #333;
    min-height: 20px;
}

/* Scanner Mini (para tela de vendas) */
.scanner-mini {
    margin-bottom: 15px;
}

.btn-scanner-mini {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-scanner-mini:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 13px;
}

/* Overlay de Detecção do QuaggaJS */
.drawingBuffer {
    position: absolute;
    top: 0;
    left: 0;
}

/* Animação de sucesso ao detectar */
@keyframes detectSuccess {
    0% {
        border-color: #4caf50;
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    50% {
        border-color: #4caf50;
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        border-color: #4caf50;
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.scanner-container.detected {
    animation: detectSuccess 0.6s ease;
}

/* Responsividade do Scanner */
@media (max-width: 768px) {
    .scanner-section {
        padding: 15px;
    }
    
    .btn-scanner {
        padding: 15px;
        font-size: 14px;
    }
    
    #barcode-scanner,
    #barcode-scanner-atualizar,
    #barcode-scanner-venda {
        min-height: 250px;
    }
    
    .scanner-status {
        font-size: 13px;
        padding: 10px;
    }
}

/* Indicador de permissão de câmera */
.camera-permission-info {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 13px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 10px;
}

.camera-permission-info::before {
    content: "ℹ️";
    font-size: 18px;
}

/* ========================================
   SISTEMA DE LOGIN
   ======================================== */

/* Tela de Login */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.5s ease-in;
}

.login-container {
    background: #1a1a1a;
    border: 2px solid #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(255, 255, 255, 0.2);
    padding: 40px;
    max-width: 450px;
    width: 90%;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.login-header p {
    font-size: 16px;
    color: #aaaaaa;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-login {
    background: #ffffff;
    color: #000000;
    border: 2px solid #ffffff;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-login:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-cadastrar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cadastrar:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
}

.btn-cancelar {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancelar:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
}

/* Informações do Usuário no Menu */
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-info span {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.btn-logout {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn-logout:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Responsividade do Login */
@media (max-width: 768px) {
    .login-container {
        padding: 30px 20px;
        max-width: 95%;
    }
    
    .login-header h1 {
        font-size: 26px;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-logout {
        width: 100%;
    }
}
/* Estilos para múltiplos endereços no cadastro de cliente */
.endereco-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 2px solid #e9ecef;
}

.endereco-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.btn-delete {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
}

.btn-add {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
}

.btn-add:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-2px);
}

/* Melhorias na pesquisa */
.search-box small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}
/* Dropdown de autocomplete de produtos */
.produtos-dropdown {
    position: absolute;
    background: white;
    border: 2px solid #000000;
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    width: 100%;
    margin-top: 5px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    left: 0;
}

.dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #000000;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.dropdown-item:hover,
.dropdown-item:active {
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE8CC 100%);
    transform: scale(1.02);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item-nome {
    font-weight: 600;
    color: #000000;
    margin-bottom: 5px;
    font-size: 14px;
}

.dropdown-item-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #000000;
}

.dropdown-qtd {
    font-weight: 600;
}

.dropdown-qtd.normal {
    color: #28a745;
}

.dropdown-qtd.baixo {
    color: #ffc107;
}

.dropdown-qtd.esgotado {
    color: #dc3545;
}

.dropdown-preco {
    color: #000000;
    font-weight: 600;
}

.dropdown-item-empty {
    padding: 12px 15px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .produtos-dropdown {
        max-height: 300px;
        font-size: 14px;
    }
    
    .dropdown-item {
        padding: 15px 12px;
        min-height: 60px;
    }
    
    .dropdown-item-nome {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .dropdown-item-info {
        font-size: 13px;
    }
}

/* Modal de Comprovante */
#modal-comprovante .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#modal-comprovante .btn:active {
    transform: scale(0.98);
}
