/* ============================================================
   matriculas-app.css — Onda 4: tela Matrículas + drawers + sub-app
   Namespace .cf-mat-* / .cf-aluno-*
   ============================================================ */

.cf-mat {
  /* Sessão 134: full-width sem max-width */
  padding: 22px 28px;
  display: flex; flex-direction: column; gap: 24px;
}
.cf-mat-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap;
}
.cf-mat-title { font-size: 22px; font-weight: 600; margin: 0; font-family: 'IBM Plex Sans', sans-serif; color: #0f172a; }
.cf-mat-sub { font-size: 12.5px; color: #64748b; margin: 4px 0 0 0; }

.cf-mat-kpis { display: flex; gap: 10px; }
.cf-mat-kpi {
  background: #fff; border: 1px solid #ecf0f4; border-radius: 9px;
  padding: 10px 16px;
  display: flex; flex-direction: column; gap: 1px;
  min-width: 100px;
}
.cf-mat-kpi strong { font-size: 18px; font-weight: 600; color: #0f172a; font-family: 'IBM Plex Sans', sans-serif; }
.cf-mat-kpi small { font-size: 10.5px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 500; }

.cf-mat-filters {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 12px 14px; background: #fff; border: 1px solid #ecf0f4; border-radius: 9px;
}

.cf-mat-list {
  background: #fff; border: 1px solid #ecf0f4; border-radius: 9px;
  overflow: hidden;
}
.cf-mat-table { width: 100%; border-collapse: collapse; }
.cf-mat-table th, .cf-mat-table td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid #f1f5f9;
  font-size: 12.5px; color: #475569; vertical-align: middle;
}
.cf-mat-table th {
  font-weight: 600; color: #94a3b8; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.4px;
  background: #fafbfc;
}
.cf-mat-table tbody tr { cursor: pointer; transition: background .12s; }
.cf-mat-table tbody tr:hover { background: #f8fbff; }

.cf-mat-aluno-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: none; cursor: pointer;
  padding: 0; font-family: inherit; text-align: left;
}
.cf-mat-aluno-btn:hover strong { color: #1e5baa; }
.cf-mat-aluno-btn small { display: block; font-size: 10.5px; color: #94a3b8; margin-top: 1px; font-weight: 400; }
.cf-mat-aluno-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10.5px; font-weight: 600;
}
.cf-mat-aluno-avatar-lg { width: 44px; height: 44px; font-size: 14px; }
.cf-mat-no-aluno { font-size: 11.5px; color: #94a3b8; font-style: italic; }

.cf-mat-status-select {
  font-size: 11.5px; padding: 4px 8px; border-radius: 5px; cursor: pointer;
  font-family: inherit; border: 1px solid #e2e8f0;
}
.cf-mat-status-select.cf-mat-status-pago      { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.cf-mat-status-select.cf-mat-status-parcelado { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.cf-mat-status-select.cf-mat-status-pendente  { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.cf-mat-status-select.cf-mat-status-atrasado  { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.cf-mat-status-select.cf-mat-status-cancelado { background: #f1f5f9; color: #64748b; border-color: #cbd5e1; }

.cf-mat-status-pill {
  display: inline-flex; align-items: center;
  font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 9px;
  text-transform: capitalize;
}
.cf-mat-status-pill.cf-mat-status-pago      { background: #d1fae5; color: #065f46; }
.cf-mat-status-pill.cf-mat-status-parcelado { background: #dbeafe; color: #1e40af; }
.cf-mat-status-pill.cf-mat-status-pendente  { background: #fef3c7; color: #92400e; }
.cf-mat-status-pill.cf-mat-status-atrasado  { background: #fee2e2; color: #991b1b; }
.cf-mat-status-pill.cf-mat-status-cancelado { background: #f1f5f9; color: #64748b; }

.cf-mat-open-newtab {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 5px;
  color: #94a3b8; transition: background .15s, color .15s;
}
.cf-mat-open-newtab:hover { background: #f0f6ff; color: #1e5baa; }

/* ────────────────────────────────────────
   DRAWER MATRÍCULA
   ──────────────────────────────────────── */
.cf-mat-drawer { padding: 0; }
.cf-mat-drawer-head {
  position: relative; padding: 18px 22px 14px 22px;
  background: linear-gradient(180deg, #f0f6ff 0%, #fff 100%);
  border-bottom: 1px solid #ecf0f4;
}
.cf-mat-drawer-eyebrow {
  font-size: 10.5px; color: #1e5baa; text-transform: uppercase;
  letter-spacing: 0.4px; font-weight: 600; margin-bottom: 4px;
}
.cf-mat-drawer-title {
  font-size: 19px; font-weight: 600; color: #0f172a;
  font-family: 'IBM Plex Sans', sans-serif; margin: 0;
}
.cf-mat-drawer-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 11.5px; color: #64748b; margin-top: 8px;
}
.cf-mat-drawer-meta span { display: inline-flex; align-items: center; gap: 4px; }
.cf-mat-newtab-btn {
  position: absolute; top: 14px; right: 50px;
  width: 30px; height: 30px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #64748b; transition: background .15s, color .15s;
}
.cf-mat-newtab-btn:hover { background: #f1f5f9; color: #1e5baa; }
.cf-mat-drawer-body {
  flex: 1; overflow-y: auto;
  padding: 18px 20px; background: #fafbfc;
  display: flex; flex-direction: column; gap: 16px;
}

.cf-mat-aluno-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: #fff; border: 1px solid #e8edf2; border-radius: 9px;
  cursor: pointer; text-align: left; font-family: inherit;
  transition: border-color .15s, transform .1s;
}
.cf-mat-aluno-card:hover { border-color: #1e5baa; transform: translateY(-1px); }
.cf-mat-aluno-card strong { display: block; font-size: 14px; color: #0f172a; }
.cf-mat-aluno-card small { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: #64748b; margin-top: 2px; }
.cf-mat-aluno-card small + small { margin-top: 1px; }

.cf-mat-curso-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 11.5px; color: #64748b; margin-top: 6px;
}
.cf-mat-curso-meta span { display: inline-flex; align-items: center; gap: 4px; }

.cf-mat-pay-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.cf-mat-saved-msg { transition: opacity .25s; margin-right: auto; }

/* ────────────────────────────────────────
   DRAWER ALUNO
   ──────────────────────────────────────── */
.cf-aluno-drawer { padding: 0; }
.cf-aluno-drawer-head {
  position: relative;
  padding: 18px 22px 16px 22px;
  background: linear-gradient(180deg, #f0f6ff 0%, #fff 100%);
  border-bottom: 1px solid #ecf0f4;
}
.cf-aluno-drawer-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cf-aluno-avatar-xl {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 600;
}
.cf-aluno-hero-info { flex: 1; min-width: 0; }
.cf-aluno-name-input {
  width: 100%; font-size: 19px; font-weight: 600; color: #0f172a;
  font-family: 'IBM Plex Sans', sans-serif;
  background: transparent; border: none; outline: none;
  padding: 4px 7px; border-radius: 5px; margin-left: -7px;
  transition: background .15s;
}
.cf-aluno-name-input:hover, .cf-aluno-name-input:focus { background: #f1f5f9; }
.cf-aluno-hero-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11.5px; color: #64748b; margin-top: 4px;
}
.cf-aluno-hero-meta span { display: inline-flex; align-items: center; gap: 4px; }

.cf-aluno-kpis { display: flex; gap: 8px; }
.cf-aluno-kpi {
  flex: 1; padding: 10px 12px; background: #fff; border: 1px solid #e8edf2; border-radius: 7px;
}
.cf-aluno-kpi strong { display: block; font-size: 16px; font-weight: 600; color: #0f172a; font-family: 'IBM Plex Sans', sans-serif; }
.cf-aluno-kpi small { display: block; font-size: 10.5px; color: #94a3b8; margin-top: 1px; }

.cf-aluno-drawer-body {
  flex: 1; overflow-y: auto;
  padding: 18px 20px; background: #fafbfc;
  display: flex; flex-direction: column; gap: 16px;
}
.cf-aluno-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.cf-aluno-mat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: #f8fafc; border: 1px solid transparent; border-radius: 6px;
  cursor: pointer; text-align: left; width: 100%;
  font-family: inherit; transition: background .15s, border-color .15s;
}
.cf-aluno-mat-row:hover { background: #f0f6ff; border-color: #bfdbfe; }
.cf-aluno-mat-row + .cf-aluno-mat-row { margin-top: 4px; }
.cf-aluno-mat-info { flex: 1; min-width: 0; }
.cf-aluno-mat-info strong { display: block; font-size: 12.5px; color: #0f172a; }
.cf-aluno-mat-info small { display: block; font-size: 11px; color: #64748b; margin-top: 1px; }

/* ────────────────────────────────────────
   SUB-APP MATRÍCULA (nova aba)
   ──────────────────────────────────────── */
body { margin: 0; font-family: Inter, system-ui, sans-serif; background: #f6f9fc; color: #0f172a; }

.cf-mat-app-loading, .cf-mat-app-error {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  padding: 40px; color: #64748b; text-align: center;
}
.cf-mat-app-error h2 { font-size: 18px; font-weight: 600; color: #0f172a; margin: 0; }
.cf-mat-app-error p { margin: 0; }

.cf-mat-app-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px; background: #fff;
  border-bottom: 1px solid #ecf0f4;
}
.cf-mat-app-brand strong { font-size: 14px; color: #0f172a; font-weight: 600; }
.cf-mat-app-eyebrow { font-size: 12px; color: #94a3b8; margin-left: 6px; }

.cf-mat-app-main {
  display: grid; grid-template-columns: 320px 1fr;
  height: calc(100vh - 57px);
}
@media (max-width: 900px) { .cf-mat-app-main { grid-template-columns: 1fr; } }

.cf-mat-app-sidebar {
  background: #fff; border-right: 1px solid #ecf0f4;
  padding: 22px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 20px;
}
.cf-mat-app-aluno {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
  padding-bottom: 18px; border-bottom: 1px solid #ecf0f4;
}
.cf-mat-app-aluno h2 {
  margin: 0; font-size: 17px; font-weight: 600;
  font-family: 'IBM Plex Sans', sans-serif; color: #0f172a;
}
.cf-mat-app-aluno p {
  margin: 0; font-size: 11.5px; color: #64748b;
  display: flex; align-items: center; gap: 5px;
}

.cf-mat-app-other-mats h3 {
  font-size: 11px; font-weight: 600; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.4px; margin: 0 0 10px 0;
}
.cf-mat-app-empty { font-size: 11.5px; color: #94a3b8; font-style: italic; }
.cf-mat-app-other-row {
  display: block; padding: 8px 10px; border-radius: 6px;
  text-decoration: none; color: #0f172a; transition: background .15s;
}
.cf-mat-app-other-row:hover { background: #f8fafc; }
.cf-mat-app-other-row.on { background: #f0f6ff; border: 1px solid #bfdbfe; }
.cf-mat-app-other-row + .cf-mat-app-other-row { margin-top: 3px; }
.cf-mat-app-other-row strong { display: block; font-size: 12.5px; }
.cf-mat-app-other-row small { display: block; font-size: 11px; color: #94a3b8; margin-top: 2px; }

.cf-mat-app-content { padding: 32px; overflow-y: auto; max-width: 900px; }
.cf-mat-app-eyebrow-2 { font-size: 11px; color: #1e5baa; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.cf-mat-app-content-head { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid #ecf0f4; }
.cf-mat-app-content-head h1 {
  margin: 6px 0 10px 0; font-size: 26px; font-weight: 600;
  font-family: 'IBM Plex Sans', sans-serif; color: #0f172a;
}
.cf-mat-app-content-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: #64748b;
}
.cf-mat-app-content-meta span { display: inline-flex; align-items: center; gap: 5px; }

.cf-mat-app-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 700px) { .cf-mat-app-cards { grid-template-columns: 1fr; } }
.cf-mat-app-card {
  background: #fff; border: 1px solid #ecf0f4; border-radius: 9px;
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.cf-mat-app-card-label {
  font-size: 11px; color: #94a3b8; text-transform: uppercase;
  letter-spacing: 0.4px; font-weight: 500;
}
.cf-mat-app-card-value {
  font-size: 24px; font-weight: 600; color: #0f172a;
  font-family: 'IBM Plex Sans', sans-serif;
}
.cf-mat-app-card-value-md { font-size: 16px; text-transform: capitalize; }

.cf-mat-app-section { margin-bottom: 22px; }
.cf-mat-app-section h3 { font-size: 13px; font-weight: 600; color: #475569; margin: 0 0 8px 0; text-transform: uppercase; letter-spacing: 0.4px; }
.cf-mat-app-section p { font-size: 13px; color: #475569; line-height: 1.6; margin: 0; }
.cf-mat-app-notes {
  padding: 12px 14px; background: #fff; border: 1px solid #ecf0f4; border-radius: 7px;
  font-style: italic;
}
