:root {
    --pt-primary: #1d4ed8;
    --pt-primary-dark: #1e3a8a;
    --pt-accent: #c0392b;
    --pt-bg: #ffffff;
    --pt-muted: #6b7280;
    --pt-card-bg: #f9fafb;
    --pt-banner-bg: #fef9c3;
    --pt-banner-border: #facc15;
    --pt-welcome-bg: #e0e7ff;
}

html { font-size: 14px; min-height: 100%; }
@media (min-width: 768px) { html { font-size: 16px; } }
body { margin: 0; background: var(--pt-bg); color: #111827; font-family: 'Segoe UI', Tahoma, sans-serif; }

a, a:hover, a:focus { text-decoration: none; }

/* ---------- Header ---------- */
.pt-header { border-bottom: 1px solid #e5e7eb; background: #fff; }
.pt-brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.pt-logo { width: 48px; height: 48px; }
.pt-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.pt-brand-text strong { color: var(--pt-primary-dark); }
.pt-brand-text small { color: var(--pt-muted); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.pt-nav a { margin-left: 1rem; text-decoration: none; color: var(--pt-primary); font-weight: 500; }
.pt-nav .pt-cta { background: var(--pt-primary); color: #fff; padding: .35rem .8rem; border-radius: .375rem; }
.pt-nav .pt-link-btn { background: none; border: none; color: var(--pt-primary); font-weight: 500; cursor: pointer; margin-left: 1rem; padding: 0; }
.pt-user { color: var(--pt-muted); margin-left: 1rem; }
.pt-nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; row-gap: .25rem; }
.pt-nav a.pt-nav-on { color: var(--pt-primary-dark); font-weight: 700; border-bottom: 2px solid var(--pt-primary); }
.pt-nav .dropdown-menu .dropdown-item { margin-left: 0; }
.pt-nav .pt-bell { position: relative; text-decoration: none; }
.pt-nav .pt-belldot { position: absolute; top: -.45rem; right: -.6rem; background: #dc2626; color: #fff; border-radius: 999px; font-size: .65rem; font-weight: 700; padding: 0 .35rem; line-height: 1.1rem; }
.pt-bell-menu { min-width: 320px; }

/* ---------- Page header ---------- */
.pt-page-header { margin-bottom: 1rem; }
.pt-page-header h1 {
    color: var(--pt-primary-dark); font-weight: 700; margin-bottom: .25rem;
    font-size: 1.5rem;
}
/* Normalise every admin page H1 to the Add-Class title size, so pages that
   don't wrap their heading in .pt-page-header still match. */
.pt-admin-body h1 {
    font-size: 1.5rem; font-weight: 700; color: var(--pt-primary-dark);
}
.pt-page-sub {
    color: var(--pt-accent); font-weight: 600; margin-bottom: .5rem;
    font-size: .9rem;
}
.pt-info-banner {
    background: var(--pt-banner-bg);
    border-left: 4px solid var(--pt-banner-border);
    padding: .65rem 1rem;
    color: #78350f;
    border-radius: .25rem;
    font-size: .9rem;
    margin: .5rem 0 1rem;
}
.pt-welcome {
    background: var(--pt-welcome-bg);
    border-left: 4px solid var(--pt-primary);
    color: var(--pt-primary-dark);
    font-weight: 600;
    padding: .65rem 1rem;
    border-radius: .25rem;
    margin-bottom: 1.5rem;
}

/* ---------- Cards ---------- */
.pt-cards { margin-bottom: 1rem; }
.pt-card {
    background: var(--pt-card-bg);
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: 1rem 1.25rem;
}
.pt-card h3 { color: #111827; font-size: 1.05rem; font-weight: 700; }
.pt-card p { color: #4b5563; margin-bottom: .75rem; }
.pt-pill {
    display: inline-block;
    background: var(--pt-primary);
    color: #fff;
    font-size: .65rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: .35rem;
    vertical-align: middle;
}
.pt-pill.existing { background: #2563eb; }

/* ---------- Form card ---------- */
.pt-form-card { max-width: 480px; margin: 1rem auto 0; }
.pt-form-card label { font-weight: 600; }

/* ---------- Year pills ---------- */
.pt-year-pills { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.pt-year { padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: #064e3b; }
.pt-year.y1 { background: #dcfce7; }
.pt-year.y2 { background: #dcfce7; }
.pt-year.y3 { background: #fed7aa; color: #7c2d12; }
.pt-year.y4 { background: #fed7aa; color: #7c2d12; }
.pt-year.y5 { background: #fecaca; color: #7f1d1d; }
.pt-year.sec { background: #bbf7d0; color: #064e3b; }

/* ---------- Captcha ---------- */
.pt-captcha { height: 48px; border: 1px solid #d1d5db; border-radius: .25rem; }
.pt-captcha-input { max-width: 140px; }

/* ---------- Section ---------- */
.pt-section { margin-top: 1.5rem; }
.pt-section h4 { color: #111827; font-weight: 600; }

/* ---------- Dashboard stat cards ---------- */
.pt-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: .85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    height: 100%;
}
.pt-stat-label { color: var(--pt-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.pt-stat-value { color: var(--pt-primary-dark); font-size: 1.4rem; font-weight: 700; }

/* ---------- Status badges ---------- */
.pt-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    background: #e5e7eb;
    color: #374151;
}
.pt-status-Draft       { background: #e5e7eb; color: #374151; }
.pt-status-Submitted   { background: #dbeafe; color: #1e3a8a; }
.pt-status-UnderReview { background: #fef3c7; color: #78350f; }
.pt-status-Accepted    { background: #dcfce7; color: #064e3b; }
.pt-status-Enrolled    { background: #bbf7d0; color: #064e3b; }
.pt-status-Rejected    { background: #fecaca; color: #7f1d1d; }
.pt-status-Withdrawn   { background: #e5e7eb; color: #6b7280; }
.pt-status-Pending     { background: #fef3c7; color: #78350f; }
.pt-status-Passed      { background: #dcfce7; color: #064e3b; }
.pt-status-Failed      { background: #fecaca; color: #7f1d1d; }

/* ---------- Tabs ---------- */
.pt-tabs { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.25rem; border-bottom: 1px solid #e5e7eb; }
.pt-tabs li { padding: .5rem 0; }
.pt-tabs li a { color: var(--pt-muted); text-decoration: none; font-weight: 500; }
.pt-tabs li.active { border-bottom: 2px solid var(--pt-primary); }
.pt-tabs li.active a { color: var(--pt-primary); }

/* ---------- Mode badges ---------- */
.pt-mode {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}
.pt-mode-FaceToFace { background: #fed7aa; color: #7c2d12; }
.pt-mode-Online     { background: #dbeafe; color: #1e3a8a; }
.pt-mode-Home       { background: #ede9fe; color: #5b21b6; }

/* ---------- Level badges ---------- */
.pt-level {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}
.pt-level-Beginner    { background: #dcfce7; color: #064e3b; }
.pt-level-Intermediate{ background: #ede9fe; color: #5b21b6; }
.pt-level-Advanced    { background: #fee2e2; color: #7f1d1d; }

/* ---------- Teacher avatar ---------- */
.pt-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    margin-right: .35rem;
    vertical-align: middle;
}

/* ---------- Enrolment progress bar ---------- */
.pt-progress {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
    width: 80px;
}
.pt-progress-bar {
    height: 100%;
    background: #16a34a;
    border-radius: 3px;
}

/* ---------- Audit log card ---------- */
.pt-audit {
    background: #fef9c3;
    border-left: 4px solid #facc15;
    padding: .8rem 1rem;
    border-radius: .25rem;
}
.pt-audit h5 { color: #78350f; font-weight: 700; }
.pt-audit table { background: transparent; }

/* ---------- Profile photo thumbnail ---------- */
.pt-photo-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
}

/* ---------- Admission tier badges ---------- */
.pt-tier {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
}
.pt-tier-A { background: #dcfce7; color: #064e3b; }
.pt-tier-B { background: #fed7aa; color: #7c2d12; }
.pt-tier-C { background: #fecaca; color: #7f1d1d; }

/* ---------- Route preview banner ---------- */
.pt-route-banner {
    background: var(--pt-welcome-bg);
    border-left: 4px solid var(--pt-primary);
    color: var(--pt-primary-dark);
    padding: .65rem 1rem;
    border-radius: .25rem;
    font-size: .9rem;
}

/* ---------- Admissions pipeline stepper ---------- */
.pt-pipeline {
    display: flex;
    gap: .25rem;
    flex-wrap: wrap;
}
.pt-step {
    flex: 1 1 0;
    min-width: 90px;
    text-align: center;
    padding: .55rem .25rem;
    border-radius: .375rem;
    font-size: .85rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
}
.pt-step-done   { background: #16a34a; color: #fff; }
.pt-step-active { background: #2563eb; color: #fff; }
.pt-step-todo   { background: #f3f4f6; color: #6b7280; }

/* ---------- Footer ---------- */
.pt-footer {
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    color: var(--pt-muted);
    margin-top: 2rem;
    font-size: .85rem;
}
.pt-footer a { color: var(--pt-primary); text-decoration: none; }

/* =========================================================
   Admin portal layout — dropdown nav + toolbar
   ========================================================= */
.pt-admin-body { background: #fafbfd; }
.pt-admin-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.pt-admin-brand {
    display: flex; align-items: center; gap: .5rem;
    text-decoration: none; margin-right: .75rem;
}
.pt-admin-logo {
    width: 30px; height: 30px; border-radius: 50%;
    border: 2px solid #d94a3a; padding: 2px; background: #fff;
    box-sizing: content-box; object-fit: contain;
}
.pt-admin-brand-text strong {
    display: block; color: #1a2b4a; font-size: 12px; line-height: 1.05;
    white-space: nowrap;
}
.pt-admin-brand-text small {
    display: block; color: #6b7280; font-size: 8.5px;
    letter-spacing: .4px; margin-top: 2px;
}
.pt-admin-nav .navbar-nav .nav-link {
    color: #1d4ed8; font-weight: 500;
    font-size: .8rem;
    padding: .35rem .5rem;
    display: flex; align-items: center; gap: .2rem;
    white-space: nowrap;
}
.pt-admin-nav .navbar-nav .nav-link:hover,
.pt-admin-nav .navbar-nav .nav-link.active {
    color: #0f2966;
    border-bottom: 2px solid #1d4ed8;
    padding-bottom: calc(.35rem - 2px);
}
.pt-admin-nav .dropdown-menu {
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 10px rgba(0,0,0,.06);
    padding: .25rem 0; min-width: 190px;
    font-size: .8rem;
}
.pt-admin-nav .dropdown-item { color: #1d4ed8; padding: .4rem 1rem; }
.pt-admin-nav .dropdown-item:hover { background: #eff4ff; color: #0f2966; }

.pt-admin-toolbar { flex-shrink: 0; }
.pt-admin-toolbar .pt-admin-bell {
    font-size: 18px; color: #333; text-decoration: none;
    padding: .1rem .3rem; line-height: 1;
}
.pt-admin-toolbar .pt-admin-bell:hover { color: #1d4ed8; }
.pt-admin-toolbar .pt-admin-bell .badge {
    font-size: 11px; padding: 2px 6px;
    margin-top: 3px; margin-left: -6px;
}
.pt-admin-toolbar .pt-admin-user {
    border: 1px solid #d1d5db; background: #fff;
    padding: .3rem .65rem; border-radius: 999px;
    color: #1a2b4a; font-weight: 500;
    font-size: .85rem;
}
.pt-admin-toolbar .pt-admin-user::after { display: none; }
.pt-admin-toolbar .pt-admin-logout {
    color: #1d4ed8; font-weight: 500; text-decoration: none; padding: 0;
}

.pt-stat-card-lg {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: .9rem 1rem; text-align: center; min-height: 78px;
    display: flex; flex-direction: column; justify-content: center;
}
.pt-stat-card-lg .value {
    font-size: 24px; font-weight: 700; color: #1a2b4a; line-height: 1;
}
.pt-stat-card-lg .label {
    font-size: 10.5px; letter-spacing: .8px; color: #6b7280;
    text-transform: uppercase; margin-bottom: .3rem;
}
.pt-chart-panel {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 1rem 1.25rem;
}
.pt-chart-panel h5 {
    margin: 0 0 .75rem 0; color: #1a2b4a; font-weight: 600;
}
.pt-chart-holder {
    position: relative; width: 100%; height: 280px;
}
.pt-coming-soon {
    background: #fff; border: 1px dashed #cbd5e1; border-radius: 10px;
    padding: 3rem 2rem; text-align: center; color: #6b7280;
}
.pt-coming-soon h2 { color: #1a2b4a; margin-bottom: .5rem; }

/* ---- Class overview list ---- */
.pt-cls-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 1rem; margin-bottom: 1rem;
}
.pt-cls-count { color: var(--pt-primary-dark, #1a2b4a); font-weight: 700; }

.pt-cls-toolbar {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: .5rem .75rem; margin-bottom: .75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.02);
}
.pt-cls-tool {
    background: #fff; border: 1px solid #e2e8f0; color: #334155;
    font-size: .8rem; padding: .35rem .75rem;
    display: inline-flex; align-items: center; gap: .35rem;
    transition: background .15s, border-color .15s;
}
.pt-cls-tool:hover:not(:disabled) { background: #f8fafc; border-color: #cbd5e1; }
.pt-cls-tool:disabled { opacity: .45; }

.pt-cls-filter {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; margin-bottom: .75rem;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: .6rem .75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.02);
}
.pt-cls-filter-left { display: flex; align-items: center; gap: .5rem; flex-grow: 1; }
.pt-cls-filter-right { display: flex; align-items: center; gap: .5rem; }
.pt-cls-search { position: relative; flex-grow: 1; max-width: 320px; }
.pt-cls-search-icon {
    position: absolute; left: .6rem; top: 50%; transform: translateY(-50%);
    color: #94a3b8; font-size: .85rem; pointer-events: none;
}
.pt-cls-search .form-control { padding-left: 2rem; height: 32px; font-size: .85rem; }
.pt-cls-filter .form-select-sm { height: 32px; }

/* List table (no vertical grid, subtle row hovers) */
.pt-cls-list-wrap {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.02);
}
.pt-cls-list { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0; }
.pt-cls-list thead th {
    background: #f8fafc; color: #64748b;
    font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
    padding: .55rem .75rem; border-bottom: 1px solid #eef2f7;
    text-align: left;
}
.pt-cls-list tbody td {
    padding: .75rem; vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}
.pt-cls-list tbody tr.cls-row:hover td { background: #fafcff; }
.pt-cls-list tbody tr:last-child td { border-bottom: none; }

.pt-cls-swatch-cell {
    position: relative; padding-left: 1.25rem !important;
    white-space: nowrap;
}
.pt-cls-swatch {
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 5px;
}
.pt-cls-title {
    color: #1d4ed8; font-weight: 600; text-decoration: none;
}
.pt-cls-title:hover { color: #0f2966; text-decoration: none; }

.pt-cls-progress {
    height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden;
}
.pt-cls-progress-bar {
    height: 100%; background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 999px; transition: width .3s;
}
.pt-cls-status {
    display: inline-block; font-size: .72rem; font-weight: 600;
    padding: .2em .6em; border-radius: 999px;
}
.pt-cls-status-finished { background: #f1f5f9; color: #64748b; }
.pt-cls-status-upcoming { background: #fef3c7; color: #92400e; }

.pt-cls-students {
    display: inline-block; min-width: 32px;
    background: #1e293b; color: #fff; font-weight: 600;
    padding: .3em .7em; border-radius: 999px; font-size: .8rem;
}
.pt-cls-price { font-weight: 700; color: #0f172a; font-size: .95rem; }

.pt-cls-chevron {
    background: transparent; border: 1px solid transparent;
    color: #94a3b8; padding: .15rem .35rem; border-radius: 6px;
    cursor: pointer; transition: background .15s, color .15s;
}
.pt-cls-chevron:hover { background: #f1f5f9; color: #334155; }

/* Empty state */
.pt-cls-empty {
    background: #fff; border: 2px dashed #e2e8f0; border-radius: 10px;
    padding: 3rem 1.5rem; text-align: center;
}
.pt-cls-empty-icon { font-size: 42px; margin-bottom: .5rem; }
.pt-cls-empty h5 { color: #1a2b4a; margin-bottom: .35rem; }

/* ---- Add / Edit class form ---- */
.pt-form-wrap { max-width: 960px; margin: 0 auto; }
.pt-form-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}
.pt-form-section-head {
    display: flex; align-items: baseline; gap: 1rem;
    padding-bottom: .75rem; margin-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}
.pt-form-section-head h5 {
    margin: 0; color: #1a2b4a; font-weight: 600; font-size: 1rem;
    white-space: nowrap;
}
.pt-form-section-head p {
    margin: 0; color: #6b7280; font-size: .8rem;
}
.pt-form-section .form-label { font-weight: 500; font-size: .85rem; color: #334155; }
.pt-form-section .form-control, .pt-form-section .form-select { font-size: .9rem; }

/* ---- Booking settings ---- */
.pt-bkg-page { max-width: 1100px; margin: 0 auto; }
.pt-bkg-page .nav-pills .nav-link {
    color: #334155; font-weight: 500; text-align: left;
    border-radius: 6px; padding: .5rem .75rem; margin-bottom: .1rem;
}
.pt-bkg-page .nav-pills .nav-link.active { background: #1d4ed8; color: #fff; }
.pt-bkg-dot {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%;
    background: #cbd5e1;
}
.pt-bkg-dot.on { background: #22c55e; }

/* Yes/No pill toggle used on Configure Booking */
.pt-yn { display: inline-flex; border: 1px solid #d1d5db; border-radius: 6px; overflow: hidden; }
.pt-yn-btn {
    padding: .35rem 1rem; background: #fff; border: none; font-size: .85rem;
    cursor: pointer; color: #64748b;
}
.pt-yn-btn.on  { background: #22c55e; color: #fff; }
.pt-yn-btn.off { background: #1d4ed8; color: #fff; }

.pt-ai-hint {
    background: #fffbeb; border: 1px dashed #fbbf24; border-radius: 6px;
    padding: .75rem 1rem; margin-top: .5rem;
}
.pt-img-slot {
    width: 96px; height: 68px; background: #f1f5f9; border: 1px solid #e2e8f0;
    border-radius: 6px; display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: .8rem;
}

/* ---- Manage tags ---- */
.pt-mtags { max-width: 860px; margin: 0 auto; }
.pt-mtags-tabs .nav-link {
    color: #475569; font-weight: 500; padding: .45rem 1rem;
    border-radius: 999px; background: transparent;
    font-size: .85rem;
}
.pt-mtags-tabs .nav-link.active {
    background: #1d4ed8; color: #fff;
}
.pt-mtags-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
    overflow: hidden;
}
.pt-mtags-add {
    display: flex; gap: .5rem; padding: 1rem 1.25rem;
    border-bottom: 1px solid #eef2f7; background: #f8fafc;
}
.pt-mtags-add .form-control { max-width: 360px; }
.pt-mtags-list {}
.pt-mtags-row {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
}
.pt-mtags-row:last-child { border-bottom: none; }
.pt-mtags-row:hover { background: #f8fafc; }
.pt-mtags-actions { display: flex; gap: .35rem; align-items: center; }

/* ---- Class detail ---- */
.pt-cd-page { max-width: 1100px; margin: 0 auto; }
.pt-cd-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 1rem; padding: 1rem 1.25rem;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    border-left: 6px solid #94a3b8;
    box-shadow: 0 1px 2px rgba(0,0,0,.02);
}
.pt-cd-header-body h1 { margin: 0; font-size: 1.35rem; color: #0f172a; font-weight: 700; }
.pt-cd-header-actions {
    display: flex; gap: .35rem; flex-wrap: wrap;
    justify-content: flex-end;
}

.pt-cd-stat {
    background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: .5rem .9rem; min-width: 92px;
    display: flex; flex-direction: column; align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,.02);
}
.pt-cd-stat-icon { font-size: 14px; color: #64748b; line-height: 1; }
.pt-cd-stat-value { font-size: 1.1rem; font-weight: 700; color: #0f172a; line-height: 1; margin-top: .15rem; }
.pt-cd-stat-label { font-size: .6rem; color: #64748b; letter-spacing: .06em; text-transform: uppercase; margin-top: .2rem; }

.pt-cd-monthbar {
    display: flex; align-items: center; gap: .75rem;
    padding: .35rem 0 .5rem 0;
}
.pt-cd-monthbar strong { font-size: .95rem; color: #0f172a; min-width: 140px; text-align: center; }
/* Prev / Next at the first / last month: clearly greyed out, not-allowed cursor
   (pointer-events back on so the cursor shows; the click handlers guard the index). */
.pt-cd-monthbar .btn:disabled,
.pt-cd-monthbar .btn.disabled,
.pt-cd-monthbar .btn:disabled:hover,
.pt-cd-monthbar .btn.disabled:hover {
    background: #f1f5f9; color: #94a3b8; border-color: #e2e8f0;
    opacity: 1; cursor: not-allowed; pointer-events: auto;
}
.pt-cd-dates {
    display: flex; gap: .5rem; overflow-x: auto;
    padding: .25rem 0;
}
.pt-cd-date {
    flex: 0 0 auto; min-width: 90px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    padding: .5rem .75rem; text-align: center; cursor: pointer;
    transition: border-color .15s, transform .1s;
}
.pt-cd-date:hover { border-color: #94a3b8; }
.pt-cd-date-active { border-color: #1d4ed8; border-width: 2px; padding: calc(.5rem - 1px) calc(.75rem - 1px); }
.pt-cd-date-past  { background: #f8fafc; }
.pt-cd-date-disabled {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}
.pt-cd-date-disabled .pt-cd-date-day,
.pt-cd-date-disabled .pt-cd-date-month,
.pt-cd-date-disabled .pt-cd-date-wd { color: #991b1b; }
.pt-cd-student-row-disabled { background: #fef2f2; }
.pt-cd-student-row-disabled .pt-cd-student-name { color: #94a3b8; }

.pt-cd-scope {
    border: 1px solid #e5e7eb; border-radius: 8px;
    padding: .75rem 1rem; padding-left: 2.5rem;
    transition: border-color .15s, background .15s;
}
.pt-cd-scope.selected {
    border-color: #1d4ed8; background: #eff6ff;
}
.pt-cd-scope .form-check-input { margin-left: -1.5rem; }
.pt-cd-scope-disabled { opacity: .55; cursor: not-allowed; }

/* ⋮ button in the register — no dropdown caret */
.dropdown-toggle-nocaret::after { display: none !important; }
.pt-cd-date-month { font-size: .65rem; color: #64748b; letter-spacing: .06em; }
.pt-cd-date-day   { font-size: 1.25rem; font-weight: 700; color: #0f172a; line-height: 1; }
.pt-cd-date-wd    { font-size: .65rem; color: #64748b; letter-spacing: .06em; }
.pt-cd-date-count { margin-top: .15rem; font-size: .7rem; }

.pt-cd-register {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.02);
}
.pt-cd-register-head {
    display: flex; align-items: center; gap: .5rem;
    background: #f8fafc; padding: .65rem 1rem;
    border-bottom: 1px solid #eef2f7;
}
.pt-cd-student-row {
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background .1s;
}
.pt-cd-student-row:hover { background: #fafcff; }
.pt-cd-student-row:last-child { border-bottom: none; }
.pt-cd-student-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    color: #fff; font-weight: 700; font-size: .75rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.pt-cd-student-name { color: #1d4ed8; text-decoration: none; font-weight: 500; }
.pt-cd-student-name:hover { text-decoration: none; }
.pt-cd-new {
    background: #f1f5f9; color: #64748b;
    font-size: .65rem; font-weight: 600;
    padding: .2em .6em; border-radius: 999px;
}
.pt-cd-empty {
    background: #fff; border: 2px dashed #e2e8f0; border-radius: 10px;
    padding: 2rem 1.5rem; text-align: center; color: #64748b;
}

/* ---- Class calendar ---- */
.pt-cal-frame {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    overflow: hidden;
}
.pt-cal-week td { height: 46px; padding: 0; position: relative; vertical-align: top; }
.pt-cal-week th { background: #f8fafc; }
.pt-cal-slot { border-color: #eef2f7 !important; }
.pt-cal-block {
    position: absolute; left: 3%; right: 3%;
    color: #fff; padding: 4px 6px; border-radius: 4px;
    font-size: 11px; line-height: 1.2; cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,.15);
    overflow: hidden;
}
.pt-cal-block:hover { filter: brightness(1.08); }
.pt-cal-block-disabled {
    opacity: .55; text-decoration: line-through;
    background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.15), rgba(0,0,0,.15) 4px, transparent 4px, transparent 8px);
}
.pt-cal-month td.pt-cal-mcell { height: 100px; vertical-align: top; }
.pt-cal-chip {
    color: #fff; padding: 1px 5px; margin-top: 2px; border-radius: 3px;
    font-size: 11px; cursor: pointer; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.pt-cal-row {
    display: flex; align-items: center; gap: .75rem;
    padding: .5rem .25rem; border-bottom: 1px solid #eef2f7; cursor: pointer;
}
.pt-cal-row:hover { background: #f8fafc; }
.pt-cal-row:last-child { border-bottom: none; }
.pt-cal-swatch { width: 6px; height: 32px; border-radius: 3px; }

/* ---- Student overview ---- */
.pt-so-alpha { font-size: .95rem; }
.pt-so-alpha-pill {
    display: inline-block; padding: .1rem .55rem; margin: 0 .05rem;
    color: #1d4ed8; border-radius: 999px; line-height: 1.6;
}
.pt-so-alpha-pill:hover { background: #eef2ff; }
.pt-so-alpha-pill.active { background: #dbeafe; color: #0f2966; font-weight: 600; }

.pt-so-pager { list-style: none; padding: 0; display: inline-flex; gap: .35rem; }
.pt-so-pager a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; padding: 0 .6rem;
    border: 1px solid #d1d5db; border-radius: 6px;
    color: #1f2937; font-size: .9rem; background: #fff;
}
.pt-so-pager a:hover { background: #f3f4f6; }
.pt-so-pager a.active { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }

.pt-so-filter { max-width: 260px; text-align: center; }
.pt-so-status { min-width: 160px; }

.pt-so-table-wrap { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.pt-so-table { width: 100%; border-collapse: collapse; }
.pt-so-table thead th {
    background: #f9fafb; color: #6b7280; font-weight: 600; font-size: .8rem;
    text-transform: none; padding: .6rem .9rem; border-bottom: 1px solid #e5e7eb;
    text-align: left;
}
.pt-so-table tbody td {
    padding: .65rem .9rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle;
}
.pt-so-table tbody tr:last-child td { border-bottom: none; }
.pt-so-table tbody tr:hover { background: #f8fafc; }

.pt-so-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    color: #fff; font-weight: 700; font-size: .7rem; flex-shrink: 0;
}
.pt-so-edit-hint { font-size: .8rem; cursor: pointer; opacity: .7; }
.pt-so-edit-hint:hover { opacity: 1; }
.pt-so-name { color: #1d4ed8; font-weight: 500; }

.pt-so-contact-email { color: #1d4ed8; }

.pt-so-tag-add {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 22px; border: 1px solid #d1d5db; background: #fff;
    color: #6b7280; font-weight: 600; border-radius: 4px; padding: 0;
    line-height: 1; cursor: pointer; margin-right: .35rem;
}
.pt-so-tag-add:hover { background: #f3f4f6; color: #1f2937; }
.pt-so-tag {
    display: inline-block; background: #f1f5f9; color: #475569;
    font-size: .72rem; font-weight: 500; padding: .15rem .5rem;
    border-radius: 999px; margin-right: .25rem;
}

.pt-so-film-yes, .pt-so-film-no {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 6px; font-weight: 700; font-size: .85rem;
}
.pt-so-film-yes { background: #dcfce7; color: #16a34a; }
.pt-so-film-no  { background: #fee2e2; color: #dc2626; }

.pt-so-actions { display: inline-flex; gap: .25rem; }
.pt-so-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 28px; border: 1px solid #e5e7eb; border-radius: 6px;
    color: #64748b; background: #fff; text-decoration: none; font-size: .85rem;
}
.pt-so-icon-btn:hover { background: #f8fafc; color: #1d4ed8; border-color: #cbd5e1; }

/* ---- Consent list on New Student ---- */
.pt-consent-list { max-width: 720px; }
.pt-consent-row {
    display: grid; grid-template-columns: 1fr 150px 32px;
    align-items: center; gap: .75rem;
    padding: .35rem 0; border-bottom: 1px solid #f1f5f9;
}
.pt-consent-row:last-child { border-bottom: none; }
.pt-consent-label { margin: 0; font-weight: 600; color: #1f2937; }
.pt-consent-select { padding-top: .2rem; padding-bottom: .2rem; }
.pt-consent-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 28px; border-radius: 6px;
    color: #9ca3af; font-weight: 700; background: #f9fafb;
}
.pt-consent-icon.yes { background: #dcfce7; color: #16a34a; }
.pt-consent-icon.no  { background: #fee2e2; color: #dc2626; }

/* ---- Student overview extras (DD, medical, consent inline icons) ---- */
.pt-so-avatar-wrap { position: relative; display: inline-block; }
.pt-so-medical-badge {
    position: absolute; top: -6px; right: -8px;
    width: 18px; height: 18px; border-radius: 4px;
    background: #dc2626; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .65rem; border: 1.5px solid #fff; cursor: help;
    line-height: 1;
}

/* Consent icons — only shown when NOT consented, styled as prohibition (red-slash) */
.pt-so-consent-row { display: inline-flex; gap: .2rem; }
.pt-so-consent-no {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid #dc2626;
    background: #fef2f2;
    font-size: .72rem; line-height: 1; cursor: help;
}
.pt-so-consent-no::after {
    /* the red diagonal slash */
    content: ''; position: absolute; inset: 0; margin: auto;
    width: 24px; height: 2px; background: #dc2626;
    transform: rotate(-45deg); border-radius: 2px;
}

.pt-so-dd {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 20px; border-radius: 12px;
    background: #f3f4f6; color: #9ca3af; font-weight: 600; font-size: .85rem;
}
.pt-so-dd.off { background: #f3f4f6; color: #cbd5e1; }
.pt-so-balance { font-variant-numeric: tabular-nums; color: #1f2937; }

/* ---- Manage students modal ---- */
.pt-ms-pills {
    display: flex; flex-wrap: wrap; gap: .35rem;
    border: 1px solid #cfe0ff; border-radius: 8px;
    padding: .5rem; min-height: 44px; background: #f5f8ff;
}
.pt-ms-pill {
    display: inline-flex; align-items: center; gap: .3rem;
    background: #eef4ff; color: #1d4ed8; font-weight: 500;
    padding: .15rem .55rem .15rem .3rem; border-radius: 999px;
    font-size: .85rem;
}
.pt-ms-pill-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: #cbd5e1; color: #0f172a; font-size: .65rem; font-weight: 700;
}
.pt-ms-pill-x {
    background: none; border: none; padding: 0 .1rem; color: #64748b;
    font-size: 1rem; line-height: 1; cursor: pointer;
}
.pt-ms-pill-x:hover { color: #dc2626; }
.pt-ms-newstudent {
    background: #f3f4f6; color: #1d4ed8; border-radius: 6px;
    text-decoration: none; font-weight: 500;
}
.pt-ms-newstudent:hover { background: #e5e7eb; }

.pt-ms-scope { display: flex; flex-direction: column; gap: .5rem; }
.pt-ms-scope-opt {
    border: 1px solid #e5e7eb; border-radius: 8px; padding: .6rem .9rem;
    cursor: pointer; display: flex; align-items: center;
}
.pt-ms-scope-opt.selected { border-color: #1d4ed8; background: #eef4ff; }

/* ---- Sign-in landing (Home/Index) ---- */
.pt-signin-wrap { padding: 2rem 0; min-height: 70vh; }
.pt-signin-grid {
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem;
    max-width: 1100px; margin: 0 auto;
}
@media (max-width: 900px) { .pt-signin-grid { grid-template-columns: 1fr; gap: 2rem; } }

.pt-signin-logo { width: 64px; height: auto; }
.pt-signin-brand { font-size: 1.4rem; font-weight: 700; color: #0f2966; line-height: 1.1; }
.pt-signin-tagline { font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
.pt-signin-headline { font-size: 2rem; font-weight: 700; color: #0f172a; margin: 0 0 .5rem; }

.pt-signin-cta {
    background: #eef4ff; border: 1px solid #cfe0ff; border-radius: 12px;
    padding: 1rem 1.25rem; margin: 1rem 0 1.5rem;
}
.pt-signin-cta-label { font-weight: 600; margin-bottom: .35rem; color: #0f2966; }
.pt-signin-cta-badge {
    background: #1d4ed8; color: #fff; font-size: .68rem; font-weight: 700;
    padding: .1rem .45rem; border-radius: 4px; letter-spacing: .05em;
}
.pt-signin-cta-body { color: #334155; }

.pt-signin-contact { border-top: 1px solid #e5e7eb; padding-top: 1rem; margin-top: 1rem; }
.pt-signin-contact a { color: #334155; }
.pt-signin-contact a:hover { color: #1d4ed8; }

.pt-signin-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 1.75rem 1.5rem; box-shadow: 0 4px 24px rgba(15, 41, 102, .06);
    max-width: 420px;
}
.pt-signin-card h2 { font-weight: 700; color: #0f172a; }

/* ---- Student detail (profile card + tabs) ---- */
.pt-sd-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; }
.pt-sd-card-head {
    background: #f9fafb; border-bottom: 1px solid #e5e7eb;
    padding: .75rem 1rem; border-top-left-radius: 10px; border-top-right-radius: 10px;
}
.pt-sd-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 72px; height: 72px; border-radius: 50%;
    color: #fff; font-weight: 700; font-size: 1.5rem;
}
.pt-sd-avatar-sm {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    color: #fff; font-weight: 700; font-size: .7rem;
}
.pt-sd-section-hd {
    color: #6b7280; font-size: .8rem; text-transform: none;
    margin-top: 1rem; padding: .35rem 0; border-top: 1px solid #f1f5f9;
    text-align: center;
}
.pt-sd-fields { display: grid; grid-template-columns: 40% 60%; row-gap: .25rem; column-gap: .75rem; margin: 0; }
.pt-sd-fields dt { color: #4b5563; font-weight: 600; text-align: right; font-size: .85rem; }
.pt-sd-fields dd { margin: 0; font-size: .9rem; }
.pt-sd-tab-body { background: #fff; border: 1px solid #dee2e6; border-top: none;
    border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }
.pt-sd-tab-body table { margin-bottom: 0; }


/* ---- Messages (overview / detail / compose) ---- */
.pt-msg-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.pt-msg-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%; background: #e0ecff; color: #1d4ed8;
    font-size: .85rem; flex-shrink: 0;
}
.pt-msg-icon.lg { width: 44px; height: 44px; font-size: 1.2rem; }
.pt-msg-scheduled { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 10px; padding: .85rem 1rem; margin-bottom: 1rem; }
.pt-msg-scheduled .pt-so-table-wrap { border-color: #fde68a; }
.pt-msg-badge-hw { background: #0b7285; color: #fff; }
.pt-msg-to { color: #1d4ed8; font-size: .82rem; }
.pt-msg-row { cursor: pointer; }
.pt-msg-chip {
    display: inline-flex; align-items: center; gap: .4rem; background: #eef2ff; color: #1e3a8a;
    border-radius: 999px; padding: .2rem .55rem .2rem .25rem; margin: 0 .3rem .35rem 0; font-size: .82rem;
}
.pt-msg-chip.warn { background: #fef3c7; color: #92400e; }
.pt-msg-chip.via-class { background: #f1f5f9; color: #334155; }
.pt-msg-chip.via-class.warn { background: #fef3c7; color: #92400e; }
.pt-msg-chip .pt-msg-chip-mail { color: #64748b; font-size: .78rem; }
.pt-msg-chip .pt-so-avatar { width: 22px; height: 22px; font-size: .6rem; }
.pt-msg-chip button { border: 0; background: transparent; color: #64748b; padding: 0 .15rem; line-height: 1; }
.pt-msg-chip button:hover { color: #dc2626; }
.pt-msg-form { display: grid; grid-template-columns: 170px 1fr; gap: .9rem 1.2rem; align-items: start; }
.pt-msg-form > label { font-weight: 700; padding-top: .45rem; text-align: right; margin: 0; }
@media (max-width: 768px) {
    .pt-msg-form { grid-template-columns: 1fr; }
    .pt-msg-form > label { text-align: left; padding-top: 0; }
}
.pt-msg-to-box { border: 1px solid #d1d5db; border-radius: 8px; padding: .45rem; background: #fff; }
.pt-msg-to-list { max-height: 260px; overflow: auto; }
.pt-msg-suggest { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: #fff;
    border: 1px solid #d1d5db; border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.12); max-height: 300px; overflow: auto; }
.pt-msg-suggest button { display: flex; width: 100%; text-align: left; border: 0; background: #fff; padding: .45rem .7rem; gap: .5rem; align-items: center; }
.pt-msg-suggest button:hover, .pt-msg-suggest button.active { background: #eff6ff; }
.pt-msg-togglebox { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: .75rem .9rem; margin-top: .5rem; }
.pt-msg-editor .ql-container { min-height: 220px; font-size: .95rem; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.pt-msg-editor .ql-toolbar { border-top-left-radius: 8px; border-top-right-radius: 8px; background: #f9fafb; }
.pt-msg-recent { position: absolute; z-index: 20; bottom: 100%; left: 0; width: min(520px, 90vw); background: #fff;
    border: 1px solid #d1d5db; border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.15); padding: .5rem; }
.pt-msg-recent-list { max-height: 300px; overflow: auto; }
.pt-msg-recent-list button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: .45rem .5rem; border-radius: 6px; }
.pt-msg-recent-list button:hover { background: #f1f5f9; }
.pt-msg-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; border-top: 1px solid #e5e7eb; padding-top: 1rem; margin-top: 1.2rem; }
.pt-msg-send { background: #22a45d; border-color: #22a45d; color: #fff; }
.pt-msg-send:hover { background: #1b8a4e; border-color: #1b8a4e; color: #fff; }
.pt-msg-body { font-size: .95rem; line-height: 1.6; overflow-wrap: anywhere; }
.pt-msg-body p { margin: 0 0 .6rem; }
.pt-msg-activity-item { padding: .45rem 0; border-bottom: 1px dashed #eef2f7; }
.pt-msg-activity-item:last-child { border-bottom: 0; }

/* ---- Messages: toolbar / pager / scheduled list ---- */
.pt-msg-toolbar { display: grid; grid-template-columns: 1fr minmax(260px, 420px) 1fr; gap: .75rem; align-items: center; }
@media (max-width: 768px) { .pt-msg-toolbar { grid-template-columns: 1fr; } }
.pt-msg-filter-form { position: relative; margin: 0; }
.pt-msg-filter { padding-left: 2.1rem; height: 38px; }
.pt-msg-filter-icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%) rotate(-45deg); color: #64748b; pointer-events: none; }
.pt-msg-pager { list-style: none; padding: 0; display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.pt-msg-pager a, .pt-msg-pager span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 .55rem;
    border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; color: #1f2937; text-decoration: none; font-size: .9rem;
}
.pt-msg-pager span { border-color: transparent; background: transparent; }
.pt-msg-pager a:hover { background: #f3f4f6; }
.pt-msg-pager a.active { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.pt-msg-pager a.disabled { color: #cbd5e1; pointer-events: none; }
.pt-msg-sched-table tbody tr { border-left: 3px solid #f59e0b; }
.pt-msg-clock {
    display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
    background: #f5ad4e; color: #fff; font-size: 1.05rem;
}
.pt-msg-cancel {
    width: 22px; height: 22px; border-radius: 50%; border: 0; background: #dc3545; color: #fff;
    font-size: .7rem; line-height: 22px; padding: 0;
}
.pt-msg-cancel:hover { background: #b02a37; }

/* ---- Messages: class picker (compose) ---- */
.pt-msg-classdd > .btn { min-width: 240px; text-align: left; }
.pt-msg-classdd-menu { width: min(560px, 92vw); overflow: hidden; }
.pt-msg-classlist { max-height: 380px; overflow-y: auto; padding: .25rem 0; }
.pt-msg-classgroup + .pt-msg-classgroup { border-top: 1px solid #e5e7eb; margin-top: .25rem; padding-top: .25rem; }
.pt-msg-classgroup-title { color: #6b7280; font-size: .8rem; padding: .35rem .9rem .15rem; }
.pt-msg-classitem { display: flex; align-items: center; gap: .5rem; padding: .3rem .9rem; margin: 0; cursor: pointer; }
.pt-msg-classitem:hover { background: #f1f5f9; }
.pt-msg-classitem.selected { background: #e7f1ff; }
.pt-msg-classname { display: block; color: #1f2937; }
.pt-msg-classmeta { display: block; color: #6b7280; font-size: .78rem; }
.pt-msg-classtick { color: #1d4ed8; font-weight: 700; visibility: hidden; }
.pt-msg-classitem.selected .pt-msg-classtick { visibility: visible; }

/* ---- Messages: team members picker (Advanced options) ---- */
.pt-msg-teamdd-menu { width: min(340px, 92vw); overflow: hidden; }
.pt-msg-teamdd .pt-msg-classitem { padding: .35rem .9rem; }
.pt-msg-classitem.pt-msg-noemail { color: #9ca3af; cursor: not-allowed; }
.pt-msg-classitem.pt-msg-noemail:hover { background: transparent; }

.pt-msg-count { background: #2f80c3; color: #fff; font-weight: 600; }

/* ===== Teacher module (dashboard + invoices) ===== */
/* Page subtitle under each teacher page title — the prototype's red ".sub". */
.pt-tsub { color: #d93025; font-weight: 600; }
.pt-tdash-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
@media (max-width: 768px) { .pt-tdash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pt-tdash-tile { background: #fff; border: 1px solid #e5e7eb; border-top: 4px solid var(--tile, #94a3b8); border-radius: 10px; padding: .9rem 1rem; }
.pt-tdash-tile .pt-tdash-num { color: var(--tile, #334155); }
.pt-tdash-num { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.pt-tdash-lbl { color: #64748b; font-size: .85rem; }
.pt-tdash-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 1rem 1.15rem; height: 100%; }
.pt-tdash-card hr { margin: .7rem 0; }
.pt-tdash-online { background: #ede9fe; color: #6d28d9; }
.pt-tdash-f2f { background: #dcfce7; color: #15803d; }
.pt-tdash-today { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem 0; border-bottom: 1px dashed #eef2f7; }
.pt-tdash-today a { font-weight: 600; text-decoration: none; }
.pt-tdash-today span { color: #64748b; font-size: .9rem; white-space: nowrap; }
.pt-tdash-today.disabled a, .pt-tdash-today.disabled span { color: #b91c1c; text-decoration: line-through; }

.pt-tinv-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.pt-tinv-toolbar { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .7rem 1rem; border-bottom: 1px solid #eef2f7; background: #f9fafb; }
.pt-tinv-search { display: flex; align-items: center; gap: .4rem; border: 1px solid #d1d5db; border-radius: 8px; padding: .25rem .6rem; background: #fff; min-width: 240px; }
.pt-tinv-search input { border: 0; outline: 0; width: 100%; background: transparent; }
.pt-tinv-tabsrow { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .6rem 1rem; border-bottom: 1px solid #eef2f7; }
.pt-tinv-tabs { display: flex; gap: .25rem; flex-wrap: wrap; }
.pt-tinv-tabs a { padding: .3rem .75rem; border-radius: 999px; color: #475569; text-decoration: none; font-size: .9rem; border: 1px solid transparent; }
.pt-tinv-tabs a:hover { background: #f1f5f9; }
.pt-tinv-tabs a.active { background: #1d4ed8; color: #fff; }
.pt-tinv-tabcount { display: inline-block; min-width: 1.4em; padding: 0 .35em; border-radius: 999px; background: #e5e7eb; color: #374151; font-size: .75rem; text-align: center; }
.pt-tinv-tabcount.warn { background: #fee2e2; color: #b91c1c; }
.pt-tinv-tabs a.active .pt-tinv-tabcount { background: rgba(255,255,255,.25); color: #fff; }
.pt-tinv-row { display: grid; grid-template-columns: 24px 110px 1fr 170px 170px; gap: .8rem; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.pt-tinv-row:hover { background: #f8fafc; }
.pt-tinv-row.cancelled { opacity: .6; }
@media (max-width: 768px) { .pt-tinv-row { grid-template-columns: 24px 1fr; } .pt-tinv-row > :nth-child(n+3) { grid-column: 2; } }
.pt-tinv-date { color: #64748b; font-size: .9rem; }
.pt-tinv-no { font-weight: 700; color: #1f2937; text-decoration: none; }
.pt-tinv-amount { text-align: right; }
.pt-tinv-badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.pt-tinv-badge-draft { background: #e5e7eb; color: #374151; }
.pt-tinv-badge-due { background: #fef3c7; color: #92400e; }
.pt-tinv-badge-overdue { background: #fee2e2; color: #b91c1c; }
.pt-tinv-badge-paid { background: #dcfce7; color: #15803d; }
.pt-tinv-badge-cancelled { background: #f1f5f9; color: #64748b; text-decoration: line-through; }

.pt-tinv-sheet { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 1.25rem 1.4rem; }
.pt-tinv-title { font-size: 1.9rem; font-weight: 700; border: 0; border-bottom: 1px dashed #cbd5e1; outline: 0; max-width: 320px; background: transparent; }
.pt-tinv-meta { display: grid; grid-template-columns: auto 220px; gap: .4rem .7rem; align-items: center; }
.pt-tinv-meta label { font-size: .85rem; color: #475569; text-align: right; margin: 0; }
.pt-tinv-label { font-weight: 700; font-size: .85rem; color: #334155; margin-bottom: .25rem; }
.pt-tinv-party { line-height: 1.45; }
.pt-tinv-lines-head, .pt-tinv-line { display: grid; grid-template-columns: 1fr 190px 150px 120px 48px; gap: .6rem; align-items: start; }
.pt-tinv-lines-head { color: #64748b; font-size: .8rem; font-weight: 600; text-transform: uppercase; padding-bottom: .35rem; border-bottom: 1px solid #e5e7eb; margin-bottom: .5rem; }
.pt-tinv-line { padding: .45rem 0; border-bottom: 1px dashed #eef2f7; }
@media (max-width: 768px) { .pt-tinv-line { grid-template-columns: 1fr 1fr; } }
.pt-tinv-kind { display: inline-block; font-size: .7rem; color: #64748b; background: #f1f5f9; border-radius: 4px; padding: 0 .35rem; margin-bottom: .2rem; }
.pt-tinv-lineamt { padding-top: .35rem; font-weight: 600; }
.pt-tinv-totals { min-width: min(420px, 100%); }
.pt-tinv-trow { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .3rem 0; }
.pt-tinv-total { border-top: 1px solid #e5e7eb; margin-top: .2rem; padding-top: .5rem; font-size: 1.05rem; }
.pt-tinv-balance { background: #f1f5f9; border-radius: 6px; padding: .45rem .6rem; }
.pt-tinv-avatar { width: 72px; height: 72px; border-radius: 50%; background: #e0e7ff; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.pt-tinv-doc { background: #fff; border: 1px solid #e5e7eb; border-top: 6px solid #1d4ed8; border-radius: 6px; padding: 2rem 2.4rem; max-width: 940px; margin: 0 auto; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.pt-tinv-doc-title { font-size: 1.8rem; font-weight: 700; }
.pt-tinv-doc-table thead th { background: #f8fafc; font-size: .85rem; color: #475569; }

/* ---- Teacher module: Students, Profile, Communications, New message ---- */
.pt-tsect-head { padding: .7rem 1.1rem; background: #f3f5f8; font-weight: 700; font-size: 1.05rem; border-radius: 10px 10px 0 0; }
.pt-trow { display: flex; align-items: center; gap: 1rem; padding: .45rem 0; }
.pt-trow > label { width: 160px; flex: 0 0 160px; font-weight: 600; margin: 0; }
.pt-trow > .form-control { flex: 1; }
.pt-tdbs-soon { background: #e0a534; color: #fff; }
.pt-tdbs-warn { display: flex; gap: .45rem; align-items: flex-start; background: #fff7ed; color: #92400e; font-size: .85rem; padding: .6rem 1rem; border-radius: 0 0 10px 10px; }
.pt-tlock-note { display: flex; gap: .45rem; align-items: flex-start; background: #f1f5f9; color: #64748b; font-size: .85rem; padding: .6rem 1rem; border-radius: 0 0 10px 10px; }
.pt-tinfo { display: flex; gap: .45rem; align-items: flex-start; background: #eef4ff; border: 1px solid #cddcff; color: #1e3a8a; font-size: .88rem; border-radius: .5rem; padding: .6rem .8rem; }
.pt-thidden { background: #f8fafc; border: 1px dashed #d8dee8; border-radius: .5rem; padding: .6rem .8rem; color: #64748b; font-size: .85rem; }
.pt-tcomm-row { cursor: pointer; }
.pt-tcover { background: #fef3c7; color: #92400e; }
/* Class Detail title doubles as the class switcher: looks like the h1, only a caret gives it away. */
.pt-tclass-switch {
    font: inherit; color: inherit; background: #f5f8ff; border: 2px solid #93c5fd; border-radius: 10px;
    padding: .15rem 2.1rem .15rem .6rem; margin: 0; width: auto; max-width: 100%;
    cursor: pointer; appearance: none; -webkit-appearance: none; transition: border-color .15s, box-shadow .15s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231d4ed8' stroke-width='2' d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .6rem center; background-size: 1.1rem;
}
.pt-tclass-switch:hover { border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29, 78, 216, .15); }
.pt-tclass-switch:focus { outline: 0; border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29, 78, 216, .25); }
.pt-tclass-switch option, .pt-tclass-switch optgroup { font-size: 1rem; font-weight: 400; color: #0f172a; }
.pt-treg-head { padding: .55rem 1rem; background: #f3f5f8; font-weight: 700; color: #374151; border-radius: 10px 10px 0 0; }
.pt-treg-head.pt-treg-visit { background: #fffbeb; color: #b45309; }
.pt-treg-table th:nth-child(n+2), .pt-treg-table td:nth-child(n+2) { white-space: nowrap; }
@media (max-width: 575.98px) {
    .pt-treg-table th, .pt-treg-table td { padding-left: .4rem; padding-right: .4rem; }
}
/* Register radios: bigger, with a clear ring so unselected ones are obvious; colour-coded when chosen. */
.pt-treg-table input[type="radio"] {
    width: 1.35rem; height: 1.35rem; margin: 0; cursor: pointer;
    border: 2px solid #94a3b8; background-color: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
}
.pt-treg-table input[type="radio"]:hover { border-color: #1d4ed8; }
.pt-treg-table input[type="radio"]:focus { box-shadow: 0 0 0 3px rgba(29, 78, 216, .25); }
.pt-treg-table input[type="radio"][value="present"]:checked { background-color: #16a34a; border-color: #16a34a; }
.pt-treg-table input[type="radio"][value="absent"]:checked  { background-color: #dc2626; border-color: #dc2626; }
.pt-treg-table input[type="radio"][value="late"]:checked    { background-color: #d97706; border-color: #d97706; }
.pt-treg-table input[type="radio"]:disabled { opacity: .55; cursor: not-allowed; }
.pt-tclass-note { padding: .55rem 0; border-bottom: 1px dashed #eef2f7; }
.pt-tclass-note:last-child { border-bottom: none; }
.pt-ttt-day { border-bottom: 1px solid #e5e7eb; }
.pt-ttt-day:last-child { border-bottom: none; }
.pt-ttt-dayhead { background: #f3f5f8; padding: .5rem 1rem; font-weight: 700; color: #374151; }
.pt-ttt-day:first-child .pt-ttt-dayhead { border-radius: 10px 10px 0 0; }
.pt-ttt-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .6rem 1rem; border-top: 1px solid #f1f5f9; }
.pt-ttt-time { color: #475569; font-size: .85rem; white-space: nowrap; }
.pt-ttt-row.disabled a, .pt-ttt-row.disabled .pt-ttt-time { color: #b91c1c; text-decoration: line-through; }
.pt-tcomm-row:hover { background: #f8fafc; }
.pt-tcomm-icon { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; background: #0f766e; color: #fff; display: inline-grid; place-items: center; font-size: .8rem; }
.pt-tcomm-subject { color: #1f2937; font-weight: 500; text-decoration: none; }
.pt-tcomm-subject.is-new { font-weight: 700; }
.pt-tcomm-subject:hover { text-decoration: underline; }
.pt-tcompose { display: grid; grid-template-columns: 130px 1fr; gap: .9rem; align-items: start; }
.pt-tcompose > label { font-weight: 700; padding-top: .45rem; margin: 0; }
.pt-tcompose .ql-container { min-height: 180px; font-size: 1rem; }
.pt-tstu-pick { max-height: 300px; overflow: auto; border: 1px solid #e2e8f0; border-radius: .5rem; padding: .3rem .8rem; }
.pt-tstu-group-head { font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #64748b; margin-top: .5rem; }
.pt-tstu-tag { background: #e0e7ff; color: #3730a3; font-weight: 600; margin-right: .2rem; }
.pt-tatt-yes { background: #dcfce7; color: #166534; font-weight: 500; margin: 0 .2rem .2rem 0; }
.pt-tatt-no { background: #fee2e2; color: #991b1b; font-weight: 500; margin: 0 .2rem .2rem 0; }
.pt-tfb-body, .pt-tmsg-body { line-height: 1.6; overflow-wrap: anywhere; }
.pt-tmsg-body img { max-width: 100%; height: auto; }
@media (max-width: 640px) {
    .pt-tcompose { grid-template-columns: 1fr; gap: .35rem; }
    .pt-tcompose > label { padding-top: .6rem; }
    .pt-trow { flex-direction: column; align-items: stretch; gap: .3rem; }
    .pt-trow > label { width: auto; flex: none; }
}
@media (max-width: 575.98px) {
    /* Phone: keep the teacher header within the screen — the name pill is dropped, Logout stays. */
    .pt-teacher-body .pt-admin-user { display: none; }
}

/* ---- Teacher module: Feedback & Reports ---- */
.pt-tstat { border-top: 4px solid; }
.pt-trating { color: #fff; font-weight: 600; }
.pt-trating-wide { min-width: 120px; text-align: center; }
.pt-trate-pick { display: flex; flex-wrap: wrap; gap: .35rem; }
.pt-trate-pick label { margin: 0; cursor: pointer; }
.pt-trate-pick input { position: absolute; opacity: 0; pointer-events: none; }
.pt-trate-pick span { display: inline-block; border: 1px solid var(--rc); color: var(--rc); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; font-weight: 600; background: #fff; }
.pt-trate-pick input:checked + span { background: var(--rc); color: #fff; }
.pt-trate-pick input:focus-visible + span { outline: 2px solid #1d4ed8; outline-offset: 2px; }
.pt-trate-pick.sm span { padding: .2rem .6rem; font-size: .78rem; }
.pt-tcrit { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .55rem 0; border-bottom: 1px solid #f1f5f9; }
.pt-tcrit:last-child { border-bottom: 0; }
.pt-tcrit-label { flex: 1; min-width: 220px; }
.pt-tdots { display: inline-flex; gap: 4px; }
.pt-tdots span { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.pt-tthread { border: 1px solid #e2e8f0; border-radius: .5rem; margin-bottom: .45rem; overflow: hidden; }
.pt-tthread-head { display: flex; gap: .6rem; align-items: center; width: 100%; border: 0; background: #f8fafc; padding: .55rem .8rem; }
.pt-tthread-head .min-w-0 { min-width: 0; }
.pt-tmsg { border: 1px solid; border-radius: .6rem; padding: .55rem .8rem; margin: .4rem 0; }
.pt-tmsg.parent { background: #eef4ff; border-color: #cddcff; }
.pt-tmsg.teacher { background: #ecfdf5; border-color: #a7f3d0; }
.pt-tmsg.admin { background: #f5f3ff; border-color: #ddd6fe; }
.pt-tmsg.internal { background: #fffbeb; border-color: #fde68a; }
.pt-rc-doc { max-width: 900px; margin: 0 auto; background: #fff; padding: 2.4rem 3rem; box-shadow: 0 1px 4px rgba(0,0,0,.12); color: #222; }
.pt-rc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; border-bottom: 2px solid #c0392b; padding-bottom: 1rem; }
.pt-rc-title { font-size: 1.5rem; font-weight: 700; color: #111; }
.pt-rc-info { width: 100%; font-size: .9rem; margin: 1.4rem 0; }
.pt-rc-info td { padding: .3rem 0; }
.pt-rc-info td:nth-child(odd) { color: #666; width: 130px; }
.pt-rc-h { font-size: 1.1rem; margin: 1.3rem 0 .5rem; color: #111; border-bottom: 1px solid #e0e0e0; padding-bottom: .3rem; }
.pt-rc-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.pt-rc-table th { background: #f3f5f8; padding: .5rem .6rem; text-align: center; }
.pt-rc-table td { padding: .5rem .6rem; border-bottom: 1px solid #eee; }
.pt-rc-par { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid #f0f0f0; }
.pt-rc-pill { display: inline-block; color: #fff; border-radius: 10px; padding: 1px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pt-rc-sign { border-top: 1px solid #999; width: 180px; margin-top: 1.6rem; padding-top: .2rem; }
@media (max-width: 640px) { .pt-rc-doc { padding: 1.2rem; } .pt-rc-head { flex-direction: column; } .pt-rc-head .text-end { text-align: left !important; } }

/* Trial tag (before a student's name) */
.pt-trial-tag { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: .7rem; font-weight: 600; line-height: 1.5; white-space: nowrap; vertical-align: middle; margin-right: .3rem; border: 1px solid; cursor: default; }
.pt-trial-tag-paid { background: #e0f2fe; color: #075985; border-color: #7dd3fc; }
.pt-trial-tag-free { background: #ecfdf5; color: #065f46; border-color: #6ee7b7; }
.pt-trial-tag-await { background: #fffbeb; color: #92400e; border-color: #fcd34d; }
/* Stripe booking tags (StripeBookingService.TagFor) */
.pt-stripe-tag-paid { background: #eff6ff; color: #1e40af; border-color: #93c5fd; }
.pt-stripe-tag-ending { background: #fffbeb; color: #92400e; border-color: #fbbf24; }
.pt-stripe-tag-unpaid { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.pt-stripe-tag-await { background: #f5f3ff; color: #5b21b6; border-color: #c4b5fd; }

/* Admin navbar: keep everything (incl. Logout) inside the viewport on 1200-1500px screens. */
@media (min-width: 992px) and (max-width: 1500px) {
    .pt-admin-header > .container-fluid { padding-left: .75rem !important; padding-right: .75rem !important; }
    .pt-admin-brand { margin-right: .35rem; }
    .pt-admin-nav .navbar-nav .nav-link { font-size: .75rem; padding: .35rem .3rem; }
    .pt-admin-toolbar { gap: .5rem !important; }
    .pt-admin-toolbar .pt-admin-user { padding: .25rem .5rem; font-size: .8rem; }
    .pt-admin-toolbar .pt-admin-logout { font-size: .8rem; }
}

/* Buttons with .bg-white (e.g. "btn btn-outline-secondary bg-white"): bg-white is !important, so on hover the
   text turned white on a white background. Let hover / focus / active use the button's own state colours. */
.btn.bg-white:hover, .btn.bg-white:focus-visible { background-color: var(--bs-btn-hover-bg) !important; }
.btn.bg-white:active, .btn.bg-white.active { background-color: var(--bs-btn-active-bg) !important; }

/* Small round teacher photo (top bar, class pages); falls back to initials / emoji when there's none. */
.pt-tch-photo { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; vertical-align: middle; flex-shrink: 0; }
