/*
 * e-RPH Corporate Edition
 * Formal visual system for school-wide daily use.
 */
:root {
  --corp-navy-950: #081a2f;
  --corp-navy-900: #0d2340;
  --corp-navy-800: #163452;
  --corp-teal-700: #116b66;
  --corp-teal-600: #168078;
  --corp-teal-100: #e5f2f0;
  --corp-gold-500: #c99a32;
  --corp-red-600: #b93642;
  --corp-green-600: #147354;
  --corp-ink: #172a3f;
  --corp-text: #42556a;
  --corp-muted: #738196;
  --corp-line: #d7dee7;
  --corp-line-soft: #e8edf2;
  --corp-surface: #ffffff;
  --corp-canvas: #f2f5f8;
  --corp-radius: 8px;
}

/* Foundation */
.erph-body,
.erph-login-page {
  color: var(--corp-ink);
  background: var(--corp-canvas);
  font-size: 16px;
}
.erph-main {
  width: min(100% - 40px, 1180px);
  padding: 34px 0 64px;
}
.erph-card {
  border: 1px solid var(--corp-line);
  border-radius: var(--corp-radius);
  padding: 24px;
  background: var(--corp-surface);
  box-shadow: 0 2px 5px rgba(8, 26, 47, .035);
}
.erph-flash {
  border-radius: 5px;
  border-left-width: 4px;
  box-shadow: none;
}

/* Corporate header */
.erph-topbar {
  border-top: 4px solid var(--corp-teal-600);
  border-bottom: 1px solid var(--corp-line);
  background: #fff;
  backdrop-filter: none;
}
.erph-topbar-inner {
  width: min(100% - 40px, 1180px);
  min-height: 76px;
  gap: 28px;
}
.erph-brand {
  gap: 12px;
  padding-right: 24px;
  border-right: 1px solid var(--corp-line);
}
.erph-brand img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}
.erph-brand small {
  color: var(--corp-teal-700);
  font-size: .62rem;
  letter-spacing: .1em;
}
.erph-brand strong {
  color: var(--corp-navy-900);
  font-size: 1.35rem;
}
.erph-nav {
  gap: 2px;
}
.erph-nav a {
  position: relative;
  padding: 26px 15px 23px;
  border-radius: 0;
  color: #53657a;
  font-size: .82rem;
}
.erph-nav a::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: 16px;
  left: 15px;
  height: 2px;
  background: transparent;
}
.erph-nav a:hover,
.erph-nav a.active {
  color: var(--corp-navy-900);
  background: transparent;
}
.erph-nav a.active::after {
  background: var(--corp-teal-600);
}
.erph-user {
  border-left-color: var(--corp-line);
}
.erph-avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--corp-teal-700);
}
.erph-user-trigger {
  border-radius: 6px;
}
.erph-user-trigger:hover,
.erph-user[open] .erph-user-trigger {
  background: #f1f5f6;
}
.erph-user-links {
  top: calc(100% + 8px);
  padding: 7px;
  border-color: var(--corp-line);
  border-radius: 7px;
  box-shadow: 0 14px 32px rgba(8, 26, 47, .14);
}
.erph-menu-identity {
  padding: 9px 8px 13px;
}
.erph-menu-identity > span {
  border-radius: 5px;
  background: var(--corp-teal-700);
}
.erph-user-links a {
  border-radius: 4px;
}
.erph-user-links a:hover {
  color: var(--corp-navy-900);
  background: #edf2f4;
}

/* Page titles and actions */
.erph-page-heading {
  position: relative;
  align-items: center;
  min-height: 104px;
  padding: 4px 0 26px 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--corp-line);
}
.erph-page-heading::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 31px;
  left: 0;
  width: 4px;
  background: var(--corp-teal-600);
}
.erph-page-heading > div:first-child > span {
  color: var(--corp-teal-700);
  font-size: .68rem;
  letter-spacing: .12em;
}
.erph-page-heading h1,
.compact-heading h1 {
  margin: 6px 0 3px;
  color: var(--corp-navy-950);
  font-size: clamp(2rem, 3vw, 2.65rem);
  letter-spacing: -.045em;
}
.erph-page-heading p {
  color: var(--corp-muted);
  font-size: .84rem;
}
.erph-primary-button,
.erph-secondary-button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 5px;
  font-size: .78rem;
  box-shadow: none;
}
.erph-primary-button {
  background: var(--corp-navy-900);
}
.erph-primary-button:hover {
  background: var(--corp-teal-700);
}
.erph-secondary-button {
  color: var(--corp-navy-800);
  border-color: #bbc7d3;
}

