* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

body {
    background: #f2f3f7;
    display: flex;
}

.sidebar {
    width: 250px;
    height: 100vh;
    background: #1e1f26;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.logo {
    color: #fff;
    font-weight: 700;
    margin-bottom: 40px;
    font-size: 22px;
    text-align: center;
}

.sidebar a {
    color: #b7b7b7;
    padding: 12px 15px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 16px;
    margin-bottom: 6px;
    transition: .3s;
}

.sidebar a:hover,
.sidebar .active {
    background: #2e3037;
    color: #fff;
}

.main {
    width: 100%;
    padding: 35px;
    align-items: center; /* CENTRALIZA horizontalmente */
    text-align: center;  /* Centraliza texto */
    margin-left: 240px;  /* mesma largura do sidebar */
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 28px;
    color: #333;
}

/* === Correção definitiva para o formulário de busca === */
.busca-form {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
}

/* evita herança width:100% de form input */
.busca-form input {
    flex: 0 0 380px;        /* largura fixa, muda se quiser */
    width: 380px;           /* garante largura consistente */
    max-width: 80vw;        /* responsivo em telas pequenas */
    height: 44px !important;
    padding: 0 12px !important;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 6px;
    line-height: normal !important;
    display: block !important;
    vertical-align: middle !important;
    box-sizing: border-box;
}

