:root {
    --brand: #7207FF;
    --brand-dark: #5E00D6;
    --brand-secondary: #B379FF;
    --ink: #1E1E1E;
    --muted: #6D6675;
    --line: #E3D4FF;
    --soft: #F7F2FF;
    --brand-rgb: 114, 7, 255;
    --brand-secondary-rgb: 179, 121, 255;
    --ink-rgb: 30, 30, 30;
    --bs-primary: var(--brand);
    --bs-primary-rgb: var(--brand-rgb);
    --bs-secondary: var(--brand-secondary);
    --bs-secondary-rgb: var(--brand-secondary-rgb);
    --bs-body-color: var(--ink);
    --bs-link-color: var(--brand);
    --bs-link-hover-color: var(--brand-dark);
    --bs-focus-ring-color: rgba(var(--brand-rgb), .25);
    --bs-sidebar-dark-bg: var(--ink);
    --bs-sidebar-dark-menu-item-active-color: var(--brand-secondary);
    --bs-sidebar-dark-menu-item-hover-color: var(--brand-secondary);
    --bs-sidebar-menu-item-active-color: var(--brand);
    --bs-sidebar-menu-item-hover-color: var(--brand);
}

body {
    color: var(--ink);
    background: #fff;
}

.pace .pace-progress {
    background: linear-gradient(to right, var(--brand) 0%, var(--brand-secondary) 100%) !important;
}

.pace .pace-activity {
    background: var(--brand) !important;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    min-width: 0;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

a,
p,
span,
small,
strong,
label,
.card,
.dropdown-menu,
.breadcrumb,
.table td,
.table th {
    overflow-wrap: anywhere;
}

.public-body {
    font-family: var(--bs-body-font-family);
}

.text-primary,
.navbar-brand {
    color: var(--brand) !important;
}

.text-secondary {
    color: var(--brand-secondary) !important;
}

.bg-primary {
    background-color: var(--brand) !important;
}

.bg-secondary {
    background-color: var(--brand-secondary) !important;
}

.bg-primary-subtle {
    background-color: rgba(var(--brand-rgb), .12) !important;
}

.text-bg-primary {
    color: #fff !important;
    background-color: var(--brand) !important;
}

.border-primary {
    border-color: var(--brand) !important;
}

a {
    color: var(--brand);
}

a:hover {
    color: var(--brand-dark);
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    box-shadow: 0 8px 20px rgba(var(--brand-rgb), .18);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

.btn-outline-primary:hover {
    background: var(--brand);
    border-color: var(--brand);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb), .16);
}

.hero-band {
    color: #fff;
    background:
        linear-gradient(90deg, rgba(var(--ink-rgb), .94) 0%, rgba(var(--brand-rgb), .82) 44%, rgba(var(--brand-secondary-rgb), .42) 100%),
        url("../images/training-hero.png") center/cover;
}

.hero-panel {
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 8px;
    padding: 28px;
    backdrop-filter: blur(8px);
}

.logo-mini,
.logo-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.logo-mini {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #fff;
    background: var(--brand);
}

.logo-mini-public {
    width: 30px;
    height: 30px;
    font-size: .9rem;
}

.logo-text {
    color: #fff;
    font-size: 1.2rem;
    letter-spacing: 0;
}

.auth-brand-logo,
.public-brand-logo,
.dashboard-logo-wordmark,
.dashboard-logo-icon,
.public-brand-icon {
    display: block;
    object-fit: contain;
}

.auth-brand-logo {
    width: min(260px, 70vw);
    max-height: 92px;
}

.public-brand-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
}

.public-brand-logo {
    width: min(148px, 38vw);
    max-height: 44px;
}

.dashboard-logo-icon {
    width: 34px;
    height: 34px;
    margin: 0 auto;
}

.dashboard-logo-wordmark {
    width: 138px;
    max-width: 100%;
    max-height: 48px;
    margin: 0 auto;
}

.feature-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(var(--ink-rgb), .05);
}

.feature-card > i {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--brand);
    background: rgba(var(--brand-rgb), .1);
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.feature-card span {
    display: block;
    color: var(--muted);
    font-size: .85rem;
}

.course-card,
.card {
    border-color: var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(var(--ink-rgb), .05);
}

