/* shared by classroom.html and admin.html (site.css provides tokens, buttons, .panel, .grid) */
.portal-head { background: #121114; color: #fff; border-bottom: 1px solid #ffffff26; }
.portal-head .muted { color: #d9d4d8; }
.portal-head .btn.secondary, .portal-head button.secondary { color: #fff; border-color: #ffffff80; }
.portal-head .btn.secondary:hover, .portal-head button.secondary:hover { background: #ffffff1f; }
.portal-head .shell { display: flex; align-items: center; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.portal-head .spacer { flex: 1; }
.page { padding-block: 32px 72px; }
.page h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 18px; }
.stack > * + * { margin-top: 16px; }
.msg { min-height: 1.4em; margin-top: 8px; font-weight: 500; }
.msg.bad { color: #b00020; } .msg.good { color: #0b6b2e; }
.form label { display: block; margin-top: 12px; font-weight: 500; }
.form input, .form select, .form textarea, .bar input, .bar select, table input, table select {
  display: block; width: 100%; padding: .55rem .7rem; border: 1px solid #cfc7ca; border-radius: 6px; background: #fff; font: inherit; }
.form button { margin-top: 14px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.tabs button[aria-pressed="true"] { background: var(--ink); }
.bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.bar > * { flex: 0 1 auto; } .bar input { width: 260px; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--paper); white-space: nowrap; }
td .btn, td button { min-height: 34px; padding: .25rem .6rem; font-size: .85rem; }
.pill { display: inline-block; padding: 1px 10px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); font-size: .82rem; }
.pill.paid, .pill.ready, .pill.active { background: #e6f5ea; border-color: #9bd2ab; }
.pill.slip_uploaded, .pill.processing, .pill.new { background: #fff4d6; border-color: #e5c872; }
.pill.rejected, .pill.failed, .pill.banned, .pill.expired { background: #fde7ea; border-color: #e7a0aa; }
.stat { font-family: var(--heading); font-size: 2rem; line-height: 1.1; }
.two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }

/* protected player */
.player { position: relative; background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; user-select: none; -webkit-user-select: none; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player .wm { position: absolute; z-index: 5; pointer-events: none; color: #fff; opacity: .28; font: 600 13px/1.2 var(--thai); text-shadow: 0 0 3px #000; white-space: nowrap; transition: top 1.2s, left 1.2s; }
.player .shield { position: absolute; inset: 0; z-index: 6; display: none; place-items: center; background: #000c; color: #fff; text-align: center; padding: 20px; }
.player.blocked .shield { display: grid; }
.lesson { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; background: #fff; }
.lesson.current { border-color: var(--red); }
.lesson .grow { flex: 1; }
.qr { max-width: 260px; background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.price-tag { font-family: var(--heading); font-size: 1.6rem; color: var(--red-dark); }

/* header shortcuts added by nav.js */
#kp-nav { display: inline-flex; gap: 8px; flex-wrap: wrap; }
#kp-nav:empty { display: none; }
.portal-head a[aria-current='page'], header a.classroom[aria-current='page'] { background: #ffffff22; }
