/* CFC Nogueira - layout fiel aos prints de referência */
:root {
    --green: #2e7d32;
    --green-dark: #1b5e20;
    --green-header: #388e3c;
    --green-light: #e8f5e9;
    --orange: #e65100;
    --red: #c62828;
    --gray-bg: #f0f0f0;
    --border: #ddd;
    --text: #333;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Roboto', sans-serif; color: var(--text); }

/* ========== PÁGINAS PÚBLICAS ========== */
.public-page {
    background: #fff;
    min-height: 100vh;
    padding-bottom: 70px;
}
.public-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    padding: 2rem 1.5rem;
    text-align: center;
}
.public-login { justify-content: flex-start; padding-top: 3rem; min-height: auto; }
.logo-circle {
    width: 110px; height: 110px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--green);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.95rem;
    color: var(--green-dark);
    line-height: 1.1;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.logo-circle span { font-size: 0.7rem; font-weight: 600; }
.logo-large { width: 130px; height: 130px; font-size: 1.05rem; margin-bottom: 1rem; }
.public-title { color: var(--green-dark); font-size: 1.5rem; margin-bottom: 0.35rem; }
.public-slogan { color: #888; font-size: 0.95rem; margin-bottom: 1.75rem; }
.btn {
    display: inline-block; border: none; cursor: pointer;
    text-decoration: none; text-align: center; font-weight: 600;
}
.btn-green { background: var(--green); color: #fff; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-pill {
    width: 100%; max-width: 320px;
    padding: 0.95rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
}
.auth-admin {
    position: fixed; top: 0.75rem; right: 0.75rem; z-index: 50;
    width: 42px; height: 42px;
    background: var(--green); color: #fff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; font-size: 1.1rem;
}
.login-form { width: 100%; max-width: 320px; text-align: left; }
.login-form label { display: block; font-size: 0.85rem; color: #555; margin-bottom: 0.3rem; }
.login-form input {
    width: 100%; padding: 0.8rem 1rem;
    border: none; background: #e8e8e8;
    border-radius: 6px; margin-bottom: 0.85rem; font-size: 1rem;
}
.login-erro { background: #ffebee; color: #c62828; padding: 0.65rem; border-radius: 6px; margin-bottom: 0.75rem; font-size: 0.85rem; }
.login-links { margin-top: 1.25rem; font-size: 0.8rem; }
.login-links a { display: block; color: var(--green-dark); text-decoration: none; margin: 0.5rem 0; font-weight: 500; }

.public-bottom-nav, .aluno-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    display: flex; background: #fff;
    border-top: 1px solid #e0e0e0;
    z-index: 200; height: 60px;
}
.public-bottom-nav a, .aluno-bottom-nav .nav-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-decoration: none; color: #888;
    font-size: 0.65rem; gap: 2px;
    border-top: 3px solid transparent;
}
.public-bottom-nav a.active, .aluno-bottom-nav .nav-item.active {
    color: var(--green-dark); border-top-color: var(--green);
    font-weight: 600;
}
.nav-icon { font-size: 1.25rem; line-height: 1; }

/* ========== ÁREA DO ALUNO (APP) ========== */
.aluno-app {
    background: var(--gray-bg);
    min-height: 100vh;
    padding-bottom: 65px;
}
.aluno-header {
    background: var(--green-header);
    color: #fff;
    padding: 0.65rem 1rem;
    display: flex; align-items: center; justify-content: space-between;
}
.aluno-header-brand { display: flex; align-items: center; gap: 0.65rem; }
.aluno-header .logo-circle {
    width: 48px; height: 48px; font-size: 0.45rem;
    border-width: 2px; flex-shrink: 0;
}
.aluno-header .logo-circle span { font-size: 0.38rem; }
.brand-text strong { display: block; font-size: 0.95rem; }
.brand-text small { font-size: 0.65rem; opacity: 0.9; }
.aluno-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.25);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; text-decoration: none; font-size: 1rem;
    border: 2px solid rgba(255,255,255,0.5);
}

.aluno-subheader {
    background: var(--green-header);
    color: #fff;
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 1rem;
}
.aluno-back {
    color: #fff; text-decoration: none; font-size: 1.4rem;
    line-height: 1; padding: 0.15rem 0.35rem;
}
.aluno-subheader h1 { font-size: 1.1rem; font-weight: 600; }