.course-card {
    overflow: hidden;
}

.course-card-cover,
.course-detail-cover {
    display: block;
    width: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(var(--brand-rgb), .16), rgba(var(--brand-secondary-rgb), .2));
}

.course-card-cover {
    aspect-ratio: 4 / 5;
    height: auto;
    min-height: 260px;
}

.course-detail-cover {
    max-height: 360px;
    border-radius: 8px;
}

.course-card-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-dark);
    font-weight: 700;
    text-align: center;
    padding: 18px;
}

.course-card-cover-empty span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card-text {
    min-height: 72px;
}

.course-thumb {
    width: 74px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--soft);
}

.course-thumb-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    font-weight: 700;
}

.course-cover-preview,
.course-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--muted);
}

.course-cover-preview img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 8px;
}

.card,
.card-body,
.card-footer,
.modal-content,
.alert,
.dropdown-menu {
    max-width: 100%;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detail-grid div,
.stat-card {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.detail-grid strong,
.stat-card span {
    display: block;
    color: var(--muted);
    font-size: .85rem;
}

.stat-card strong {
    display: block;
    font-size: 1.75rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.status-pending { background: #fff3cd; color: #664d03; }
.status-approved { background: #cff4fc; color: #055160; }
.status-rejected { background: #f8d7da; color: #842029; }
.status-completed { background: #d1e7dd; color: #0f5132; }
.status-pre_registration,
.status-awaiting_documents,
.status-awaiting_payment { background: #fff3cd; color: #664d03; }
.status-confirmed,
.status-in_training { background: #cff4fc; color: #055160; }
.status-waitlisted,
.status-transferred { background: #e2e3e5; color: #41464b; }
.status-cancelled { background: #f8d7da; color: #842029; }

.badge[class*="status-"] {
    border-radius: 999px;
    padding: .45rem .65rem;
}

.detail-sidebar {
    top: 86px;
}

.certificate-page {
    background: #eef3f2;
}

.certificate {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.certificate-inner {
    width: min(100%, 1000px);
    min-height: 650px;
    background: #fff;
    border: 8px solid var(--brand);
    outline: 2px solid #caa84a;
    outline-offset: -22px;
    padding: 72px 64px;
    text-align: center;
}

.certificate h1 {
    font-size: 3rem;
    color: var(--brand-dark);
}

.certificate h2 {
    font-size: 2rem;
}

.certificate .col span {
    display: block;
    color: var(--muted);
}

.auth-body {
    min-height: 100vh;
    background: #f3f6f8;
}

.auth-cover {
    position: relative;
    align-items: end;
    min-height: 100vh;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(var(--ink-rgb), .95), rgba(var(--brand-rgb), .76)),
        url("../template/images/auth-bg.jpg") center/cover;
}

.auth-cover-content {
    max-width: 760px;
    padding: 72px;
}

.auth-cover-content h1 {
    font-size: 3rem;
    font-weight: 700;
}

.auth-cover-content p {
    max-width: 620px;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, .8);
}

.auth-form {
    max-width: 420px;
}

.auth-full-page-content {
    min-height: 100vh;
}

.auth-full-page-content > .w-100,
.auth-full-page-content .d-flex.flex-column.h-100 {
    min-height: calc(100vh - 96px);
}

.auth-full-page-content .auth-logo {
    display: flex !important;
    justify-content: center;
}

.auth-full-page-content .my-auto {
    width: 100%;
    max-width: 420px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.auth-full-page-content .auth-form {
    margin-right: auto;
    margin-left: auto;
    text-align: left;
}

.auth-logo .logo-text {
    color: var(--brand);
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    font-size: .85rem;
}

.auth-links a {
    color: var(--muted);
}

.auth-links a:hover {
    color: var(--brand);
}

.two-step-input {
    min-height: 48px;
    font-weight: 700;
}

.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card i {
    position: absolute;
    right: 18px;
    bottom: 16px;
    color: rgba(var(--brand-rgb), .18);
    font-size: 3rem;
}

.dashboard-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-eyebrow {
    color: var(--brand);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-kpi-card,
.dashboard-panel {
    background: #fff;
    border: 1px solid #ece7f8;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(var(--ink-rgb), .05);
}

.dashboard-kpi-card {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    min-height: 112px;
    padding: 1rem;
    overflow: hidden;
}

.dashboard-kpi-card span,
.dashboard-kpi-card small {
    display: block;
    color: var(--muted);
}

.dashboard-kpi-card span {
    margin-bottom: .35rem;
    font-size: .82rem;
    font-weight: 600;
}

.dashboard-kpi-card strong {
    display: block;
    max-width: 100%;
    color: var(--ink);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-variant-numeric: tabular-nums;
}

.dashboard-kpi-card small {
    margin-top: .45rem;
    font-size: .78rem;
}

.dashboard-kpi-card > i {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--brand);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(var(--brand-rgb), .22);
    font-size: 1.25rem;
}

.dashboard-kpi-dark > i {
    background: var(--ink);
    box-shadow: 0 8px 18px rgba(var(--ink-rgb), .16);
}

.dashboard-kpi-warning > i {
    color: #7a4b00;
    background: #ffcf62;
    box-shadow: 0 8px 18px rgba(255, 191, 83, .22);
}

.dashboard-panel {
    padding: 1rem;
}

.dashboard-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
}

.dashboard-panel-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 700;
}

.dashboard-panel-heading p {
    margin: .15rem 0 0;
    color: var(--muted);
    font-size: .8rem;
}

.dashboard-panel-heading a {
    flex: 0 0 auto;
    font-size: .82rem;
    font-weight: 600;
}

.dashboard-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.dashboard-mini-stat {
    min-height: 88px;
    padding: .75rem;
    background: #f8f7fb;
    border: 1px solid #eee8fb;
    border-radius: 8px;
}

.dashboard-mini-stat i {
    color: var(--brand);
    font-size: 1.15rem;
}

.dashboard-mini-stat span,
.dashboard-mini-stat strong {
    display: block;
}

.dashboard-mini-stat span {
    margin-top: .35rem;
    color: var(--muted);
    font-size: .78rem;
}

.dashboard-mini-stat strong {
    margin-top: .25rem;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.dashboard-chart {
    min-height: 280px;
    overflow: hidden;
}

.dashboard-table {
    min-width: 640px;
}

.dashboard-session-list {
    display: grid;
    gap: .75rem;
}

.dashboard-session-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: .75rem;
    align-items: start;
    padding: .75rem;
    background: #f8f7fb;
    border: 1px solid #eee8fb;
    border-radius: 8px;
}

.dashboard-session-date {
    display: grid;
    place-items: center;
    min-height: 52px;
    color: #fff;
    background: var(--brand);
    border-radius: 8px;
}

.dashboard-session-date strong,
.dashboard-session-date span,
.dashboard-session-item > div:last-child strong,
.dashboard-session-item > div:last-child span,
.dashboard-session-item > div:last-child small {
    display: block;
}

.dashboard-session-date strong {
    font-size: 1.1rem;
    line-height: 1;
}

.dashboard-session-date span {
    margin-top: .2rem;
    font-size: .7rem;
    text-transform: uppercase;
}

.dashboard-session-item > div:last-child strong {
    color: var(--ink);
    line-height: 1.25;
}

.dashboard-session-item > div:last-child span,
.dashboard-session-item > div:last-child small {
    color: var(--muted);
    font-size: .8rem;
}

.apexcharts-canvas,
.apexcharts-svg,
.apexcharts-legend {
    max-width: 100% !important;
}

.payment-card {
    border-color: #e5e7eb;
}

.payment-card .badge {
    white-space: normal;
    text-align: right;
}

.payment-card .alert {
    border-radius: 6px;
}

.billing-overview {
    border: 1px solid #e9edf4;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(var(--ink-rgb), .04);
}

.billing-overview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eef1f6;
}

.billing-eyebrow {
    display: block;
    margin-bottom: .35rem;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 700;
}

.billing-overview h2 {
    margin: 0;
    color: var(--muted);
    font-size: .92rem;
    font-weight: 500;
}

.billing-method-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: .35rem .65rem;
    color: var(--brand);
    background: rgba(var(--brand-rgb), .08);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.billing-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.billing-info-grid > div {
    min-width: 0;
}

.billing-info-grid span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
}

.billing-info-grid strong {
    display: block;
    margin-top: .35rem;
    color: var(--ink);
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.billing-table-card {
    border: 1px solid #e9edf4;
    border-radius: 8px;
    overflow: hidden;
}

.billing-table {
    font-size: .83rem;
}

.billing-table > :not(caption) > * > * {
    padding: .7rem .8rem;
    border-color: #edf0f5;
    vertical-align: middle;
}

.billing-table thead th {
    color: #475569;
    background: #fbfcfe;
    font-size: .74rem;
    font-weight: 700;
    white-space: nowrap;
}

.billing-table td {
    color: var(--ink);
}

.billing-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: .18rem .45rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.payment-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .4rem;
}

.payment-row-actions form {
    margin: 0;
}

.proof-frame {
    display: block;
    width: 100%;
    height: min(72vh, 760px);
    border: 0;
    background: #f8fafc;
}

.finance-mini {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 14px;
    background: #f8fafc;
}

.finance-mini span {
    display: block;
    color: var(--muted);
    font-size: .82rem;
}

.finance-mini strong {
    display: block;
    margin-top: 4px;
}

.smart-filter-form {
    position: relative;
}

.smart-filter-shell {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 46px;
    padding: .35rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid rgba(var(--brand-rgb), .32);
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(var(--ink-rgb), .05);
}

.smart-filter-label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 34px;
    padding: 0 .65rem;
    font-size: .86rem;
    font-weight: 600;
    white-space: nowrap;
}

.smart-filter-label i {
    color: var(--brand);
    font-size: 1rem;
}

.smart-filter-scroll {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
    padding: .1rem;
}

.smart-filter-dropdown {
    position: relative;
    flex: 0 0 auto;
}

.smart-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 32px;
    max-width: 260px;
    padding: .28rem .58rem;
    color: var(--ink);
    background: #f7f7f9;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    font-size: .82rem;
    line-height: 1.2;
    white-space: nowrap;
}

.smart-filter-chip::after {
    content: "\ea4a";
    color: var(--muted);
    font-family: boxicons !important;
    font-size: 1rem;
    line-height: 1;
}

.smart-filter-chip span {
    color: var(--muted);
}

.smart-filter-chip strong {
    overflow: hidden;
    max-width: 150px;
    color: var(--ink);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-filter-chip.is-active {
    color: var(--brand);
    background: rgba(var(--brand-rgb), .1);
    border-color: rgba(var(--brand-rgb), .35);
}

.smart-filter-chip.is-active span,
.smart-filter-chip.is-active strong,
.smart-filter-chip.is-active::after {
    color: var(--brand);
}

.smart-filter-menu {
    width: min(300px, calc(100vw - 24px));
    border-color: #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(var(--ink-rgb), .16);
}

.smart-filter-menu .form-label {
    display: block;
    margin-bottom: .45rem;
    font-weight: 600;
}

.smart-filter-actions {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    flex: 0 0 auto;
}

.dashboard-filter-form {
    position: relative;
}

.dashboard-filter-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding: .25rem;
    background: #fff;
    border: 1px solid rgba(var(--brand-rgb), .5);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(var(--ink-rgb), .05);
}

.dashboard-filter-query {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 36px;
    padding: 0 .65rem;
    color: var(--muted);
    background: transparent;
    border: 0;
    text-align: left;
}

.dashboard-filter-query i {
    flex: 0 0 auto;
    color: var(--brand);
    font-size: 1.1rem;
}

.dashboard-filter-query > span:first-of-type {
    flex: 0 0 auto;
    font-size: .86rem;
}

.dashboard-filter-tags {
    display: flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
    overflow: hidden;
}

.dashboard-filter-tags span {
    flex: 0 0 auto;
    max-width: 190px;
    padding: .18rem .45rem;
    color: var(--brand);
    background: rgba(var(--brand-rgb), .1);
    border-radius: 6px;
    font-size: .76rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-filter-actions {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    flex: 0 0 auto;
}

.dashboard-filter-actions .btn {
    min-height: 34px;
}

.dashboard-filter-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin-top: .5rem;
    padding: .9rem;
    background: #fff;
    border: 1px solid #ece7f8;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(var(--ink-rgb), .08);
}

.dashboard-filter-panel .form-label {
    margin-bottom: .35rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
}

.table-filter-toolbar {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.table-filter-search {
    position: relative;
    flex: 1 1 280px;
}

.table-filter-search i {
    position: absolute;
    top: 50%;
    left: .75rem;
    color: var(--muted);
    transform: translateY(-50%);
}

.table-filter-search .form-control {
    padding-left: 2.15rem;
}

.table-filter-toolbar .form-select {
    width: min(240px, 100%);
}

.notification-row:last-child {
    border-bottom: 0 !important;
}

.student-tour-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #fff;
    background: var(--brand);
    font-size: 1.55rem;
}

.student-tour-progress {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9eef2;
}

.student-tour-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
    transition: width .2s ease;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 8px 24px rgba(var(--ink-rgb), .12);
}

.profile-avatar-lg {
    width: 112px;
    height: 112px;
}

.profile-avatar-wrap {
    flex: 0 0 auto;
}

.profile-photo-form {
    width: min(100%, 440px);
}

.support-contact-list {
    display: grid;
    gap: 10px;
}

.support-contact-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
}

.support-contact-list i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--brand);
    background: var(--soft);
    font-size: 1.2rem;
}

.student-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.student-metric-card {
    position: relative;
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 10px 30px rgba(var(--ink-rgb), .05);
}

.student-metric-card:hover {
    color: var(--ink);
    border-color: rgba(var(--brand-rgb), .35);
    transform: translateY(-1px);
}

.student-metric-card span,
.student-metric-card small {
    position: relative;
    z-index: 1;
}

.student-metric-card span {
    color: var(--muted);
    font-size: .86rem;
}

.student-metric-card strong {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.student-metric-card small {
    color: var(--muted);
}

.student-metric-card > i {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--brand);
    background: var(--soft);
    font-size: 1.25rem;
}

.student-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.student-calendar-weekday {
    color: var(--muted);
    font-size: .72rem;
    text-align: center;
}

.student-calendar-day {
    min-height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 8px;
    color: var(--ink);
    background: #f8f9fb;
    font-size: .82rem;
}

.student-calendar-day.is-muted {
    color: #b6afbf;
    background: #fbfbfc;
}

.student-calendar-day.is-today {
    color: #fff;
    background: var(--ink);
}

.calendar-dots,
.student-calendar-legend {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.calendar-dots i,
.student-calendar-legend i {
    width: 7px;
    height: 7px;
    display: inline-block;
    border-radius: 50%;
}

.dot-secondary {
    background: var(--brand-secondary);
}

.dot-primary {
    background: var(--brand);
}

.student-calendar-legend {
    width: 100%;
    justify-content: flex-start;
    gap: 14px;
    margin-top: 14px;
    color: var(--muted);
    font-size: .82rem;
}

.student-upcoming-list {
    display: grid;
    gap: 10px;
}

.student-upcoming-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
}

.student-upcoming-item:hover {
    color: var(--ink);
    border-color: rgba(var(--brand-rgb), .35);
}

.student-upcoming-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 8px;
    color: var(--brand);
    background: var(--soft);
    font-weight: 700;
    text-align: center;
}

