* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f8;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 25px;
}

header h1 {
    color: #0066cc;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

header p {
    color: #666;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}

input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: #0066cc;
    outline: none;
}

button {
    width: 100%;
    padding: 14px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #005bb5;
}

button:disabled {
    background-color: #88aacc;
    cursor: not-allowed;
}

.status {
    margin-top: 18px;
    text-align: center;
    font-size: 0.95rem;
    min-height: 24px;
}

.status.success {
    color: #2e7d32;
}

.status.error {
    color: #c62828;
}

/* --- Campo de matrículas em chips --- */

.chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 52px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    cursor: text;
    transition: border-color 0.2s;
}

.chips:focus-within {
    border-color: #0066cc;
}

.chips-lista {
    display: contents;   /* os <li> participam do flex da caixa */
    list-style: none;
}

.chips input {
    flex: 1 1 140px;
    min-width: 120px;
    border: none;
    outline: none;
    padding: 6px 4px;
    font-size: 1rem;
    background: transparent;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px 4px 3px 10px;
    border-radius: 999px;
    background: #e6f0fa;
    color: #004c99;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

.chip.invalida {
    background: #fdecea;
    color: #c62828;
    outline: 1px solid #ef9a9a;
}

.chip-texto {
    cursor: pointer;
}

/* sobrescreve o estilo genérico de button (azul, largura total) */
.chip .chip-remover {
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 1rem;
    line-height: 1;
    font-weight: 700;
}

.chip .chip-remover:hover {
    background: rgba(0, 0, 0, 0.08);
}

.ajuda {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #666;
}

.ajuda kbd {
    padding: 0 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.8rem;
    background: #f7f7f7;
}

.contador {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #2e7d32;
    min-height: 1.2em;
}

.contador.erro {
    color: #c62828;
}