/* Importação de Fonte Moderna */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

:root {
    --primary: #d35400;        /* Laranja Sabor das Emoções */
    --primary-hover: #e67e22;
    --secondary: #2c3e50;      /* Cinza escuro para textos */
    --bg-fundo: #f8f9fa;       /* Cinza muito claro para o fundo */
    --danger: #e74c3c;         /* Vermelho para o botão Limpar */
    --success: #27ae60;        /* Verde para status Respondido */
    --white: #ffffff;
    --border: #ececec;
    --radius-btn: 50px;        /* Botões Totalmente Arredondados */
    --radius-card: 15px;       /* Arredondamento dos Cards */
}

/* Reset Geral */
* { 
    box-sizing: border-box; 
    -webkit-font-smoothing: antialiased;
}

body { 
    font-family: 'Montserrat', sans-serif; 
    background-color: var(--bg-fundo); 
    color: var(--secondary); 
    margin: 0; 
    padding-top: 100px; /* Espaço para o header fixo */
    line-height: 1.6;
}

/* ==========================================================================
   CABECALHO FIXO (LOGO À ESQUERDA)
   ========================================================================== */
.top-navbar {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    height: 85px;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    padding: 0 40px; /* Alinhamento da logo à esquerda */
    z-index: 1000;
}

.top-navbar img { 
    height: 55px; 
}

/* ==========================================================================
   CONTAINERS E ESTRUTURA
   ========================================================================== */
.container { 
    max-width: 900px; 
    margin: 0 auto; 
    padding: 20px; 
}

.admin-header, .form-intro {
    margin-bottom: 30px;
    text-align: left;
}

.admin-header h1, .form-intro h1 {
    color: var(--primary);
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

/* ==========================================================================
   BARRA DE PROGRESSO (GOOGLE FORMS STYLE)
   ========================================================================== */
.progress-container {
    width: 100%;
    background: #e0e0e0;
    height: 8px;
    border-radius: 10px;
    margin-bottom: 40px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%; /* Controlado via JS */
    transition: width 0.4s ease;
}

/* ==========================================================================
   LÓGICA DE ETAPAS (STEPPER)
   ========================================================================== */
.form-step {
    display: none; /* Esconde todas as etapas por padrão */
    animation: fadeIn 0.5s ease;
}

.form-step.active {
    display: block; /* Mostra apenas a etapa ativa */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   CARDS DE QUESTÕES E BLOCOS
   ========================================================================== */
.block-header {
    margin-bottom: 25px;
}

.block-header h2 {
    color: var(--primary);
    font-size: 22px;
    margin-bottom: 10px;
}

.block-header p {
    font-style: italic;
    color: #7f8c8d;
    font-size: 14px;
}

.question-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-card);
    margin-bottom: 20px;
    border-left: 6px solid var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.question-card p {
    font-weight: 600;
    margin-bottom: 15px;
}

/* ==========================================================================
   ESCALA LIKERT (0-4)
   ========================================================================== */
.likert-scale {
    display: flex;
    justify-content: space-between;
    background: #fafafa;
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
}

.likert-option {
    text-align: center;
    flex: 1;
    cursor: pointer;
}

.likert-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.likert-option span {
    display: block;
    font-size: 11px;
    color: #95a5a6;
    margin-top: 5px;
    font-weight: 600;
}

/* ==========================================================================
   BOTÕES E ACÇÕES (ARREDONDADOS)
   ========================================================================== */
.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-card);
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.btn-modern {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px 35px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    font-size: 15px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(211, 84, 0, 0.2);
}

.btn-modern:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-prev {
    background: #ecf0f1;
    color: #7f8c8d;
    box-shadow: none;
}

.btn-prev:hover {
    background: #bdc3c7;
}

.btn-outline {
    background: transparent;
    color: var(--danger);
    border: 2px solid var(--danger);
    padding: 12px 25px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-outline:hover {
    background: var(--danger);
    color: var(--white);
}

/* ==========================================================================
   TABELA E GESTÃO (INDEX.PHP)
   ========================================================================== */
.table-container { 
    background: var(--white); 
    border-radius: var(--radius-card); 
    overflow: hidden; 
    border: 1px solid var(--border);
}

.grid-links { width: 100%; border-collapse: collapse; }
.grid-links th { 
    background: #fdfdfd; 
    padding: 18px; 
    text-align: left; 
    font-size: 12px; 
    text-transform: uppercase;
    color: #888;
}
.grid-links td { padding: 15px; border-top: 1px solid var(--border); }

.input-link-readonly {
    width: 100%;
    padding: 8px;
    border: 1px solid #f1f1f1;
    background: #fafafa;
    border-radius: 8px;
    font-size: 12px;
    color: #666;
}

.badge { padding: 5px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.status-criado { background: #e8f8f5; color: #1abc9c; }
.status-respondido { background: #f2f3f4; color: #7f8c8d; }

.alert-info {
    background: #e1f5fe;
    color: #0277bd;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    border-left: 5px solid #0277bd;
    font-weight: 600;
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 768px) {
    .top-navbar { padding: 0 20px; }
    .top-navbar img { height: 40px; }
    .actions-bar { flex-direction: column; align-items: stretch; gap: 15px; }
    .likert-scale { flex-wrap: wrap; }
    .likert-option { flex: 0 0 33%; margin-bottom: 10px; }
}