.student-upcoming-item strong,
.student-upcoming-item small {
    display: block;
}

.student-upcoming-item small {
    color: var(--muted);
}

#sidebar-menu ul li a.active,
#sidebar-menu ul li.mm-active > a {
    color: #fff !important;
}

.vertical-menu {
    background: var(--ink);
}

body[data-sidebar="dark"] .vertical-menu,
body[data-sidebar="dark"] .navbar-brand-box {
    background: var(--ink);
    border-color: transparent !important;
}

.navbar-brand-box {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12px;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.navbar-brand-box .logo {
    width: 100%;
    justify-content: center;
    align-items: center;
}

.vertical-menu #sidebar-menu {
    padding-top: 12px;
}

body[data-sidebar="dark"] #sidebar-menu ul li a:hover,
body[data-sidebar="dark"] #sidebar-menu ul li a:hover i,
body[data-sidebar="dark"] .mm-active > a,
body[data-sidebar="dark"] .mm-active > a i,
body[data-sidebar="dark"] .mm-active .active {
    color: var(--brand-secondary) !important;
}

body[data-sidebar="dark"] #sidebar-menu ul li.mm-active > a.active,
body[data-sidebar="dark"] #sidebar-menu ul li a.active {
    color: #fff !important;
    background: rgba(var(--brand-rgb), .34);
    border-left: 3px solid var(--brand-secondary);
}

