﻿:root {
      --black: #14140F;
      --red: #DD3B26;
      --red-soft: #FCE7E3;
      --green: #1F7A52;
      --green-soft: #E4F3EB;
      --bg: #F2EFE9;
      --card: #FFFFFF;
      --muted: #8A8A82;
      --line: #E7E3DA;
      --radius-lg: 28px;
      --radius-md: 20px;
      --radius-sm: 14px;
      --shadow: 0 12px 30px -14px rgba(20, 20, 15, 0.18);
    }

    * {
      box-sizing: border-box;
    }

    .icon-sprite {
      display: none;
    }

    .icon {
      display: block;
      flex: none;
      fill: none;
      stroke: currentColor;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    html,
    body {
      margin: 0;
      padding: 0;
    }

    body {
      background: var(--bg);
      color: var(--black);
      font-family: 'Inter', sans-serif;
      -webkit-font-smoothing: antialiased;
      min-height: 100vh;
      min-height: 100dvh;
    }

    h1,
    h2,
    h3,
    .display {
      font-family: 'Manrope', sans-serif;
      letter-spacing: -0.01em;
      margin: 0;
    }

    button {
      font-family: inherit;
      cursor: pointer;
    }

    .app {
      max-width: 1200px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 1fr;
    }

    /* ---------- SIDEBAR (desktop) ---------- */
    .sidebar {
      display: none;
    }

    /* ---------- TOP HEADER ---------- */
    .content {
      padding: 28px 20px 110px;
    }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 22px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .brand-mark {
      width: 38px;
      height: 38px;
      border-radius: 11px;
      background: var(--black);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-family: 'Manrope', sans-serif;
      font-weight: 800;
      font-size: 16px;
    }

    .brand-name {
      font-family: 'Manrope', sans-serif;
      font-weight: 700;
      font-size: 15px;
      letter-spacing: 0.01em;
    }

    .topbar-actions {
      display: flex;
      gap: 10px;
    }

    .icon-btn {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: 1px solid var(--line);
      background: var(--card);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--black);
      transition: transform .15s ease, background .15s ease;
    }

    .icon-btn:hover {
      background: var(--black);
      color: #fff;
    }

    .icon-btn:active {
      transform: scale(0.94);
    }

    .greeting-block {
      margin-bottom: 18px;
    }

    .greeting-date {
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 4px;
      font-weight: 500;
    }

    .greeting-title {
      font-size: 26px;
      font-weight: 700;
      line-height: 1.25;
    }

    .greeting-title strong {
      color: var(--red);
      font-weight: 800;
    }

    /* ---------- SEARCH ---------- */
    .search {
      display: flex;
      align-items: center;
      gap: 10px;
      background: var(--card);
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 14px 18px;
      margin-bottom: 20px;
      box-shadow: var(--shadow);
    }

    .search input {
      border: none;
      outline: none;
      background: transparent;
      font-family: 'Inter', sans-serif;
      font-size: 14.5px;
      color: var(--black);
      width: 100%;
    }

    .search input::placeholder {
      color: var(--muted);
    }

    .search svg {
      flex: none;
      color: var(--muted);
    }

    /* ---------- DAY CHIPS ---------- */
    .day-chips {
      display: flex;
      gap: 10px;
      overflow-x: auto;
      padding-bottom: 4px;
      margin-bottom: 22px;
      scrollbar-width: none;
    }

    .day-chips::-webkit-scrollbar {
      display: none;
    }

    .chip {
      flex: none;
      padding: 12px 18px;
      border-radius: 999px;
      background: var(--card);
      border: 1px solid var(--line);
      font-size: 13.5px;
      font-weight: 600;
      color: var(--black);
      white-space: nowrap;
    }

    .chip.active {
      background: var(--black);
      border-color: var(--black);
      color: #fff;
    }

    .chip .sub {
      display: block;
      font-size: 10.5px;
      font-weight: 500;
      opacity: 0.65;
      margin-top: 1px;
    }

    /* ---------- METRIC GRID ---------- */
    .section-title {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      margin-bottom: 12px;
    }

    .section-title h2 {
      font-size: 16px;
      font-weight: 700;
    }

    .section-title a {
      font-size: 12.5px;
      color: var(--muted);
      text-decoration: none;
      font-weight: 600;
    }

    .metrics-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 14px;
      margin-bottom: 26px;
    }

    .metric-card {
      background: var(--card);
      border-radius: var(--radius-md);
      padding: 18px;
      box-shadow: var(--shadow);
      position: relative;
      overflow: hidden;
    }

    .metric-icon {
      width: 36px;
      height: 36px;
      border-radius: 11px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 14px;
    }

    .metric-icon.black {
      background: var(--black);
      color: #fff;
    }

    .metric-icon.red {
      background: var(--red-soft);
      color: var(--red);
    }

    .metric-icon.green {
      background: var(--green-soft);
      color: var(--green);
    }

    .metric-value {
      font-family: 'Manrope', sans-serif;
      font-size: 26px;
      font-weight: 700;
      color: var(--black);
      line-height: 1.15;
      margin-bottom: 6px;
    }

    .metric-label {
      font-size: 16px;
      color: var(--black);
      font-weight: 700;
      line-height: 1.3;
      margin-bottom: 10px;
    }

    .metric-trend {
      font-size: 11.5px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 999px;
      display: inline-block;
      margin-top: 2px;
    }

    .metric-trend.up {
      background: var(--green-soft);
      color: var(--green);
    }

    .metric-trend.down {
      background: var(--red-soft);
      color: var(--red);
    }

    .metric-trend.neutral {
      background: var(--bg);
      color: var(--muted);
    }

    .metric-card.linkable {
      border: none;
      text-align: left;
      width: 100%;
      font-family: inherit;
      cursor: pointer;
      transition: transform .15s ease;
    }

    .metric-card.linkable:active {
      transform: scale(0.98);
    }

    /* ---------- CLASS/EVENT CARDS ---------- */
    .classes-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin-bottom: 28px;
    }

    .class-card {
      background: var(--card);
      border-radius: var(--radius-md);
      padding: 18px 18px;
      box-shadow: var(--shadow);
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .class-stripe {
      width: 4px;
      align-self: stretch;
      border-radius: 4px;
      flex: none;
    }

    .class-body {
      flex: 1;
      min-width: 0;
    }

    .class-name {
      font-family: 'Manrope', sans-serif;
      font-weight: 700;
      font-size: 15.5px;
      margin-bottom: 8px;
    }

    .class-meta {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 12.5px;
      color: var(--muted);
      font-weight: 500;
    }

    .class-time {
      color: var(--black);
      font-weight: 700;
    }

    .class-duration {
      background: var(--bg);
      border-radius: 999px;
      padding: 3px 10px;
      font-weight: 600;
    }

    .class-arrow {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: var(--bg);
      display: flex;
      align-items: center;
      justify-content: center;
      flex: none;
      color: var(--black);
    }

    /* ---------- SHORTCUTS ---------- */
    .shortcuts-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      margin-bottom: 16px;
    }

    .shortcut {
      background: var(--card);
      border-radius: var(--radius-sm);
      padding: 16px 8px;
      box-shadow: var(--shadow);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 9px;
      border: none;
      text-align: center;
    }

    .shortcut-icon {
      width: 42px;
      height: 42px;
      border-radius: 13px;
      background: var(--black);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .shortcut:nth-child(2) .shortcut-icon {
      background: var(--red);
    }

    .shortcut span {
      font-size: 12px;
      font-weight: 600;
      color: var(--black);
      line-height: 1.2;
    }

    /* ---------- COMPETIÇÕES (placeholder page) ---------- */
    .page-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 22px;
    }

    .page-header h1 {
      font-size: 22px;
      font-weight: 700;
    }

    .empty-state {
      background: var(--card);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      padding: 56px 28px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 16px;
    }

    .empty-state-icon {
      width: 64px;
      height: 64px;
      border-radius: 18px;
      background: var(--red-soft);
      color: var(--red);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .empty-state h2 {
      font-size: 18px;
      font-weight: 700;
    }

    .empty-state p {
      font-size: 13.5px;
      color: var(--muted);
      font-weight: 500;
      line-height: 1.6;
      max-width: 320px;
      margin: 0;
    }

    .empty-state .tag {
      margin-top: 4px;
      font-size: 11.5px;
      font-weight: 700;
      color: var(--muted);
      background: var(--bg);
      padding: 5px 12px;
      border-radius: 999px;
    }

    @media (min-width:900px) {
      .empty-state {
        padding: 80px 40px;
      }
    }

    /* ---------- BOTTOM NAV (mobile) ---------- */
    .bottom-nav {
      position: fixed;
      bottom: calc(16px + env(safe-area-inset-bottom, 0px));
      left: 50%;
      transform: translateX(-50%);
      width: calc(100% - 32px);
      max-width: 420px;
      background: var(--black);
      border-radius: 999px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px;
      box-shadow: 0 18px 40px -12px rgba(20, 20, 15, 0.45);
      z-index: 50;
    }

    .nav-item {
      flex: 1;
      min-width: 0;
      background: none;
      border: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
      padding: 10px 4px;
      color: #87867E;
      border-radius: 999px;
      transition: color .15s ease;
    }

    .nav-item.active {
      color: #fff;
      background: rgba(255, 255, 255, 0.08);
    }

    .nav-item svg {
      width: 20px;
      height: 20px;
    }

    .nav-item span {
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
    }

    /* Com 7 itens, só o item ativo mostra o texto. Os outros ficam só com o ícone
       e mantêm o nome acessível para leitor de tela. */
    .nav-item:not(.active) { flex: 0 0 auto; min-width: 40px; padding-left: 8px; padding-right: 8px; }
    .nav-item.active { flex: 1 1 auto; }
    .nav-item:not(.active) span {
      position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
      overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
    }

    /* ---------- ALUNOS ---------- */
    .students-header {
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin-bottom: 20px;
    }

    .students-header-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }

    .students-header h1 {
      font-size: 22px;
      font-weight: 700;
    }

    .students-subtitle {
      font-size: 13.5px;
      color: var(--muted);
      font-weight: 500;
    }

    .btn-new-student {
      display: none;
      align-items: center;
      gap: 8px;
      background: var(--black);
      color: #fff;
      border: none;
      border-radius: 999px;
      padding: 12px 18px;
      font-size: 13.5px;
      font-weight: 700;
      box-shadow: var(--shadow);
      flex: none;
      white-space: nowrap;
      transition: transform .15s ease;
    }

    .btn-new-student:active {
      transform: scale(0.96);
    }

    .students-count {
      font-size: 13px;
      color: var(--muted);
      font-weight: 600;
      margin: 2px 0 14px;
    }

    .students-count strong {
      color: var(--black);
      font-weight: 700;
    }

    .students-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .student-card {
      background: var(--card);
      border-radius: var(--radius-md);
      padding: 16px 16px;
      box-shadow: var(--shadow);
      display: flex;
      align-items: center;
      gap: 14px;
      border: none;
      width: 100%;
      text-align: left;
      transition: transform .15s ease;
    }

    .student-card:active {
      transform: scale(0.99);
    }

    .student-avatar {
      width: 46px;
      height: 46px;
      border-radius: 14px;
      background: var(--black);
      color: #fff;
      font-family: 'Manrope', sans-serif;
      font-weight: 700;
      font-size: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex: none;
    }

    .student-body {
      flex: 1;
      min-width: 0;
    }

    .student-top-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 6px;
    }

    .student-name {
      font-family: 'Manrope', sans-serif;
      font-weight: 700;
      font-size: 15px;
      color: var(--black);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .status-badge {
      font-size: 12px;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: 999px;
      flex: none;
    }

    .status-badge.active {
      background: var(--green-soft);
      color: var(--green);
    }

    .status-badge.inactive {
      background: var(--bg);
      color: var(--muted);
    }

    .student-belt-row {
      display: flex;
      align-items: center;
      margin-bottom: 6px;
    }

    .belt-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      font-weight: 600;
      color: var(--muted);
    }

    .belt-dot {
      width: 9px;
      height: 9px;
      border-radius: 50%;
      flex: none;
      border: 1px solid rgba(20, 20, 15, 0.12);
    }

    .belt-select-control {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .belt-select-control select {
      flex: 1;
    }

    .belt-select-dot {
      width: 18px;
      height: 18px;
      box-shadow: 0 0 0 2px var(--card);
    }

    .belt-dot.branca {
      background: #FFFFFF;
    }

    .belt-dot.cinza {
      background: #A5A5A5;
      border-color: transparent;
    }

    .belt-dot.cinza-branca {
      background: linear-gradient(90deg, #A5A5A5 50%, #FFFFFF 50%);
    }

    .belt-dot.cinza-preta {
      background: linear-gradient(90deg, #A5A5A5 50%, #14140F 50%);
      border-color: transparent;
    }

    .belt-dot.amarela {
      background: #F2C94C;
      border-color: transparent;
    }

    .belt-dot.amarela-branca {
      background: linear-gradient(90deg, #F2C94C 50%, #FFFFFF 50%);
    }

    .belt-dot.amarela-preta {
      background: linear-gradient(90deg, #F2C94C 50%, #14140F 50%);
      border-color: transparent;
    }

    .belt-dot.laranja-branca {
      background: linear-gradient(90deg, #E8872F 50%, #FFFFFF 50%);
    }

    .belt-dot.laranja {
      background: #E8872F;
      border-color: transparent;
    }

    .belt-dot.laranja-preta {
      background: linear-gradient(90deg, #E8872F 50%, #14140F 50%);
      border-color: transparent;
    }

    .belt-dot.verde {
      background: #3E9B62;
      border-color: transparent;
    }

    .belt-dot.verde-branca {
      background: linear-gradient(90deg, #3E9B62 50%, #FFFFFF 50%);
    }

    .belt-dot.verde-preta {
      background: linear-gradient(90deg, #3E9B62 50%, #14140F 50%);
      border-color: transparent;
    }

    .belt-dot.azul {
      background: #2C6BE0;
      border-color: transparent;
    }

    .belt-dot.roxa {
      background: #7B3FE4;
      border-color: transparent;
    }

    .belt-dot.marrom {
      background: #7A4B2A;
      border-color: transparent;
    }

    .belt-dot.preta {
      background: #14140F;
      border-color: transparent;
    }

    .belt-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
      gap: 12px;
    }

    .belt-grid-card {
      min-width: 0;
      min-height: 122px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 9px;
      padding: 14px 10px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: var(--card);
      color: var(--black);
      box-shadow: var(--shadow);
      text-align: center;
      transition: transform .15s ease, border-color .15s ease;
    }

    .belt-grid-card:hover,
    .belt-grid-card.selected {
      border-color: var(--green);
    }

    .belt-grid-card:active {
      transform: scale(0.98);
    }

    .belt-grid-dot {
      width: 28px;
      height: 28px;
    }

    .belt-grid-label {
      font-family: 'Manrope', sans-serif;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.3;
    }

    .belt-grid-count {
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
    }

    .graduation-results {
      margin-top: 26px;
    }

    .graduation-results-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 14px;
    }

    .graduation-results-header h2 {
      font-size: 19px;
      margin-bottom: 5px;
    }

    .graduation-results-header .section-copy {
      margin-bottom: 0;
    }

    .graduation-filters {
      margin: 0 0 14px;
    }

    .graduation-students-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .graduation-student-card {
      position: relative;
      cursor: pointer;
      gap: 12px;
      border: 1px solid transparent;
      transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
    }

    .graduation-student-card.graduation-student-inactive {
      border: 1px solid var(--red-soft);
    }

    .graduation-student-card.is-selected {
      border-color: var(--green);
      background: var(--green-soft);
    }

    .graduation-student-card:focus-within {
      outline: 2px solid var(--green);
      outline-offset: 2px;
    }

    .graduation-student-checkbox {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    .graduation-inactive-hint {
      color: var(--red);
      font-size: 12px;
      font-weight: 700;
    }

    .graduation-selection-tools {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 14px;
    }

    .graduation-selection-summary {
      margin-top: 24px;
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: var(--card);
      box-shadow: var(--shadow);
    }

    .graduation-summary-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 14px;
    }

    .graduation-summary-header h2 {
      font-size: 18px;
      margin-bottom: 5px;
    }

    .graduation-summary-header .section-copy {
      margin: 0;
    }

    .graduation-selection-list {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
      gap: 10px;
    }

    .graduation-selection-item {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: var(--bg);
    }

    .graduation-selection-item .student-name {
      flex: 1 1 100%;
    }

    .graduation-selection-item.is-inactive {
      border-color: var(--red);
    }

    .graduation-selection-belt {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
    }

    .graduation-review-actions {
      margin-top: 16px;
    }

    .graduation-batch-actions {
      position: fixed;
      z-index: 60;
      right: 24px;
      bottom: 24px;
    }

    .graduation-batch-fab {
      display: grid;
      width: 58px;
      height: 58px;
      place-items: center;
      border: 0;
      border-radius: 50%;
      background: var(--black);
      color: var(--card);
      box-shadow: var(--shadow);
      font-size: 34px;
      font-weight: 400;
      line-height: 1;
    }

    .graduation-batch-fab:hover {
      transform: translateY(-2px);
    }

    .graduation-batch-menu {
      position: absolute;
      right: 0;
      bottom: calc(100% + 12px);
      width: min(320px, calc(100vw - 32px));
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: var(--card);
      box-shadow: var(--shadow);
    }

    .graduation-batch-menu button {
      width: 100%;
      padding: 13px 14px;
      border: 0;
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--black);
      font: inherit;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.45;
      text-align: left;
    }

    .graduation-batch-menu button:hover,
    .graduation-batch-menu button:focus-visible {
      outline: none;
      background: var(--bg);
    }

    .graduation-batch-warning {
      margin: 14px 0 0;
      padding: 12px 14px;
      border-radius: var(--radius-sm);
      background: var(--red-soft);
      color: var(--red);
      font-size: 13px;
      font-weight: 600;
      line-height: 1.5;
    }

    .student-sub {
      font-size: 12px;
      color: var(--muted);
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .student-sub .dot-sep {
      width: 3px;
      height: 3px;
      border-radius: 50%;
      background: var(--muted);
      flex: none;
    }

    @media (min-width:900px) {
      .btn-new-student {
        display: inline-flex;
      }

      .students-header-top {
        align-items: center;
      }
    }

    @media (max-width:899px) {
      .graduation-batch-actions {
        right: 18px;
        bottom: calc(88px + env(safe-area-inset-bottom));
      }
    }

    @media (max-width:480px) {
      .graduation-batch-actions {
        right: 14px;
      }
      .graduation-batch-menu {
        right: -2px;
      }
    }

    /* ================= DESKTOP ================= */
    @media (min-width:900px) {
      .app {
        grid-template-columns: 260px 1fr;
        gap: 0;
      }

      .sidebar {
        display: flex;
        flex-direction: column;
        padding: 32px 22px;
        border-right: 1px solid var(--line);
        min-height: 100vh;
        position: sticky;
        top: 0;
        align-self: start;
      }

      .sidebar .brand {
        margin-bottom: 40px;
        padding-left: 4px;
      }

      .side-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
        flex: 1;
      }

      .side-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 14px;
        color: var(--muted);
        font-size: 14px;
        font-weight: 600;
        text-decoration: none;
        border: none;
        background: none;
        text-align: left;
      }

      .side-link svg {
        width: 19px;
        height: 19px;
        flex: none;
      }

      .side-link.active {
        background: var(--black);
        color: #fff;
      }

      .side-link:hover:not(.active) {
        background: #EAE6DD;
        color: var(--black);
      }

      .side-foot {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 4px;
        border-top: 1px solid var(--line);
        margin-top: 12px;
        padding-top: 18px;
      }

      .side-foot .avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--red);
        color: #fff;
        font-family: 'Manrope', sans-serif;
        font-weight: 700;
        font-size: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: none;
      }

      .side-foot .who {
        font-size: 12.5px;
        font-weight: 600;
        line-height: 1.3;
      }

      .side-foot .who small {
        display: block;
        color: var(--muted);
        font-weight: 500;
        font-size: 11px;
      }

      .content {
        padding: 36px 44px 60px;
      }

      .bottom-nav {
        display: none;
      }

      .greeting-title {
        font-size: 30px;
      }

      .dashboard-grid {
        display: grid;
        grid-template-columns: 1.15fr 0.85fr;
        gap: 26px;
        align-items: start;
      }

      .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .shortcuts-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .search {
        max-width: 420px;
      }

      .topbar {
        margin-bottom: 30px;
      }
    }

    /* ---------- PERFIL DO ALUNO ---------- */
    .profile-panel { background: var(--card); border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow); margin-bottom: 22px; }
    .profile-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; }
    .profile-summary { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
    .profile-summary .student-body { overflow-wrap: anywhere; }
    .profile-summary h2 { font-size: 22px; margin-bottom: 8px; }
    .profile-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
    .profile-details, .student-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0; }
    .profile-details dt, .student-field { font-size: 12.5px; color: var(--muted); font-weight: 500; }
    .profile-details dd { margin: 6px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
    .profile-actions { display: flex; flex-wrap: wrap; gap: 10px; }
    .profile-primary { background: var(--black); color: #fff; border-color: var(--black); }
    .profile-danger { background: var(--red-soft); color: var(--red); border-color: var(--red-soft); }
    .payment-table { width: 100%; border-collapse: collapse; font-size: 12.5px; text-align: left; }
    .payment-table th { color: var(--muted); font-weight: 600; }
    .payment-table th, .payment-table td { padding: 14px 8px; border-bottom: 1px solid var(--line); }
    .payment-table th:first-child, .payment-table td:first-child { padding-left: 0; }
    .payment-table tbody tr:last-child td { border-bottom: 0; }
    .payment-table .status-badge { display: inline-block; }
    .payment-pending { background: var(--red-soft); color: var(--red); }
    .student-dialog { width: calc(100% - 32px); max-width: 620px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); color: var(--black); box-shadow: var(--shadow); }
    .student-dialog::backdrop { background: rgba(20, 20, 15, .45); }
    body:has(.student-dialog[open]) { overflow: hidden; }
    .student-dialog .page-header { justify-content: space-between; }
    .student-dialog h2 { font-size: 20px; }
    .student-dialog p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
    .student-field { display: flex; flex-direction: column; gap: 8px; }
    .student-field input, .student-field select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--card); color: var(--black); font: inherit; font-size: 14px; }
    .student-dialog .profile-actions { margin-top: 22px; }
    .profile-notice { font-size: 13px; color: var(--green); margin-bottom: 16px; }
    .profile-notice:empty { display: none; }
    @media (max-width: 480px) {
      .profile-details, .student-form-grid { grid-template-columns: 1fr; }
      .payment-table thead { display: none; }
      .payment-table, .payment-table tbody, .payment-table tr { display: block; }
      .payment-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
      .payment-table tbody tr:last-child { border-bottom: 0; }
      .payment-table td, .payment-table td:first-child { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 6px 0; }
      .payment-table td::before { content: attr(data-label); color: var(--muted); font-weight: 500; }
    }
    /* MVP: additions reuse the dashboard's existing tokens and components. */
    .brand-mark { width: 50px; flex: none; overflow: hidden; background: transparent; }
    .brand-mark .app-logo { width: 100%; height: 100%; max-width: none; object-fit: contain; flex: none; border-radius: inherit; }
    [hidden] { display: none !important; }
    body[data-auth="signed-out"] > .app, body[data-auth="signed-out"] > .bottom-nav { display: none; }
    body[data-auth="signed-in"] > #login-screen { display: none; }
    .auth-screen { min-height: 100dvh; display: grid; place-items: center; padding: 28px 20px; }
    .auth-card { width: 100%; max-width: 440px; padding: 32px; border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow); }
    .auth-card .brand { margin-bottom: 32px; }
    .auth-card h1 { font-size: 26px; }
    .auth-card p { color: var(--muted); font-size: 13.5px; line-height: 1.6; }
    .auth-card .student-field { margin-top: 18px; }
    .auth-options { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
    .check-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--black); }
    input[type="checkbox"] { accent-color: var(--red); }
    .text-button { border: 0; background: none; color: var(--red); font-size: 12.5px; font-weight: 600; padding: 0; text-align: left; }
    .auth-submit { width: 100%; }
    .auth-create { text-align: center; }
    .demo-note { margin-top: 22px; padding: 14px; background: var(--bg); border-radius: var(--radius-sm); color: var(--muted); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
    .form-error, .auth-card .form-error, .student-dialog .form-error { color: var(--red); font-size: 13px; }
    .form-error:empty { display: none; }
    .toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 100; background: var(--black); color: var(--card); border-radius: var(--radius-sm); padding: 14px 20px; box-shadow: var(--shadow); max-width: calc(100% - 32px); font-size: 13px; }
    .student-field textarea { resize: vertical; min-height: 90px; width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--card); color: var(--black); font: inherit; }
    .student-field input[type="file"] { font-size: 12px; }
    .student-form-grid .full-field { grid-column: 1 / -1; }
    .weekday-options { display: flex; flex-wrap: wrap; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
    .weekday-options legend { color: var(--muted); font-size: 12.5px; }
    .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
    .toolbar .search { margin: 0; flex: 1; min-width: 180px; }
    .toolbar .student-field { min-width: 150px; }
    .section-copy { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 18px; }
    .entity-card { border: 0; width: 100%; text-align: left; color: var(--black); font: inherit; }
    .entity-card .class-meta { flex-wrap: wrap; line-height: 1.5; }
    .entity-card .class-name { overflow-wrap: anywhere; }
    .entity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
    .details-heading { font-size: 18px; margin-bottom: 18px; }
    .mini-button { padding: 8px 12px; font-size: 11.5px; }
    .table-wrap { min-width: 0; }
    .data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12.5px; }
    .data-table th { color: var(--muted); font-weight: 600; }
    .data-table th, .data-table td { border-bottom: 1px solid var(--line); padding: 14px 6px; overflow-wrap: anywhere; }
    .data-table th:first-child, .data-table td:first-child { padding-left: 0; }
    .data-table tr:last-child td { border-bottom: 0; }
    .data-table .status-badge { display: inline-block; }
    .data-table .table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
    .data-table select { max-width: 135px; background: var(--card); color: var(--black); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; font: inherit; }
    .settings-grid { display: grid; gap: 18px; }
    .settings-grid .profile-panel { margin-bottom: 0; }
    .settings-grid h2 { margin-bottom: 18px; font-size: 16px; }
    .setting-checks { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; }
    .academy-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 11px; }
    .content, .dashboard-grid > div, .profile-panel, section { min-width: 0; }
    .btn-new-student { display: inline-flex; }
    button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
    .bottom-nav .nav-item { min-width: 0; }
    .bottom-nav .nav-item { min-height: 44px; justify-content: center; }
    .bottom-nav .nav-item:not(.active) { min-width: 40px; }
    /* Alvos de toque de 44 px e campos de 16 px (evita o zoom automático do iPhone). */
    .icon-btn { width: 44px; height: 44px; }
    .chip { min-height: 44px; }
    .text-button { min-height: 44px; padding: 0 4px; }
    .check-label { min-height: 44px; font-size: 13px; }
    @media (max-width: 899px) {
      .student-field input, .student-field select, .student-field textarea, .search input { font-size: 16px; }
    }
    body[data-theme="dark"] { --black: #F2EFE9; --bg: #171714; --card: #252520; --muted: #B3B0A6; --line: #3C3C32; --red-soft: #482820; --green-soft: #183D2D; --green: #75C9A1; }
    body[data-theme="dark"] .student-avatar, body[data-theme="dark"] .profile-primary, body[data-theme="dark"] .chip.active, body[data-theme="dark"] .side-link.active, body[data-theme="dark"] .btn-new-student, body[data-theme="dark"] .shortcut-icon, body[data-theme="dark"] .metric-icon.black { color: #14140F; }
    body[data-theme="dark"] .bottom-nav { background: #252520; border: 1px solid var(--line); }
    @media (max-width: 650px) {
      .entity-grid { grid-template-columns: 1fr; }
      .data-table thead { display: none; }
      .data-table, .data-table tbody, .data-table tr { display: block; }
      .data-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
      .data-table tr:last-child { border-bottom: 0; }
      .data-table td, .data-table td:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border: 0; }
      .data-table td::before { content: attr(data-label); color: var(--muted); flex: none; }
      .data-table td > :last-child { min-width: 0; }
      .data-table td .table-actions { justify-content: flex-end; }
    }
    @media (max-width: 480px) {
      .auth-card { padding: 24px; }
      .student-dialog { padding: 18px; }
      .bottom-nav { width: calc(100% - 16px); padding: 6px; }
      .bottom-nav .nav-item { padding: 10px 6px; }
      .bottom-nav .nav-item:not(.active) { padding-left: 6px; padding-right: 6px; }
      .bottom-nav .nav-item span { font-size: 10.5px; }
      .bottom-nav .nav-item svg { width: 20px; height: 20px; }
      .metric-value { font-size: 23px; overflow-wrap: anywhere; }
    }
    @media (max-width: 360px) {
      .shortcuts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .metric-card { padding: 14px; }
      .metric-label { font-size: 14px; overflow-wrap: anywhere; }
    }
    .pwa-install-banner {
      position: fixed;
      z-index: 90;
      right: 24px;
      bottom: 24px;
      width: min(100% - 32px, 440px);
      padding: 20px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      background: var(--card);
      color: var(--black);
      box-shadow: var(--shadow);
      opacity: 0;
      transform: translateY(10px);
      transition: opacity .18s ease, transform .18s ease;
    }
    .pwa-install-banner.is-visible { opacity: 1; transform: translateY(0); }
    .pwa-install-copy { padding-right: 24px; }
    .pwa-install-copy h2 { margin: 0 0 6px; font-size: 16px; }
    .pwa-install-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
    .pwa-install-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
    .pwa-install-actions .chip { min-height: 42px; }
    .pwa-install-actions .chip:disabled { opacity: .6; cursor: wait; }
    .pwa-install-close {
      position: absolute;
      top: 10px;
      right: 10px;
      display: grid;
      width: 32px;
      height: 32px;
      place-items: center;
      border: 0;
      border-radius: 50%;
      background: transparent;
      color: var(--muted);
      font-size: 22px;
      line-height: 1;
    }
    .pwa-install-close:hover { background: var(--bg); color: var(--black); }
    .pwa-settings-option h2 { margin-bottom: 14px; }
    @media (max-width: 650px) {
      .pwa-install-banner {
        right: 12px;
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
        left: 12px;
        width: auto;
        padding: 16px;
      }
      .pwa-install-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .pwa-install-actions .chip { min-width: 0; padding: 11px 10px; font-size: 13px; }
    }
    @media (prefers-reduced-motion: reduce) {
      .pwa-install-banner { transition: none; }
    }

/* ---------- SAGA ---------- */
.presence-count { font-size: 12px; color: var(--muted); }
.presence-count.is-low { color: var(--red); font-weight: 600; }
.link-box { overflow-wrap: anywhere; background: var(--bg); border-radius: var(--radius-sm); padding: 12px; font-size: 13px; }
.auth-help { margin-top: 14px; }
.training-cta { margin-top: 14px; }
.student-field textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--card); color: var(--black); font: inherit; font-size: 14px; resize: vertical; }
body[data-papel="professor"] [data-view="finance"],
body[data-papel="professor"] [data-view="competitions"],
body[data-papel="professor"] [aria-label="Notificações"],
body[data-papel="professor"] .shortcuts-grid,
body[data-papel="professor"] .metrics-grid > :nth-child(n+2),
body[data-papel="professor"] [data-action="openNewStudent"],
body[data-papel="professor"] [data-action="openStudentEditor"],
body[data-papel="professor"] [data-action="confirmStudentDeletion"],
body[data-papel="professor"] [data-action="openClassEditor"],
body[data-papel="professor"] [data-action="deleteClassConfirmation"],
body[data-papel="professor"] .btn-new-student,
body[data-papel="professor"] .graduation-student-checkbox,
body[data-papel="professor"] .graduation-selection-tools,
body[data-papel="professor"] .graduation-batch-actions,
body[data-papel="professor"] .graduation-batch-fab { display: none !important; }