/* Dashboard */
.erph-dashboard-grid {
  gap: 12px;
  margin-bottom: 16px;
}
.erph-stat-card {
  min-height: 136px;
  padding: 20px;
  border-color: var(--corp-line);
  border-radius: var(--corp-radius);
  box-shadow: none;
}
.erph-stat-card::after {
  display: none;
}
.erph-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--corp-teal-600);
}
.erph-stat-card span {
  color: var(--corp-muted);
  font-size: .68rem;
  letter-spacing: .07em;
}
.erph-stat-card strong {
  color: var(--corp-navy-950);
  font-size: 2.3rem;
}
.erph-stat-card small {
  color: #7b899a;
  font-size: .68rem;
}
.stat-month::before { background: #2c7195; }
.stat-complete::before { background: var(--corp-green-600); }
.stat-draft::before { background: var(--corp-gold-500); }
.erph-dashboard-content {
  gap: 16px;
  margin-bottom: 16px;
}
.erph-card-heading {
  padding-bottom: 14px;
  border-bottom-color: var(--corp-line-soft);
}
.erph-card-heading span {
  color: var(--corp-teal-700);
  font-size: .62rem;
  letter-spacing: .1em;
}
.erph-card-heading h2 {
  color: var(--corp-navy-900);
  font-size: 1.14rem;
}
.week-chip,
.erph-status {
  border-radius: 4px;
}
.week-chip {
  color: #725515;
  border: 1px solid #e5d19d;
  background: #fffaf0;
}
.today-list a {
  padding: 14px 2px;
  border-bottom-color: var(--corp-line-soft);
}
.today-list time {
  color: var(--corp-teal-700);
}
.progress-card {
  border-top: 4px solid var(--corp-navy-900);
}
.progress-ring {
  width: 118px;
  height: 118px;
  background: conic-gradient(var(--corp-teal-600) calc(var(--progress) * 3.6), #e7ebef 0);
}
.progress-card h2 {
  color: var(--corp-navy-900);
}
.record-date {
  border: 1px solid #bed8d4;
  border-radius: 5px;
  color: var(--corp-teal-700);
  background: #edf6f4;
}
.record-main > span {
  color: var(--corp-teal-700);
}
.erph-record-list article > a {
  border-radius: 4px;
  color: var(--corp-navy-800);
}
.erph-status.complete {
  color: #0b6548;
  border: 1px solid #acd6c6;
  background: #ebf7f2;
}
.erph-status.draft {
  color: #73530d;
  border: 1px solid #e2ce99;
  background: #fff9e9;
}

/* Records and formal tables */
.record-browser {
  border-radius: var(--corp-radius);
}
.erph-filterbar {
  grid-template-columns: minmax(260px, 1fr) 180px 165px auto auto;
  padding: 18px 20px;
  border-bottom-color: var(--corp-line);
  background: #f6f8fa;
}
.erph-filterbar label {
  color: #53667a;
  font-size: .68rem;
}
.erph-filterbar input,
.erph-filterbar select {
  min-height: 44px;
  border-color: #bcc8d4;
  border-radius: 4px;
  color: var(--corp-ink);
}
.erph-filterbar button {
  min-height: 44px;
  border-radius: 4px;
  background: var(--corp-navy-900);
}
.result-count {
  border-bottom: 1px solid var(--corp-line-soft);
  color: var(--corp-muted);
}
.erph-table th {
  padding: 13px 16px;
  color: #53667a;
  background: #edf1f5;
  font-size: .63rem;
  letter-spacing: .08em;
}
.erph-table td {
  padding: 15px 16px;
  border-bottom-color: var(--corp-line-soft);
  color: var(--corp-text);
  font-size: .76rem;
}
.erph-table tbody tr:hover {
  background: #fafcfd;
}
.record-actions {
  gap: 4px;
}
.record-actions a,
.record-actions button {
  min-height: 33px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: .62rem;
}
.record-actions .view {
  color: var(--corp-navy-800);
}
.record-actions .edit {
  color: #70520f;
  border-color: #d9c48d;
  background: #fffaf0;
}
.record-actions .print {
  color: var(--corp-teal-700);
  border-color: #9fcac4;
  background: #f0f8f6;
}

/* Editor */
.rph-editor-form {
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 16px;
}
.rph-editor-main {
  gap: 14px;
}
.rph-form-section {
  padding: 0;
  overflow: hidden;
}
.rph-section-title {
  gap: 13px;
  padding: 16px 20px;
  margin: 0;
  border-bottom: 1px solid var(--corp-line);
  background: #f5f7f9;
}
.rph-section-title > span {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 4px;
  background: var(--corp-navy-900);
}
.rph-section-title h2 {
  color: var(--corp-navy-900);
  font-size: 1rem;
}
.rph-section-title p {
  color: var(--corp-muted);
  font-size: .68rem;
}
.rph-form-section > .rph-grid,
.rph-form-section > datalist + .rph-grid {
  padding: 20px;
}
.rph-form-section .rph-grid {
  padding: 20px;
}
.rph-grid {
  gap: 15px;
}
.rph-grid label {
  color: #384f65;
  font-size: .72rem;
}
.rph-grid input,
.rph-grid textarea,
.rph-grid select {
  min-height: 46px;
  padding: 11px 12px;
  border-color: #becad5;
  border-radius: 4px;
  color: var(--corp-ink);
  background: #fff;
  font-size: .78rem;
}
.rph-grid input:focus,
.rph-grid textarea:focus {
  border-color: var(--corp-teal-600);
  box-shadow: 0 0 0 3px rgba(22, 128, 120, .1);
}
.rph-editor-sidebar {
  top: 96px;
}
.editor-summary {
  border-top: 4px solid var(--corp-navy-900);
  border-radius: var(--corp-radius);
}
.editor-kicker {
  color: var(--corp-teal-700);
}
.editor-summary h2 {
  color: var(--corp-navy-900);
  font-size: 1.25rem;
}
.editor-checklist i {
  background: var(--corp-teal-600);
}
.editor-summary button {
  min-height: 44px;
  border-radius: 4px;
}
.save-draft {
  color: var(--corp-navy-800);
  border: 1px solid #becad5 !important;
  background: #fff;
}
.save-complete {
  background: var(--corp-navy-900);
}

/* RPH document and profile */
.rph-document {
  border-radius: var(--corp-radius);
}
.rph-document > header {
  padding: 22px 25px;
  background: var(--corp-navy-900);
}
.rph-document > header span:first-child {
  color: #9cc8c4;
}
.document-facts,
.document-sections,
.document-support,
.document-reflection {
  border-color: var(--corp-line);
}
.document-facts > div,
.document-sections section,
.document-support > div,
.document-reflection > div {
  border-color: var(--corp-line);
}
.document-sections h3 {
  color: var(--corp-teal-700);
  letter-spacing: .04em;
}
.profile-layout {
  gap: 16px;
}
.profile-identity {
  border-bottom-color: var(--corp-line);
}
.teacher-profile-avatar {
  border-radius: 7px;
  background: var(--corp-teal-700);
  box-shadow: none;
}
.teacher-avatar-controls {
  border-color: var(--corp-line);
  border-radius: 5px;
  background: #f6f8fa;
}
.teacher-avatar-controls > label:not(.teacher-remove-avatar) {
  border-radius: 4px;
  background: var(--corp-navy-900);
}
.password-card .rph-section-title {
  margin: -24px -24px 18px;
}
.password-card .rph-section-title > span {
  background: var(--corp-gold-500);
}
.password-required-note {
  border: 1px solid #e2cc91;
  border-radius: 4px;
  background: #fff9e9;
}
.password-inline button,
.profile-submit button {
  border-radius: 4px;
  background: var(--corp-navy-900);
}

.password-card .profile-submit {
  display: flex;
  justify-content: stretch;
  padding: 0 24px 24px;
  margin: 0;
}

.password-card .profile-save-button {
  width: 100%;
  font-size: .78rem;
  letter-spacing: .01em;
}

/* Login: formal split panel */
.erph-login-page {
  padding: 32px;
  background:
    linear-gradient(rgba(13, 35, 64, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 35, 64, .035) 1px, transparent 1px),
    #eef2f5;
  background-size: 32px 32px;
}
.erph-login-shell {
  width: min(100%, 1040px);
  min-height: 610px;
  grid-template-columns: 1fr .88fr;
  border: 1px solid #cfd8e2;
  border-radius: 8px;
  box-shadow: 0 20px 55px rgba(8, 26, 47, .13);
}
.erph-login-story {
  padding: 48px;
  background: var(--corp-navy-900);
}
.erph-login-story::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 36px 36px;
}
.erph-login-story::after {
  display: none;
}
.story-brand,
.story-copy,
.story-week {
  position: relative;
  z-index: 2;
}
.story-kicker {
  color: #77cfc6;
}
.story-copy h1 {
  font-size: clamp(2.7rem, 4vw, 3.7rem);
}
.story-copy p {
  color: #bfccd8;
}
.story-week {
  border-radius: 5px;
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.06);
}
.erph-login-panel {
  padding: 48px;
}
.login-title > span {
  color: var(--corp-teal-700);
}
.login-title h2 {
  color: var(--corp-navy-950);
  font-size: 1.9rem;
}
.erph-login-card form > label,
.erph-captcha > span {
  color: #3b5065;
}
.erph-login-card input {
  min-height: 48px;
  border-color: #becad5;
  border-radius: 4px;
}
.erph-captcha > div {
  border-color: #cbd5df;
  border-radius: 4px;
  background: #f5f7f9;
}
.erph-login-card form > button {
  min-height: 48px;
  border-radius: 4px;
  background: var(--corp-navy-900);
  box-shadow: none;
}
.teacher-account-note {
  border-radius: 4px;
  background: #f0f3f6;
}