.badge.bg-primary-subtle,
.badge.text-primary {
    color: var(--brand) !important;
}

#layout-wrapper,
.main-content,
.page-content,
.container,
.container-fluid,
.row,
.navbar-header {
    min-width: 0;
    max-width: 100%;
}

.navbar-header {
    gap: .5rem;
}

.navbar-header > .d-flex {
    min-width: 0;
}

.header-item {
    flex: 0 0 auto;
}

.app-search {
    min-width: 220px;
    max-width: min(360px, 32vw);
}

.app-search .position-relative,
.app-search input {
    min-width: 0;
}

.topbar-pro {
    display: grid;
    grid-template-columns: auto minmax(220px, 520px) auto;
    gap: 16px;
    align-items: center;
    background: #fff;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

#page-topbar {
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.topbar-left,
.topbar-actions {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.topbar-search {
    width: 100%;
    min-width: 0;
    max-width: 520px;
    margin: 0 auto;
}

.topbar-search .position-relative {
    display: flex;
    align-items: center;
}

.topbar-search i {
    position: absolute;
    left: 14px;
    color: var(--muted);
    z-index: 1;
}

.topbar-search .form-control {
    height: 40px;
    padding-left: 40px;
    border-radius: 8px;
    border-color: rgba(var(--ink-rgb), .12);
    background: #fff;
    box-shadow: 0 8px 24px rgba(var(--ink-rgb), .04);
}

.topbar-context {
    align-items: center;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--muted);
    background: #f8f9fb;
    font-size: .85rem;
    white-space: nowrap;
}

.topbar-actions {
    justify-content: flex-end;
    gap: 2px;
}

.topbar-actions .header-item {
    border-radius: 8px;
}

.certificate-preview-frame {
    display: block;
    width: 100%;
    height: min(76vh, 820px);
    border: 0;
    background: #f8f9fb;
}

.page-title-box {
    gap: .75rem;
}

.page-title-box h4,
.page-title-right {
    min-width: 0;
}

.breadcrumb {
    flex-wrap: wrap;
}

.dropdown-menu-lg {
    width: min(320px, calc(100vw - 16px));
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
    min-width: 720px;
}

.table th,
.table td {
    vertical-align: middle;
}

.table td .btn,
.table th .btn,
.card-footer .btn,
.card-body .btn {
    white-space: normal;
}

.nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.nav-tabs .nav-item,
.nav-tabs .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
}

