/* 老师 / 学校专区：用 register.css 的颜色和排法，这里只有专区自己多出来的东西。
   对齐和断行的规则和报名页一样：一排的按钮同宽、左右两栏各自靠齐、手机上一笔一张卡片。 */
.portal.portal-wide { max-width: 1100px; }
.p-who { text-align: center; color: var(--gold-deep); font-size: 14px; line-height: 1.6; margin: -18px 0 22px; text-wrap: balance; overflow-wrap: break-word; }
.p-who b { font-weight: 800; color: var(--navy); }
.p-who div { font-weight: 600; }
/* 导航：六格同宽同高；手机上三格一行，刚好两行 */
.p-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 28px; }
.p-nav a, .p-nav button { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 6px; border-radius: 12px; border: 1px solid rgba(214,168,78,0.65); background: #fff; color: var(--gold-deep); font: inherit; font-weight: 700; font-size: 13px; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer; text-wrap: balance; }
.p-nav a:hover, .p-nav button:hover { background: rgba(214,168,78,0.12); }
.p-nav a.on { background: linear-gradient(135deg, #F3DCA2 0%, #D6A84E 100%); color: var(--navy); border-color: transparent; }
.p-nav button { color: var(--muted); border-color: var(--line); }
@media (max-width: 680px) { .p-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* 一块内容 */
.p-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 20px; margin-bottom: 16px; }
.p-card.gold { border-color: var(--gold-line); background: var(--paper); }
.p-title { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--navy); line-height: 1.3; margin: 0 0 16px; text-wrap: balance; }
.p-sub { color: var(--gold-deep); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 12px; text-wrap: balance; }
.p-narrow { max-width: 460px; margin: 0 auto; }
.p-msg { text-align: center; font-weight: 700; font-size: 14px; line-height: 1.6; margin-top: 14px; text-wrap: balance; }
.p-msg:empty { display: none; }
.p-msg.bad { color: var(--bad); } .p-msg.ok { color: var(--ok); } .p-msg.busy { color: var(--warn); }
/* 只读的资料：左边项目、右边内容 */
.p-facts { margin: 0 0 18px; }
.p-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-top: 1px solid rgba(15,26,48,0.08); font-size: 14px; line-height: 1.5; }
.p-facts > div:first-child { border-top: 0; }
.p-facts dt { flex: 0 0 auto; color: var(--soft); white-space: nowrap; }
.p-facts dd { margin: 0; min-width: 0; color: var(--navy); font-weight: 600; text-align: right; overflow-wrap: break-word; text-wrap: balance; }
@media (max-width: 680px) { .p-card { padding: 18px 16px; } .p-title { font-size: 22px; } }

/* 一行：左边标题、右边按钮；手机上按钮在下面、占满一行 */
.p-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.p-bar .gold-btn { flex: 0 0 auto; }
.p-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: 10px; margin-bottom: 4px; }
.p-filters > :only-child { grid-column: 1 / -1; }
/* 名单 / 记录：电脑上是表格，每一格放得下就不换行；手机上一笔一张卡片，「项目：内容」上下对齐 */
.p-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 14px; }
.p-table th { text-align: left; padding: 10px 10px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; white-space: nowrap; background: var(--paper); border-bottom: 1px solid var(--line); }
.p-table td { padding: 12px 10px; border-bottom: 1px solid rgba(15,26,48,0.08); color: var(--navy); vertical-align: middle; line-height: 1.5; }
.p-table td.main { overflow-wrap: break-word; min-width: 220px; }
.p-table td .cart-sub { margin-top: 0; }
.p-table td.acts { white-space: nowrap; text-align: right; }
.p-table td.acts .check-btn { min-height: 36px; padding: 7px 14px; font-size: 13px; line-height: 20px; margin-left: 6px; }
@media (max-width: 760px) {
  .p-bar .gold-btn { width: 100%; }
  .p-filters { grid-template-columns: 1fr; }
  .p-table, .p-table tbody { display: block; }
  .p-table thead { display: none; }
  .p-table tr { display: block; padding: 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .p-table td { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 12px; padding: 3px 0; border: 0; font-size: 13px; }
  .p-table td[data-l]::before { content: attr(data-l); color: var(--muted); }
  /* 内容靠左、不撑满整格（小标签不会被拉长） */
  .p-table td[data-l] > * { justify-self: start; min-width: 0; text-wrap: balance; }
  .p-table td.main { display: block; font-size: 15px; padding-bottom: 8px; min-width: 0; }
  .p-table td.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 12px; }
  .p-table td.acts .check-btn { width: 100%; margin: 0; }
}