/* e-RPH management inside admin */
body.admin-page-erph-teachers .erph-admin-intro,
body.admin-page-erph-teachers .erph-teacher-create,
body.admin-page-erph-teachers .erph-admin-summary,
body.admin-page-erph-teachers .erph-teacher-list {
  border-radius: 8px !important;
  box-shadow: 0 2px 5px rgba(8, 26, 47, .035) !important;
}
.erph-admin-intro > div > span,
.erph-admin-list-heading span {
  color: var(--corp-teal-700);
}
.erph-admin-intro .btn,
.erph-teacher-create .btn {
  border-radius: 4px !important;
}
.erph-admin-summary {
  color: #fff;
  background: var(--corp-navy-900) !important;
}
.teacher-create-note {
  border: 1px solid #e3ce97;
  border-radius: 4px;
}
.teacher-account-card {
  border-color: var(--corp-line);
  border-radius: 6px;
}
.teacher-account-head > span {
  border-radius: 5px;
  background: var(--corp-teal-700);
}
.teacher-account-head i {
  border-radius: 4px;
}
.teacher-account-actions .btn,
.teacher-reset-form input {
  border-radius: 4px !important;
}

/* Print remains formal and economical */
.print-sheet {
  box-shadow: 0 12px 35px rgba(8, 26, 47, .12);
}
.print-sheet > header {
  border-bottom-color: var(--corp-navy-900);
}
.print-sheet > header > strong {
  color: var(--corp-teal-700);
}
.print-facts th,
.print-content th {
  color: var(--corp-navy-900);
  background: #edf2f5;
}

@media (max-width: 900px) {
  .erph-topbar-inner {
    width: min(100% - 28px, 1180px);
  }
  .erph-brand {
    border-right: 0;
    padding-right: 0;
  }
  .erph-nav {
    padding: 6px;
    border-radius: 6px;
  }
  .erph-nav a {
    padding: 12px;
    border-radius: 4px;
  }
  .erph-nav a::after {
    display: none;
  }
  .erph-nav a.active {
    background: #edf3f4;
  }
  .rph-editor-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .erph-main {
    width: calc(100% - 24px);
    padding-top: 24px;
  }
  .erph-page-heading {
    min-height: 0;
    padding: 3px 0 19px 14px;
  }
  .erph-page-heading::before {
    top: 4px;
    bottom: 23px;
    width: 3px;
  }
  .erph-page-heading h1,
  .compact-heading h1 {
    font-size: 1.85rem;
  }
  .erph-card {
    padding: 18px;
  }
  .erph-dashboard-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .erph-stat-card {
    min-height: 120px;
    padding: 15px;
  }
  .erph-stat-card strong {
    font-size: 1.9rem;
  }
  .rph-form-section {
    padding: 0;
  }
  .rph-section-title {
    padding: 14px 15px;
  }
  .rph-form-section .rph-grid {
    padding: 16px;
  }
  .password-card .rph-section-title {
    margin: -18px -18px 16px;
  }
  .erph-login-page {
    padding: 12px;
  }
  .erph-login-shell {
    border-radius: 6px;
  }
  .erph-login-story {
    min-height: 240px;
    padding: 28px;
  }
  .erph-login-panel {
    padding: 32px 24px;
  }
}

