:root {
  --navy: #001f3d;
  --navy-2: #082d52;
  --navy-3: #15486f;
  --gold: #feb639;
  --gold-soft: #fff4dc;
  --blue: #2886c8;
  --blue-soft: #eaf5fc;
  --green: #23956c;
  --green-soft: #e8f7f1;
  --coral: #db644f;
  --coral-soft: #fff0ed;
  --ink: #17324c;
  --muted: #687b8c;
  --line: #dfe7ed;
  --surface: #fff;
  --canvas: #f4f6f8;
  --shadow: 0 12px 35px rgba(0, 31, 61, .08);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; font-size: 16px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(254, 182, 57, .35); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* Login */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, 1.15fr) minmax(420px, .85fr); background: white; }
.login-brand { position: relative; min-height: 100vh; padding: 54px 7vw; color: white; overflow: hidden; background: linear-gradient(135deg, rgba(0,31,61,.96), rgba(1,48,82,.88)), url("assets/sala-treinamento.webp") center/cover; }
.login-brand::after { content: ""; position: absolute; width: 360px; height: 360px; border: 1px solid rgba(254,182,57,.2); border-radius: 50%; right: -130px; bottom: -90px; box-shadow: 0 0 0 50px rgba(254,182,57,.03), 0 0 0 100px rgba(254,182,57,.025); }
.login-brand-content { position: relative; z-index: 1; height: calc(100vh - 108px); display: flex; flex-direction: column; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-size: 1.25rem; font-weight: 850; letter-spacing: -.045em; }
.brand-lockup img { width: 43px; height: 43px; object-fit: contain; }
.brand-lockup b { color: var(--gold); font-weight: 850; }
.login-logo { align-self: flex-start; color: white; font-size: 1.42rem; }
.login-logo img { width: 52px; height: 52px; }
.login-message { margin: auto 0; max-width: 680px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--gold); font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.eyebrow.dark { color: var(--navy-3); }
.login-message h1 { margin: 19px 0 22px; color: white; font-size: clamp(2.7rem, 4.1vw, 4.8rem); line-height: 1.03; letter-spacing: -.045em; font-weight: 760; }
.login-message h1 strong { color: var(--gold); font-weight: inherit; }
.login-message p { max-width: 590px; color: rgba(255,255,255,.78); font-size: 1.12rem; line-height: 1.7; }
.login-brand-footer { display: flex; gap: 24px; flex-wrap: wrap; color: rgba(255,255,255,.78); font-size: .82rem; font-weight: 600; }
.login-brand-footer span::before { content: "✓"; color: var(--gold); margin-right: 7px; }
.login-panel { display: grid; place-items: center; padding: 42px clamp(30px, 6vw, 90px); }
.login-card { width: min(430px, 100%); display: grid; gap: 22px; }
.login-card h2 { margin: 8px 0 3px; font-size: 2rem; color: var(--navy); letter-spacing: -.03em; }
.login-card p { margin: 0; }
.mobile-login-logo { display: none; }
.field { display: grid; gap: 8px; color: #29435a; font-size: .86rem; font-weight: 700; }
.field input, .field select, .field textarea, .attendance-controls input, .attendance-controls select, .toolbar select { width: 100%; border: 1px solid #cfdbe4; border-radius: 10px; background: #fff; color: var(--ink); padding: 12px 13px; transition: border .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus, .attendance-controls input:focus, .attendance-controls select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(254,182,57,.14); outline: 0; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.password-toggle { position: absolute; right: 7px; top: 5px; color: var(--muted); }
.login-options { display: flex; justify-content: space-between; align-items: center; font-size: .83rem; }
.checkbox { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.checkbox input { accent-color: var(--navy); }
.text-button { padding: 0; border: 0; background: none; color: var(--navy-3); font-weight: 750; }
.demo-note { display: flex; justify-content: space-between; padding: 12px 14px; border-radius: 10px; background: var(--gold-soft); color: #6b4a0d; font-size: .78rem; }
.student-portal-link { color: var(--navy-3); font-size: .78rem; font-weight: 750; text-align: center; text-decoration: none; }
.student-portal-link:hover { text-decoration: underline; }

/* Shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 262px minmax(0, 1fr); background: var(--canvas); }
.sidebar { position: sticky; top: 0; z-index: 30; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; color: #d7e3ed; background: linear-gradient(180deg, var(--navy), #042744 72%, #082e4e); box-shadow: 12px 0 32px rgba(0,31,61,.09); }
.sidebar-head { height: 87px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo { color: white; font-size: 1.05rem; }
.sidebar-logo img { width: 38px; height: 38px; }
.sidebar-close { display: none; color: white; }
.main-nav { padding: 20px 13px; }
.nav-label { margin: 19px 13px 7px; color: #7990a4; font-size: .66rem; font-weight: 800; letter-spacing: .13em; }
.nav-item { width: 100%; min-height: 44px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; margin: 3px 0; padding: 8px 12px; border: 0; border-radius: 10px; color: #b9cad8; background: transparent; text-align: left; font-size: .89rem; font-weight: 580; transition: all .18s; }
.nav-item:hover { color: white; background: rgba(255,255,255,.065); }
.nav-item.active { color: white; background: rgba(254,182,57,.14); box-shadow: inset 3px 0 var(--gold); }
.nav-item.active .nav-icon { color: var(--gold); }
.nav-icon { display: grid; place-items: center; width: 25px; font-size: 1.08rem; }
.nav-count, .nav-alert { min-width: 22px; padding: 2px 6px; border-radius: 999px; color: #bbccda; background: rgba(255,255,255,.1); font-size: .68rem; text-align: center; }
.nav-alert { color: #fff; background: var(--coral); }
.sidebar-profile { margin-top: auto; display: grid; grid-template-columns: 38px 1fr 30px; align-items: center; gap: 10px; padding: 17px 18px; border-top: 1px solid rgba(255,255,255,.09); background: rgba(0,0,0,.1); }
.sidebar-profile strong, .sidebar-profile span { display: block; }
.sidebar-profile strong { color: #fff; font-size: .8rem; }
.sidebar-profile span { color: #88a0b4; font-size: .68rem; }
.sidebar-profile .icon-button { color: #9bb0c1; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; font-weight: 800; font-size: .76rem; }
.avatar-gold { color: var(--navy); background: var(--gold); }
.sidebar-scrim { display: none; }
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 87px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar h1 { margin: 0; color: var(--navy); font-size: 1.22rem; letter-spacing: -.02em; }
.topbar p { margin: 2px 0 0; color: var(--muted); font-size: .74rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.global-search { width: 240px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafb; color: var(--muted); }
.global-search input { width: 100%; height: 38px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .82rem; }
.connection-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: .7rem; }
.connection-pill > span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(35,149,108,.12); }
.connection-pill.offline { color: #a26900; background: var(--gold-soft); }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; font-size: 1.05rem; }
.icon-button:hover { background: rgba(0,31,61,.06); }
.notification-button { border: 1px solid var(--line); color: var(--navy); }
.menu-button { display: none; }
.main-content { max-width: 1520px; margin: 0 auto; padding: 28px 32px 50px; }
.view { display: none; animation: viewIn .25s ease; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* Common */
.button { min-height: 41px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 9px 16px; border: 1px solid transparent; border-radius: 9px; font-size: .82rem; font-weight: 750; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: var(--navy); background: var(--gold); box-shadow: 0 8px 20px rgba(254,182,57,.25); }
.button.primary:hover { background: #ffc24f; }
.button.dark { color: white; background: var(--navy); }
.button.ghost { color: var(--navy); border-color: #cdd9e2; background: white; }
.button.danger { color: white; background: #c94636; }
.button.wide { width: 100%; }
.button-group { display: flex; gap: 8px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 18px rgba(0,31,61,.035); }
.panel.compact { border-radius: 12px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.panel-head h3 { margin: 4px 0 0; color: var(--navy); font-size: 1.02rem; }
.panel-kicker { color: #8798a7; font-size: .62rem; font-weight: 850; letter-spacing: .13em; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.section-head h2 { margin: 0; color: var(--navy); font-size: 1.6rem; letter-spacing: -.035em; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: .84rem; }
.date-label { color: var(--navy-3); font-size: .69rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.welcome-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 4px 0 22px; }
.welcome-row h2 { margin: 4px 0 2px; color: var(--navy); font-size: 1.7rem; letter-spacing: -.04em; }
.welcome-row h2 span { font-size: 1.3rem; }
.welcome-row p { margin: 0; color: var(--muted); font-size: .85rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin-bottom: 17px; }
.metric-card { position: relative; min-height: 118px; display: flex; align-items: flex-start; gap: 14px; padding: 21px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 5px 16px rgba(0,31,61,.035); }
.metric-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -35px; top: -35px; border-radius: 50%; background: currentColor; opacity: .05; }
.metric-icon { width: 41px; height: 41px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; font-size: 1.25rem; font-weight: 750; background: currentColor; }
.metric-icon::first-line { color: inherit; }
.metric-card.blue { color: var(--blue); } .metric-card.blue .metric-icon { background: var(--blue-soft); }
.metric-card.gold { color: #b67500; } .metric-card.gold .metric-icon { background: var(--gold-soft); }
.metric-card.green { color: var(--green); } .metric-card.green .metric-icon { background: var(--green-soft); }
.metric-card.coral { color: var(--coral); } .metric-card.coral .metric-icon { background: var(--coral-soft); }
.metric-card span, .metric-card strong, .metric-card small { display: block; }
.metric-card span { margin-bottom: 4px; color: var(--muted); font-size: .72rem; font-weight: 650; }
.metric-card strong { color: var(--navy); font-size: 1.48rem; line-height: 1.25; letter-spacing: -.035em; }
.metric-card small { margin-top: 8px; color: #8695a2; font-size: .64rem; }
.metric-card small b { color: var(--green); }
.metric-card.coral small b { color: var(--coral); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(310px,.75fr); gap: 17px; margin-bottom: 17px; }
.secondary-grid { grid-template-columns: minmax(0,1.25fr) minmax(340px,.75fr); }
.classes-panel, .finance-summary, .attendance-chart, .attention-panel { padding: 21px; }
.class-list { margin-top: 9px; }
.class-item { display: grid; grid-template-columns: 70px 4px 1fr auto; align-items: center; gap: 16px; padding: 15px 0; border-bottom: 1px solid #edf1f4; }
.class-item:last-child { border-bottom: 0; padding-bottom: 0; }
.class-time strong, .class-time span { display: block; }
.class-time strong { color: var(--navy); font-size: .92rem; }
.class-time span { color: var(--muted); font-size: .67rem; }
.class-color { width: 4px; height: 42px; border-radius: 4px; background: var(--gold); }
.class-color.blue { background: var(--blue); } .class-color.green { background: var(--green); }
.class-info strong, .class-info span { display: block; }
.class-info strong { color: var(--ink); font-size: .82rem; }
.class-info span { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.class-item .button { min-height: 34px; padding: 7px 11px; font-size: .7rem; }
.finance-big { margin: 28px 0 25px; }
.finance-big span, .finance-big strong, .finance-big small { display: block; }
.finance-big span { color: var(--muted); font-size: .7rem; }
.finance-big strong { margin: 3px 0 6px; color: var(--navy); font-size: 1.7rem; letter-spacing: -.04em; }
.finance-big small { color: var(--muted); font-size: .64rem; }
.finance-big small b { color: var(--green); }
.finance-bars { display: grid; gap: 16px; }
.finance-bars p { display: flex; justify-content: space-between; margin: 0 0 7px; color: var(--muted); font-size: .68rem; }
.finance-bars p b { color: var(--ink); }
.finance-bars i, .bar-chart i { height: 6px; display: block; overflow: hidden; border-radius: 999px; background: #e8edf1; }
.finance-bars em, .bar-chart em { height: 100%; display: block; border-radius: inherit; background: var(--green); }
.finance-bars .expense em { background: var(--coral); }
.select-look { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: .66rem; }
.bar-chart { display: grid; gap: 17px; margin-top: 22px; }
.bar-chart > div { display: grid; grid-template-columns: 190px 1fr 40px; align-items: center; gap: 13px; }
.bar-chart span { color: #4c6275; font-size: .7rem; }
.bar-chart b { color: var(--navy); font-size: .7rem; text-align: right; }
.bar-chart em { background: linear-gradient(90deg, var(--navy-3), var(--blue)); }
.attention-panel { display: grid; align-content: start; }
.attention-item { display: grid; grid-template-columns: 39px 1fr auto; align-items: center; gap: 11px; padding: 14px 0; border: 0; border-bottom: 1px solid #edf1f4; background: none; text-align: left; }
.attention-item:last-child { border-bottom: 0; }
.attention-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; font-weight: 800; }
.attention-icon.red { color: var(--coral); background: var(--coral-soft); }
.attention-icon.gold { color: #a96c00; background: var(--gold-soft); }
.attention-icon.blue { color: var(--blue); background: var(--blue-soft); }
.attention-item b, .attention-item small { display: block; }
.attention-item b { color: var(--ink); font-size: .75rem; }
.attention-item small { color: var(--muted); font-size: .64rem; margin-top: 2px; }
.attention-item > strong { color: #a1afba; }

/* Tables and lists */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px; }
.table-search { min-width: 250px; flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #d3dee6; border-radius: 9px; color: var(--muted); }
.table-search input { width: 100%; min-height: 39px; border: 0; outline: 0; background: transparent; font-size: .78rem; }
.toolbar select { width: auto; min-height: 41px; padding: 8px 34px 8px 11px; font-size: .76rem; }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 13px 18px; color: #7d8f9d; background: #f8fafb; font-size: .63rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
td { padding: 14px 18px; border-top: 1px solid #e8edf1; color: #4b6174; font-size: .75rem; }
tbody tr:hover { background: #fbfcfd; }
.student-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.student-cell strong, .student-cell span { display: block; }
.student-cell strong { color: var(--ink); font-size: .78rem; }
.student-cell span { margin-top: 2px; color: var(--muted); font-size: .63rem; }
.avatar-soft { color: var(--navy); background: #e6edf3; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-size: .64rem; font-weight: 750; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.active, .status.paid { color: var(--green); background: var(--green-soft); }
.status.completed { color: var(--blue); background: var(--blue-soft); }
.status.paused, .status.pending { color: #a86b00; background: var(--gold-soft); }
.status.overdue { color: var(--coral); background: var(--coral-soft); }
.table-action { padding: 5px 8px; border: 0; border-radius: 7px; color: var(--navy-3); background: #eef4f8; font-size: .67rem; font-weight: 750; }
.table-action.danger { color: var(--coral); background: var(--coral-soft); }
.table-footer { display: flex; justify-content: space-between; align-items: center; padding: 12px 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; }
.pagination { display: flex; gap: 5px; }
.pagination button { min-width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--muted); font-size: .7rem; }
.pagination button.active { color: var(--navy); border-color: var(--gold); background: var(--gold-soft); }

/* Courses */
.course-summary { display: grid; grid-template-columns: repeat(4,1fr); margin-bottom: 17px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.course-summary div { padding: 16px 21px; border-right: 1px solid var(--line); }
.course-summary div:last-child { border-right: 0; }
.course-summary span, .course-summary strong { display: block; }
.course-summary span { color: var(--muted); font-size: .68rem; }
.course-summary strong { margin-top: 3px; color: var(--navy); font-size: 1.2rem; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.course-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 5px 18px rgba(0,31,61,.035); }
.course-card-top { position: relative; min-height: 100px; padding: 20px; color: white; background: linear-gradient(125deg, var(--navy), var(--navy-3)); }
.course-card:nth-child(2) .course-card-top { background: linear-gradient(125deg, #0c5885, #2886c8); }
.course-card:nth-child(3) .course-card-top { background: linear-gradient(125deg, #785400, #d49a1a); }
.course-card-top::after { content: ""; position: absolute; width: 120px; height: 120px; border: 24px solid rgba(255,255,255,.07); border-radius: 50%; right: -50px; top: -42px; }
.course-card-top span { color: var(--gold); font-size: .62rem; font-weight: 800; letter-spacing: .1em; }
.course-card:nth-child(2) .course-card-top span, .course-card:nth-child(3) .course-card-top span { color: white; }
.course-card-top h3 { max-width: 290px; margin: 7px 0 0; font-size: 1.12rem; line-height: 1.2; }
.course-card-body { padding: 18px 20px; }
.course-meta { display: flex; gap: 17px; color: var(--muted); font-size: .67rem; }
.course-price { margin-left: auto; color: var(--navy); font-weight: 850; }
.course-description { min-height: 38px; margin: 13px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.course-modules { margin: 17px 0; padding-top: 12px; border-top: 1px solid #e8edf1; }
.course-modules span { display: block; margin-bottom: 8px; color: #8494a1; font-size: .61rem; font-weight: 800; letter-spacing: .09em; }
.course-modules ol { margin: 0; padding-left: 20px; color: #40586b; font-size: .72rem; }
.course-modules li { margin: 6px 0; padding-left: 4px; }
.course-card-foot { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .67rem; }
.course-actions { display: flex; gap: 6px; }

/* Attendance */
.save-hint { display: flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: .7rem; font-weight: 700; }
.attendance-controls { display: grid; grid-template-columns: 1.25fr 1.25fr .8fr auto; gap: 12px; align-items: end; margin-bottom: 15px; padding: 16px; }
.attendance-controls label { display: grid; gap: 6px; color: var(--muted); font-size: .65rem; font-weight: 750; }
.attendance-controls input, .attendance-controls select { min-height: 41px; padding: 8px 10px; font-size: .75rem; }
.attendance-sheet { overflow: hidden; }
.attendance-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px; color: white; background: linear-gradient(110deg, var(--navy), #0b3c65); }
.attendance-sheet-head h3 { margin: 5px 0 5px; font-size: 1.12rem; }
.attendance-sheet-head p { margin: 0; color: #b6cad9; font-size: .68rem; }
.attendance-counter { min-width: 110px; text-align: right; }
.attendance-counter strong, .attendance-counter span { display: block; }
.attendance-counter strong { color: var(--gold); font-size: 2rem; line-height: 1; }
.attendance-counter span { margin-top: 5px; color: #a9c0d1; font-size: .64rem; }
.attendance-list { padding: 4px 20px; }
.attendance-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; padding: 13px 2px; border-bottom: 1px solid #edf1f4; }
.attendance-person { display: flex; align-items: center; gap: 11px; }
.attendance-person strong, .attendance-person span { display: block; }
.attendance-person strong { color: var(--ink); font-size: .77rem; }
.attendance-person span { color: var(--muted); font-size: .63rem; }
.attendance-options { display: flex; padding: 3px; border-radius: 9px; background: #f0f3f5; }
.attendance-options button { min-width: 78px; padding: 7px 9px; border: 0; border-radius: 7px; color: #768897; background: transparent; font-size: .65rem; font-weight: 750; }
.attendance-options button.active.present { color: var(--green); background: white; box-shadow: 0 2px 8px rgba(0,31,61,.08); }
.attendance-options button.active.absent { color: var(--coral); background: white; box-shadow: 0 2px 8px rgba(0,31,61,.08); }
.attendance-options button.active.excused { color: #9b6500; background: white; box-shadow: 0 2px 8px rgba(0,31,61,.08); }
.attendance-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 21px; border-top: 1px solid var(--line); background: #fafbfc; }
.attendance-actions span { color: var(--muted); font-size: .67rem; }

/* Finance, reports, settings */
.finance-metrics .metric-card strong { font-size: 1.15rem; }
.finance-table-head { padding: 18px; }
.tab-switch { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: #eef2f5; }
.tab-switch button { padding: 6px 11px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: .65rem; }
.tab-switch button.active { color: var(--navy); background: white; box-shadow: 0 2px 7px rgba(0,31,61,.08); font-weight: 750; }
.amount-positive { color: var(--green); font-weight: 750; }.amount-negative { color: var(--coral); font-weight: 750; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.report-card { display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.report-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; font-size: 1.25rem; }
.report-icon.blue { color: var(--blue); background: var(--blue-soft); }.report-icon.green { color: var(--green); background: var(--green-soft); }.report-icon.gold { color: #a66a00; background: var(--gold-soft); }.report-icon.coral { color: var(--coral); background: var(--coral-soft); }
.report-card h3 { margin: 0; color: var(--navy); font-size: .9rem; }.report-card p { margin: 4px 0 0; color: var(--muted); font-size: .69rem; }
.certificate-highlight { display: grid; grid-template-columns: .85fr 1.15fr; gap: 34px; align-items: center; margin-bottom: 16px; padding: 28px; background: linear-gradient(115deg, #fff, #fffaf0); }
.certificate-highlight h3 { margin: 7px 0; color: var(--navy); font-size: 1.45rem; }.certificate-highlight p { margin: 0 0 17px; color: var(--muted); font-size: .8rem; }
.certificate-preview { min-height: 235px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; border: 9px double var(--navy); outline: 3px solid var(--gold); outline-offset: -14px; background: white; text-align: center; box-shadow: 0 14px 30px rgba(0,31,61,.12); transform: none; }
.certificate-brand { gap: 7px; font-size: .9rem; letter-spacing: -.04em; }
.certificate-brand img { width: 32px; height: 32px; }
.certificate-brand.large { font-size: 1.25rem; }.certificate-brand.large img { width: 46px; height: 46px; }
.certificate-preview > span { margin-top: 16px; color: var(--gold); font-size: .6rem; font-weight: 900; letter-spacing: .2em; }.certificate-preview strong { margin-top: 8px; color: var(--navy); font-family: Georgia, serif; font-size: 1.1rem; }.certificate-preview i { width: 120px; margin: 16px 0 6px; border-top: 1px solid var(--navy); }.certificate-preview small { color: var(--muted); font-size: .55rem; }
.role-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; margin-bottom: 16px; }
.role-grid article { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: white; }.role-grid h3 { margin: 13px 0 5px; color: var(--navy); font-size: .9rem; }.role-grid p { min-height: 44px; margin: 0 0 12px; color: var(--muted); font-size: .68rem; }.role-grid strong { color: var(--navy-3); font-size: .68rem; }
.role-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; font-weight: 850; }.role-icon.navy { color: white; background: var(--navy); }.role-icon.gold { color: var(--navy); background: var(--gold); }.role-icon.blue { color: var(--blue); background: var(--blue-soft); }
.safety-banner { display: flex; gap: 13px; align-items: center; margin-bottom: 15px; padding: 16px 18px; border: 1px solid #f0d088; border-radius: 13px; background: var(--gold-soft); }.safety-banner > span { font-size: 1.5rem; color: #986100; }.safety-banner strong { color: #63430b; font-size: .82rem; }.safety-banner p { margin: 2px 0 0; color: #806027; font-size: .68rem; }
.empty-state { padding: 45px 20px; text-align: center; color: var(--muted); }.empty-state span { display: block; font-size: 2rem; }.empty-state strong { display: block; margin: 8px 0 3px; color: var(--navy); }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }.settings-card { padding: 22px; }.settings-card h3 { margin: 5px 0 18px; color: var(--navy); }.settings-card .field { margin-bottom: 13px; }.suffix-input { position: relative; }.suffix-input input { padding-right: 40px; }.suffix-input b { position: absolute; right: 14px; top: 12px; color: var(--muted); }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 12px 0; border-top: 1px solid #edf1f4; }.toggle-row b, .toggle-row small { display: block; }.toggle-row b { color: var(--ink); font-size: .75rem; }.toggle-row small { color: var(--muted); font-size: .62rem; }.toggle-row input { width: 38px; height: 21px; accent-color: var(--navy); }
.sync-illustration { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 20px 0; color: var(--navy); font-size: 1.6rem; }.sync-illustration i { width: 70px; border-top: 2px dashed var(--gold); }.settings-card > p { color: var(--muted); font-size: .72rem; }.sync-status { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 9px; color: var(--green); background: var(--green-soft); font-size: .66rem; }.sync-status > span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }.sync-status small { color: var(--muted); }
.signature-settings { grid-row: span 2; }
.signature-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 11px; color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.signature-divider::before,.signature-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.signature-pad-wrap { padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9fa; }.signature-pad-wrap canvas { display: block; width: 100%; aspect-ratio: 900 / 280; border: 1px dashed #b8c5ce; border-radius: 9px; background: white; cursor: crosshair; touch-action: none; }.signature-pad-wrap > small { display: block; margin: 7px 2px 9px; color: var(--muted); font-size: .62rem; }.signature-pad-actions { display: flex; justify-content: flex-end; gap: 8px; }.signature-pad-actions .button { min-height: 36px; padding: 8px 12px; font-size: .65rem; }
.signature-saved { display: grid; grid-template-columns: minmax(100px,145px) 1fr; align-items: center; gap: 12px; margin-top: 13px; padding: 11px; border: 1px solid #cce5da; border-radius: 11px; background: var(--green-soft); }.signature-saved[hidden] { display: none; }.signature-saved > img { width: 100%; height: 68px; object-fit: contain; border-radius: 7px; background: white; }.signature-saved strong,.signature-saved small { display: block; }.signature-saved strong { color: var(--green); font-size: .7rem; }.signature-saved small { max-width: 190px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }.signature-saved-actions { grid-column: 1 / -1; display: flex; gap: 8px; }.signature-saved-actions .button { flex: 1; min-height: 34px; padding: 7px 10px; font-size: .62rem; }.signature-hint { margin: 10px 0 0 !important; line-height: 1.5; }
.interest-alert { background: var(--gold); color: var(--navy); }
.interest-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 15px; }.interest-summary article { display: flex; align-items: flex-start; gap: 12px; padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: white; }.interest-summary-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; font-weight: 850; }.interest-summary-icon.gold { color: #996200; background: var(--gold-soft); }.interest-summary-icon.blue { color: var(--blue); background: var(--blue-soft); }.interest-summary-icon.green { color: var(--green); background: var(--green-soft); }.interest-summary small,.interest-summary strong,.interest-summary em { display: block; }.interest-summary small { color: var(--muted); font-size: .63rem; }.interest-summary strong { margin: 2px 0; color: var(--navy); font-size: 1.25rem; }.interest-summary em { color: #83939f; font-size: .58rem; font-style: normal; }.interest-table-head { padding: 18px; }.interest-actions { display: flex; gap: 5px; }.interest-empty { padding: 45px 20px; text-align: center; }.interest-empty span { display: block; color: #91a1ad; font-size: 1.8rem; }.interest-empty strong { display: block; margin: 7px 0; color: var(--navy); }.interest-empty small { color: var(--muted); }

/* Student profile */
.back-link { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 18px; padding: 0; border: 0; color: var(--navy-3); background: transparent; font-size: .76rem; font-weight: 750; }
.student-profile-head { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 20px; }
.student-profile-identity { display: flex; align-items: center; gap: 15px; }
.profile-avatar { width: 62px; height: 62px; display: grid; place-items: center; border: 4px solid white; border-radius: 17px; color: var(--navy); background: linear-gradient(135deg, #dceaf3, #eef5f8); box-shadow: 0 5px 18px rgba(0,31,61,.13); font-size: 1.05rem; font-weight: 850; }
.profile-name-row { display: flex; align-items: center; gap: 10px; }
.profile-name-row h2 { margin: 0; color: var(--navy); font-size: 1.6rem; letter-spacing: -.04em; }
.student-profile-identity p { margin: 4px 0 2px; color: #52697b; font-size: .78rem; }.student-profile-identity small { color: #8797a4; font-size: .65rem; }
.profile-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }
.profile-metrics article { min-height: 102px; display: flex; align-items: flex-start; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.profile-metric-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; font-weight: 800; }.profile-metric-icon.green { color: var(--green); background: var(--green-soft); }.profile-metric-icon.blue { color: var(--blue); background: var(--blue-soft); }.profile-metric-icon.gold { color: #9b6500; background: var(--gold-soft); }.profile-metric-icon.coral { color: var(--coral); background: var(--coral-soft); }
.profile-metrics small, .profile-metrics strong, .profile-metrics em { display: block; }.profile-metrics small { color: var(--muted); font-size: .65rem; font-style: normal; }.profile-metrics strong { margin: 3px 0; color: var(--navy); font-size: 1.02rem; }.profile-metrics em { color: #81919e; font-size: .6rem; font-style: normal; }
.profile-layout { display: grid; grid-template-columns: minmax(0,1fr) 315px; gap: 16px; align-items: start; }
.profile-main, .profile-aside { min-width: 0; display: grid; gap: 16px; }
.profile-section { min-width: 0; padding: 21px; }
.module-timeline { display: grid; margin-top: 19px; }
.module-row { position: relative; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; min-height: 70px; }
.module-row:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 30px; bottom: 0; width: 2px; background: #dfe7ed; }
.module-step { position: relative; z-index: 1; width: 33px; height: 33px; display: grid; place-items: center; border: 2px solid #d6e0e7; border-radius: 50%; color: #90a0ad; background: white; font-size: .68rem; font-weight: 850; }
.module-row.complete .module-step { color: white; border-color: var(--green); background: var(--green); }.module-row.current .module-step { color: var(--navy); border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); }
.module-copy strong, .module-copy span { display: block; }.module-copy strong { color: var(--ink); font-size: .76rem; }.module-copy span { margin-top: 3px; color: var(--muted); font-size: .62rem; }.module-row.pending .module-copy { opacity: .63; }
.module-state { align-self: start; padding: 4px 7px; border-radius: 999px; color: #718391; background: #eef2f5; font-size: .57rem; font-weight: 750; }.module-row.complete .module-state { color: var(--green); background: var(--green-soft); }.module-row.current .module-state { color: #936000; background: var(--gold-soft); }
.profile-tabs { display: flex; gap: 22px; margin: -5px -2px 16px; border-bottom: 1px solid var(--line); }
.profile-tabs button { position: relative; padding: 11px 2px; border: 0; color: var(--muted); background: transparent; font-size: .72rem; font-weight: 750; }.profile-tabs button.active { color: var(--navy); }.profile-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--gold); }
.profile-tab { display: none; }.profile-tab.active { display: block; animation: viewIn .2s ease; }.profile-tab table th { background: #fbfcfd; }.profile-tab table th, .profile-tab table td { padding-left: 10px; padding-right: 10px; }
.finance-package-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding: 13px; border-radius: 11px; background: #f6f8fa; }.finance-package-summary div { padding: 5px 10px; border-right: 1px solid #dfe6eb; }.finance-package-summary div:last-child { border-right: 0; }.finance-package-summary span, .finance-package-summary strong { display: block; }.finance-package-summary span { color: var(--muted); font-size: .59rem; }.finance-package-summary strong { margin-top: 3px; color: var(--navy); font-size: .86rem; }.finance-package-summary .positive { color: var(--green); }.finance-package-summary .negative { color: var(--coral); }
.installment-list { display: grid; margin-top: 13px; }.installment-row { display: grid; grid-template-columns: 1fr 90px 100px auto; align-items: center; gap: 10px; padding: 11px 5px; border-bottom: 1px solid #edf1f4; font-size: .7rem; }.installment-row strong { color: var(--ink); }.installment-row span { color: var(--muted); }
.notes-box { padding: 17px; border: 1px solid #e5ebef; border-radius: 11px; background: #fafbfc; }.notes-box > span, .audit-mini > span { color: #81919d; font-size: .6rem; font-weight: 850; letter-spacing: .09em; }.notes-box p { margin: 9px 0 12px; color: #4b6174; font-size: .74rem; line-height: 1.65; }.audit-mini { margin-top: 18px; }.audit-mini p { margin: 10px 0; color: var(--muted); font-size: .65rem; }.audit-mini b { color: var(--ink); margin-right: 8px; }
.contact-card dl { margin: 15px 0 0; }.contact-card dl div { padding: 10px 0; border-bottom: 1px solid #edf1f4; }.contact-card dl div:last-child { border-bottom: 0; }.contact-card dt { color: #8796a2; font-size: .59rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }.contact-card dd { margin: 3px 0 0; color: var(--ink); font-size: .73rem; font-weight: 650; word-break: break-word; }
.quick-actions { padding-top: 18px; }.quick-actions > button { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 13px 0; border: 0; border-bottom: 1px solid #edf1f4; color: var(--navy); background: transparent; text-align: left; }.quick-actions > button:last-child { border-bottom: 0; padding-bottom: 0; }.quick-actions > button > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--blue); background: var(--blue-soft); }.quick-actions b, .quick-actions small { display: block; }.quick-actions b { color: var(--ink); font-size: .7rem; }.quick-actions small { margin-top: 2px; color: var(--muted); font-size: .58rem; }.quick-actions button > strong { color: #9aa9b4; }.quick-actions .danger-row > span, .quick-actions .danger-row b { color: var(--coral); }.quick-actions .danger-row > span { background: var(--coral-soft); }

/* Modals */
.modal { width: min(620px, calc(100% - 30px)); max-height: calc(100vh - 40px); padding: 0; overflow: auto; border: 0; border-radius: 18px; color: var(--ink); background: white; box-shadow: 0 25px 80px rgba(0,31,61,.3); }
.modal::backdrop { background: rgba(0,20,40,.62); backdrop-filter: blur(3px); }
.modal form { padding: 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 21px; }.modal-head h2 { margin: 4px 0 0; color: var(--navy); font-size: 1.35rem; }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 15px; }.form-grid .full { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.small-modal { width: min(430px, calc(100% - 30px)); text-align: center; }.small-modal p { color: var(--muted); font-size: .78rem; }.small-modal .field { text-align: left; }.danger-symbol { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; color: var(--coral); background: var(--coral-soft); font-size: 1.5rem; font-weight: 900; }
.certificate-dialog { width: min(930px, calc(100% - 30px)); padding: 20px; }.certificate-document { padding: 10px; background: #f0f1f2; }.certificate-border { min-height: 520px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 45px; border: 12px double var(--navy); outline: 3px solid var(--gold); outline-offset: -20px; background: white; text-align: center; }.certificate-border > span { margin-top: 25px; color: #af770d; font-size: .7rem; font-weight: 900; letter-spacing: .25em; }.certificate-border > p { margin: 16px 0 4px; color: var(--muted); }.certificate-border h2 { margin: 8px 0; color: var(--navy); font: 700 2.2rem Georgia,serif; }.certificate-border h3 { margin: 8px 0; color: #af770d; font: 700 1.25rem Georgia,serif; }.certificate-signature { display: flex; flex-direction: column; align-items: center; margin: 20px 0 18px; }.certificate-signature img { width: 220px; height: 76px; margin-bottom: -4px; object-fit: contain; }.certificate-signature i { width: 180px; border-top: 1px solid var(--navy); }.certificate-signature strong { margin-top: 6px; color: var(--navy); }.certificate-signature span { color: var(--muted); font-size: .7rem; }.certificate-border > small { color: var(--muted); font-size: .62rem; }

/* Feedback */
.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; gap: 9px; }
.toast { min-width: 280px; max-width: 380px; display: flex; align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid #cee6dc; border-radius: 11px; color: #165d45; background: #f0fbf6; box-shadow: var(--shadow); animation: toastIn .25s ease; font-size: .76rem; font-weight: 700; }.toast::before { content: "✓"; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); }.toast.error { color: #8d3428; border-color: #f1c9c2; background: #fff5f3; }.toast.error::before { content: "!"; background: var(--coral); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .course-grid { grid-template-columns: repeat(2,1fr); }
  .attendance-controls { grid-template-columns: 1fr 1fr; }
  .profile-metrics { grid-template-columns: repeat(2,1fr); }
  .profile-layout { grid-template-columns: minmax(0,1fr) 285px; }
  .interest-summary { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 1040px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; }
  .mobile-login-logo { display: inline-flex; margin-bottom: 8px; }.mobile-login-logo img { width: 46px; height: 46px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-102%); width: 275px; transition: transform .25s; }.sidebar.open { transform: none; }
  .sidebar-close, .menu-button { display: inline-grid; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 25; background: rgba(0,20,40,.42); }.sidebar-scrim.open { display: block; }
  .dashboard-grid, .secondary-grid { grid-template-columns: 1fr; }
  .global-search { display: none; }
  .main-content { padding: 24px 20px 44px; }
  .course-grid { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }.profile-aside { grid-template-columns: 1fr 1fr; }
  .student-profile-head { align-items: flex-start; flex-direction: column; }
  .interest-summary { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { min-height: 72px; padding: 10px 14px; }.topbar p { display: none; }.topbar h1 { font-size: 1.05rem; }.connection-pill b { display: none; }
  .main-content { padding: 20px 13px 40px; }
  .welcome-row, .section-head { align-items: flex-start; }.welcome-row { flex-direction: column; }.welcome-row .button { width: 100%; }
  .section-head { flex-direction: column; }.section-head > .button, .section-head .button-group { width: 100%; }.button-group .button { flex: 1; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.metric-card { min-height: 136px; flex-direction: column; padding: 15px; }.metric-card strong { font-size: 1.2rem; }
  .class-item { grid-template-columns: 55px 3px 1fr; gap: 10px; }.class-item .button { grid-column: 3; justify-self: start; }
  .bar-chart > div { grid-template-columns: 130px 1fr 33px; gap: 8px; }
  .toolbar { flex-wrap: wrap; }.table-search { min-width: 100%; }.toolbar select, .toolbar .button { flex: 1; }
  .course-summary { grid-template-columns: 1fr 1fr; }.course-summary div:nth-child(2) { border-right: 0; }.course-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .attendance-controls { grid-template-columns: 1fr; }.attendance-sheet-head { align-items: flex-start; }.attendance-counter { min-width: auto; }
  .attendance-row { grid-template-columns: 1fr; }.attendance-options { width: 100%; }.attendance-options button { min-width: 0; flex: 1; }
  .attendance-actions { align-items: stretch; flex-direction: column; }.attendance-actions .button { width: 100%; }
  .report-card { grid-template-columns: 44px 1fr; }.report-card .button { grid-column: 1/-1; }
  .certificate-highlight { grid-template-columns: 1fr; padding: 18px; }.certificate-preview { transform: none; }
  .role-grid { grid-template-columns: 1fr; }.role-grid p { min-height: 0; }
  .profile-metrics { grid-template-columns: 1fr 1fr; gap: 9px; }.profile-metrics article { min-height: 118px; flex-direction: column; padding: 14px; }
  .profile-aside { grid-template-columns: 1fr; }.student-profile-head .button-group { width: 100%; flex-wrap: wrap; }.student-profile-head .button-group .button { flex: 1 1 44%; }.profile-name-row { align-items: flex-start; flex-direction: column; gap: 5px; }.profile-name-row h2 { font-size: 1.35rem; }
  .finance-package-summary { grid-template-columns: 1fr; }.finance-package-summary div { border-right: 0; border-bottom: 1px solid #dfe6eb; }.finance-package-summary div:last-child { border-bottom: 0; }.installment-row { grid-template-columns: 1fr auto; }.installment-row > span { display: none; }
  .form-grid { grid-template-columns: 1fr; }.form-grid .full { grid-column: auto; }
  .signature-settings { grid-row: auto; }.signature-pad-actions,.signature-saved-actions { flex-direction: column; }.signature-pad-actions .button,.signature-saved-actions .button { width: 100%; }.signature-saved { grid-template-columns: 110px 1fr; }
  .certificate-border { min-height: 470px; padding: 35px 25px; }.certificate-border h2 { font-size: 1.65rem; }
  .login-panel { padding: 28px 22px; }
  .toast-region { left: 13px; right: 13px; bottom: 13px; }.toast { min-width: 0; max-width: none; }
}

/* Login ampliado para celulares que reportam uma viewport maior que a tela física. */
@media (max-width: 1040px) {
  .login-panel {
    min-height: 100svh;
    place-items: start center;
    padding: max(34px, 7svh) clamp(20px, 6vw, 48px) 40px;
  }
  .login-card { width: min(620px, 100%); gap: 24px; }
  .mobile-login-logo { margin-bottom: 12px; font-size: 1.45rem; }
  .mobile-login-logo img { width: 58px; height: 58px; }
  .login-card h2 { margin-top: 2px; font-size: clamp(2.15rem, 6vw, 2.65rem); }
  .login-card > p { font-size: 1rem; line-height: 1.6; }
  .field { gap: 9px; font-size: 1rem; }
  .field input { min-height: 58px; padding: 15px 16px; border-radius: 12px; font-size: 1.05rem; }
  .password-wrap input { padding-right: 56px; }
  .password-toggle { top: 6px; right: 6px; width: 46px; height: 46px; }
  .login-options { gap: 16px; font-size: .96rem; }
  .login-card .button { min-height: 56px; border-radius: 12px; font-size: .96rem; }
  .student-portal-link { padding: 6px; font-size: .92rem; }
}

@media print {
  body * { visibility: hidden; }
  .certificate-dialog[open], .certificate-dialog[open] * { visibility: visible; }
  .certificate-dialog[open] { position: absolute; inset: 0; width: 100%; max-height: none; box-shadow: none; }
  .certificate-dialog .modal-actions { display: none; }
  .certificate-document { padding: 0; background: white; }
}
