* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #333;
    min-height: 100vh;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    text-align: center;
}

.login-card h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 5px;
}

.subtitle {
    color: #666;
    margin-bottom: 25px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Header */
.app-header {
    background: white;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    font-size: 20px;
    color: #667eea;
}

.btn-logout {
    color: #999;
    text-decoration: none;
    font-size: 20px;
}

/* Dashboard */
.page {
    padding: 20px;
}

.dashboard h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.data-hoje {
    color: #666;
    margin-bottom: 25px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.card-icon {
    font-size: 32px;
}

.card-info h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.card-info p {
    color: #666;
    font-size: 14px;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.menu-item {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.menu-item:active {
    transform: scale(0.95);
}

.menu-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

/* PDV */
.pdv-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
}

.produto-info {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.produto-info.hidden {
    display: none;
}

.preco-container {
    margin: 15px 0;
}

.preco-valor {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
}

.quantidade-container {
    margin-bottom: 20px;
}

.quantidade-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-qtd {
    width: 40px;
    height: 40px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
}

.quantidade-control input {
    width: 80px;
    text-align: center;
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
}

.carrinho-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.carrinho-itens {
    margin: 15px 0;
    max-height: 300px;
    overflow-y: auto;
}

.carrinho-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.carrinho-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: bold;
    padding: 15px 0;
    border-top: 2px solid #e1e5e9;
}

/* Responsive */
@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
}

/* Estilos adicionais */
.page-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-back {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.btn-add {
    margin-left: auto;
    background: #48bb78;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
}

.search-section {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
}

.produtos-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.produto-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.produto-info h3 {
    margin-bottom: 5px;
    font-size: 16px;
}

.produto-codigo {
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}

.produto-preco {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

.produto-estoque {
    font-size: 14px;
    color: #48bb78;
}

.produto-estoque.baixo {
    color: #f56565;
}

.produto-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    text-decoration: none;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
}

.empty-state p {
    margin-bottom: 20px;
    color: #666;
    font-size: 18px;
}

.btn-secondary {
    background: #cbd5e0;
    color: #333;
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Estilos para Caixa */
.caixa-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.caixa-info-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.caixa-icon {
    font-size: 48px;
}

.caixa-data h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.caixa-saldo-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.saldo-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.saldo-valor {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.caixa-resumo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.resumo-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resumo-icon {
    font-size: 24px;
}

.resumo-info {
    display: flex;
    flex-direction: column;
}

.resumo-label {
    font-size: 12px;
    color: #666;
}

.resumo-valor {
    font-weight: bold;
    color: #333;
}

.movimentacao-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.movimentacao-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
}

.movimentacao-info {
    flex: 1;
}

.movimentacao-tipo {
    font-weight: bold;
    margin-bottom: 3px;
}

.movimentacao-desc {
    font-size: 14px;
    color: #666;
}

.movimentacao-hora {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

.movimentacao-valor {
    font-weight: bold;
    font-size: 18px;
}

.movimentacao-valor.positivo {
    color: #48bb78;
}

.movimentacao-valor.negativo {
    color: #f56565;
}

/* Estilos para Clientes */
.cliente-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.cliente-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.cliente-info {
    flex: 1;
}

.cliente-info h3 {
    margin-bottom: 5px;
    font-size: 16px;
}

.cliente-cpf, .cliente-telefone {
    font-size: 13px;
    color: #666;
    margin-bottom: 3px;
}

.cliente-stats {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.badge {
    background: #e2e8f0;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    color: #4a5568;
}

.cliente-info-box {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.cliente-info-box h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

.cliente-info-box p {
    margin-bottom: 8px;
}

/* Estilos para PDV - adicionais */
.cliente-busca {
    margin: 20px 0;
    position: relative;
}

.cliente-search {
    position: relative;
}

.resultados-clientes {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.cliente-resultado {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
}

.cliente-resultado:hover {
    background: #f7fafc;
}

.cliente-selecionado {
    background: #f0fff4;
    padding: 10px 15px;
    border-radius: 10px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fidelidade-container {
    background: #fef5e7;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.pontos-info {
    margin-bottom: 10px;
}

.pontos-calculo {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f6e05e;
}

.pagamento-container {
    margin: 20px 0;
}

.pagamento-dinheiro {
    margin-top: 15px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
}

.troco-info {
    margin-top: 10px;
    padding: 10px;
    background: #c6f6d5;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    color: #22543d;
}

.desconto-item-container {
    margin: 15px 0;
}

.desconto-control {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.desconto-control input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

.desconto-control select {
    width: 80px;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

.carrinho-resumo {
    margin: 20px 0;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
}

.resumo-linha {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.total-linha {
    font-size: 20px;
    font-weight: bold;
    padding-top: 10px;
    border-top: 2px solid #e2e8f0;
    margin-top: 10px;
}

.desconto-total-container {
    align-items: center;
}

.desconto-total-control {
    display: flex;
    gap: 10px;
}

.desconto-total-control input {
    width: 100px;
    padding: 8px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

.desconto-total-control select {
    width: 70px;
    padding: 8px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

/* Estilos para Perfil */
.perfil-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

.perfil-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.perfil-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
}

.perfil-info h2 {
    margin-bottom: 5px;
}

.perfil-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
    margin-bottom: -2px;
}

.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

/* Utilitários */
.hidden {
    display: none !important;
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #718096;
}

/* Responsivo */
@media (max-width: 480px) {
    .caixa-resumo {
        grid-template-columns: 1fr;
    }
    
    .perfil-header {
        flex-direction: column;
        text-align: center;
    }
    
    .desconto-total-control {
        flex-direction: column;
    }
}