/* School RPH template */
.rph-template-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
}

.rph-template-options fieldset {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--corp-line);
  border-radius: 8px;
  background: #f8faf9;
}

.rph-template-options legend {
  padding: 0 8px;
  color: var(--corp-ink);
  font-size: .86rem;
  font-weight: 800;
}

.rph-option-grid,
.mastery-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rph-check-option {
  display: flex !important;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #dbe5e2;
  border-radius: 6px;
  background: #fff;
  color: #40524f !important;
  font-size: .78rem !important;
  font-weight: 600 !important;
  line-height: 1.35;
  cursor: pointer;
}

.rph-check-option:has(input:checked) {
  border-color: var(--corp-green);
  background: #edf8f5;
  color: var(--corp-green-dark) !important;
  box-shadow: inset 3px 0 0 var(--corp-green);
}

.rph-check-option input {
  flex: 0 0 auto;
  width: 17px !important;
  height: 17px !important;
  margin: 0;
  accent-color: var(--corp-green);
}

.mastery-options {
  grid-template-columns: 1fr;
}

.mastery-option strong {
  flex: 0 0 34px;
  color: var(--corp-ink);
}

.mastery-option span {
  font-size: .72rem;
}

.attendance-grid .follow-up-field {
  grid-column: 1 / -1;
}

.attendance-grid {
  grid-template-columns: repeat(2, minmax(0, 220px));
}

.document-numbered-section > h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--corp-line);
  background: #f3f7f6;
  color: var(--corp-ink);
  font-size: .88rem;
  text-transform: uppercase;
}

.document-numbered-section > h3 > span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  background: var(--corp-green);
  color: #fff;
  font-size: .68rem;
}

.document-facts.two-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.document-facts.three-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.document-facts.three-facts .document-fact-wide {
  grid-column: 1 / -1;
  border-top: 1px solid var(--corp-line);
}

.document-sections.single {
  grid-template-columns: 1fr;
}

.support-matrix > section:last-child {
  grid-column: 1 / -1;
  border-right: 0;
}

.assessment-matrix > section {
  min-height: 110px;
  border-bottom: 0;
}

.document-reflection.reflection-only {
  display: block;
}

.document-reflection.reflection-only > div {
  min-height: 110px;
  border-right: 0;
}

.document-template-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--corp-line);
  border-bottom: 1px solid var(--corp-line);
}

.document-template-matrix > section {
  min-height: 135px;
  padding: 20px;
  border-right: 1px solid var(--corp-line);
  border-bottom: 1px solid var(--corp-line);
}

.document-template-matrix > section:nth-child(2n) {
  border-right: 0;
}

.document-template-matrix > section:nth-last-child(-n+2) {
  border-bottom: 0;
}