.btn-toolbar,
.btn-group {
    flex-wrap: wrap;
}

.modal-dialog {
    max-width: min(100% - 16px, var(--bs-modal-width, 500px));
    margin-right: auto;
    margin-left: auto;
}

.page-content {
    padding-bottom: 72px;
}

@media (max-width: 1199px) {
    .topbar-pro {
        grid-template-columns: auto minmax(220px, 1fr) auto;
        gap: 10px;
    }

    .student-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-filter-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stat-card {
        padding: 14px;
    }

    .metric-card {
        padding-right: 64px;
    }
}

@media (max-width: 991px) {
    .dashboard-hero {
        flex-direction: column;
    }

    .dashboard-hero .dropdown,
    .dashboard-hero .dropdown > .btn {
        width: 100%;
    }

    .dashboard-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-content {
        margin-left: 0 !important;
    }

    .vertical-menu {
        z-index: 1050;
        max-width: min(260px, calc(100vw - 56px));
    }

    body:not(.sidebar-enable) .vertical-menu {
        pointer-events: none;
    }

    .page-content {
        padding-top: 84px;
    }

    .smart-filter-shell {
        align-items: stretch;
    }

    .auth-cover {
        min-height: auto;
    }

    .auth-cover-content {
        padding: 48px 28px;
    }

    .auth-form {
        width: min(100%, 420px);
    }
}

