@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --ink: #17251e;
  --muted: #69776d;
  --green: #17633f;
  --green-dark: #0e442a;
  --green-soft: #e2f1e8;
  --lime: #b9d840;
  --paper: #fbfcf8;
  --canvas: #edf2ec;
  --line: #dce5dc;
  --sun: #f4b63f;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: radial-gradient(circle at 92% 4%, #dcefcf 0, transparent 22rem), linear-gradient(135deg, #eff4ed, #e7eee6); }
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(185,216,64,.58); outline-offset: 2px; }

.wrap { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 32px 0 56px; }
.top { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-bottom: 30px; }
.identity { display: flex; align-items: center; gap: 14px; }
.mark { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px 15px 15px 4px; background: var(--green-dark); color: var(--lime); font: 800 22px/1 'Manrope', sans-serif; box-shadow: 0 12px 24px rgba(14,68,42,.18); }
.brand { margin-bottom: 2px; color: var(--green-dark); font: 800 20px/1.1 'Manrope', sans-serif; letter-spacing: -.04em; }
.eyebrow { margin-bottom: 5px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.5; }
.greeting { font-size: 14px; }

button { min-height: 42px; border-radius: 11px; padding: 0 15px; background: var(--green); color: #fff; font-weight: 700; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
button:hover { background: var(--green-dark); box-shadow: 0 7px 16px rgba(14,68,42,.18); transform: translateY(-1px); }
button.secondary { border: 1px solid var(--line); background: rgba(255,255,255,.75); color: var(--green-dark); }
button.secondary:hover { background: #fff; }
button.danger { border: 1px solid #8b4938; background: #57332a; color: #ffd5c6; }
button:disabled { cursor: not-allowed; opacity: .5; transform: none; box-shadow: none; }
.top-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.access-manager { max-height: min(88vh, 850px); overflow: auto; }
.access-list { display: grid; gap: 9px; border-top: 1px solid var(--line); padding-top: 13px; }
.access-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: rgba(255,255,255,.55); }
.access-row code { color: inherit; }
.access-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.access-row button { flex: 0 0 auto; }

.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.card { position: relative; overflow: hidden; min-height: 142px; border: 1px solid rgba(211,225,212,.95); border-radius: 18px; padding: 20px; background: rgba(255,255,255,.88); box-shadow: 0 10px 30px rgba(21,55,33,.045); }
.card:first-child { border-color: transparent; background: var(--green-dark); color: #fff; }
.card:first-child::after { position: absolute; right: -25px; bottom: -62px; width: 155px; height: 155px; border: 23px solid rgba(185,216,64,.32); border-radius: 50%; content: ''; }
.card .muted { display: block; color: #758277; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.card:first-child .muted { color: #d4e5d8; }
.card b { position: relative; z-index: 1; display: block; margin-top: 10px; font: 800 clamp(24px,3vw,32px)/1 'Manrope', sans-serif; letter-spacing: -.06em; }
.metric-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--sun); }

.layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 22px; align-items: start; }
form, .panel { border: 1px solid rgba(211,225,212,.95); border-radius: 18px; background: rgba(255,255,255,.9); box-shadow: 0 12px 32px rgba(21,55,33,.045); }
#student-form { display: grid; gap: 13px; padding: 22px; }
h2 { margin: 0 0 4px; font: 800 19px/1.15 'Manrope', sans-serif; letter-spacing: -.04em; }
.form-note { margin: -2px 0 4px; font-size: 13px; }.optional { color: var(--muted); font-weight: 500; }.modality { color: #9ee170; font-weight: 700; }
label { display: grid; gap: 6px; color: #415046; font-size: 12px; font-weight: 800; }
input, select, textarea { min-height: 43px; border: 1px solid var(--line); border-radius: 10px; padding: 0 11px; background: #fff; color: var(--ink); transition: border .18s ease, box-shadow .18s ease; }textarea { padding: 10px 11px; resize: vertical; }input:hover, select:hover, textarea:hover { border-color: #b8cbbd; }input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,99,63,.1); outline: 0; }
.form-grid, .details-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }.form-details { border-top: 1px solid var(--line); padding-top: 13px; }.form-details summary { color: #c2d0c5; cursor: pointer; font-size: 13px; font-weight: 800; }.details-fields { padding-top: 13px; }.wide { grid-column: 1 / -1; }

.panel { padding: 23px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.filter-bar { display: flex; gap: 6px; }.filter { min-height: 32px; border: 1px solid #355041; padding: 0 10px; background: #152119; color: #c2d0c5; font-size: 12px; }.filter.active { border-color: #72c98b; background: #2d7548; color: #eff7ef; }
.student-search { flex: 1 1 210px; max-width: 310px; }.student-search span { font-size: 11px; }.student-search input { width: 100%; min-height: 39px; }
.month-pill { border-radius: 999px; padding: 7px 10px; background: var(--green-soft); color: var(--green-dark); font-size: 12px; font-weight: 800; }
.students { display: grid; gap: 10px; padding-top: 13px; }
.student { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 73px; border: 1px solid transparent; border-radius: 13px; padding: 12px; background: #f8faf7; transition: background .18s ease, border .18s ease, transform .18s ease; }
.student:hover { border-color: #d6e4d8; background: #fff; transform: translateX(2px); }
.student-main { display: flex; align-items: center; min-width: 0; gap: 11px; }
.avatar { display: grid; flex: 0 0 auto; width: 37px; height: 37px; place-items: center; border-radius: 12px; background: var(--green-soft); color: var(--green-dark); font-size: 13px; font-weight: 800; }
.student b { display: block; overflow: hidden; font: 700 14px/1.25 'Manrope', sans-serif; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.student .muted { margin-top: 3px; font-size: 12px; }
.payment-date { margin-top: 5px; color: #79d59a; font-size: 12px; font-weight: 700; }
.debt-banner { width: fit-content; margin-top: 7px; border: 1px solid #8b4938; border-radius: 8px; padding: 5px 8px; background: #43261f; color: #ffd1c1; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.student-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }.student-actions button, .whatsapp { min-height: 36px; padding: 0 11px; font-size: 12px; }.whatsapp { display: inline-flex; align-items: center; border-radius: 9px; background: #2b8f55; color: #07140c; font-weight: 800; text-decoration: none; }.debt { background: #57332a; color: #ffd5c6; }.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; overflow: auto; padding: 24px; background: rgba(3, 10, 6, .76); }.edit-form { width: min(720px, 100%); display: grid; gap: 13px; margin: auto; padding: 24px; }.edit-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding-bottom: 8px; border-bottom: 1px solid var(--line); }.edit-head h2 { margin: 0; }
.tag { display: inline-flex; align-items: center; min-height: 30px; border-radius: 999px; padding: 0 10px; font-size: 11px; font-weight: 800; letter-spacing: .05em; }
.paid { background: #dff3e5; color: #126235; }
.notice { margin: 18px 0 0; border: 1px dashed #c9d9ca; border-radius: 12px; padding: 16px; color: var(--muted); text-align: center; }

#setup, #login { width: min(460px, calc(100% - 32px)); display: grid; gap: 14px; margin: 7vh auto; border: 1px solid rgba(255,255,255,.8); border-radius: 23px; padding: 31px; background: rgba(255,255,255,.92); box-shadow: 0 26px 70px rgba(14,68,42,.16); animation: float-in .52s ease both; }
#setup::before, #login::before { width: 38px; height: 38px; margin-bottom: 4px; border-radius: 12px 12px 12px 3px; background: var(--green-dark); color: var(--lime); content: 'A'; display: grid; place-items: center; font: 800 18px 'Manrope'; }
#setup h1, #login h1 { margin: 0; color: var(--green-dark); font: 800 28px/1.05 'Manrope', sans-serif; letter-spacing: -.06em; }
#setup p, #login p { margin: -3px 0 7px; }
@keyframes float-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 850px) { .grid { grid-template-columns: repeat(2, 1fr); } .layout { grid-template-columns: 1fr; } }
@media (max-width: 540px) { .wrap { width: min(100% - 26px, 1180px); padding-top: 20px; } .top { align-items: flex-start; flex-direction: column; } .top-actions { width: 100%; } .top-actions button { flex: 1; } .grid { grid-template-columns: 1fr 1fr; gap: 10px; } .card { min-height: 112px; padding: 15px; } .card b { font-size: 23px; } .panel, #student-form { padding: 17px; } .student, .access-row { align-items: flex-start; flex-direction: column; } .student button, .tag { margin-left: 48px; } .access-row button { width: 100%; } }

/* Tema noite: menos brilho, mais foco na operação. */
:root { --ink: #edf5ee; --muted: #aab9ae; --green: #4aab70; --green-dark: #102d20; --green-soft: #1c4931; --canvas: #0b120f; --line: #293c31; --sun: #f1c85d; }
body { background: radial-gradient(circle at 92% 0%, rgba(66, 138, 87, .2), transparent 25rem), radial-gradient(circle at 8% 100%, rgba(185, 216, 64, .08), transparent 22rem), #0b120f; }
.brand { color: #f2f8f2; }.eyebrow { color: #9ee170; }.mark { background: #1a5335; box-shadow: 0 12px 24px rgba(0, 0, 0, .28); }
button { background: #3f9c63; color: #07140c; }button:hover { background: #67bd80; box-shadow: 0 7px 16px rgba(0, 0, 0, .26); }button.secondary { border-color: #355041; background: #152119; color: #d9e8db; }button.secondary:hover { background: #203027; }
.card { border-color: #263a2e; background: #152019; box-shadow: 0 10px 30px rgba(0, 0, 0, .16); }.card:first-child { background: #17472f; }.card .muted { color: #a1b0a5; }.card:first-child .muted { color: #c5ddca; }
form, .panel { border-color: #293c31; background: #141e18; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); }.access-row { background: #101914; }label { color: #c2d0c5; }input, select, textarea { border-color: #314638; background: #0f1812; color: #edf5ee; }input:hover, select:hover, textarea:hover { border-color: #4b6754; }input:focus, select:focus, textarea:focus { border-color: #72c98b; box-shadow: 0 0 0 3px rgba(114,201,139,.14); }.month-pill { background: #203e2b; color: #bdeaa7; }.panel-head { border-color: #293c31; }.student { background: #101914; }.student:hover { border-color: #355441; background: #16231b; }.avatar { background: #203e2b; color: #bdeaa7; }.paid { background: #1b5434; color: #c2efcc; }.notice { border-color: #3a5543; color: #aab9ae; }
#setup, #login { border-color: #2e4536; background: #141e18; box-shadow: 0 26px 70px rgba(0, 0, 0, .38); }#setup h1, #login h1 { color: #eff7ef; }