.document-template-matrix section > span {
  display: block;
  margin-bottom: 12px;
  color: var(--corp-muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.document-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.document-tags b {
  padding: 7px 9px;
  border: 1px solid #cfe4df;
  border-radius: 4px;
  background: #f1f8f6;
  color: var(--corp-green-dark);
  font-size: .72rem;
}

.document-tags em {
  color: var(--corp-muted);
  font-size: .8rem;
  font-style: normal;
}

.document-mastery strong {
  display: inline-grid;
  width: 48px;
  height: 48px;
  margin-right: 10px;
  place-items: center;
  border-radius: 50%;
  background: var(--corp-ink);
  color: #fff;
  font-size: 1rem;
}

.document-mastery p {
  display: inline;
  color: #52645f;
  font-size: .8rem;
}

/* Formal A4 output */
.erph-print-page {
  background: #d9dedc;
}

.erph-print-page .print-sheet {
  width: 210mm;
  max-width: none;
  min-height: 297mm;
  margin: 20px auto 50px;
  padding: 7mm;
  border: 1px solid #17211f;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 18px 55px rgba(12, 34, 30, .18);
  color: #060b0a;
  font-family: Arial, Helvetica, sans-serif;
}

.rph-template-heading {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.rph-template-heading th,
.rph-template-heading td {
  height: 24mm;
  border: 1px solid #222;
}

.rph-template-heading th {
  padding: 2mm 5mm;
  background: #dcecf6;
  text-align: center;
}

.rph-template-heading th small {
  display: block;
  margin-bottom: 1mm;
  color: #33464f;
  font: 600 6.5pt Arial, sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.rph-template-heading th strong {
  display: block;
  font: italic 700 14pt Georgia, "Times New Roman", serif;
}

.rph-template-heading td {
  width: 32mm;
  padding: 1.5mm;
  text-align: center;
  vertical-align: middle;
}

.rph-template-heading img {
  display: block;
  width: 20mm;
  height: 20mm;
  margin: auto;
  object-fit: cover;
}

.erph-print-page .print-sheet > header {
  min-height: auto;
  margin: 0;
  padding: 0 0 4mm;
  border-bottom: 2px solid #000;
  background: transparent;
  color: #000;
}

.erph-print-page .print-sheet > header img {
  width: 13mm;
  height: 13mm;
}

.erph-print-page .print-sheet > header span,
.erph-print-page .print-sheet > header strong {
  color: #000;
}

.erph-print-page .print-sheet > header h1 {
  font-size: 15pt;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.template-facts,
.template-content,
.print-template-aside table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.template-facts {
  margin-top: 0;
  font-size: 7.4pt;
}

.template-facts th,
.template-facts td,
.template-content th,
.template-content td,
.print-template-aside td {
  padding: 1.3mm 1.5mm;
  border: 1px solid #000;
  vertical-align: top;
}

.template-facts th {
  width: 15%;
  background: #f0f1f1;
  text-align: left;
  text-transform: uppercase;
}

.template-facts td {
  width: 35%;
}

.print-template-columns {
  display: grid;
  grid-template-columns: minmax(0, 2.65fr) minmax(51mm, 1fr);
  gap: 2mm;
  margin-top: 2mm;
  align-items: start;
}

.template-content {
  font-size: 6.9pt;
  line-height: 1.45;
}

.template-content th {
  width: 31%;
  background: #f0f1f1;
  text-align: left;
  text-transform: uppercase;
}

.template-content p {
  margin: 0;
}

.simplified-template {
  width: 100%;
  margin-top: 2mm;
}

.simplified-template .print-section-row th {
  width: auto;
  padding: 1.7mm 2mm;
  background: #dcecf6;
  color: #111;
  font: italic 700 8.2pt Georgia, "Times New Roman", serif;
  letter-spacing: .03em;
  text-align: left;
}

.simplified-template .print-section-row span {
  display: inline-block;
  margin-right: 1.5mm;
  color: #174f70;
  font: 800 7.2pt Arial, sans-serif;
}

.simplified-template > tbody > tr:not(.print-section-row) > th {
  width: 34mm;
  background: #fff;
  font: italic 700 7.2pt Georgia, "Times New Roman", serif;
  text-align: center;
  vertical-align: middle;
}

.simplified-template > tbody > tr:not(.print-section-row) > td {
  padding: 1.7mm 2.2mm;
  font-size: 7.3pt;
  line-height: 1.5;
  vertical-align: top;
}

.simplified-template .print-activity-row > td {
  min-height: 30mm;
  padding-top: 2.5mm;
  padding-bottom: 2.5mm;
}

.simplified-template .print-reflection-row > td {
  height: 28mm;
  padding-top: 2.5mm;
}

.print-sheet > footer.rph-print-approval {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 24mm;
  margin: 6mm 13mm 0;
  font-size: 7.5pt;
}

.print-sheet > footer.rph-print-approval > div {
  display: flex;
  align-items: flex-end;
  gap: 3mm;
}

.print-sheet > footer.rph-print-approval span {
  flex: 1;
  height: 6mm;
  border-bottom: 1px solid #222;
}

.activity-print-block {
  min-height: 11mm;
  padding: 1mm 0 1.5mm;
  border-bottom: 1px solid #a9afad;
}

.activity-print-block:last-child {
  border-bottom: 0;
}

.activity-print-block strong {
  display: block;
  margin-bottom: .5mm;
  font-style: italic;
}

.print-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7mm 2mm;
}

.print-template-aside {
  display: grid;
  gap: 2mm;
  font-size: 6.2pt;
  line-height: 1.3;
}

.print-template-aside section {
  border: 1px solid #000;
}

.print-template-aside h2 {
  margin: 0;
  padding: 1.4mm;
  background: #101716;
  color: #fff;
  font-size: 7pt;
  text-align: center;
  text-transform: uppercase;
}

.print-template-aside td {
  padding: 1mm;
}

.print-template-aside td:last-child {
  width: 9mm;
  text-align: center;
  font-size: 8pt;
  font-weight: 800;
}

.print-template-aside small {
  display: block;
  margin-top: .4mm;
  font-size: 5.3pt;
  font-weight: 400;
}

.print-signatures > div {
  display: grid;
  grid-template-columns: 10mm 1fr;
  min-height: 12mm;
  border-top: 1px solid #000;
}

.print-signatures > div span {
  display: grid;
  place-items: center;
  border-right: 1px solid #000;
  font-weight: 800;
}

.print-signatures i {
  display: block;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 5mm;
  }

  .erph-print-page {
    background: #fff;
  }

  .erph-print-page .print-sheet {
    width: 200mm;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .print-template-columns {
    break-inside: avoid;
  }
}

@media (max-width: 620px) {
  .rph-template-options,
  .document-template-matrix {
    grid-template-columns: 1fr;
  }

  .document-facts.three-facts {
    grid-template-columns: 1fr;
  }

  .document-facts.three-facts .document-fact-wide {
    grid-column: auto;
  }

  .rph-option-grid {
    grid-template-columns: 1fr;
  }

  .document-template-matrix > section {
    border-right: 0;
    border-bottom: 1px solid var(--corp-line);
  }

  .document-template-matrix > section:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--corp-line);
  }

  .document-template-matrix > section:last-child {
    border-bottom: 0;
  }
}

/* Refined teacher workspace */
.erph-main {
  width: min(1500px, calc(100% - 64px));
}

.erph-flash {
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(15, 37, 34, .05);
}

.erph-card,
.erph-stat-card {
  border-color: #d8e1df;
  border-radius: 10px;
  box-shadow: 0 12px 35px rgba(18, 42, 38, .055);
}

.erph-card {
  position: relative;
}

.erph-primary-button,
.erph-secondary-button,
.view-actions a,
.record-actions a,
.record-actions button {
  border-radius: 6px;
  letter-spacing: -.01em;
}

.rph-editor-form {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

.rph-editor-main {
  gap: 20px;
}

.rph-form-section {
  overflow: hidden;
  padding: 0;
}

.rph-section-title {
  margin: 0;
  padding: 21px 24px;
  border-bottom: 1px solid #dce5e2;
  background:
    linear-gradient(90deg, rgba(10, 119, 102, .055), transparent 58%),
    #f8faf9;
}

.rph-section-title > span {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 7px;
  background: var(--corp-ink);
  box-shadow: 0 7px 15px rgba(8, 32, 45, .14);
}

.rph-section-title h2 {
  color: var(--corp-ink);
  font-size: 1.12rem;
  letter-spacing: -.035em;
}

.rph-section-title p {
  margin-top: 4px;
  color: #72817e;
  font-size: .72rem;
}

.rph-form-section > .rph-grid {
  padding: 24px;
}

.rph-grid {
  gap: 18px 16px;
}

.rph-grid label {
  gap: 9px;
  color: #223c38;
  font-size: .75rem;
  font-weight: 750;
}

.rph-grid input,
.rph-grid textarea,
.rph-grid select {
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid #bdcbc7;
  border-radius: 6px;
  color: #132c29;
  background: #fff;
  font-size: .82rem;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.rph-grid textarea {
  min-height: 118px;
  line-height: 1.7;
}

.rph-grid input:hover,
.rph-grid textarea:hover,
.rph-grid select:hover {
  border-color: #8da59f;
}

.rph-grid input:focus,
.rph-grid textarea:focus,
.rph-grid select:focus {
  border-color: var(--corp-green);
  background: #fcfffe;
  box-shadow: 0 0 0 4px rgba(10, 119, 102, .1);
}

.rph-grid input::placeholder,
.rph-grid textarea::placeholder {
  color: #91a09d;
}

/* Table-style RPH editor, aligned with the formal print template. */
.rph-template-entry {
  overflow: hidden;
  padding: 0;
  border-color: #8b9995;
  border-radius: 2px;
}

.rph-entry-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  min-height: 88px;
  border-bottom: 1px solid #68736f;
}

.rph-entry-heading > div {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 16px 24px;
  background: #dcecf6;
  text-align: center;
}

.rph-entry-heading small {
  color: #405962;
  font-size: .6rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.rph-entry-heading strong {
  color: #101716;
  font: 700 1.12rem/1.35 Poppins, "Noto Naskh Arabic", sans-serif;
}

.rph-entry-heading > span {
  display: grid;
  place-items: center;
  border-left: 1px solid #68736f;
  background: #fff;
}

.rph-entry-heading img {
  width: 88px;
  height: 88px;
  object-fit: cover;
}

.rph-entry-table {
  background: #fff;
}

.rph-template-entry,
.rph-template-entry input,
.rph-template-entry textarea,
.rph-template-entry select,
.rph-template-entry button {
  font-family: Poppins, "Noto Naskh Arabic", sans-serif;
}

.rph-entry-section {
  display: grid;
  grid-template-columns: 34px auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 14px;
  border-bottom: 1px solid #68736f;
  background: #dcecf6;
}

.rph-entry-section b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 3px;
  color: #fff;
  background: #174f70;
  font-size: .65rem;
}

.rph-entry-section strong {
  color: #111;
  font: 700 .88rem/1.4 Poppins, "Noto Naskh Arabic", sans-serif;
  text-transform: uppercase;
}

.rph-entry-section small {
  justify-self: end;
  color: #52666d;
  font-size: .6rem;
}

.rph-entry-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-width: 0;
  margin: 0;
  border-bottom: 1px solid #68736f;
}

.rph-entry-table > :last-child {
  border-bottom: 0;
}

.rph-entry-label {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  padding: 12px 15px;
  border-right: 1px solid #68736f;
  color: #182320;
  font: 700 .74rem/1.4 Poppins, "Noto Naskh Arabic", sans-serif;
  text-align: center;
  text-transform: uppercase;
}

.rph-entry-control {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 12px 14px;
  border: 0;
}

fieldset.rph-entry-control {
  background: #fbfcfc;
}

.rph-entry-control > input,
.rph-entry-control > textarea,
.rph-entry-control > select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #b5c4c0;
  border-radius: 4px;
  outline: 0;
  color: #19312d;
  background: #fff;
  font: 500 .78rem/1.65 Poppins, "Noto Naskh Arabic", sans-serif;
  resize: vertical;
}

.rph-entry-control > textarea {
  min-height: 100px;
}

.rph-entry-tall .rph-entry-control > textarea {
  min-height: 190px;
}

.rph-entry-control > input:hover,
.rph-entry-control > textarea:hover,
.rph-entry-control > select:hover {
  border-color: #839a94;
}

.rph-entry-control > input:focus,
.rph-entry-control > textarea:focus,
.rph-entry-control > select:focus {
  border-color: var(--corp-green);
  box-shadow: 0 0 0 3px rgba(10, 119, 102, .11);
}

.rph-entry-choice-row .rph-entry-control {
  padding: 14px;
}

.rph-entry-choice-row .rph-option-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rph-entry-choice-row .mastery-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rph-entry-control.compact-number input,
.rph-entry-control.compact-number select {
  max-width: 180px;
}

.rph-time-range {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto minmax(130px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #f8fbfa;
}

.rph-time-field {
  display: grid;
  gap: 7px;
}

.rph-time-field > span,
.postponement-other > span {
  color: #52666d;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.rph-time-field input,
.postponement-other input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #b5c4c0;
  border-radius: 4px;
  outline: 0;
  color: #19312d;
  background: #fff;
  font: 500 .78rem/1.65 Poppins, "Noto Naskh Arabic", sans-serif;
}

.rph-time-field input:focus,
.postponement-other input:focus {
  border-color: var(--corp-green);
  box-shadow: 0 0 0 3px rgba(10, 119, 102, .11);
}

.rph-time-separator {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #174f70;
  font-size: 1rem;
  font-weight: 700;
}

.rph-postponement-row {
  grid-template-columns: 1fr;
  background: #fff;
}

.rph-postponement-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 18px;
  border-bottom: 1px solid #c3cecb;
  color: #263b3a;
  background: #eef8f5;
  font-size: .75rem;
  font-weight: 650;
  text-align: center;
}

.rph-postponement-title strong {
  color: #15785f;
  font-size: .8rem;
  letter-spacing: .04em;
}

.postponement-other {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid #dce5e2;
}

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

/* Multilingual RPH content: Malay/Rumi, Jawi and Arabic. */
.rph-language-support {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 16px;
  margin: -4px 0 16px;
  border: 1px solid #b8ddd5;
  border-radius: 10px;
  color: #385b5a;
  background: #f0faf7;
  font-size: .72rem;
}

.rph-language-support strong {
  flex: 0 0 auto;
  color: var(--corp-teal-700);
  font: 700 1rem/1.2 Poppins, "Noto Naskh Arabic", sans-serif;
}

[data-bidi-input],
.bidi-text,
.bidi-text-inline {
  font-family: Poppins, "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
  unicode-bidi: plaintext;
  text-align: start;
  letter-spacing: normal;
  text-transform: none;
  overflow-wrap: anywhere;
}

[data-bidi-input][dir="rtl"] {
  font-size: .9rem;
  line-height: 1.9;
}

.bidi-text {
  display: block;
  white-space: normal;
}

.bidi-text-inline {
  display: inline-block;
  max-width: 100%;
}

@media (max-width: 720px) {
  .rph-language-support {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .rph-entry-heading {
    grid-template-columns: minmax(0, 1fr) 78px;
    min-height: 74px;
  }

  .rph-entry-heading > div {
    padding: 12px;
  }

  .rph-entry-heading strong {
    font-size: .83rem;
  }

  .rph-entry-heading img {
    width: 62px;
    height: 62px;
  }

  .rph-entry-section {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
  }

  .rph-entry-section small {
    display: none;
  }

  .rph-entry-row {
    grid-template-columns: 1fr;
  }

  .rph-entry-label {
    min-height: 0;
    justify-content: flex-start;
    padding: 10px 13px;
    border-right: 0;
    border-bottom: 1px solid #c3cecb;
    text-align: left;
  }

  .rph-entry-choice-row .rph-option-grid,
  .rph-entry-choice-row .mastery-options {
    grid-template-columns: 1fr;
  }

  .rph-entry-control.compact-number input,
  .rph-entry-control.compact-number select {
    max-width: none;
  }

  .rph-time-range {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .rph-time-separator {
    display: none;
  }

  .postponement-other {
    grid-template-columns: 1fr;
  }
}

.school-time-field {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid #bdcbc7;
  border-radius: 6px;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.school-time-field:focus-within {
  border-color: var(--corp-green);
  box-shadow: 0 0 0 4px rgba(10, 119, 102, .1);
}

.school-time-field > b {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--corp-ink);
  font-size: .58rem;
  letter-spacing: .08em;
}

.school-time-field select {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 42px 0 14px;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: #132c29;
  background:
    linear-gradient(45deg, transparent 50%, #58706b 50%) calc(100% - 19px) 23px / 5px 5px no-repeat,
    linear-gradient(135deg, #58706b 50%, transparent 50%) calc(100% - 14px) 23px / 5px 5px no-repeat,
    #fff;
  appearance: none;
  font: 650 .82rem Poppins, sans-serif;
  cursor: pointer;
}

.school-time-field select:focus {
  box-shadow: none;
}

.rph-editor-sidebar {
  top: 88px;
}

.editor-summary {
  overflow: hidden;
  padding: 24px;
  border: 0;
  border-top: 0;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(48, 190, 161, .19), transparent 38%),
    linear-gradient(150deg, #0a2638, #0b3a3b);
  box-shadow: 0 18px 42px rgba(8, 38, 48, .18);
}

.editor-kicker,
.editor-summary h2 {
  color: #fff;
}

.editor-kicker {
  color: #66dcc7;
}

.editor-summary > p,
.editor-checklist span,
.editor-summary > small {
  color: #b8cbc7;
}

.editor-checklist {
  border-color: rgba(255, 255, 255, .12);
}

.editor-checklist i {
  background: #51d3b9;
  box-shadow: 0 0 0 4px rgba(81, 211, 185, .12);
}

.editor-summary button {
  min-height: 50px;
  border-radius: 6px;
}

.editor-summary .save-draft {
  color: #dce9e6;
  border: 1px solid rgba(255, 255, 255, .19);
  background: rgba(255, 255, 255, .08);
}

.editor-summary .save-complete {
  color: #082b2b;
  background: #6be0c7;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .17);
}

.editor-summary > a {
  color: #d3e6e1;
}

.rph-template-options {
  padding: 24px;
}

.rph-template-options fieldset {
  border-radius: 7px;
}

/* Premium profile page */
.profile-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
  gap: 22px;
  align-items: start;
}

.profile-card,
.password-card {
  overflow: hidden;
  padding: 0;
}

.profile-identity {
  position: relative;
  gap: 18px;
  min-height: 150px;
  margin: 0;
  padding: 27px 30px;
  border: 0;
  color: #fff;
  background:
    linear-gradient(90deg, transparent 70%, rgba(83, 213, 185, .1)),
    linear-gradient(145deg, #09273a, #0a4341);
}

.profile-identity::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -92px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(101, 224, 198, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(101, 224, 198, .035);
}

.teacher-profile-avatar {
  z-index: 1;
  width: 86px;
  height: 86px;
  flex-basis: 86px;
  border: 3px solid rgba(255, 255, 255, .72);
  border-radius: 9px;
  background: #0b7b6d;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
}

.profile-identity-copy {
  position: relative;
  z-index: 1;
}

.profile-identity-copy > span {
  display: block;
  margin-bottom: 7px;
  color: #6ce0c8;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.profile-identity h2 {
  color: #fff;
  font-size: 1.55rem;
}

.profile-identity p {
  color: #c7d8d5;
  font-size: .78rem;
}

.profile-active-status {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 11px;
  border: 1px solid rgba(108, 224, 200, .28);
  border-radius: 999px;
  color: #dffaf4;
  background: rgba(5, 34, 37, .3);
  font-size: .65rem;
}

.profile-active-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #61dfbd;
  box-shadow: 0 0 0 4px rgba(97, 223, 189, .13);
}

.teacher-avatar-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 24px 28px 0;
  padding: 17px 18px;
  border: 1px solid #d8e2df;
  border-radius: 7px;
  background: #f7faf9;
}

.avatar-control-copy {
  display: grid;
  gap: 3px;
}

.avatar-control-copy > span {
  color: var(--corp-green);
  font-size: .57rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.avatar-control-copy strong {
  color: var(--corp-ink);
  font-size: .84rem;
}

.avatar-control-copy p {
  margin: 0;
  color: #7b8a87;
  font-size: .66rem;
}

.avatar-control-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.teacher-avatar-controls .avatar-control-actions > label:not(.teacher-remove-avatar) {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--corp-ink);
  font-size: .68rem;
  font-weight: 750;
  cursor: pointer;
}

.teacher-remove-avatar {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #edc6c4;
  border-radius: 6px;
  color: #a13a37;
  background: #fff8f7;
  font-size: .67rem;
  font-weight: 700;
}

.profile-card > .rph-grid {
  padding: 24px 28px 29px;
}

.password-card .rph-section-title {
  margin: 0;
}

.password-card .rph-section-title > span {
  background: #c59027;
  box-shadow: 0 7px 15px rgba(197, 144, 39, .2);
}

.password-card .rph-section-title small {
  display: block;
  margin-bottom: 2px;
  color: #9a762e;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.password-card > .rph-grid {
  padding: 23px 24px 14px;
}

.password-inline button {
  min-width: 105px;
  border-radius: 0 6px 6px 0;
  color: #fff;
  background: var(--corp-ink);
  font-size: .65rem;
  cursor: pointer;
}

.password-inline input {
  border-radius: 6px 0 0 6px;
}

.password-rules {
  display: grid;
  gap: 8px;
  margin: 0 24px 24px;
  padding: 15px;
  border-radius: 6px;
  background: #f3f7f5;
}

.password-rules span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #647570;
  font-size: .65rem;
}

.password-rules i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--corp-green);
}

