* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #f4f6f8;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: #1f2937;
    color: #fff;
    padding: 20px;
}

.sidebar h2 {
    margin-bottom: 30px;
    font-size: 20px;
}

.sidebar a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.sidebar a:hover {
    background: #374151;
    color: #fff;
}

.main {
    flex: 1;
    padding: 30px;
}

.topbar {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    font-size: 18px;
    font-weight: bold;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.card strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #111827; /* alto contraste */
    margin-bottom: 8px;
}

/* ===============================
   DASHBOARD – MELHORIA DE CONTRASTE
   =============================== */

.cards .card strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.cards .card {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
}

.table-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

button {
    padding: 10px 15px;
    border: none;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

button.secondary {
    background: #6b7280;
}

form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

input, select {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

/* =====================================================
   FORMULÁRIOS DE CADASTRO (CLIENTES / DISTRIBUIDORES)
   CSS ISOLADO — NÃO AFETA OUTRAS TELAS
   ===================================================== */

.form-crm {
    display: block !important;
}

.form-crm .form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    width: 100%;
}

.form-crm .form-row.full {
    flex-direction: column;
}

.form-crm .form-col-2 > * {
    flex: 1;
}

.form-crm .form-col-3 > * {
    flex: 1;
}

.form-crm .form-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.form-crm h4 {
    margin: 20px 0 8px;
    font-size: 14px;
    color: #111827;
}

/* ===============================
   BOTÕES – PADRÃO CRM WEGE
   =============================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 8px 14px;
    border-radius: 10px; /* 👈 arredondado */
    font-size: 13px;
    font-weight: 600;

    text-decoration: none;
    cursor: pointer;
    border: none;

    transition: all 0.2s ease-in-out;
}

/* tamanhos */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* cores */
.btn-primary {
    background: #2563eb; /* azul moderno */
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-success {
    background: #16a34a;
    color: #fff;
}

.btn-success:hover {
    background: #15803d;
}

.btn-warning {
    background: #f59e0b;
    color: #fff;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* evita quebra de linha nas ações */
.text-nowrap {
    white-space: nowrap;
}

/* ===============================
   LOGO – BRANDING WEGE
   =============================== */

.sidebar-logo {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar-logo img {
    max-width: 160px;
    height: auto;
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo img {
    max-width: 180px;
    height: auto;
}