:root {
    --brand-color: #0056b3;
}

* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f8f9fa; margin: 0; padding-bottom: 40px; color: #333; }
.hidden { display: none !important; }

/* Cabeçalho White-Label */
.main-header {
    background: linear-gradient(135deg, var(--brand-color) 0%, #1e293b 160%);
    color: white; padding: 28px 20px 34px 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-bottom-left-radius: 30px; border-bottom-right-radius: 30px; position: relative; text-align: center;
}
.brand-header { display: inline-flex; align-items: center; justify-content: center; gap: 14px; }
.brand-logo { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: white; padding: 3px; }
.main-header h1 { margin: 0; font-size: 26px; font-weight: 800; }
.main-header .slogan { font-size: 11px; opacity: 0.85; margin-top: 2px; text-transform: uppercase; letter-spacing: 2.5px; }

.home-link {
    position: absolute; top: 20px; left: 20px; background: rgba(255, 255, 255, 0.15); color: white;
    text-decoration: none; padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.3); transition: 0.2s; display: flex; align-items: center; gap: 6px;
}
.home-link:hover { background: rgba(255, 255, 255, 0.28); }

/* Login */
.login-wrapper { display: flex; justify-content: center; align-items: center; min-height: 55vh; padding: 30px 20px; }
.login-box { background: white; padding: 38px 30px; border-radius: 14px; box-shadow: 0 8px 25px rgba(0,0,0,0.08); text-align: center; width: 100%; max-width: 370px; }
.login-box h3 { margin-top: 0; margin-bottom: 22px; color: #1e293b; font-size: 20px; }
.login-box input { width: 100%; padding: 12px; margin-bottom: 14px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }
.login-box button { background: var(--brand-color); color: white; border: none; padding: 12px; font-size: 15px; font-weight: bold; border-radius: 8px; cursor: pointer; width: 100%; transition: 0.2s; }
.login-box button:hover { filter: brightness(0.9); }
.error-msg { color: #dc3545; font-size: 13px; margin-top: 12px; display: none; font-weight: 600; }

/* Container e Abas */
.container { max-width: 1060px; margin: auto; padding: 28px 20px; }
.dashboard-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 15px; }
.tabs { display: flex; gap: 8px; background: #e2e8f0; padding: 5px; border-radius: 10px; }
.tab-btn { background: transparent; border: none; padding: 10px 18px; border-radius: 8px; cursor: pointer; font-weight: bold; color: #475569; transition: 0.2s; font-size: 14px; }
.tab-btn.active { background: #fff; color: var(--brand-color); box-shadow: 0 2px 5px rgba(0,0,0,0.06); }
.logout-btn { background: #dc3545; color: white; border: none; padding: 9px 16px; border-radius: 8px; cursor: pointer; font-weight: bold; font-size: 13px; }
.logout-btn:hover { background: #c82333; }

/* Grid NPS */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.colab-card { background: #fff; padding: 24px; border-radius: 14px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: flex; flex-direction: column; }
.colab-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 14px; margin-bottom: 14px; }
.colab-header h2 { margin: 0; font-size: 19px; color: var(--brand-color); }
.nps-score { font-size: 32px; font-weight: 800; }
.stats { display: flex; justify-content: space-between; font-size: 13px; color: #64748b; margin-bottom: 15px; background: #f8fafc; padding: 8px 12px; border-radius: 8px; }

.feedback-list { max-height: 360px; overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 12px; }
.feedback-item { background: #fdfdfd; padding: 12px; border-radius: 8px; border: 1px solid #f1f5f9; border-left: 4px solid #ccc; font-size: 13px; text-align: left; }
.feedback-item-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; color: #64748b; align-items: center; }
.feedback-text-block { margin-bottom: 6px; line-height: 1.4; color: #334155; }
.feedback-negative-box { background: #fff5f5; padding: 8px; border-radius: 6px; border-left: 3px solid #dc3545; margin-top: 6px; }

/* Painéis de Gestão */
.admin-panel { display: grid; grid-template-columns: 1fr 2fr; gap: 28px; }
@media (max-width: 768px) { .admin-panel { grid-template-columns: 1fr; } }

.form-box, .list-box { background: #fff; padding: 24px; border-radius: 14px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.form-box.modo-edicao { border: 2px solid #ffc107; }
.form-box h3, .list-box h3 { margin-top: 0; color: #1e293b; margin-bottom: 18px; border-bottom: 2px solid #f1f5f9; padding-bottom: 10px; }

.form-group { margin-bottom: 14px; text-align: left; }
.form-group label { display: block; font-size: 13px; color: #475569; margin-bottom: 5px; font-weight: bold; }
.form-group input, .form-group select { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }

.btn-group { display: flex; gap: 10px; margin-top: 18px; }
.btn-submit-colab { background: #10b981; color: white; border: none; padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer; flex: 1; }
.btn-submit-colab.btn-update { background: #f59e0b; color: #1e293b; }
.btn-cancel { background: #64748b; color: white; border: none; padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer; flex: 1; display: none; }

.team-list { display: flex; flex-direction: column; gap: 10px; }
.team-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 15px; background: #f8fafc; border-radius: 10px; border: 1px solid #e2e8f0; }
.team-item-info { display: flex; align-items: center; gap: 14px; }
.team-item-img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brand-color); }
.team-item-text strong { display: block; color: #1e293b; font-size: 15px; }
.team-item-text span { color: #64748b; font-size: 12px; }

.action-btns { display: flex; gap: 8px; }
.btn-edit { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: bold; }
.btn-delete { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: bold; }

.badge-gerente { background: var(--brand-color); color: white; font-size: 10px; padding: 2px 7px; border-radius: 4px; margin-left: 5px; }
.badge-consultor { background: #64748b; color: white; font-size: 10px; padding: 2px 7px; border-radius: 4px; margin-left: 5px; }

/* Modais */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-box { background: #fff; padding: 28px; border-radius: 14px; text-align: center; max-width: 330px; width: 90%; box-shadow: 0 10px 25px rgba(0,0,0,0.2); position: relative; }
.modal-close { position: absolute; top: 12px; right: 15px; font-size: 22px; cursor: pointer; color: #94a3b8; }
.modal-msg { margin: 10px 0 22px; color: #334155; font-size: 15px; }
.btn-modal-ok { background: var(--brand-color); color: white; border: none; padding: 11px; border-radius: 8px; cursor: pointer; font-weight: bold; width: 100%; }
.btn-modal-danger { background: #dc3545; color: white; border: none; padding: 11px; border-radius: 8px; cursor: pointer; font-weight: bold; width: 100%; }
.btn-modal-cancel { background: #64748b; color: white; border: none; padding: 11px; border-radius: 8px; cursor: pointer; font-weight: bold; width: 100%; }

.lock-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #0f172a; color: white; display: flex; justify-content: center; align-items: center; z-index: 9999; padding: 20px; text-align: center; }
.lock-box { max-width: 400px; background: #1e293b; padding: 35px; border-radius: 18px; }
.btn-outline-light { background: transparent; color: #cbd5e1; border: 1px solid #475569; padding: 10px 20px; border-radius: 8px; cursor: pointer; margin-top: 15px; }

/* Botão de Retorno ao Super Admin */
.superadmin-link {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.superadmin-link:hover {
    background: #1e293b;
    transform: translateY(-1px);
}

/* Banner de Aviso quando Super Admin acessa instância inativa */
.status-warning-banner {
    background: #fef3c7;
    color: #92400e;
    border-bottom: 1px solid #fde68a;
    text-align: center;
    padding: 10px 20px;
    font-size: 13px;
}