.profile-submit button {
  min-width: 230px;
  min-height: 52px;
  justify-content: space-between;
  padding: 0 20px;
  border: 1px solid #c96a08;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 12px 28px rgba(217, 119, 6, .28);
  opacity: 1;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.profile-submit button:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(217, 119, 6, .34);
}

.profile-submit button:focus-visible {
  outline: 3px solid rgba(245, 158, 11, .28);
  outline-offset: 3px;
}

.profile-submit button > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
}

@media (max-width: 980px) {
  .erph-main {
    width: min(100% - 32px, 1500px);
  }

  .rph-editor-form,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .rph-editor-sidebar {
    position: static;
  }

  .profile-submit {
    justify-content: stretch;
  }

  .profile-submit button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .erph-main {
    width: calc(100% - 24px);
  }

  .rph-section-title,
  .rph-form-section > .rph-grid,
  .rph-template-options {
    padding: 18px;
  }

  .school-time-field {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .profile-identity {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 22px;
  }

  .profile-active-status {
    margin-left: 0;
  }

  .teacher-avatar-controls {
    grid-template-columns: 1fr;
    margin: 18px 18px 0;
  }

  .avatar-control-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .teacher-avatar-controls .avatar-control-actions > label {
    justify-content: center;
  }

  .profile-card > .rph-grid {
    padding: 20px 18px;
  }
}

/* Searchable school selectors */
.rph-form-section:has(.rph-combobox) {
  z-index: 8;
  overflow: visible;
}

.rph-combobox {
  position: relative;
  display: block;
}

.rph-combobox > input {
  padding-right: 48px;
}

.rph-combobox > [data-combobox-toggle] {
  position: absolute;
  z-index: 2;
  top: 7px;
  right: 7px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #edf4f2;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.rph-combobox > [data-combobox-toggle]:hover {
  background: #dfece8;
}

.rph-combobox > [data-combobox-toggle] i {
  width: 8px;
  height: 8px;
  border-right: 2px solid #35544e;
  border-bottom: 2px solid #35544e;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}

.rph-combobox.open > [data-combobox-toggle] i {
  transform: translateY(2px) rotate(225deg);
}

.rph-combobox.open > input {
  border-color: var(--corp-green);
  box-shadow: 0 0 0 4px rgba(10, 119, 102, .1);
}

.rph-combobox-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 9px);
  left: 0;
  right: 0;
  display: none;
  max-height: 320px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid #cddbd7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(13, 38, 34, .18);
}