.aluno-main { padding: 1rem; max-width: 600px; margin: 0 auto; }
.welcome-msg { font-size: 0.95rem; margin-bottom: 1.25rem; color: #444; }
.welcome-msg strong { color: var(--green-dark); }

/* Gauges semicirculares */
.gauge-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.gauge-card {
    background: #fff; border-radius: 8px;
    padding: 1rem 0.5rem; text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.gauge-card p { font-size: 0.8rem; color: #555; margin-top: 0.35rem; }
.semi-gauge {
    width: 100px; height: 55px;
    margin: 0 auto; position: relative; overflow: hidden;
}
.semi-gauge::before {
    content: ''; position: absolute;
    width: 100px; height: 100px;
    border-radius: 50%;
    border: 10px solid #e0e0e0;
    border-bottom-color: transparent;
    border-left-color: transparent;
    transform: rotate(-45deg);
    top: 0; left: 0;
}
.semi-gauge-fill {
    position: absolute;
    width: 100px; height: 100px;
    border-radius: 50%;
    border: 10px solid var(--green);
    border-bottom-color: transparent;
    border-left-color: transparent;
    transform: rotate(calc(-45deg + (var(--pct) * 1.8deg)));
    top: 0; left: 0;
    transition: transform 0.3s;
}
.semi-gauge-val {
    position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%);
    font-weight: 700; font-size: 1rem; color: var(--green-dark);
}

.status-block { background: #fff; border-radius: 8px; padding: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.status-block h2 { font-size: 0.95rem; color: var(--green-dark); margin-bottom: 0.75rem; }
.status-list { list-style: none; }
.status-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.55rem 0; border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
}
.status-list li:last-child { border-bottom: none; }

.badge {
    padding: 0.2rem 0.55rem; border-radius: 4px;
    font-size: 0.7rem; font-weight: 600; white-space: nowrap;
}
.badge-ok { background: #c8e6c9; color: #2e7d32; }
.badge-warn { background: #fff3e0; color: #e65100; }
.badge-info { background: #e3f2fd; color: #1565c0; }
.badge-pending { background: #fce4ec; color: #c62828; }

/* Tabelas aluno */
.table-wrap { overflow-x: auto; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.aluno-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; min-width: 480px; }
.aluno-table th {
    background: var(--green-dark); color: #fff;
    padding: 0.65rem 0.5rem; text-align: left; font-weight: 600;
}
.aluno-table td { padding: 0.6rem 0.5rem; border-bottom: 1px solid #eee; }
.aluno-table tbody tr:nth-child(even) { background: #fafafa; }
.btn-table {
    background: var(--green); color: #fff;
    padding: 0.3rem 0.65rem; border-radius: 4px;
    text-decoration: none; font-size: 0.75rem; font-weight: 600;
}

.info-card {
    background: #fff; border-radius: 8px; padding: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.info-card p { font-size: 0.9rem; margin-bottom: 0.4rem; }
.info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0; font-size: 0.9rem;
}
.field-label { display: block; font-size: 0.85rem; color: #555; margin-bottom: 0.35rem; }
.field-input {
    width: 100%; padding: 0.75rem; border: 1px solid #ddd;
    border-radius: 6px; font-size: 1rem;
}
.empty-msg { color: #999; font-size: 0.9rem; text-align: center; padding: 1.5rem; }
.btn-row { display: flex; flex-direction: column; gap: 0.65rem; margin-top: 1rem; }

.doc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.doc-card { text-align: center; }
.doc-gerados-titulo {
    margin: 1.5rem 0 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
}
.doc-placeholder {
    aspect-ratio: 3/4; background: #eee; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: #999; font-size: 0.8rem; border: 1px solid #ddd;
}
.doc-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; }
.stamp {
    display: inline-block; margin-top: 0.4rem;
    padding: 0.2rem 0.5rem; border: 2px solid var(--red);
    color: var(--red); font-weight: 700; font-size: 0.65rem;
    transform: rotate(-4deg);
}

/* Menu overlay */
.menu-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 300; display: none; align-items: flex-end;
}
.menu-overlay.open { display: flex; }
.menu-sheet {
    background: #fff; width: 100%; max-height: 80vh;
    border-radius: 16px 16px 0 0; overflow-y: auto;
}
.menu-sheet-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.25rem; border-bottom: 1px solid #eee;
    position: sticky; top: 0; background: #fff;
}
.menu-sheet-header button {
    background: none; border: none; font-size: 1.75rem;
    cursor: pointer; color: #666; line-height: 1;
}
.menu-sheet-list a {
    display: block; padding: 0.85rem 1.25rem;
    color: #333; text-decoration: none; font-size: 0.95rem;
    border-bottom: 1px solid #f5f5f5;
}
.menu-sheet-list a.active { color: var(--green-dark); font-weight: 600; background: var(--green-light); }
.menu-logout { color: var(--red) !important; font-weight: 600; }

.aluno-bottom-nav .nav-menu.active {
    background: var(--green-light);
}

/* ========== ADMIN ========== */
.admin-page-login { background: #eceff1; min-height: 100vh; }
.admin-hero {
    height: 200px; background-color: #5ba3d9;
    background-size: cover; background-position: center bottom;
}
.admin-login-container { max-width: 400px; margin: -70px auto 2rem; padding: 0 1rem; position: relative; z-index: 2; }
.admin-login-card {
    background: #fff; border-radius: 8px; padding: 2rem 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); text-align: center;
}
.admin-login-card h1 { font-size: 1.3rem; color: var(--green-dark); margin-bottom: 0.25rem; }
.admin-login-card .slogan { color: #666; font-size: 0.9rem; margin-bottom: 1.25rem; }
.admin-login-card label { display: block; text-align: left; font-size: 0.85rem; margin-bottom: 0.3rem; color: #444; }
.admin-login-card input {
    width: 100%; padding: 0.75rem; border: 1px solid #ccc;
    border-radius: 4px; margin-bottom: 0.85rem; font-size: 1rem;
}
.btn-admin, .btn-salvar-full {
    background: var(--green-dark); color: #fff; border: none;
    font-weight: 700; cursor: pointer; border-radius: 4px;
}
.admin-login-card .btn-admin { width: 100%; padding: 0.9rem; font-size: 1rem; }
.admin-login-links { margin-top: 1rem; font-size: 0.8rem; }
.admin-login-links a { display: block; color: var(--green-dark); text-decoration: none; margin: 0.4rem 0; }
.admin-erro { background: #ffebee; color: #c62828; padding: 0.65rem; border-radius: 6px; margin-bottom: 0.75rem; font-size: 0.85rem; text-align: left; }

.admin-page-app { background: var(--gray-bg); min-height: 100vh; }
.admin-app-bar {
    background: var(--green-dark); color: #fff;
    padding: 0.75rem 1rem;
    display: flex; justify-content: space-between; align-items: center;
}
.admin-app-bar nav a { color: #fff; text-decoration: none; font-size: 0.8rem; margin-left: 1rem; }
.admin-app-body { padding: 1rem; max-width: 1200px; margin: 0 auto; }

.admin-search-form input {
    width: 100%; padding: 0.75rem 1rem;
    border: 1px solid #ccc; border-radius: 4px;
    font-size: 0.95rem; margin-bottom: 1rem;
}
.admin-filter-label { font-size: 0.9rem; color: #555; margin-bottom: 0.65rem; }
.admin-cat-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem; margin-bottom: 1.25rem;
}
.admin-cat-btn {
    padding: 0.45rem 0.25rem; text-align: center;
    background: #fff; border: 1px solid #ccc;
    border-radius: 4px; text-decoration: none;
    color: #333; font-size: 0.8rem; font-weight: 500;
}
.admin-cat-btn.active { background: var(--green-dark); color: #fff; border-color: var(--green-dark); }

.admin-table-wrap { overflow-x: auto; background: #fff; border-radius: 4px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.admin-table th {
    background: var(--green-dark); color: #fff;
    padding: 0.7rem 0.5rem; text-align: left; font-weight: 600;
}
.admin-table td { padding: 0.65rem 0.5rem; border-bottom: 1px solid #eee; }
.admin-table tbody tr:nth-child(odd) { background: #fff; }
.admin-table tbody tr:nth-child(even) { background: #f5f5f5; }
.empty-cell { text-align: center; color: #999; padding: 2rem !important; }
.link-edit { color: var(--green-dark); font-weight: 600; text-decoration: none; }

/* Form editar admin */
.admin-form-panel { background: #fff; border-radius: 8px; padding: 1rem; }
.admin-form-header { margin-bottom: 1rem; }
.admin-form-header h2 { color: var(--green-dark); font-size: 1.1rem; margin-top: 0.5rem; }
.admin-sucesso { background: #e8f5e9; color: #2e7d32; padding: 0.65rem; border-radius: 6px; margin-bottom: 1rem; }
.form-hint { font-size: 0.78rem; color: #666; margin: 0 0 0.45rem; line-height: 1.35; }
.label-opcional { font-weight: 500; text-transform: none; color: #888; }
.admin-doc-preview {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    display: inline-block;
    max-width: 100%;
}
.admin-doc-preview img {
    display: block;
    max-width: 160px;
    max-height: 160px;
    object-fit: cover;
    border-radius: 4px;
}
.admin-doc-preview a { font-size: 0.85rem; color: var(--green-dark); font-weight: 600; }
.form-field input[type="file"] {
    padding: 0.4rem 0;
    border: none;
    background: transparent;
    font-size: 0.82rem;
}
.doc-pdf-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    width: 100%;
    margin-top: 0.5rem;
    border-radius: 6px;
    background: #f0f4f0;
    color: var(--green-dark);
    font-weight: 700;
    text-decoration: none;
    border: 1px dashed #9ccc9c;
}
.dash-header-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Página IP / Localização */
.ip-page { padding-top: 0.75rem; }
.ip-page-top { display: flex; justify-content: flex-end; margin-bottom: 0.75rem; }
.ip-page-title {
    background: var(--green-dark);
    color: #fff;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    padding: 0.85rem 1rem;
    border-radius: 4px 4px 0 0;
}
.ip-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
}
.ip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.ip-table th {
    background: var(--green-dark);
    color: #fff;
    padding: 0.7rem 0.55rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}
.ip-table td {
    padding: 0.65rem 0.55rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.ip-table tbody tr:nth-child(odd) { background: #fff; }
.ip-table tbody tr:nth-child(even) { background: #f7f7f7; }
.ip-link {
    color: #1565c0;
    text-decoration: underline;
    font-weight: 500;
}
.ip-link:hover { color: #0d47a1; }

.form-section {
    border: none; margin-bottom: 1rem; padding: 0;
}
.form-section legend {
    font-weight: 700; color: var(--green-dark);
    font-size: 0.95rem; margin-bottom: 0.75rem;
    width: 100%; padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--green-light);
}
.form-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}
.form-field label {
    display: block; font-size: 0.72rem; font-weight: 600;
    color: #555; margin-bottom: 0.25rem; text-transform: uppercase;
}
.form-field input, .form-field select, .form-field textarea {
    width: 100%; padding: 0.5rem 0.6rem;
    border: 1px solid #ccc; border-radius: 4px; font-size: 0.88rem;
}
.form-field textarea { min-height: 90px; resize: vertical; font-family: inherit; }
.form-field.span-2 { grid-column: span 2; }
.form-field.form-check { display: flex; align-items: flex-end; }
.form-field.form-check label { text-transform: none; font-size: 0.85rem; display: flex; gap: 0.4rem; align-items: center; }
.form-actions-sticky { margin-top: 1rem; }
.btn-salvar-full { width: 100%; padding: 1rem; font-size: 1.05rem; letter-spacing: 0.5px; }

@media (max-width: 900px) {
    .admin-cat-grid { grid-template-columns: repeat(4, 1fr); }
    .form-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .admin-cat-grid { grid-template-columns: repeat(3, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .form-field.span-2 { grid-column: span 1; }
}

/* ========== PAINEL ADMIN — LISTA ALUNOS (print) ========== */
.admin-painel-wrap {
    background: #e8e8e8;
    min-height: 100vh;
    padding: 1.25rem;
}
.dash-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem 1.5rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}
.dash-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.15;
    color: #111;
}
.btn-sair {
    background: #e53935;
    color: #fff;
    text-decoration: none;
    padding: 0.55rem 1.35rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}
.dash-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.dash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}
.dash-btn-blue {
    background: #1e88e5;
    color: #fff;
    border-color: #1e88e5;
}
.dash-btn-outline {
    background: #fff;
    color: #333;
    border-color: #ccc;
}
.dash-btn-danger {
    background: #c62828;
    color: #fff;
    border-color: #c62828;
}
.dash-btn-danger:hover { background: #b71c1c; }
.pg-excluir-form { margin-top: 0.75rem; }
.dash-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.dash-search input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 1px solid #ccc;
    border-radius: 50px;
    font-size: 0.9rem;
    min-width: 0;
}
.dash-search .dash-btn { padding: 0.7rem 1.5rem; }
.dash-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
}
.dash-summary small { display: block; font-size: 0.75rem; color: #888; }
.dash-summary strong { font-size: 1.1rem; color: #111; }
.dash-badge {
    background: #e3f2fd;
    color: #1565c0;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}
.dash-alert { padding: 0.65rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.9rem; }
.dash-alert-ok { background: #e8f5e9; color: #2e7d32; }
.dash-table-scroll {
    overflow-x: auto;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    max-height: 520px;
    overflow-y: auto;
}
.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    min-width: 1100px;
}
.dash-table thead th {
    background: #fff;
    color: #333;
    font-weight: 700;
    text-align: left;
    padding: 0.65rem 0.5rem;
    border-bottom: 2px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1;
}
.dash-table td {
    padding: 0.55rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.dash-table tbody tr:nth-child(even) { background: #f9f9f9; }
.dash-table tbody tr:nth-child(odd) { background: #fff; }
.col-nome { font-weight: 500; max-width: 160px; }
.col-email { max-width: 140px; word-break: break-all; font-size: 0.72rem; }
.thumb-foto {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}
.thumb-empty { background: #ddd; }
.dash-btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.72rem;
    border-radius: 50px;
}
.dash-empty { text-align: center; color: #999; padding: 2rem !important; }
.form-inline { display: inline; margin: 0; }
.doc-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.doc-admin-item { text-align: center; }
.doc-admin-item img { width: 100%; border-radius: 6px; margin-top: 0.5rem; }


/* ========== PAGAMENTOS / MODAIS ========== */
.aluno-alert { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.9rem; }
.aluno-alert-erro { background: #ffebee; color: #c62828; }
.aluno-alert-ok { background: #e8f5e9; color: #2e7d32; }

.exames-actions { margin-bottom: 1rem; }
.btn-pagar-exames {
    width: 100%; padding: 1rem;
    background: linear-gradient(135deg, #5e35b1, #7e57c2);
    color: #fff; border: none; border-radius: 12px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 14px rgba(94,53,177,0.35);
}
.exames-recentes { margin-bottom: 1rem; }
.exames-recentes h3 { font-size: 0.9rem; margin-bottom: 0.5rem; color: #555; }
.exame-pg-item {
    display: flex; justify-content: space-between; align-items: center;
    background: #fff; padding: 0.75rem 1rem; border-radius: 8px;
    text-decoration: none; color: #333; margin-bottom: 0.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.55); z-index: 500;
    align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-card {
    background: #fff; border-radius: 16px; width: 100%; max-width: 520px;
    max-height: 90vh; overflow-y: auto; padding: 1.25rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.modal-header h2 { font-size: 1.1rem; font-weight: 700; color: #222; padding-right: 1rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #888; line-height: 1; }

.select-all-row {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 0.75rem; border: 1px solid #e8e8e8; border-radius: 10px; margin-bottom: 1rem; cursor: pointer;
}
.select-all-row strong { display: block; font-size: 0.95rem; }
.select-all-row small { color: #888; font-size: 0.8rem; }

.exames-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; margin-bottom: 1rem; }
@media (max-width: 480px) { .exames-check-grid { grid-template-columns: 1fr; } }
.exame-check-item {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem;
    padding: 0.65rem; border: 1px solid #eee; border-radius: 10px; cursor: pointer;
}
.exame-check-item input { flex-shrink: 0; }
.exame-nome-pill {
    background: #263238; color: #fff; padding: 0.25rem 0.6rem;
    border-radius: 50px; font-size: 0.78rem; font-weight: 600;
}
.exame-valor-pill {
    background: #1565c0; color: #fff; padding: 0.25rem 0.6rem;
    border-radius: 50px; font-size: 0.78rem; font-weight: 600;
}
.total-selecionado-bar {
    display: flex; justify-content: space-between; align-items: center;
    background: #e3f2fd; padding: 0.85rem 1rem; border-radius: 10px; margin-bottom: 1rem;
}
.total-selecionado-bar strong { font-size: 1.15rem; color: #0d47a1; }
.btn-confirmar-pagamento {
    width: 100%; padding: 0.95rem; border: none; border-radius: 12px;
    background: #1e88e5; color: #fff; font-size: 1rem; font-weight: 600; cursor: pointer;
}
.btn-confirmar-pagamento:disabled { opacity: 0.5; cursor: not-allowed; }

.pg-checkout-card {
    background: #fff; border-radius: 16px; padding: 1.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.pg-checkout-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: #222; }
.pg-valor-badge {
    display: inline-block; background: #263238; color: #fff;
    padding: 0.4rem 1rem; border-radius: 50px; font-weight: 700; margin-bottom: 1rem;
}
.pg-exames-resumo { list-style: none; margin-bottom: 1.25rem; }
.pg-exames-resumo li {
    display: flex; justify-content: space-between; padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0; font-size: 0.9rem;
}
.pg-qr-wrap { text-align: center; margin: 1rem 0; }
.pg-qr-wrap canvas,
.pg-qr-wrap img.pg-qr-img { border-radius: 8px; max-width: 100%; height: auto; }
.pg-chave-row label { font-size: 0.85rem; color: #555; display: block; margin-bottom: 0.35rem; }
.pg-chave-field { display: flex; gap: 0.5rem; }
.pg-chave-field input {
    flex: 1; padding: 0.65rem; border: 1px solid #ddd; border-radius: 8px;
    font-size: 0.85rem; background: #f5f5f5;
}
.btn-copiar {
    padding: 0.65rem 1rem; border: 1px solid #ccc; background: #fff;
    border-radius: 8px; cursor: pointer; font-weight: 600; white-space: nowrap;
}
.pg-acoes-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.btn-pg-acao {
    padding: 0.7rem 1.1rem; border: none; border-radius: 10px;
    font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
    font-size: 0.9rem;
}
.btn-pg-pix { background: #5e35b1; color: #fff; }
.btn-pg-boleto { background: #455a64; color: #fff; }
.pg-info-box {
    background: #f5f5f5; padding: 1rem; border-radius: 10px;
    font-size: 0.9rem; color: #555; line-height: 1.5;
}
.pg-info-ok { background: #e8f5e9; color: #2e7d32; }
.pg-boleto-iframe { width: 100%; height: 420px; border: 1px solid #ddd; border-radius: 8px; margin-top: 1rem; }
.pg-upload-form input[type=file] { display: block; margin: 0.5rem 0; width: 100%; }
.pg-upload-form small { display: block; color: #888; margin-bottom: 0.75rem; font-size: 0.8rem; }
.pg-hint { font-size: 0.9rem; color: #666; margin-bottom: 0.75rem; }

/* Admin config / pagamento detalhe */
.config-form { max-width: 720px; }
.config-section { background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 1.25rem; margin-bottom: 1.25rem; }
.config-section h2 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.config-hint { font-size: 0.85rem; color: #777; margin-bottom: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-group label { display: block; font-size: 0.85rem; margin-bottom: 0.35rem; font-weight: 500; }
.form-group input {
    width: 100%; padding: 0.7rem 1rem; border: 1px solid #ccc;
    border-radius: 8px; font-size: 0.95rem;
}
.config-exames-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.config-exame-item label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.config-preco-wrap { display: flex; align-items: center; gap: 0.35rem; }
.config-preco-wrap span { font-weight: 600; }
.config-preco-wrap input { flex: 1; padding: 0.6rem; border: 1px solid #ccc; border-radius: 8px; }
.config-save { margin-top: 0.5rem; }
.admin-back { margin-bottom: 1rem; }
.admin-back a { color: #1565c0; text-decoration: none; }
.pg-detalhe-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 1.25rem; max-width: 720px; }
.pg-detalhe-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.pg-detalhe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.pg-detalhe-grid small { display: block; font-size: 0.75rem; color: #888; }
.pg-exames-lista { list-style: none; margin: 0.5rem 0 1.25rem; }
.pg-exames-lista li { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid #f0f0f0; }
.pg-arquivo-box { margin: 1.25rem 0; padding-top: 1rem; border-top: 1px solid #eee; }
.pg-upload-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.75rem; }
.pg-status-form { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #eee; }
.pg-status-row { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.pg-status-row select { flex: 1; padding: 0.6rem; border-radius: 8px; border: 1px solid #ccc; }

@media (max-width: 768px) {
    .dash-actions { flex-direction: column; }
    .dash-actions .dash-btn { width: 100%; }
    .dash-header h1 { font-size: 1.35rem; }
    .form-grid { grid-template-columns: 1fr; }
    .ficha-exames-grid { grid-template-columns: 1fr; }
    .ficha-aluno-header { flex-direction: column; }
}

/* Ficha do aluno (admin) */
.link-aluno-nome { color: #1565c0; text-decoration: none; font-weight: 600; }
.link-aluno-nome:hover { text-decoration: underline; }
.ficha-aluno-header {
    display: flex; gap: 1.25rem; align-items: center;
    background: #fff; border: 1px solid #e8e8e8; border-radius: 12px;
    padding: 1.25rem; margin-bottom: 1.25rem; max-width: 900px;
}
.ficha-aluno-foto img, .ficha-foto-empty {
    width: 80px; height: 80px; border-radius: 8px; object-fit: cover;
}
.ficha-foto-empty { background: #ddd; }
.ficha-aluno-info h2 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.ficha-aluno-info p { color: #666; font-size: 0.9rem; margin-bottom: 0.75rem; }
.ficha-aluno-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ficha-section {
    background: #fff; border: 1px solid #e8e8e8; border-radius: 12px;
    padding: 1.25rem; margin-bottom: 1.25rem; max-width: 900px;
}
.ficha-section h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.ficha-exames-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem; margin-top: 1rem;
}
.ficha-exame-card {
    border: 1px solid #e0e0e0; border-radius: 10px; padding: 0.85rem;
    display: flex; flex-direction: column; gap: 0.5rem;
}
.ficha-exame-card.pago { border-color: #a5d6a7; background: #f1f8f4; }
.ficha-exame-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.ficha-exame-top strong { font-size: 0.9rem; }
.ficha-exame-top span { font-size: 0.8rem; color: #555; white-space: nowrap; }
.ficha-pg-card {
    border: 1px solid #e8e8e8; border-radius: 10px; padding: 1rem;
    margin-top: 1rem; background: #fafafa;
}
.ficha-pg-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem;
}
.ficha-pg-header small { display: block; color: #888; font-size: 0.8rem; margin-top: 0.15rem; }
.ficha-pg-header-right { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ficha-pg-label { font-size: 0.85rem; font-weight: 600; color: #555; margin: 0.5rem 0 0.25rem; }
.ficha-boleto-box {
    margin-top: 0.75rem; padding: 1rem; background: #f8f9fa;
    border-radius: 10px; border: 1px solid #e8e8e8;
}
.ficha-boleto-form-full { display: flex; flex-direction: column; gap: 0.5rem; }
.ficha-boleto-form-full label { font-size: 0.85rem; font-weight: 600; color: #444; }
.ficha-boleto-form-full textarea {
    width: 100%; padding: 0.65rem; border: 1px solid #ccc;
    border-radius: 8px; font-family: inherit; font-size: 0.9rem; resize: vertical;
}
.ficha-boleto-desc-label { font-size: 0.8rem; color: #888; margin-bottom: 0.25rem; }
.ficha-boleto-desc-text { font-size: 0.95rem; color: #333; margin-bottom: 0.75rem; line-height: 1.5; }
.ficha-boleto-anexado { margin-bottom: 0.75rem; }
.pg-boleto-descricao {
    background: #e3f2fd; padding: 1rem; border-radius: 10px;
    margin-bottom: 1rem; line-height: 1.5;
}
.pg-boleto-descricao strong { display: block; margin-bottom: 0.35rem; font-size: 0.9rem; }
.pg-boleto-descricao p { margin: 0; color: #333; }

/* ========== PAINEL ALUNO (prints roxos) ========== */
.aluno-painel-app {
    background: #eceef2;
    min-height: 100vh;
    padding: 1rem 1rem 4rem;
}
.aluno-painel-main { max-width: 720px; margin: 0 auto; }
.painel-perfil-card {
    background: #fff; border-radius: 16px; padding: 1.25rem;
    display: flex; gap: 1rem; align-items: flex-start;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); margin-bottom: 1rem;
}
.painel-perfil-foto img, .painel-foto-placeholder {
    width: 90px; height: 90px; border-radius: 12px; object-fit: cover;
}
.painel-foto-placeholder {
    background: linear-gradient(135deg, #7e57c2, #5e35b1);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700;
}
.painel-perfil-dados h1 {
    font-size: 1rem; font-weight: 800; color: #222;
    margin-bottom: 0.65rem; line-height: 1.3;
}
.painel-info-lista { list-style: none; }
.painel-info-lista li {
    font-size: 0.82rem; color: #555; margin-bottom: 0.35rem;
    display: flex; align-items: center; gap: 0.4rem;
}
.painel-info-lista .ico { opacity: 0.7; font-size: 0.9rem; }
.painel-botoes-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem;
    margin-bottom: 1rem;
}
@media (min-width: 560px) { .painel-botoes-grid { grid-template-columns: repeat(3, 1fr); } }
.painel-btn {
    background: #fff; border: none; border-radius: 12px;
    padding: 0.85rem 0.65rem; text-align: left;
    display: flex; align-items: center; gap: 0.6rem;
    font-size: 0.78rem; font-weight: 600; color: #4a148c;
    text-decoration: none; cursor: pointer;
    box-shadow: 0 2px 8px rgba(94,53,177,0.12);
    transition: transform 0.15s, box-shadow 0.15s;
    min-height: 56px;
}
.painel-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(94,53,177,0.2); }
.painel-btn-ico {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, #7e57c2, #5e35b1);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}
.painel-progresso-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
}
.painel-progresso-card {
    background: #fff; border-radius: 12px; padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.painel-progresso-card h3 { font-size: 0.85rem; color: #5e35b1; margin-bottom: 0.5rem; }
.painel-barra {
    height: 8px; background: #e8e8e8; border-radius: 4px; overflow: hidden;
    margin-bottom: 0.4rem;
}
.painel-barra-fill {
    height: 100%; background: linear-gradient(90deg, #7e57c2, #5e35b1);
    border-radius: 4px; transition: width 0.3s;
}
.painel-progresso-card p { font-size: 0.75rem; color: #888; }
.painel-logout {
    position: fixed; bottom: 1rem; right: 1rem;
    width: 44px; height: 44px; border-radius: 10px;
    background: #5e35b1; color: #fff;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(94,53,177,0.4); z-index: 100;
}
.painel-footer {
    text-align: center; font-size: 0.75rem; color: #999;
    margin-top: 2rem; padding-bottom: 1rem;
}
.modal-card-lg { max-width: 560px; }
.modal-valor { margin-bottom: 1rem; }
.modal-link-hint { font-size: 0.85rem; color: #666; margin-bottom: 0.75rem; }
.modal-link-hint a { color: #00838f; }
.modal-acoes-footer { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.btn-pg-cancelar { background: #e0e0e0 !important; color: #333 !important; }
.modal-upload label { font-weight: 600; font-size: 0.9rem; }
.aluno-painel-app .modal-overlay.open { backdrop-filter: blur(6px); }

/* Modal Exames — layout do sistema anterior */
.modal-exames-card { max-width: 640px; }
.modal-exames-header {
    align-items: flex-start;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.85rem;
    margin-bottom: 1rem;
}
.modal-exames-header h2 { margin: 0 0 0.35rem; }
.modal-exames-intro {
    margin: 0;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.4;
    padding-right: 0.5rem;
}
.exames-duas-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}
@media (max-width: 560px) {
    .exames-duas-cols { grid-template-columns: 1fr; }
}
.exames-col-escura {
    background: #1a1a1a;
    color: #fff;
    border-radius: 14px;
    padding: 1.1rem 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}
.exames-col-escura h3 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}
.exames-col-desc {
    margin: 0 0 1rem;
    font-size: 0.82rem;
    color: #cfcfcf;
    line-height: 1.4;
    flex: 1;
}
.btn-instrucoes-neon {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    border: 2px solid #e91e8c;
    box-shadow: 0 0 10px rgba(233, 30, 140, 0.55), inset 0 0 8px rgba(233, 30, 140, 0.15);
    transition: box-shadow 0.15s, transform 0.15s;
}
.btn-instrucoes-neon:hover {
    box-shadow: 0 0 16px rgba(233, 30, 140, 0.75), inset 0 0 10px rgba(233, 30, 140, 0.2);
    transform: translateY(-1px);
}
.exames-liberacoes-botoes {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.35rem;
}
.btn-liberacao-pill {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.btn-liberacao-pill:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}
.btn-liberacao-fechar {
    margin-top: 0.15rem;
    font-weight: 500;
}
.exames-liberacoes-vazio {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    color: #aaa;
}

.instrucoes-exames-page {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.instrucoes-exames-titulo {
    font-size: 1.15rem;
    margin: 0 0 1rem;
    color: #222;
}
.instrucoes-exames-corpo {
    font-size: 0.95rem;
    line-height: 1.55;
    color: #333;
    margin-bottom: 1.25rem;
}
.instrucoes-exames-vazio {
    color: #888;
    margin-bottom: 1.25rem;
}
.btn-voltar-painel {
    display: inline-block;
    text-decoration: none;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    background: #5e35b1;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Admin — liberações no cadastro */
.liberacoes-admin-box {
    margin-top: 0.75rem; padding-top: 0.75rem;
    border-top: 1px solid #eee;
}
.liberacoes-admin-titulo {
    font-size: 0.9rem; font-weight: 700; color: #333; margin: 0 0 0.65rem;
}
.liberacoes-admin-lista {
    list-style: none; margin: 0 0 1rem; padding: 0;
    display: flex; flex-direction: column; gap: 0.5rem;
}
.liberacoes-admin-item {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem; padding: 0.65rem 0.85rem;
    border: 1px solid #e8e8e8; border-radius: 10px; background: #fafafa;
}
.liberacoes-admin-info {
    display: flex; flex-direction: column; gap: 0.2rem; min-width: 0;
}
.liberacoes-admin-info strong { font-size: 0.9rem; }
.liberacoes-admin-info a { font-size: 0.8rem; color: var(--green-dark, #2e7d32); font-weight: 600; }
.btn-liberacao-excluir {
    border: 1px solid #ef9a9a; background: #fff; color: #c62828;
    padding: 0.4rem 0.75rem; border-radius: 8px; cursor: pointer;
    font-size: 0.8rem; font-weight: 600; white-space: nowrap;
}
.liberacoes-admin-nova { margin-top: 0.5rem; }

/* ========== ADMIN — NAVEGAÇÃO E ACABAMENTO PROFISSIONAL ========== */
.admin-page-app {
    --admin-primary: #173f35;
    --admin-primary-hover: #22584a;
    --admin-accent: #2f8f73;
    --admin-surface: #fff;
    --admin-bg: #f3f6f5;
    --admin-line: #e3e9e7;
    --admin-muted: #6b7773;
    background: var(--admin-bg);
}
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--admin-surface);
    border-bottom: 1px solid var(--admin-line);
    box-shadow: 0 1px 8px rgba(20, 50, 42, 0.04);
}
.admin-topbar-inner {
    width: min(100% - 32px, 1440px);
    height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--admin-primary);
    text-decoration: none;
    flex-shrink: 0;
}
.admin-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--admin-accent), var(--admin-primary));
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    box-shadow: 0 5px 14px rgba(23, 63, 53, 0.2);
}
.admin-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.admin-brand-text strong { font-size: 0.93rem; }
.admin-brand-text small {
    margin-top: 0.2rem;
    color: var(--admin-muted);
    font-size: 0.68rem;
    font-weight: 500;
}
.admin-main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    height: 100%;
}
.admin-main-nav > a,
.admin-nav-more > summary {
    min-height: 38px;
    padding: 0 0.85rem;
    border-radius: 9px;
    display: flex;
    align-items: center;
    color: #52605c;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.admin-main-nav > a:hover,
.admin-nav-more > summary:hover {
    color: var(--admin-primary);
    background: #f0f5f3;
}
.admin-main-nav > a.active,
.admin-nav-more.active > summary {
    color: var(--admin-primary);
    background: #e8f2ef;
}
.admin-nav-more { position: relative; }
.admin-nav-more > summary { list-style: none; }
.admin-nav-more > summary::-webkit-details-marker { display: none; }
.admin-nav-more > summary::after {
    content: "⌄";
    margin-left: 0.4rem;
    font-size: 0.8rem;
}
.admin-nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 190px;
    padding: 0.4rem;
    background: #fff;
    border: 1px solid var(--admin-line);
    border-radius: 11px;
    box-shadow: 0 12px 28px rgba(20, 50, 42, 0.14);
}
.admin-nav-dropdown a {
    display: block;
    padding: 0.65rem 0.75rem;
    border-radius: 7px;
    color: #45514d;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
}
.admin-nav-dropdown a:hover { background: #f0f5f3; color: var(--admin-primary); }
.admin-user-menu {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}
.admin-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e8f2ef;
    color: var(--admin-primary);
    font-size: 0.82rem;
    font-weight: 800;
}
.admin-user-name { color: #45514d; font-size: 0.78rem; font-weight: 600; }
.admin-logout {
    margin-left: 0.25rem;
    color: #b42318;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
}
.admin-logout:hover { text-decoration: underline; }
.admin-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    margin-left: auto;
    padding: 10px;
    border: 1px solid var(--admin-line);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}
.admin-menu-toggle span {
    display: block;
    height: 2px;
    margin: 4px 0;
    border-radius: 2px;
    background: var(--admin-primary);
}
.admin-app-body,
.admin-app-body-wide {
    width: min(100% - 32px, 1440px);
    max-width: none;
    margin: 0 auto;
    padding: 1.5rem 0 2.5rem;
}

/* Cards, cabeçalhos e tabela da área administrativa */
.admin-page-app .dash-card,
.admin-page-app .admin-form-panel,
.admin-page-app .config-section,
.admin-page-app .admin-table-wrap {
    border: 1px solid var(--admin-line);
    box-shadow: 0 6px 22px rgba(20, 50, 42, 0.05);
}
.admin-page-app .dash-card {
    max-width: none;
    border-radius: 14px;
    padding: 1.5rem;
}
.admin-page-app .dash-header {
    align-items: center;
    margin-bottom: 1.35rem;
}
.admin-page-app .dash-header h1 {
    margin-top: 0.25rem;
    font-size: 1.55rem;
    line-height: 1.2;
    color: #1c2925;
}
.admin-page-app .dash-header p {
    margin-top: 0.35rem;
    color: var(--admin-muted);
    font-size: 0.85rem;
}
.dash-eyebrow {
    color: var(--admin-accent);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.admin-page-app .dash-btn {
    border-radius: 8px;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.admin-page-app .dash-btn:hover { transform: translateY(-1px); }
.admin-page-app .dash-btn-blue {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
}
.admin-page-app .dash-btn-blue:hover {
    background: var(--admin-primary-hover);
    border-color: var(--admin-primary-hover);
    box-shadow: 0 4px 10px rgba(23, 63, 53, 0.16);
}
.admin-page-app .dash-btn-outline {
    border-color: #ccd6d2;
    color: #364540;
}
.admin-page-app .dash-search {
    position: relative;
    padding: 0.75rem;
    border: 1px solid var(--admin-line);
    border-radius: 11px;
    background: #f8faf9;
}
.admin-page-app .dash-search input {
    padding-left: 2.45rem;
    border-color: #d6dfdc;
    border-radius: 8px;
    background: #fff;
    outline: none;
}
.admin-page-app .dash-search input:focus {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(47, 143, 115, 0.12);
}
.dash-search-icon {
    position: absolute;
    left: 1.7rem;
    top: 50%;
    color: #82908b;
    font-size: 1.1rem;
    transform: translateY(-50%);
    pointer-events: none;
}
.admin-page-app .dash-summary {
    justify-content: flex-start;
    gap: 2.5rem;
    border-color: var(--admin-line);
    background: #fff;
    padding: 0.85rem 1rem;
}
.admin-page-app .dash-summary strong {
    display: block;
    margin-top: 0.15rem;
    color: var(--admin-primary);
    font-size: 1.25rem;
}
.admin-page-app .dash-badge,
.dash-filter-active {
    margin-left: auto;
    padding: 0.38rem 0.75rem;
    border-radius: 7px;
    background: #e8f2ef;
    color: var(--admin-primary);
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 700;
}
.admin-page-app .dash-table-scroll {
    max-height: 590px;
    border-color: var(--admin-line);
    border-radius: 11px;
}
.admin-page-app .dash-table thead th {
    padding: 0.78rem 0.6rem;
    background: #f5f8f7;
    color: #5b6864;
    border-bottom: 1px solid var(--admin-line);
    font-size: 0.69rem;
    letter-spacing: 0.035em;
}
.admin-page-app .dash-table td { padding: 0.7rem 0.6rem; }
.admin-page-app .dash-table tbody tr { transition: background 0.12s; }
.admin-page-app .dash-table tbody tr:hover { background: #eef5f2; }
.admin-page-app .dash-btn-sm { border-radius: 7px; }
.admin-page-app .link-aluno-nome { color: var(--admin-primary); text-decoration: none; }
.admin-page-app .link-aluno-nome:hover { text-decoration: underline; }
.admin-page-app .thumb-foto { border-radius: 9px; }
.admin-page-app .admin-form-panel { border-radius: 14px; padding: 1.4rem; }
.admin-page-app .admin-form-header h2 { color: var(--admin-primary); }
.admin-page-app .form-section legend { color: var(--admin-primary); border-color: #dcebe6; }
.admin-page-app .btn-salvar-full { border-radius: 9px; background: var(--admin-primary); }

@media (max-width: 980px) {
    .admin-topbar-inner { gap: 0.75rem; }
    .admin-menu-toggle { display: block; }
    .admin-main-nav {
        display: none;
        position: absolute;
        top: 62px;
        left: 16px;
        right: 16px;
        height: auto;
        padding: 0.6rem;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        border: 1px solid var(--admin-line);
        border-radius: 12px;
        box-shadow: 0 12px 28px rgba(20, 50, 42, 0.14);
    }
    .admin-main-nav.open { display: flex; }
    .admin-main-nav > a,
    .admin-nav-more > summary { width: 100%; }
    .admin-nav-dropdown {
        position: static;
        width: 100%;
        margin-top: 0.25rem;
        box-shadow: none;
    }
    .admin-user-name { display: none; }
}
@media (max-width: 620px) {
    .admin-topbar-inner,
    .admin-app-body,
    .admin-app-body-wide { width: min(100% - 20px, 1440px); }
    .admin-brand-text small { display: none; }
    .admin-user-avatar { display: none; }
    .admin-page-app .dash-card { padding: 1rem; }
    .admin-page-app .dash-header { align-items: flex-start; gap: 0.8rem; }
    .admin-page-app .dash-header p { display: none; }
    .admin-page-app .dash-header .dash-btn { padding: 0.5rem 0.65rem; }
    .admin-page-app .dash-search { flex-wrap: wrap; }
    .admin-page-app .dash-search input { flex-basis: calc(100% - 70px); }
    .admin-page-app .dash-summary { gap: 1.25rem; }
}


/* ========== INSTRUÇÕES (admin + aluno) ========== */
.instrucao-admin-lista { display: flex; flex-direction: column; gap: 0.85rem; }
.instrucao-admin-card {
    border: 1px solid #e3e9e7; border-radius: 12px; padding: 1rem;
    background: #fafcfb;
}
.instrucao-admin-card-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 0.75rem; margin-bottom: 0.5rem;
}
.instrucao-admin-card p { font-size: 0.9rem; color: #444; line-height: 1.45; margin: 0 0 0.65rem; }
.instrucao-admin-thumb {
    display: block; max-width: 100%; max-height: 220px;
    border-radius: 8px; object-fit: cover;
}
.instrucao-admin-video { width: 100%; max-height: 280px; border-radius: 8px; background: #111; }

.instrucoes-page {
    background: #fff; border-radius: 12px; padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.instrucoes-page-titulo { font-size: 1.2rem; margin: 0 0 0.35rem; color: #222; }
.instrucoes-page-intro { margin: 0 0 1rem; color: #777; font-size: 0.9rem; }
.instrucoes-cat-menu {
    display: flex; flex-wrap: wrap; gap: 0.45rem;
    margin-bottom: 1.15rem; padding-bottom: 0.85rem;
    border-bottom: 1px solid #eee;
}
.instrucoes-cat-link {
    text-decoration: none; padding: 0.55rem 0.9rem; border-radius: 999px;
    background: #f2f2f2; color: #444; font-size: 0.85rem; font-weight: 600;
}
.instrucoes-cat-link.active {
    background: #1b5e20; color: #fff;
}
.instrucoes-cat-atual {
    font-size: 1rem; margin: 0 0 0.85rem; color: #1b5e20;
}
.instrucoes-itens { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.25rem; }
.instrucao-item-card {
    border: 1px solid #eee; border-radius: 12px; padding: 1rem;
    background: #fafafa;
}
.instrucao-item-card h4 { margin: 0 0 0.5rem; font-size: 1rem; color: #222; }
.instrucao-item-desc { font-size: 0.92rem; line-height: 1.5; color: #444; margin-bottom: 0.75rem; }
.instrucao-item-img {
    display: block; width: 100%; max-height: 360px; object-fit: contain;
    border-radius: 10px; background: #eee;
}
.instrucao-item-video {
    display: block; width: 100%; max-height: none; min-height: 200px;
    border-radius: 10px; background: #111;
    aspect-ratio: 16 / 9; object-fit: contain;
}
.instrucao-video-wrap { display: flex; flex-direction: column; gap: 0.45rem; }
.instrucao-video-fallback {
    align-self: flex-start;
    font-size: 0.85rem; font-weight: 600;
    color: #1b5e20; text-decoration: underline;
}
.instrucao-item-embed {
    position: relative; width: 100%; padding-top: 56.25%;
    border-radius: 10px; overflow: hidden; background: #111;
    -webkit-overflow-scrolling: touch;
}
.instrucao-item-embed iframe {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.instrucao-pdf-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.1rem; border-radius: 10px;
    background: #1b5e20; color: #fff; text-decoration: none;
    font-weight: 700; font-size: 0.9rem;
}
.instrucao-pdf-btn:hover { background: #2e7d32; }
.instrucao-pdf-hint {
    margin: 0.45rem 0 0; font-size: 0.8rem; color: #888;
}

/* Leitor PDF — mobile-first, tela larga */
body.pdf-viewer-mode .aluno-main {
    max-width: none;
    width: 100%;
    padding: 0.5rem;
}
.pdf-viewer-page {
    background: #fff; border-radius: 12px; padding: 0.75rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    max-width: 100%;
}
.pdf-viewer-top h2 { font-size: 1.05rem; margin: 0.5rem 0 0.25rem; }
.pdf-viewer-voltar {
    color: #1b5e20; text-decoration: none; font-weight: 600; font-size: 0.9rem;
}
.pdf-viewer-status { color: #777; font-size: 0.8rem; margin: 0 0 0.65rem; }
.pdf-viewer-toolbar {
    display: flex; align-items: center; justify-content: center; gap: 0.45rem;
    margin-bottom: 0.65rem; flex-wrap: wrap;
    position: sticky; top: 0; z-index: 5;
    background: rgba(255,255,255,0.96); padding: 0.4rem 0;
}
.pdf-zoom-group { display: inline-flex; gap: 0.35rem; margin-left: 0.25rem; }
.pdf-nav-btn {
    border: 1px solid #ccc; background: #fff; border-radius: 8px;
    padding: 0.55rem 0.85rem; font-weight: 700; cursor: pointer;
    min-width: 44px; min-height: 44px;
    font-size: 1rem;
}
.pdf-nav-btn:disabled { opacity: 0.45; cursor: not-allowed; }
#pdfPageInfo { font-size: 0.88rem; font-weight: 600; color: #333; white-space: nowrap; }
.pdf-viewer-stage {
    overflow: auto; -webkit-overflow-scrolling: touch;
    text-align: center; background: #ececec;
    border-radius: 10px; padding: 0.35rem;
    max-height: none;
}
#pdfCanvas {
    display: block;
    margin: 0 auto;
    max-width: none;
    height: auto;
    box-shadow: 0 2px 12px rgba(0,0,0,0.14);
    background: #fff;
}

@media (max-width: 700px) {
    .instrucoes-page { padding: 0.85rem; }
    .instrucao-item-card { padding: 0.85rem; }
    body.pdf-viewer-mode .aluno-main { padding: 0.35rem; }
    .pdf-viewer-page { border-radius: 8px; padding: 0.5rem; }
}


/* ========== SUPORTE AO GOV ========== */
.suporte-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.35rem 1.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    max-width: 420px;
    margin: 0 auto;
}
.suporte-titulo {
    margin: 0 0 0.4rem;
    font-size: 1.25rem;
    color: #1b5e20;
}
.suporte-texto {
    margin: 0 0 1.1rem;
    color: #666;
    font-size: 0.92rem;
    line-height: 1.45;
}
.suporte-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 0.35rem;
}
.suporte-form input {
    width: 100%;
    padding: 0.85rem 0.9rem;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.suporte-form input:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
}
.suporte-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.9rem 1rem;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}
.suporte-voltar {
    display: inline-block;
    margin-top: 0.9rem;
    color: #1b5e20;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

/* ===== Prova teórica ===== */
.btn-liberacao-feita {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
    cursor: default;
    pointer-events: none;
}

.prova-page {
    margin: 0;
    background: #f5f5f5;
    font-family: Roboto, sans-serif;
    color: #222;
}
.prova-topbar {
    height: 6px;
    background: #c62828;
}
.prova-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}
.prova-gate {
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    text-align: center;
}
.prova-gate h1 { margin: 0 0 0.75rem; font-size: 1.4rem; }
.prova-gate p { color: #444; line-height: 1.5; }
.prova-gate-lista {
    text-align: left;
    margin: 1rem auto;
    max-width: 420px;
    color: #555;
    font-size: 0.92rem;
    line-height: 1.55;
}
.prova-gate-erro {
    color: #c62828;
    background: #ffebee;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
}
.prova-btn-iniciar {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.85rem 1.4rem;
    border: none;
    border-radius: 8px;
    background: #1565c0;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}
.prova-btn-iniciar:disabled { opacity: 0.65; cursor: wait; }
.prova-voltar {
    display: block;
    margin-top: 1rem;
    color: #1565c0;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.prova-monitor {
    position: relative;
    width: 160px;
    margin: 0 0 1rem auto;
}
.prova-monitor video {
    width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    background: #111;
    border: 2px solid #c62828;
}
.prova-rec-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(198,40,40,0.9);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    animation: prova-blink 1.2s infinite;
}
@keyframes prova-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.prova-aluno-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.prova-aluno-foto img,
.prova-foto-placeholder {
    width: 88px;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    background: #eee;
}
.prova-foto-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #888;
}
.prova-aluno-dados h2 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}
.prova-aluno-dados ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.88rem;
    color: #444;
    line-height: 1.55;
}

.prova-header {
    background: #fff;
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.prova-header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
}
.prova-subtitulo { margin: 0; color: #555; }
.prova-progresso-texto { margin: 0.75rem 0 0.35rem; font-weight: 600; font-size: 0.92rem; }
.prova-barra {
    height: 10px;
    background: #e0e0e0;
    border-radius: 999px;
    overflow: hidden;
}
.prova-barra-fill {
    height: 100%;
    background: #1565c0;
    transition: width 0.2s;
}
.prova-pct { margin: 0.35rem 0 0; color: #1565c0; font-weight: 700; }

.prova-form { display: flex; flex-direction: column; gap: 1rem; }
.prova-questao {
    background: #fff;
    border: none;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.prova-questao legend {
    padding: 0;
    margin-bottom: 0.75rem;
    font-size: 0.98rem;
    line-height: 1.4;
}
.prova-opcoes { display: flex; flex-direction: column; gap: 0.45rem; }
.prova-opcao {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 0.92rem;
    line-height: 1.4;
}
.prova-opcao:has(input:checked) {
    border-color: #1565c0;
    background: #e3f2fd;
}
.prova-letra {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    font-weight: 700;
    color: #1565c0;
}
.prova-opcao input { margin-top: 0.15rem; flex-shrink: 0; }
.prova-opcoes-texto .prova-opcao { border: none; padding: 0.35rem 0; background: transparent; }
.prova-opcoes-texto .prova-opcao:has(input:checked) { background: transparent; }

.prova-enviar-wrap {
    text-align: center;
    padding: 1.5rem 0 0.5rem;
}
.prova-btn-enviar {
    min-width: 200px;
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 6px;
    background: #42a5f5;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    cursor: pointer;
}
.prova-btn-enviar:disabled { opacity: 0.6; cursor: wait; }

/* Admin — seção prova */
.ficha-prova-section { margin-top: 0.5rem; }
.ficha-prova-topo {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.ficha-prova-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.ficha-prova-gauge-row {
    grid-template-columns: 1fr;
    max-width: 260px;
    margin: 0;
}
.gauge-card-speedo h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}
.speedo-canvas { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.speedo-footer-pct {
    margin: 0.25rem 0 0;
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e88e5;
}
.speedo-meta { font-size: 0.8rem; color: #666; margin-top: 0.25rem; }

.ficha-prova-gravacoes { margin: 1rem 0; }
.ficha-prova-gravacoes h4 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.ficha-prova-grav-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.ficha-prova-grav-lista li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.ficha-prova-grav-lista small { color: #777; font-size: 0.8rem; }

.ficha-prova-respostas {
    margin-top: 1rem;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}
.ficha-prova-respostas summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
}
.ficha-prova-form-respostas { margin-top: 0.85rem; }
.ficha-prova-questoes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 420px;
    overflow: auto;
    margin-bottom: 0.85rem;
    padding-right: 0.35rem;
}
.ficha-prova-q {
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #eee;
}
.ficha-prova-q.ok { border-color: #a5d6a7; background: #f1f8e9; }
.ficha-prova-q.erro { border-color: #ef9a9a; background: #ffebee; }
.ficha-prova-q label {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
    line-height: 1.35;
}
.ficha-prova-q label small {
    display: block;
    color: #666;
    font-weight: 400;
    margin-top: 0.2rem;
}
.ficha-prova-q select {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.88rem;
}

@media (max-width: 640px) {
    .prova-aluno-card { flex-direction: column; align-items: flex-start; }
    .prova-monitor { margin-left: 0; margin-right: auto; }
}

/* Document template editor */
.doc-editor-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.25rem;
    align-items: start;
}
.doc-editor-sidebar {
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 1rem;
}
.doc-editor-sidebar h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.doc-field-list { display: flex; flex-direction: column; gap: 0.4rem; max-height: 420px; overflow: auto; }
.doc-field-check {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9rem;
    padding: 0.35rem 0.4rem;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #eee;
}
.doc-editor-stage-wrap { min-width: 0; }
.doc-editor-stage {
    position: relative;
    width: min(100%, 640px);
    aspect-ratio: 210 / 297;
    border: 1px solid #ccc;
    background: #ddd;
    overflow: hidden;
    user-select: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    container-type: size;
}
.doc-editor-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
}
.doc-field-box {
    position: absolute;
    left: 0;
    top: 0;
    min-width: 2%;
    max-width: 70%;
    margin: 0;
    padding: 0 1px;
    border: 1px dashed rgba(180, 0, 0, 0.55);
    background: rgba(255, 255, 255, 0.35);
    color: #111;
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 400;
    line-height: 1.15;
    white-space: nowrap;
    overflow: visible;
    cursor: grab;
    z-index: 2;
    box-sizing: border-box;
    border-radius: 0;
    box-shadow: none;
}
.doc-field-box:active { cursor: grabbing; }
.doc-field-box.is-selected {
    border-color: #c62828;
    border-style: solid;
    background: rgba(255, 255, 200, 0.45);
}
.doc-field-box .doc-field-sample {
    display: block;
    pointer-events: none;
}
.doc-field-box .doc-field-tag {
    position: absolute;
    left: 0;
    top: -1.15em;
    font-size: 9px;
    line-height: 1;
    color: #b71c1c;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(183, 28, 28, 0.35);
    padding: 1px 4px;
    white-space: nowrap;
    pointer-events: none;
}
.doc-field-tools {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin: 0.75rem 0 0.5rem;
    flex-wrap: wrap;
}
.doc-field-tools label { font-size: 0.85rem; color: #444; }
.doc-field-tools input[type="number"] {
    width: 4rem;
    padding: 0.25rem 0.35rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.ficha-exame-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
@media (max-width: 900px) {
    .doc-editor-layout { grid-template-columns: 1fr; }
}

/* Contrato — primeiro acesso */
.contrato-page {
    margin: 0;
    min-height: 100vh;
    background: #d7ebf7;
    font-family: Roboto, system-ui, sans-serif;
    color: #222;
}
.contrato-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2rem;
}
.contrato-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.5rem 1.35rem 1.75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.contrato-brand {
    margin: 0;
    text-align: center;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.contrato-titulo {
    margin: 0.35rem 0 1.25rem;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
}
.contrato-dados p {
    margin: 0.2rem 0;
    font-size: 0.95rem;
}
.contrato-texto {
    margin-top: 1rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #333;
}
.contrato-texto h3 {
    margin: 1rem 0 0.35rem;
    font-size: 0.95rem;
}
.contrato-texto p { margin: 0 0 0.55rem; }
.contrato-divider {
    border: 0;
    border-top: 1px solid #e0e0e0;
    margin: 1.25rem 0 1rem;
}
.contrato-concordo {
    margin: 0 0 1rem;
    font-size: 0.95rem;
}
.contrato-assinatura-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.contrato-pad-wrap {
    width: 100%;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}
.contrato-pad {
    display: block;
    width: 100%;
    height: auto;
    touch-action: none;
    cursor: crosshair;
}
.contrato-btn {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    border: 0;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.contrato-btn-limpar {
    background: #ececec;
    color: #333;
}
.contrato-btn-assinar {
    background: #1e88e5;
    color: #fff;
}
.contrato-btn-assinar:disabled {
    opacity: 0.7;
    cursor: wait;
}
@media (max-width: 520px) {
    .contrato-card { padding: 1.15rem 1rem 1.4rem; }
    .contrato-brand { font-size: 1.35rem; }
}



