body {
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* ✅ Header responsivo (quebra no mobile) */ header {
    position: sticky;
    top: 0;
    z-index: 20;

    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;

    padding: 10px 16px;
    background: linear-gradient(180deg,#020617,#020617);
    border-bottom: 1px solid rgba(30,41,59,.9);
    box-shadow: 0 10px 30px rgba(0,0,0,.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* lado esquerdo */ header .left {
    display:flex;
    align-items:center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

/* logo/imagem */ header .brand {
    display:flex;
    align-items:center;
    gap: 10px;
    min-width: 0;
}

header .brand img {
    height: 40px;
    width: auto;
    display:block;
}

/* badge “editando aluno” */ .impersonation-badge {
    font-size: 12px;
    color: rgba(250,204,21,.95);
    white-space: nowrap;
}

/* form do select */ header .row-inline {
    display:flex;
    align-items:center;
    gap: 10px;
    margin: 0;
}

/* lado direito */ header .user {
    display:flex;
    align-items:center;
    gap: 10px;
    font-size: 13px;
    min-width: 0;
}

header .user img {
    width: 34px;
    height: 34px;
    border-radius: 0;
    border: 1px solid rgba(56,189,248,.8);
    object-fit: cover;
    background: #020617;
}

header .user .who {
    display:flex;
    flex-direction:column;
    gap: 2px;
    min-width: 0;
}

header .user .who strong {
    max-width: 70vw;
}

header a.logout {
    color: rgba(248,113,113,.95);
    text-decoration:none;
    font-size: 12px;
}

header a.logout:hover {
    text-decoration: underline;
}

/* ✅ Mobile: empilha tudo (um abaixo do outro) */ @media (max-width: 820px) {
    header{
    flex-direction: column;
    align-items: stretch;
}

header .left {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

header .row-inline {
    width: 100%;
}

header .row-inline select {
    width: 100%;
}

.impersonation-badge {
    white-space: normal;
}

header .user {
    width: 100%;
    justify-content: space-between;
}

} .site-menu {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.site-menu a {
    color: #e5e7eb;
    text-decoration: none;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.4);
    font-size: 0.9rem;
}

.site-menu a:hover {
    background: rgba(56,189,248,0.12);
    border-color: #38bdf8;
}

main {
    padding: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(148,163,184,0.3);
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

h1, h2 {
    color: #1a73e8;
    margin-bottom: 1.5rem;
    text-align: center;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, select, button {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    background-color: #1a73e8;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: #1557b0;
}

.hidden {
    display: none;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    color: #1a73e8;
}

.counter {
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}