.rph-combobox.open .rph-combobox-menu {
  display: grid;
  animation: rph-combobox-in .16s ease-out both;
}

@keyframes rph-combobox-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.combobox-menu-title {
  padding: 9px 10px 8px;
  color: #7b8c88;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.rph-combobox-menu [data-combobox-option] {
  position: relative;
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 56px;
  padding: 10px 42px 10px 12px;
  border: 0;
  border-radius: 6px;
  color: #17322e;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.rph-combobox-menu [data-combobox-option] + [data-combobox-option] {
  border-top: 1px solid #edf2f0;
}

.rph-combobox-menu [data-combobox-option]:hover,
.rph-combobox-menu [data-combobox-option]:focus {
  outline: 0;
  background: #eef7f4;
}

.rph-combobox-menu [data-combobox-option] strong {
  font: 750 .78rem Poppins, sans-serif;
}

.rph-combobox-menu [data-combobox-option] small {
  color: #7d8e8a;
  font: 500 .63rem Poppins, sans-serif;
}

.rph-combobox-menu [data-combobox-option] i {
  position: absolute;
  top: 19px;
  right: 16px;
  width: 15px;
  height: 8px;
  border-left: 2px solid var(--corp-green);
  border-bottom: 2px solid var(--corp-green);
  opacity: 0;
  transform: rotate(-45deg);
}

.rph-combobox-menu [data-combobox-option]:hover i,
.rph-combobox-menu [data-combobox-option]:focus i {
  opacity: 1;
}

.rph-combobox-menu [data-combobox-empty] {
  padding: 16px 12px;
  color: #71827e;
  background: #f6f9f8;
  font-size: .66rem;
  font-style: normal;
  line-height: 1.55;
}

.rph-combobox-menu [hidden] {
  display: none;
}

.rph-combobox-menu::-webkit-scrollbar {
  width: 8px;
}

.rph-combobox-menu::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 8px;
  background: #bdcfca;
}
