* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.left-section {
    flex: 1;
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 40px;
}

.clouds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
}

.cloud1, .cloud2, .cloud3 {
    position: absolute;
    color: rgba(255,255,255,0.3);
    animation: float 6s ease-in-out infinite;
}

.cloud1 {
    top: 20%;
    left: 20%;
    font-size: 2rem;
    animation-delay: 0s;
}

.cloud2 {
    top: 15%;
    right: 30%;
    font-size: 1.5rem;
    animation-delay: 2s;
}

.cloud3 {
    top: 25%;
    right: 15%;
    font-size: 1.2rem;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.building {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    color: rgba(255,255,255,0.2);
}

.content {
    text-align: center;
    z-index: 10;
}

.content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.store-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.store-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.store-btn i {
    margin-right: 8px;
}

.right-section {
    flex: 1;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form {
    width: 100%;
    max-width: 400px;
}

.logo {
    text-align: center;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: #0072ff;
    margin-bottom: 10px;
}

.logo h2 {
    color: #333;
    font-size: 1.8rem;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.message.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.input-group label i {
    margin-right: 8px;
    color: #0072ff;
    width: 16px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-group input:focus {
    outline: none;
    border-color: #0072ff;
    background: white;
    box-shadow: 0 0 0 3px rgba(0,114,255,0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.remember {
    display: flex;
    align-items: center;
    color: #666;
    cursor: pointer;
}

.remember input {
    margin-right: 8px;
}

.forgot-password {
    color: #0072ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #0056cc;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #0072ff 0%, #00c6ff 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,114,255,0.3);
}

.login-btn i {
    margin-right: 8px;
}

.register-link {
    text-align: center;
    margin-bottom: 25px;
    color: #666;
    font-size: 0.9rem;
}

.register-link a {
    color: #0072ff;
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    color: #0056cc;
}

.social-login {
    text-align: center;
}

.social-login p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.social-btn.facebook {
    background: #4267B2;
    color: white;
}

.social-btn.google {
    background: #db4437;
    color: white;
}

.social-btn.apple {
    background: #000;
    color: white;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        margin: 20px;
    }
    
    .left-section {
        min-height: 200px;
    }
    
    .content h1 {
        font-size: 2rem;
    }
    
    .right-section {
        padding: 30px 20px;
    }
}
        .form-row {
            display: flex;
            gap: 15px;
        }
        
        .form-row .form-group {
            flex: 1;
        }
        
        .status-badge {
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: bold;
            text-transform: uppercase;
        }
        
        .status-ativo {
            background: #d4edda;
            color: #155724;
        }
        
        .status-inativo {
            background: #f8d7da;
            color: #721c24;
        }
        
        textarea {
            resize: vertical;
            min-height: 60px;
        }

/* Dashboard Styles */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: #34495e;
    border-bottom: 1px solid #4a5f7a;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    color: #ecf0f1;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #34495e;
}

.sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #3498db;
    color: white;
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.main-wrapper {
    margin-left: 250px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
}

.main-content {
    flex: 1;
    padding: 20px;
    background: #f8f9fa;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.page-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.page-title h2 {
    margin: 0;
    color: #2c3e50;
}

.coming-soon {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.coming-soon i {
    font-size: 64px;
    color: #bdc3c7;
    margin-bottom: 20px;
}

.coming-soon h3 {
    color: #7f8c8d;
    margin-bottom: 10px;
}

.coming-soon p {
    color: #95a5a6;
}

/* CEV001 - Centro de Vendas Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-content h3 {
    margin: 0;
    font-size: 28px;
    color: #2c3e50;
    font-weight: 700;
}

.stat-content p {
    margin: 5px 0 0 0;
    color: #7f8c8d;
    font-size: 14px;
}

.low-stock {
    background-color: #fff5f5 !important;
}

.low-stock td {
    color: #e53e3e;
}

.config-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.config-section h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.status-concluida {
    background-color: #28a745;
    color: white;
}

.status-cancelada {
    background-color: #dc3545;
    color: white;
}

.status-pendente {
    background-color: #ffc107;
    color: #212529;
}

/* Produtos Section Styles */
.produtos-section {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    background-color: #f9f9f9;
}

.produtos-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.produto-selector {
    margin-bottom: 15px;
}

.produtos-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.produtos-table th,
.produtos-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.produtos-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.produtos-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    text-align: left;
}

.produtos-table tr:hover {
    background: #f8f9fa;
    transition: background-color 0.2s ease;
}

/* Estilos específicos para a seção de clientes */
#clientes-section .table-container {
    margin-top: 20px;
}

#clientes-section .users-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

#clientes-section .users-table th:first-child,
#clientes-section .users-table td:first-child {
    min-width: 150px;
}

#clientes-section .users-table th:nth-child(2),
#clientes-section .users-table td:nth-child(2) {
    min-width: 200px;
}

#clientes-section .users-table th:nth-child(3),
#clientes-section .users-table td:nth-child(3) {
    min-width: 120px;
}

#clientes-section .users-table th:nth-child(4),
#clientes-section .users-table td:nth-child(4) {
    min-width: 140px;
}

#clientes-section .users-table th:nth-child(5),
#clientes-section .users-table td:nth-child(5) {
    min-width: 120px;
}

#clientes-section .users-table th:nth-child(6),
#clientes-section .users-table td:nth-child(6) {
    min-width: 80px;
    text-align: center;
}

#clientes-section .users-table th:nth-child(7),
#clientes-section .users-table td:nth-child(7) {
    min-width: 100px;
    text-align: center;
}

/* Responsividade melhorada */
@media (max-width: 1200px) {
    #clientes-section .users-table {
        min-width: 800px;
    }
}

@media (max-width: 992px) {
    #clientes-section .users-table {
        min-width: 700px;
        font-size: 13px;
    }
    
    #clientes-section .users-table th,
    #clientes-section .users-table td {
        padding: 12px 8px;
    }
}

@media (max-width: 768px) {
    #clientes-section .users-table {
        min-width: 600px;
        font-size: 12px;
    }
    
    #clientes-section .users-table th,
    #clientes-section .users-table td {
        padding: 10px 6px;
    }
    
    #clientes-section .table-container {
        border-radius: 8px;
    }
}

/* Role badges para tipos de cliente */
.role-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    display: inline-block;
}

.role-pessoa_fisica {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b3d9ff;
}

.role-pessoa_juridica {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Melhorar estilos da tabela de clientes para seguir padrão do CRM */
#clientes-section .users-table th:nth-child(8),
#clientes-section .users-table td:nth-child(8) {
    min-width: 100px;
    text-align: center;
}

#clientes-section .users-table th:nth-child(9),
#clientes-section .users-table td:nth-child(9) {
    min-width: 140px;
    text-align: center;
}

#clientes-section .users-table th:nth-child(10),
#clientes-section .users-table td:nth-child(10) {
    min-width: 120px;
    text-align: center;
}

/* Botão de delete */
.btn-delete {
    background-color: #dc3545;
    color: white;
    border: none;
    transition: all 0.2s ease;
    margin-left: 5px;
}

.btn-delete:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    min-width: 35px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-edit {
    background-color: #17a2b8;
    color: white;
    border: none;
    transition: all 0.2s ease;
}

.btn-edit:hover {
    background-color: #138496;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-actions {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* User Info Styles */
.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.user-name,
.db-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
}