.portal-shell.active { display: flex; height: 100vh; overflow: hidden; background: #fbf8f9; }
.sidebar { z-index: 60; display: flex; flex-direction: column; width: 268px; flex: 0 0 268px; color: var(--wine-dark); background: white; border-right: 1px solid var(--line); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; min-height: 82px; padding: 0 22px; border-bottom: 1px solid var(--rose-soft); }
.sidebar-brand .brand-mark { width: 38px; height: 38px; }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand strong { font-size: 12px; letter-spacing: .11em; }
.sidebar-brand small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.portal-menu { flex: 1; overflow-y: auto; padding: 22px 14px; }
.menu-label { display: block; padding: 14px 11px 8px; color: #f43f5e; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.menu-link {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 3px 0; padding: 11px 13px;
  color: #9f576a; background: transparent; border: 0; border-radius: 10px; text-align: left; font-size: 13px; font-weight: 700;
}
.menu-link:hover, .menu-link.active { color: var(--wine); background: var(--blush); }
.menu-link.active { box-shadow: inset 3px 0 0 var(--rose); }
.sidebar-footer { padding: 15px; border-top: 1px solid var(--rose-soft); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px 14px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; color: white; background: var(--rose); border-radius: 12px; font-size: 12px; font-weight: 700; }
.sidebar-user strong, .sidebar-user small, .header-user strong, .header-user small { display: block; }
.sidebar-user strong { font-size: 12px; }
.sidebar-user small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.portal-main { flex: 1; min-width: 0; overflow: hidden; }
.portal-header {
  display: flex; align-items: center; justify-content: space-between; height: 82px; padding: 0 32px;
  background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.header-title-wrap { display: flex; align-items: center; gap: 12px; }
.back-nav-button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 12px;
  color: var(--wine); background: var(--blush); border: 1px solid var(--line); border-radius: 10px;
  font-size: 11px; font-weight: 800;
}
.back-nav-button:hover { color: white; background: var(--wine); border-color: var(--wine); }
.back-nav-button:disabled, .back-nav-button.is-disabled { opacity: .4; cursor: default; pointer-events: none; }
.back-nav-button svg { width: 16px; height: 16px; }
.portal-header h1 { margin: 2px 0 0; font-family: "Plus Jakarta Sans"; font-size: 22px; font-weight: 800; }
.portal-header #portal-kicker { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.header-actions, .header-user { display: flex; align-items: center; gap: 12px; }
.header-user strong { font-size: 12px; }
.header-user small { color: var(--muted); font-size: 10px; }
.notification-dot { position: absolute; right: 9px; top: 8px; width: 7px; height: 7px; background: #d35353; border: 2px solid white; border-radius: 50%; }
.portal-content { height: calc(100vh - 82px); overflow-y: auto; padding: 30px 32px 60px; }
.content-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.content-head h2 { margin: 0 0 5px; font-family: "Plus Jakarta Sans"; font-size: 23px; font-weight: 800; }
.content-head p { margin: 0; color: var(--muted); font-size: 13px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 23px; }
.stat-card { position: relative; overflow: hidden; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.stat-card::after { content: ""; position: absolute; width: 75px; height: 75px; right: -25px; bottom: -25px; background: var(--rose-soft); border-radius: 50%; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.stat-icon { display: grid; place-items: center; width: 35px; height: 35px; color: var(--wine); background: var(--rose-soft); border-radius: 10px; }
.stat-card strong { display: block; margin: 14px 0 6px; color: var(--wine-dark); font-size: 27px; }
.stat-card small { color: var(--green); font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: 1.45fr .8fr; gap: 20px; }
.master-summary {
  display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 15px; margin-bottom: 20px;
  padding: 18px 20px; background: linear-gradient(110deg, white, var(--blush)); border: 1px solid var(--line); border-radius: 17px;
}
.master-summary-icon { display: grid; place-items: center; width: 48px; height: 48px; color: white; background: linear-gradient(135deg, var(--wine-dark), var(--rose)); border-radius: 14px; }
.master-summary small { color: var(--rose); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.master-summary h3 { margin: 3px 0 4px; color: var(--wine-dark); font-size: 14px; }
.master-summary p { margin: 0; color: var(--muted); font-size: 11px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 17px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px; border-bottom: 1px solid #f0e7ea; }
.panel-head h3 { margin: 0; font-family: "Plus Jakarta Sans"; font-size: 15px; font-weight: 800; }
.panel-body { padding: 20px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 11px 13px; color: var(--muted); background: #fcf9fa; font-size: 10px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
td { padding: 14px 13px; border-top: 1px solid #f0e7ea; font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.active, .status.paid, .status.approved { color: var(--green); background: #e8f5f0; }
.status.open, .status.pending { color: var(--amber); background: #fff3e4; }
.status.finished { color: var(--blue); background: #edf3fa; }
.status.cancelled { color: #a14040; background: #fbeaea; }
.row-actions { display: flex; gap: 6px; }
.course-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.course-admin-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 18px; }
.course-admin-cover { position: relative; height: 150px; background-position: center; background-size: cover; }
.course-admin-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent, rgba(62,9,26,.65)); }
.course-admin-cover span { position: absolute; z-index: 1; left: 16px; top: 16px; padding: 7px 10px; color: var(--wine); background: white; border-radius: 18px; font-size: 9px; font-weight: 800; }
.course-admin-body { padding: 20px; }
.course-admin-body > p { min-height: 38px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.course-admin-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 17px 0; }
.course-admin-metrics span { padding: 10px 7px; color: var(--muted); background: var(--blush); border-radius: 9px; text-align: center; font-size: 8px; }
.course-admin-metrics strong { display: block; margin-bottom: 3px; color: var(--wine); font-size: 17px; }
.course-workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.course-workspace-head h2 { margin-bottom: 8px; }
.course-workspace-head p { max-width: 750px; color: var(--muted); line-height: 1.6; }
.course-workspace-stats { margin-top: 20px; }
.course-workspace-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.course-workspace-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; }
.student-filters {
  display: grid; grid-template-columns: 1fr 1fr 1.4fr auto auto; gap: 10px; align-items: end;
  margin-bottom: 18px; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 15px;
}
.student-filters label { margin: 0; color: var(--wine-dark); font-size: 10px; font-weight: 800; }
.student-filters select { margin-top: 6px; }
.student-filters .button { min-height: 43px; white-space: nowrap; }
.payment-filters { grid-template-columns: 1fr 1fr auto auto; }
.operational-schedule { display: flex; flex-direction: column; gap: 9px; }
.operational-class {
  display: grid; grid-template-columns: 38px 1fr 80px auto; align-items: center; gap: 13px;
  padding: 13px; background: var(--blush); border: 1px solid var(--line); border-radius: 12px;
}
.class-sequence { display: grid; place-items: center; width: 36px; height: 36px; color: white; background: var(--wine); border-radius: 10px; font-size: 12px; font-weight: 800; }
.operational-class small { color: var(--rose); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.operational-class h4 { margin: 3px 0; color: var(--wine-dark); font-size: 11px; }
.operational-class p { margin: 0; color: var(--muted); font-size: 9px; }
.class-attendance-count { text-align: center; }
.class-attendance-count strong, .class-attendance-count small { display: block; }
.class-attendance-count strong { color: var(--wine); font-size: 18px; }
.class-attendance-count small { color: var(--muted); font-size: 7px; }
.mini-button { display: inline-grid; place-items: center; width: 31px; height: 31px; padding: 0; color: var(--wine); background: var(--rose-soft); border: 0; border-radius: 9px; }
.mini-button.danger { color: #9d3d49; background: #f9e4e7; }
.mini-button.restore { color: #276749; background: #e6f6ee; }
.button-danger { color: white; background: #9d3d49; border-color: #9d3d49; }
.delete-confirmation { text-align: center; }
.delete-confirmation-icon {
  display: grid; place-items: center; width: 54px; height: 54px; margin: 18px auto 12px;
  color: #9d3d49; background: #f9e4e7; border-radius: 16px;
}
.delete-confirmation-icon svg { width: 25px; height: 25px; }
.delete-confirmation > p { max-width: 580px; margin: 10px auto; color: var(--muted); line-height: 1.6; }
.delete-impact { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 20px 0; }
.delete-impact span { padding: 13px 8px; color: var(--muted); background: var(--blush); border: 1px solid var(--line); border-radius: 11px; font-size: 9px; }
.delete-impact strong { display: block; margin-bottom: 4px; color: var(--wine-dark); font-size: 19px; }
.delete-note { font-size: 10px; }
.modal-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.payment-receipt { color: #38252b; background: white; }
.receipt-header { display: flex; justify-content: space-between; gap: 25px; padding-bottom: 20px; border-bottom: 2px solid var(--wine); }
.receipt-header > div { display: flex; flex-direction: column; gap: 4px; }
.receipt-header > div:last-child { align-items: flex-end; text-align: right; }
.receipt-header strong { color: var(--wine-dark); font-family: "Cormorant Garamond", serif; font-size: 25px; }
.receipt-header span, .receipt-header small { color: var(--muted); font-size: 10px; }
.receipt-brand { color: var(--wine) !important; font-family: "Cormorant Garamond", serif; font-size: 28px !important; font-weight: 700; letter-spacing: 2px; }
.receipt-status { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 18px 0; }
.receipt-status small { color: var(--muted); font-size: 9px; }
.receipt-details { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.receipt-details > div { min-height: 65px; padding: 13px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.receipt-details > div:nth-child(2n) { border-right: 0; }
.receipt-details small, .receipt-details strong { display: block; }
.receipt-details small { margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.receipt-details strong { color: var(--wine-dark); font-size: 11px; line-height: 1.4; }
.receipt-total { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding: 18px; color: white; background: var(--wine); border-radius: 13px; }
.receipt-total span { font-size: 10px; font-weight: 700; text-transform: uppercase; }
.receipt-total strong { font-family: "Cormorant Garamond", serif; font-size: 28px; }
.receipt-note { margin: 18px 0; color: var(--muted); font-size: 9px; line-height: 1.6; text-align: center; }
.receipt-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 55px; margin: 48px 20px 25px; text-align: center; }
.receipt-signatures span { display: block; border-top: 1px solid #6f5d63; }
.receipt-signatures strong { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }
.receipt-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.accounting-filters { grid-template-columns: repeat(5, 1fr) auto auto; }
.cash-type { display: inline-flex; padding: 5px 8px; border-radius: 8px; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.cash-type.ingreso { color: #276749; background: #e6f6ee; }
.cash-type.egreso { color: #9d3d49; background: #f9e4e7; }
.account-statement { display: flex; flex-direction: column; gap: 18px; }
.statement-person { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.statement-person > div { padding: 13px; border-right: 1px solid var(--line); }
.statement-person > div:last-child { border-right: 0; }
.statement-person small, .statement-person strong { display: block; }
.statement-person small { margin-bottom: 5px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.statement-person strong { color: var(--wine-dark); font-size: 10px; }
.statement-notes { padding: 14px; background: var(--blush); border: 1px solid var(--line); border-radius: 11px; }
.statement-notes strong { color: var(--wine-dark); font-size: 10px; }
.statement-notes p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.financial-report-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.student-payment-guided .form-section-title { margin-top: 18px; }
.payment-student-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; padding: 14px; background: var(--blush); border: 1px solid var(--line); border-radius: 13px; }
.payment-student-summary > div { padding: 10px; background: white; border-radius: 9px; }
.payment-student-summary small, .payment-student-summary strong { display: block; }
.payment-student-summary small { margin-bottom: 4px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.payment-student-summary strong { color: var(--wine-dark); font-size: 10px; line-height: 1.4; }
.payment-student-summary > p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; }
.payment-zero-alert { display: flex; align-items: center; gap: 7px; padding: 11px; color: #276749 !important; background: #e6f6ee; border-radius: 9px; font-weight: 700; }
.payment-form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.report-option { display: flex; align-items: center; gap: 12px; padding: 17px; text-align: left; color: var(--wine); background: white; border: 1px solid var(--line); border-radius: 14px; }
.report-option svg { flex: 0 0 auto; }
.report-option span, .report-option strong, .report-option small { display: block; }
.report-option strong { color: var(--wine-dark); font-size: 10px; }
.report-option small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.progress { height: 7px; overflow: hidden; background: #efe7e9; border-radius: 10px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--wine), var(--rose)); border-radius: 10px; }
.agenda { display: flex; flex-direction: column; gap: 15px; }
.agenda-item { display: grid; grid-template-columns: 50px 1fr; gap: 13px; align-items: center; }
.date-box { padding: 8px 4px; color: var(--wine); background: var(--rose-soft); border-radius: 10px; text-align: center; }
.date-box strong, .date-box small { display: block; }
.date-box strong { font-size: 17px; }
.date-box small { font-size: 9px; text-transform: uppercase; }
.agenda-item h4 { margin: 0 0 4px; font-size: 12px; }
.agenda-item p { margin: 0; color: var(--muted); font-size: 10px; }
.course-row { display: grid; grid-template-columns: 45px 1fr auto; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid #f1e8eb; }
.course-row:last-child { border: 0; }
.course-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--wine); background: var(--rose-soft); border-radius: 11px; }
.course-row h4 { margin: 0 0 4px; font-size: 12px; }
.course-row p { margin: 0; color: var(--muted); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.student-enrollment-form .form-section-title { margin-top: 22px; }
.teacher-profile-form .form-section-title { margin-top: 22px; }
.form-help { margin: -5px 0 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.consent-option {
  display: flex; align-items: flex-start; gap: 10px; margin: 13px 0 20px; padding: 14px;
  color: var(--muted); background: var(--blush); border: 1px solid var(--line); border-radius: 11px;
  font-size: 10px; line-height: 1.5;
}
.consent-option input { width: 17px; height: 17px; flex: 0 0 17px; margin: 1px 0 0; accent-color: var(--wine); }
.student-record-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.student-record-grid > div { padding: 13px; background: var(--blush); border: 1px solid var(--line); border-radius: 11px; }
.student-record-grid small, .student-record-grid strong { display: block; }
.student-record-grid small { margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.student-record-grid strong { color: var(--wine-dark); font-size: 11px; }
.modal { position: fixed; z-index: 100; inset: 0; display: none; place-items: center; padding: 20px; }
.modal.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(31,16,21,.55); backdrop-filter: blur(3px); }
.modal-card { position: relative; z-index: 1; width: min(620px, 100%); max-height: 90vh; overflow-y: auto; padding: 28px; background: white; border-radius: 20px; box-shadow: 0 25px 80px rgba(30,10,17,.25); }
.modal-card.modal-wide { width: min(1080px, 100%); padding: 34px; }
.modal-close { position: absolute; right: 18px; top: 18px; display: grid; place-items: center; width: 36px; height: 36px; color: var(--wine); background: var(--rose-soft); border: 0; border-radius: 10px; }
.modal-card h2 { margin-right: 45px; color: var(--wine-dark); font-size: 28px; }
.toast {
  position: fixed; z-index: 150; right: 24px; bottom: 24px; max-width: 360px; padding: 14px 18px;
  color: white; background: #2f1720; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .25s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.empty-state { padding: 45px; color: var(--muted); text-align: center; }
.empty-state i { width: 35px; height: 35px; margin-bottom: 10px; color: var(--rose); }
.survey-stars { display: flex; gap: 6px; margin: 8px 0 22px; }
.survey-stars button { display: grid; place-items: center; width: 42px; height: 42px; color: #b8a7ad; background: #faf5f7; border: 1px solid var(--line); border-radius: 10px; }
.survey-stars button.selected { color: white; background: var(--gold); border-color: var(--gold); }
.certificate { padding: 40px; text-align: center; border: 8px double #c6a363; background: #fffdf8; }
.certificate h2 { font-size: 35px; }
