@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --ink: #20251f;
    --muted: #788078;
    --line: #e9ece6;
    --paper: #fff;
    --canvas: #f5f6f2;
    --green: #315d44;
    --green-dark: #244a35;
    --green-soft: #e8f2e9;
    --orange-soft: #fff2dc;
    --orange: #98621b;
    font-family: 'DM Sans', Arial, sans-serif;
    color: var(--ink);
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: var(--canvas); font-size: 14px; }
a { color: inherit; }
.topbar { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(calc((100vw - 1320px) / 2), 5%); background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--green); color: white; font-size: 23px; }
.brand strong, .brand small { display: block; }
.brand strong { font: 800 16px 'Manrope', sans-serif; letter-spacing: .4px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 9px; letter-spacing: 1px; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav a, .nav-link { color: #5d665d; font-size: 12px; text-decoration: none; }
.nav a:hover, .nav-link:hover { color: var(--green); }
.nav > a.ativo, .nav-group.ativo > summary { color: var(--green); font-weight: 700; }
.nav-group { position: relative; }
.nav-group > summary { list-style: none; cursor: pointer; color: #5d665d; font-size: 12px; user-select: none; padding: 8px 0; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: "▾"; margin-left: 4px; font-size: 9px; }
.nav-group > summary:hover, .nav-group[open] > summary { color: var(--green); }
.nav-sub { position: absolute; top: 100%; left: -12px; z-index: 30; min-width: 250px; padding: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgba(32, 37, 31, .14); display: grid; gap: 2px; }
.nav-sub a { display: grid; gap: 2px; padding: 9px 12px; border-radius: 7px; white-space: normal; }
.nav-sub a strong { font-size: 12px; color: var(--ink); }
.nav-sub a small { font-size: 10px; color: var(--muted); }
.nav-sub a:hover, .nav-sub a.ativo { background: var(--green-soft); }
.nav-sub a.ativo strong { color: var(--green); }
.usuario-topo { display: flex; align-items: center; gap: 12px; color: #596159; font-size: 12px; }
.usuario-topo form { margin: 0; }
.link { padding: 0; border: 0; background: none; color: var(--green); font: 600 12px 'DM Sans', sans-serif; cursor: pointer; }
.container { width: min(1320px, 90%); margin: 0 auto; padding: 34px 0 22px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 3px 0 24px; }
.page-heading h1, .auth-card h1 { margin: 0 0 7px; font: 800 27px 'Manrope', sans-serif; }
.page-heading .muted, .auth-card .muted { margin: 0; color: var(--muted); line-height: 1.55; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: 1.35px; }
.academy-logo { max-width: 150px; max-height: 72px; object-fit: contain; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.stat, .card { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.stat { min-height: 120px; padding: 19px 21px; }
a.stat { display: block; color: inherit; text-decoration: none; }
a.stat:hover { border-color: var(--accent, #b3261e); }
.stat span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .7px; }
.stat strong { display: block; margin: 10px 0 3px; font: 800 24px 'Manrope', sans-serif; }
.stat strong.stat-small { font-size: 19px; }
.stat strong [data-valor-painel], .stat strong [data-mascara-painel] { color: inherit; font: inherit; letter-spacing: inherit; }
.stat small { color: var(--muted); font-size: 11px; }
#alternar-valores-painel[hidden], [data-valor-painel][hidden], [data-mascara-painel][hidden] { display: none; }
.card { overflow: hidden; }
.card-heading { padding: 19px 20px 15px; }
.card-heading h2 { margin: 0 0 4px; font: 700 16px 'Manrope', sans-serif; }
.card-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.card-heading.split { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 17px; }
.two-col > .card { margin-bottom: 0; }
.form { display: grid; gap: 13px; padding: 0 20px 20px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form label { display: block; color: #505950; font-size: 11px; font-weight: 600; }
.form .field-hint { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 400; }
.form input, .form select, .form textarea, .inline-form input { display: block; width: 100%; min-width: 0; margin-top: 5px; border: 1px solid #e2e6df; border-radius: 7px; padding: 10px 11px; outline: 0; background: #fff; color: var(--ink); font: 12px 'DM Sans', sans-serif; }
.form input, .form select { height: 39px; padding-top: 0; padding-bottom: 0; }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus, .inline-form input:focus { border-color: #71967b; box-shadow: 0 0 0 3px #315d4412; }
.form input[type=file] { padding: 9px; }
.span-2 { grid-column: span 2; }
.matricula-auto { display: flex; grid-column: span 2; align-items: center; gap: 11px; border: 1px dashed #ccd7ca; border-radius: 8px; padding: 12px; background: #f8faf6; }
.matricula-icone { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 9px; background: var(--green-soft); color: var(--green); font: 700 17px 'Manrope', sans-serif; }
.matricula-auto strong, .matricula-auto small { display: block; }
.matricula-auto strong { color: #394239; font-size: 11px; }
.matricula-auto small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.divider { padding: 7px 0 0; border-top: 1px solid var(--line); color: #394239; font-size: 12px; }
.btn { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; border: 0; border-radius: 8px; padding: 0 15px; background: #edf0eb; color: var(--ink); font: 600 12px 'DM Sans', sans-serif; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover { background: var(--green-dark); }
.btn-full { width: 100%; min-height: 44px; }
.list { padding: 0 19px 8px; }
.list-row { display: flex; min-height: 61px; align-items: center; gap: 11px; border-top: 1px solid #f0f1ee; }
.list-main { min-width: 0; flex: 1; }
.list-main strong, .list-main small { display: block; }
.list-main strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.list-main small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.list-row > b { font-size: 12px; white-space: nowrap; }
.avatar, .check { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 50%; background: #eff2ed; color: var(--green); font-weight: 700; }
.avatar.check { background: var(--green-soft); }
.student-list-avatar { object-fit: cover; }
.logo-thumb { width: 36px; height: 36px; object-fit: contain; }
.status { display: inline-flex; align-items: center; border-radius: 20px; padding: 5px 9px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.status-ok { background: var(--green-soft); color: #316340; }
.status-off { background: #f0f1ef; color: #687068; }
.academy-edit { padding: 0 0 12px 45px; color: var(--green); font-size: 11px; }
.academy-edit > summary { cursor: pointer; font-weight: 600; }
.academy-edit .student-edit-form { padding: 10px 0; }
.academy-remove-logo { display: flex !important; align-items: center; gap: 7px; }
.academy-remove-logo input { width: auto; height: auto; margin: 0; accent-color: var(--green); }
.student-row { padding: 4px 0 11px; border-top: 1px solid #f0f1ee; }
.student-row > .list-row { border: 0; }
.bulk-fee-form { margin: 0 19px 12px; border: 1px solid var(--line); border-radius: 9px; padding: 13px; background: #fafbf9; }
.bulk-fee-form > strong { color: #394239; font: 700 12px 'Manrope', sans-serif; }
.bulk-fee-form > label { max-width: 220px; }
.bulk-fee-scopes { display: grid; gap: 8px; }
.bulk-fee-scopes label, .bulk-select-all label, .student-bulk-select { display: flex; align-items: center; gap: 7px; color: #505950; font-size: 11px; font-weight: 500; }
.bulk-fee-scopes input, .bulk-select-all input, .student-bulk-select input { width: auto; height: auto; margin: 0; accent-color: var(--green); }
.bulk-fee-scopes span, .bulk-fee-form > small { color: var(--muted); font-size: 10px; }
.bulk-select-all { padding: 0 0 9px; }
.student-bulk-select { padding: 7px 0 0 45px; }
.cost-center-list { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 20px 18px; }
.cashflow-report { margin-top: 17px; }
.cashflow-filter { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.cashflow-filter .btn { align-self: end; }
.cashflow-in { color: #316340; font-weight: 700; white-space: nowrap; }
.cashflow-out { color: #9a3829; font-weight: 700; white-space: nowrap; }
.cashflow-cancelled { opacity: .58; text-decoration: line-through; }
.cashflow-cancelled .inline-form { text-decoration: none; }
.student-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 0 0 3px 45px; }
.student-actions details { position: relative; color: var(--green); font-size: 10px; }
.student-actions summary { cursor: pointer; font-weight: 600; }
.student-actions details.student-edit { position: static; flex-basis: 100%; }
.student-edit-form { max-width: 680px; padding: 10px 0; }
.student-actions button:disabled { color: #a1a79f; cursor: not-allowed; }
.disciplinas-resumo { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px 45px; }
.badge-disciplina { display: inline-flex; align-items: center; border-radius: 20px; padding: 5px 9px; background: #f1f3ef; color: #4e5a4e; font-size: 10px; }
.disciplinas-gerenciar { padding: 3px 0 5px 45px; color: var(--green); font-size: 10px; }
.disciplinas-gerenciar > summary { cursor: pointer; font-weight: 600; }
.disciplinas-editor { display: grid; gap: 9px; padding: 10px 0; }
.disciplinas-editor .inline-form { gap: 7px; }
.disciplinas-editor .inline-form > strong { min-width: 115px; color: #505950; font-size: 10px; }
.disciplinas-editor .inline-form select, .disciplinas-editor .inline-form input { width: auto; min-width: 125px; height: 32px; border: 1px solid #e2e6df; border-radius: 7px; padding: 4px 8px; background: #fff; font: 11px 'DM Sans', sans-serif; }
.form-vincular { align-items: end; padding-top: 8px; border-top: 1px solid var(--line); }
.form-vincular label { min-width: 130px; color: #505950; font-size: 10px; }
.form-vincular .art-select { max-width: 180px; }
.catalog-item { padding: 13px 0; border-top: 1px solid #f0f1ee; }
.catalog-item > strong { display: block; margin-bottom: 6px; font: 700 13px 'Manrope', sans-serif; }
.catalog-item > .muted { font-size: 11px; }
.belt-list { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.belt-list li { display: flex; align-items: baseline; gap: 6px; border-radius: 16px; padding: 4px 9px; background: #f2f5ef; font-size: 10px; }
.belt-list small { color: var(--muted); font-size: 9px; }
.belt-edit { position: relative; }
.belt-edit > summary { color: var(--green); font-size: 9px; cursor: pointer; }
.belt-edit .inline-form { position: absolute; z-index: 2; top: 18px; left: 0; width: 240px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 8px 20px #20251f18; }
.belt-edit .inline-form input { width: 100%; }
.inline-form { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0; }
.inline-form input { width: 110px; height: 30px; margin: 0; padding: 5px 7px; font-size: 10px; }
.inline-form button.btn { min-height: 30px; padding: 0 8px; font-size: 10px; }
.empty { padding: 12px 0; color: var(--muted); font-size: 12px; }
.content-item { padding: 14px 0; border-top: 1px solid #f0f1ee; }
.content-item strong { font-size: 12px; }
.content-item p { margin: 8px 0; color: #505950; font-size: 12px; line-height: 1.55; }
.content-item small { color: var(--muted); font-size: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #f8f9f6; }
th { padding: 11px 14px; color: #777f77; font-size: 9px; font-weight: 700; letter-spacing: .55px; }
td { padding: 11px 14px; border-top: 1px solid #f0f1ee; font-size: 12px; }
.report-brand { display: flex; align-items: center; gap: 19px; padding: 22px; }
.report-brand h2 { margin: 0 0 5px; font: 700 18px 'Manrope', sans-serif; }
.report-brand .muted { margin: 0; font-size: 12px; }
.report-card { margin-top: 17px; }
.report-card .card-heading { padding-top: 18px; padding-bottom: 12px; }
.heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.heading-actions .academy-logo { margin-left: 10px; }
.student-heading { justify-content: flex-start; }
.student-profile-photo, .student-profile-placeholder { width: 82px; height: 82px; flex: 0 0 82px; border: 3px solid #fff; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 12px #20251f18; }
.student-profile-placeholder { display: grid; place-items: center; background: var(--green-soft); color: var(--green); font: 800 30px 'Manrope', sans-serif; }
.student-heading-info { flex: 1; }
.profile-photo-card { margin-bottom: 17px; }
.profile-photo-form { padding: 0 20px 18px; }
.profile-photo-input { display: grid; gap: 6px; color: #505950; font-size: 11px; font-weight: 600; }
.profile-photo-input input { width: auto; max-width: 100%; height: auto; margin: 0; padding: 0; border: 0; font: 11px 'DM Sans', sans-serif; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0 20px 20px; }
.product-card { display: grid; align-content: start; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 15px; }
.product-card h3 { margin: 0; font: 700 14px 'Manrope', sans-serif; }
.product-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.product-card > strong { color: var(--green); font: 800 18px 'Manrope', sans-serif; }
.product-card > small { color: var(--muted); font-size: 10px; }
.product-card form { align-items: end; margin-top: 5px; }
.product-card form label { flex: 0 0 86px; color: #505950; font-size: 10px; }
.product-card form input { width: 100%; height: 34px; margin: 4px 0 0; border: 1px solid #e2e6df; border-radius: 7px; padding: 5px 7px; font: 11px 'DM Sans', sans-serif; }
.product-card form .btn { flex: 1; padding: 0 8px; font-size: 10px; }
.product-edit { padding: 10px 0 0; }
.alerta { margin: 0 0 15px; border-radius: 8px; padding: 12px 15px; font-size: 12px; }
.erro { background: #fff0ed; color: #9a3829; }
.sucesso { background: var(--green-soft); color: #316340; }
.auth-wrap { display: grid; min-height: calc(100vh - 160px); place-items: center; padding: 16px 0 36px; }
.auth-card { width: min(100%, 420px); border: 1px solid var(--line); border-radius: 16px; padding: 32px; background: #fff; box-shadow: 0 14px 42px #2534250a; }
.auth-emblema { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 20px; border-radius: 14px; background: var(--green); color: #fff; font-size: 27px; }
.auth-card h1 { margin-bottom: 9px; font-size: 24px; }
.auth-card > .muted { margin-bottom: 23px; font-size: 13px; }
.auth-card .form { padding: 0; margin-top: 21px; }
.text-link { display: inline-block; margin-top: 17px; color: var(--green); font-size: 12px; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.setup-note { margin: 20px 0 0; border-top: 1px solid var(--line); padding-top: 15px; color: var(--muted); font-size: 11px; }
.setup-note a { color: var(--green); font-weight: 600; }
.card-heading:has(> div:first-child) { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inline-form select { min-width: 0; }
.check-row { display: flex; align-items: center; gap: 8px; padding: 4px 19px 10px; color: #505950; font-size: 12px; font-weight: 600; }
label.list-row { cursor: pointer; }
label.list-row input[type=checkbox], .check-row input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--green); }
form[data-confirm] > .btn, form[data-confirm] + .btn { margin: 4px 19px 18px; }
.footer { padding: 16px 5%; color: #909790; text-align: center; font-size: 10px; }

@media (max-width: 1100px) {
    .topbar { padding-top: 10px; padding-bottom: 10px; }
    .nav { flex-wrap: wrap; gap: 4px 18px; justify-content: flex-end; }
}
@media (max-width: 900px) {
    .topbar { padding: 8px 5%; flex-wrap: wrap; }
    .nav { order: 3; width: 100%; justify-content: flex-start; gap: 6px 16px; padding: 0 0 8px; }
    .nav a { font-size: 12px; }
    .nav-group { flex-basis: 100%; }
    .nav-sub { position: static; min-width: 0; box-shadow: none; margin-top: 4px; }
    .usuario-topo > span { display: none; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .two-col { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cashflow-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-heading { flex-wrap: wrap; }
    .card-heading:has(> div:first-child) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
    .list-row { flex-wrap: wrap; padding: 8px 0; }
    .list-main strong { white-space: normal; overflow-wrap: anywhere; }
    .list-main small, td { overflow-wrap: anywhere; }
    .student-edit-form { max-width: none; }
    img, video, iframe { max-width: 100%; }
}
@media (max-width: 600px) {
    body { font-size: 15px; }
    .topbar { min-height: 60px; gap: 9px; }
    .brand-mark { width: 35px; height: 35px; }
    .brand strong { font-size: 14px; }
    .nav a, .nav-group > summary { font-size: 13px; padding: 8px 0; }
    .nav > a { padding: 8px 0; }
    .nav-sub a { padding: 11px 12px; }
    .container { width: 92%; padding-top: 22px; }
    .stats { grid-template-columns: 1fr; gap: 9px; }
    .stat { min-height: 92px; padding: 14px 16px; }
    .stat strong { margin: 6px 0 2px; font-size: 21px; }
    .form-grid, .cashflow-filter { grid-template-columns: 1fr; }
    .form input, .form select, .inline-form input, .inline-form select, .form textarea { font-size: 16px; }
    .form input, .form select { height: 44px; }
    .btn, .inline-form button.btn { min-height: 44px; }
    .inline-form { width: 100%; }
    .inline-form input, .inline-form select { width: 100%; height: 40px; }
    .span-2, .matricula-auto { grid-column: auto; }
    .page-heading { align-items: flex-start; }
    .page-heading h1 { font-size: 23px; }
    .heading-actions { justify-content: flex-start; }
    .heading-actions .academy-logo { display: none; }
    .card-heading { padding: 16px 14px 12px; }
    .form { padding: 0 14px 16px; }
    .list { padding: 0 14px 8px; }
    .student-profile-photo, .student-profile-placeholder { width: 64px; height: 64px; flex-basis: 64px; }
    .product-grid { grid-template-columns: 1fr; padding-right: 14px; padding-left: 14px; }
    .auth-card { padding: 25px 21px; }
    .student-actions, .disciplinas-resumo, .disciplinas-gerenciar { padding-left: 0; margin-left: 0; }
    .academy-edit, .student-bulk-select { padding-left: 0; }
    .bulk-fee-form { margin-right: 14px; margin-left: 14px; }
    .disciplinas-editor .inline-form > strong { width: 100%; }
    .disciplinas-editor .inline-form select, .disciplinas-editor .inline-form input { width: 100%; }
    .belt-edit .inline-form { width: min(240px, 80vw); }
    th, td { padding: 9px 10px; }
    .report-brand { flex-wrap: wrap; padding: 16px; }
}
@media print {
    body { background: #fff; }
    .topbar, .footer, .nav, .usuario-topo, .btn, .form, .no-print, .alerta { display: none !important; }
    .container { width: 100%; padding: 0; }
    .card, .stat { break-inside: avoid; box-shadow: none; }
    .report-card { border: 0; }
    .report-brand { padding: 8px 0 14px; }
    .table-wrap { overflow: visible; }
    table { font-size: 10px; }
    th, td { padding: 6px 8px; }
}