/* 打勾报名：学生一位一行（勾选框在左，名字和附注在右）；名单长了在框里上下滑 */
.p-ticks { max-height: 380px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; margin: 10px 0 14px; background: #fff; }
.p-tick { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: start; padding: 11px 14px; margin: 0; border-bottom: 1px solid rgba(15,26,48,0.07); font-size: 14px; line-height: 1.5; color: var(--navy); cursor: pointer; }
.p-tick:last-child { border-bottom: 0; }
.p-tick.off { cursor: default; color: var(--muted); background: var(--paper); }
.p-tick input { margin-top: 4px; accent-color: #B8862B; }
.p-tick b { display: block; font-weight: 700; overflow-wrap: break-word; }
.p-tick .cart-sub { display: block; }
/* 一笔报名：上面名字和报名费左右对齐，下面是要填的栏位 */
.p-row { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; background: #fff; font-size: 14px; line-height: 1.5; color: var(--navy); }
.p-row.ok { background: var(--paper); border-color: rgba(15,123,85,0.35); }
.p-row.bad { border-color: #fecdd3; }
.p-row .form-group { margin-bottom: 16px; }
.p-row-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.p-row-foot .notice { margin: 0; }
.p-row-foot .link-btn { flex: 0 0 auto; margin-left: auto; white-space: nowrap; }
.only-narrow { display: none; }
@media (max-width: 680px) { .only-narrow { display: block; } }

/* 专区里一叠的按钮：字太长（马来文、英文）时在词和词之间换成两行，不把页面撑宽 */
.portal-wide .success-actions > * { white-space: normal; text-wrap: balance; }
/* 合计那一行缩进到和上面每一笔的金额同一条线 */
#rFoot .cart-total { padding-left: 17px; padding-right: 17px; }

/* 首页的提醒：一句一行，整行可以按 */
.p-notes { display: grid; gap: 8px; }
.p-note { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--gold-line); background: #fff; color: var(--navy); font-size: 14px; line-height: 1.5; font-weight: 600; text-decoration: none; text-wrap: pretty; }
.p-note span:first-child { min-width: 0; overflow-wrap: break-word; }
.p-note .go { flex: 0 0 auto; color: var(--gold-deep); font-size: 20px; line-height: 1; }
.p-note.rejected, .p-note.urgent { border-color: #fecdd3; background: #fff1f2; color: #9f1239; }
/* 比赛卡片：手机一栏，电脑两栏；每张卡片的按钮都在最下面 */
.p-events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.p-events > :only-child { grid-column: 1 / -1; }
.p-event { display: flex; flex-direction: column; margin-bottom: 0; }
.p-event .p-facts { flex: 1; }
@media (max-width: 760px) { .p-events { grid-template-columns: minmax(0, 1fr); } }
/* 记录：小标签排成一行 */
.p-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.p-pills .st-pill { margin-top: 0; }
.pay-item.dim { opacity: 0.6; }
/* 两个选单要放得下最长的选项（马来文「Semua status bayaran」） */
.p-filters.three { grid-template-columns: minmax(0, 1fr) minmax(0, 250px) minmax(0, 250px); }
@media (max-width: 760px) { .p-filters.three { grid-template-columns: 1fr; } }

/* 提醒里分两行写的：第一行粗体（哪一笔），第二行是说明 */
.p-note b { display: block; font-weight: 800; overflow-wrap: break-word; }
.p-note .why { display: block; font-weight: 600; text-wrap: pretty; }
/* 编号、名字各自一段：整段换行（比一行还长的名字才会在段里面换行） */
.piece { display: inline-block; max-width: 100%; }

/* 报名记录：每一笔自己的付款链接 */
.p-link { margin-top: 10px; }
.p-link .cart-sub { margin-top: 8px; }
.p-link .pay-url { margin-top: 6px; }

/* 「登出」在名字下面，是一条小字链接（导航六格都是页面） */
.p-who .p-out { display: block; margin: 2px auto 0; padding: 2px 6px; background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; font-size: 12px; text-decoration: underline; cursor: pointer; }
.p-who .p-out:hover { color: var(--navy); }

/* ===== 积分兑换 ===== */
/* 双倍积分期间的提示 */
.rw-promo { background: var(--navy); color: #fff; border-radius: 14px; padding: 14px 18px; margin-bottom: 16px; font-size: 14px; line-height: 1.6; text-align: center; text-wrap: balance; }
.rw-promo > span { display: block; }
.rw-promo b { display: block; color: #F3DCA2; font-weight: 800; letter-spacing: 1px; margin-bottom: 2px; }
/* 积分：大数字在左，三个小数字在右；手机上上下排 */
.rw-balance { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: center; }
.rw-big .p-sub { margin-bottom: 4px; }
.rw-num { font-family: var(--serif); font-size: 56px; font-weight: 700; line-height: 1.05; color: var(--navy); white-space: nowrap; }
.rw-num small { font-family: inherit; font-size: 22px; margin-left: 6px; color: var(--gold-deep); }
.rw-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rw-stat { display: flex; flex-direction: column; justify-content: center; background: #fff; border: 1px solid var(--gold-line); border-radius: 12px; padding: 12px 8px; text-align: center; }
.rw-stat b { display: block; font-size: 20px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.rw-stat > span { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--muted); text-wrap: balance; }
.rw-how { margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(15,26,48,0.1); }
.rw-how .p-sub { margin-bottom: 8px; }
.rw-how .cart-line { padding: 5px 0; font-size: 14px; color: var(--navy); align-items: baseline; }
.rw-how .cart-line > span { min-width: 0; }
.rw-how .cart-line b { flex: 0 0 auto; color: var(--ok); font-weight: 800; }
.rw-how .cart-line b.rw-wait, .rw-row .rw-later { color: #a16207; }
.rw-how .rw-note { margin-top: 6px; text-wrap: pretty; }
.rw-row .rw-later { font-weight: 600; }
/* 三个分页：同宽 */
.rw-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 22px 0 16px; }
.rw-tabs button { min-height: 46px; padding: 8px 6px; border-radius: 12px; border: 1px solid rgba(214,168,78,0.65); background: #fff; color: var(--gold-deep); font: inherit; font-weight: 700; font-size: 14px; line-height: 1.3; cursor: pointer; }
.rw-tabs button.on { background: var(--navy); color: #F3DCA2; border-color: var(--navy); }
.rw-pane[hidden] { display: none; }
/* 礼品：电脑三栏、平板两栏、手机一栏；每张卡片的分数和按钮都在同一高度 */
.rw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rw-item { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 0; }
.rw-icon, .rw-photo { width: 76px; height: 76px; border-radius: 50%; border: 1px solid var(--gold-line); }
.rw-icon { display: flex; align-items: center; justify-content: center; background: var(--paper); color: var(--gold-deep); }
.rw-photo { object-fit: cover; background: var(--paper); }
.rw-kind { margin-top: 12px; font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--gold-deep); }
.rw-name { font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.3; color: var(--navy); margin: 4px 0 4px; text-wrap: balance; overflow-wrap: break-word; max-width: 100%; }
.rw-desc { flex: 1; font-size: 13px; text-wrap: balance; }
.rw-cost { margin: 14px 0 12px; font-size: 20px; font-weight: 800; color: var(--navy); min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.rw-cost .rw-left { margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.rw-item .gold-btn, .rw-item .check-btn { width: 100%; }
.rw-item .check-btn:disabled { cursor: default; color: var(--muted); border-color: var(--line); opacity: 1; background: var(--paper); }
@media (max-width: 900px) { .rw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .rw-balance { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .rw-big { text-align: center; }
  .rw-num { font-size: 48px; }
  .rw-grid { grid-template-columns: minmax(0, 1fr); }
  .rw-tabs button { font-size: 13px; }
}
/* 360 宽的手机：三格的数字和三个分页按钮，字（「Exchanged」「Permohonan」）放得下，不伸出框外 */
@media (max-width: 400px) {
  .rw-stat { padding: 12px 4px; }
  .rw-tabs button { padding: 8px 3px; }
}
/* 我的兑换、积分记录：一笔一行，左边内容、右边分数 */
.rw-list { display: grid; gap: 10px; }
.rw-row { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; font-size: 14px; line-height: 1.5; color: var(--navy); }
.rw-row .cart-line { align-items: baseline; }
/* 报名记录：报名编号整段放得下，不被右边的金额挤掉几个像素（360 宽的手机） */
.cart-line > b.nb:first-child { flex-shrink: 0; }
.cart-line:has(> b.nb:first-child) { gap: 8px; }
.rw-row .cart-line b:first-child { min-width: 0; overflow-wrap: break-word; }
.rw-row .cart-line b:last-child { flex: 0 0 auto; font-weight: 800; }
.rw-row .plus { color: var(--ok); } .rw-row .minus { color: var(--bad); } .rw-row .hold { color: #a16207; }
.rw-row .notice { margin-top: 8px; }
.rw-act { margin-top: 8px; text-align: right; }
.rw-foot { margin-top: 12px; text-align: center; text-wrap: balance; }
/* 确认兑换的对话框 */
.rw-shade { position: fixed; inset: 0; background: rgba(15,26,48,0.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.rw-dialog { width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 18px; padding: 24px 22px; box-shadow: 0 20px 60px rgba(15,26,48,0.35); }
.rw-dialog .p-title { margin-bottom: 4px; }
.rw-dialog .p-facts { margin: 14px 0 16px; }
.rw-dialog .success-actions { margin-top: 18px; }