/* anula a regra global form button { margin-top } */
.busca-form button,
.busca-form .btn-buscar {
    margin-top: 0 !important;    /* ESSENCIAL: remove o espaçamento que puxava pra baixo */
    flex: 0 0 auto;
    height: 44px !important;
    padding: 0 18px !important;
    background: #d67b00;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

/* hover/ativa */
.busca-form .btn-buscar:hover {
    background: #b76900;
    transform: scale(1.03);
}

/* Botão de Buscar (Manter ou ajustar se quiser igual) e Botão Mostrar Todos */
/* Botão de Buscar (dentro do form) e Botão Mostrar Todos (agora fora) */
.busca-form button,
.btn-todos { /* REMOVIDO O .busca-form DAQUI */
    margin-top: 0 !important;
    flex: 0 0 auto;
    height: 44px !important;
    padding: 0 18px !important;
    background: #28a745; /* Verde */
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    text-decoration: none !important; 
}

/* Hover/Ativa */
.busca-form button:hover,
.btn-todos:hover { /* REMOVIDO O .busca-form DAQUI TAMBÉM */
    background: #218838; /* Verde mais escuro no hover para combinar */
    transform: scale(1.03);
    color: white;
}

.texto-aprovacao {
    width: 100%;
    display: block;
    text-align: center;
    font-size: 9px;
    font-weight: bold;
    line-height: 1.2;

    /* FORÇA QUEBRA DE LINHA */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}


.btn-primary {
    background: #4c6ef5;
    padding: 12px 20px;
    border-radius: 10px;
    color: white;
    text-decoration: none;
    transition: .2s;
}

.btn-primary:hover {
    background: #3b5bd8;
}

/* ===== BUTTON ===== */
.btn-success {
    margin-top: 10px;
    padding: 14px 20px;
    border: none;
    font-size: 17px;
    border-radius: 12px;
    background: #4CAF50;
    color: white;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: .25s;
}

.btn-success:hover {
    background: #449b48;
}

.table-area {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th {
    text-align: center;
    color: #555;
    padding: 12px;
    border-bottom: 2px solid #e9e9e9;
}

td {
    padding: 12px;
    border-bottom: 1px solid #f1f1f1;
}

td a.btn-edit,
td a.btn-delete {
    display: inline-block;
}

td:last-child {
    
    gap: 8px;        /* espaço entre os botões */
    justify-content: center;
    align-items: center;
}


.badge {
    padding: 5px 12px;
    border-radius: 8px;
    background: #e3e7ff;
    color: #334bff;
    font-weight: bold;
}

.form-card {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 650px;
}

form label {
    font-size: 15px;
    color: #444;
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
}

form textarea,
form input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    font-size: 16px;
}

form textarea {
    height: 140px;
    resize: none;
}

form button {
    margin-top: 25px;
}
.logo-area {
    text-align: center;
    margin-bottom: 35px;
}

.logo-area img {
    width: 160px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
}

.table-wrapper {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

table th {
    background: #3aa2de;
    color: white;
    padding: 14px;
    font-size: 16px;
}

table td {
    padding: 14px;
    border-bottom: 1px solid #eee;
}

table tr:hover {
    background: #f4f4f4;
}


.btn-edit,
.btn-delete {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
    margin-right: 5px;
    color: white;
}

.btn-edit {
    background: #2196F3;
}

.btn-edit:hover {
    background: #0b7dda;
}

.btn-delete {
    background: #f44336;
}

.btn-delete:hover {
    background: #d63226;
}

.btn-edit, .btn-delete {
    padding: 4px 8px;
    font-size: 13px;
}


.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pg-btn {
    padding: 6px 12px;
    background: #eee;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.pg-btn:hover {
    background: #ddd;
}

.pg-btn.active {
    background: #3085d6;
    color: #fff;
}


.status-icon {
    font-size: 22px;
    font-weight: bold;
}

.status-yes {
    color: green;
}

.status-no {
    color: red;
}

.resposta-box {
    background: #f7f7f7;
    border-left: 4px solid #4a67ff;
    padding: 10px 14px;
    border-radius: 6px;
    max-width: 450px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    display: block;
    white-space: normal;
}

.resposta-box {
    background: #f7f7f7;
    border-left: 4px solid #3aa2de;
    padding: 10px 14px;
    border-radius: 6px;
    max-width: 450px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    display: block;
    white-space: normal;
}

.vermais-btn {
    color: ##3aa2de;
    cursor: pointer;
    font-weight: bold;
    display: inline-block;
    margin-top: 6px;
}

.top-header {
    display: flex;
    flex-direction: column;
    align-items: center; /* centraliza TUDO */
    gap: 15px;
    margin-bottom: 25px;
}

.center-btn {
    text-align: center;
    width: fit-content;
}

.btn-danger {
    background: #ff4b4b;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
}

.btn-danger:hover {
    background: #e03b3b;
}

/* Caixa bonita ao redor */
.select-custom {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.select-custom select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid #ddd;
    background: #fafafa;
    font-size: 16px;
    color: #444;
    appearance: none; /* remove o select feio */
    cursor: pointer;
    transition: 0.2s;
}

/* Efeito ao focar */
.select-custom select:focus {
    border-color: #0077ff;
    background: #fff;
    box-shadow: 0 0 5px rgba(0, 119, 255, 0.3);
    outline: none;
}

/* SETINHA estilizada */
.select-custom::after {
    content: "▾";
    font-size: 20px;
    color: #555;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Hover */
.select-custom select:hover {
    background: #f0f0f0;
}

/* Reduz a altura das linhas */
table td, table th {
    padding: 6px 10px;      /* era 12px ou mais */
    line-height: 1.1;       /* deixa mais compacto */
}

/* Ajusta fonte da tabela */
table {
    font-size: 15px;        /* menor, mas ainda confortável */
}

/* Evita que a linha cresça por causa do switch */
.switch-form {
    display: flex;
    justify-content: center;
}

.switch {
    position: relative;
    display: inline-block;
    width: 70px;
    height: 24px; /* MENOR */
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Container interno com textos */
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #e74c3c;
    border-radius: 24px;
    transition: .3s;
    font-size: 10px;

    display: flex;
    align-items: center;
    justify-content: flex-end; /* texto "Não" fica à direita */
    padding: 0 6px;
}

/* Texto SIM (fica à esquerda quando ativo) */
.slider .on {
    display: none;
    color: #fff;
    margin-right: auto;
}

/* Texto NÃO, fica à direita */
.slider .off {
    display: inline;
    color: #fff;
    margin-left: auto;
}

/* Quando marcado */
.switch input:checked + .slider {
    background-color: #2ecc71;
    justify-content: flex-start; /* "Sim" vai para a esquerda */
}

.switch input:checked + .slider .on {
    display: inline;
}

.switch input:checked + .slider .off {
    display: none;
}


/* Quando marcado */
.switch input:checked + .slider {
    background-color: #2ecc71;
}

.switch input:checked + .slider .on {
    display: inline;
}

.switch input:checked + .slider .off {
    display: none;
}

/* Indicador (bolinha) mais fino */
.slider::before {
    content: "";
    height: 18px;      /* era maior */
    width: 18px;       /* idem */
    left: 3px;
    bottom: 3px;
    background-color: white;
    position: absolute;
    border-radius: 50%;
    transition: .3s;
}

.switch input:checked + .slider::before {
    transform: translateX(46px); /* ajustado ao tamanho menor */
}

.btn-lote {
    background-color: #54b84b;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    margin-left: 10px;
    transition: .2s;
}

.btn-lote:hover {
    background-color: #d68910;
}

.sidebar {
    width: 240px;                /* Não fica gigante */
    background: #1f2937;         /* Mesmo estilo escuro */
    color: white;
    height: 100vh;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    box-shadow: 2px 0 6px rgba(0,0,0,0.2);
}

/* Logo */
.logo-area {
    text-align: center;
    margin-bottom: 15px;
}

.logo-area img {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

.logo-area h2 {
    margin-top: 10px;
    font-size: 18px;
    font-weight: bold;
}

/* Menu titles */
.menu-title {
    margin: 10px 0 5px;
    font-weight: bold;
    opacity: 0.9;
}

/* Links */
.sidebar a {
    display: block;
    padding: 8px 10px;
    color: #e5e7eb;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: .2s;
}

.sidebar a:hover {
    background: #374151;
}

.sidebar a.active {
    background: #4b5563;
    font-weight: bold;
}

/* Separator */
.sidebar hr {
    border: none;
    border-bottom: 1px solid #4b5563;
    margin: 15px 0;
}

.grupos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Cada card */
.grupo-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Título do card */
.grupo-card h3 {
    text-align: center;
    margin-bottom: 10px;
}

/* A listinha de alunos */
.grupo-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Cada aluno */
.grupo-lista li {
    background: #f5f5f5;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-weight: 600;
    text-align: center;
}

.centro-grupos {
    display: flex;
    flex-direction: column;
    align-items: center; /* centraliza horizontalmente */
    justify-content: center; /* opcional, centraliza verticalmente */
    width: 100%;
    text-align: center;
}

.centro-grupos .form-card {
    width: 350px; /* tamanho ideal */
    margin-top: 15px;
}

.centro-grupos h1 {
    margin-bottom: 15px;
}

.btn-warning {
    margin-top: 10px;
    padding: 14px 20px;
    border: none;
    font-size: 17px;
    border-radius: 12px;
    background: #f0ad4e;
    color: white;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: .25s;
}

.btn-warning:hover {
    background-color: #ec971f;
}

.header-buttons form,
.header-buttons button,
.header-buttons a {
    width: auto !important;       /* não ocupa 100% */
    min-width: 120px;             /* largura mínima confortável */
    padding: 10px 18px;           /* tamanho dos botões */
    font-size: 15px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
}

/* btn-primary personalizado para header */
.header-buttons .btn-primary {
    background-color: #4c6ef5;
    color: white;
    border: none;
}

.header-buttons .btn-primary:hover {
    background-color: #3b5bd8;
}

/* btn-lote personalizado */
.header-buttons .btn-lote {
    background-color: #54b84b;
    color: white;
    border: none;
}

.header-buttons .btn-lote:hover {
    background-color: #449b48;
}

/* Estilo geral do formulário */
.busca-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Campo SELECT personalizado */
.busca-form select {
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #ffffff;
    cursor: pointer;
    color: #333;
    appearance: none;

    background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;

    transition: all 0.2s ease-in-out;
}

/* Hover */
.busca-form select:hover {
    border-color: #777;
}

/* Foco */
.busca-form select:focus {
    outline: none;
    border-color: #2a7cff;
    box-shadow: 0 0 3px rgba(42,124,255,0.5);
}

/* Para garantir alinhamento em telas pequenas */
@media (max-width: 600px) {
    .busca-form {
        flex-wrap: wrap;
    }
    .busca-form select,
    .busca-form input {
        width: 100%;
    }
}