@media (max-width: 767px) {
    .dashboard-kpi-grid,
    .dashboard-mini-grid,
    .dashboard-filter-panel {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-card strong {
        font-size: 1.35rem;
    }

    .dashboard-filter-bar {
        flex-wrap: wrap;
    }

    .dashboard-filter-query {
        width: 100%;
        flex-basis: 100%;
    }

    .dashboard-filter-query > span:first-of-type {
        flex: 1 1 auto;
    }

    .dashboard-filter-tags {
        width: 100%;
        flex-basis: 100%;
        flex-wrap: wrap;
        overflow: visible;
    }

    .dashboard-filter-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .container-fluid,
    .container {
        padding-right: 12px;
        padding-left: 12px;
    }

    .page-title-box {
        align-items: flex-start !important;
    }

    .page-title-right {
        width: 100%;
    }

    .breadcrumb {
        font-size: .82rem;
    }

    .card-body,
    .card-footer {
        padding: 1rem;
    }

    .smart-filter-shell {
        flex-wrap: wrap;
    }

    .smart-filter-label,
    .smart-filter-actions {
        width: 100%;
    }

    .smart-filter-actions {
        justify-content: flex-end;
    }

    .smart-filter-scroll {
        width: 100%;
        flex-basis: 100%;
    }

    .dashboard-chart {
        min-height: 240px;
    }

    .course-card-cover {
        min-height: 300px;
    }

    .billing-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .certificate {
        padding: 12px;
    }

    .certificate-inner {
        padding: 52px 24px;
        min-height: auto;
    }
}

@media (max-width: 575px) {
    .topbar-pro {
        display: flex;
        justify-content: space-between;
    }

    .topbar-left {
        flex: 1 1 auto;
    }

    .topbar-actions {
        flex: 0 0 auto;
    }

    .student-summary-grid {
        grid-template-columns: 1fr;
    }

    .student-upcoming-item {
        grid-template-columns: 1fr;
    }

    .student-upcoming-date {
        justify-content: flex-start;
        padding: 0 12px;
    }

    .profile-photo-form .d-flex {
        width: 100%;
    }

    .dashboard-kpi-card {
        min-height: 104px;
    }

    .dashboard-kpi-card > i {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .dashboard-session-item {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .dashboard-session-date {
        min-height: 46px;
    }

    .navbar-header {
        padding-right: .5rem;
        padding-left: .5rem;
    }

    .navbar-brand-box {
        width: 64px !important;
        min-width: 64px;
        padding-top: 10px;
    }

    .public-brand-logo {
        width: min(116px, 34vw);
    }

    .public-brand-icon {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .auth-brand-logo {
        width: min(210px, 72vw);
    }

    .header-item {
        min-width: 36px;
        padding-right: .45rem;
        padding-left: .45rem;
    }

    .noti-icon i,
    .header-item i {
        font-size: 18px !important;
    }

    .page-content {
        padding-right: 0;
        padding-left: 0;
    }

    .page-content .d-flex.justify-content-between,
    .page-content .d-flex.align-items-center {
        flex-wrap: wrap;
        row-gap: .75rem;
    }

    .metric-card {
        padding-right: 16px;
    }

    .metric-card i {
        display: none;
    }

    .table-responsive > .table {
        min-width: 640px;
    }

    .billing-table {
        min-width: 920px !important;
    }

    .billing-overview-header {
        flex-direction: column;
    }

    .billing-info-grid {
        grid-template-columns: 1fr;
    }

    .payment-row-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .btn,
    .form-control,
    .form-select {
        max-width: 100%;
    }

    .smart-filter-chip {
        max-width: 220px;
    }

    .smart-filter-chip strong {
        max-width: 116px;
    }

    .table-filter-toolbar .form-select {
        width: 100%;
    }

    .certificate-inner {
        border-width: 5px;
        outline-offset: -14px;
        padding: 42px 18px;
    }

    .certificate .row {
        row-gap: 1rem;
    }

    .certificate .col {
        flex: 0 0 100%;
    }
}

@media print {
    .print-hide {
        display: none !important;
    }

    .certificate {
        padding: 0;
    }

    .certificate-inner {
        width: 100%;
        min-height: 100vh;
        box-shadow: none;
    }
}
