:root {
    --bg: #f3f5fb;
    --bg-deep: #eef2f9;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-strong: #10253e;
    --text: #18263d;
    --muted: #67768e;
    --primary: #0f766e;
    --primary-dark: #0a5953;
    --accent: #d4a23b;
    --danger: #b42318;
    --border: #dde5f0;
    --shadow: 0 20px 50px rgba(15, 23, 42, .08);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, .06);
    --radius: 24px;
    --radius-sm: 18px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: 'Cairo', sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #fbfcfe 0%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

body,
.dashboard-card,
.dashboard-hero__panel,
.quick-action-card,
.dashboard-program-card,
.info-chip,
.table,
.section-head,
.readonly-field {
    overflow-wrap: anywhere;
}

.btn,
.form-control,
.form-select,
.form-check-input,
.modal-content,
.table,
.badge,
.alert {
    font-family: inherit;
}

.form-control,
.form-select {
    min-height: 48px;
    border-radius: 16px;
    border-color: var(--border);
    padding-inline: 1rem;
    color: var(--text);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(15, 118, 110, .35);
    box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .12);
}

.modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 2rem);
}

.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
}

textarea.form-control {
    min-height: 120px;
}

.btn {
    border-radius: 14px;
    padding: .78rem 1.15rem;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-dark);
}

.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-success {
    border-width: 1.5px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(221, 229, 240, .9);
}

.navbar {
    min-height: 92px;
}

.brand-logo {
    width: 74px;
    height: 74px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: .18rem;
}

.brand-title {
    color: var(--text);
    font-weight: 800;
    font-size: 1.2rem;
}

.brand-subtitle {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
}

.brand-support {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-inline-start: auto;
}

.partner-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    padding: .35rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(221, 229, 240, .9);
    box-shadow: var(--shadow-soft);
}

.nav-link {
    color: var(--text) !important;
    font-weight: 700;
}

.user-badge {
    background: #edf7f5;
    color: var(--primary);
    padding: .55rem .85rem;
    border-radius: 999px;
    font-size: .88rem;
}

.page-shell {
    min-height: calc(100vh - 92px);
}

.glass-card,
.program-card,
.auth-card,
.error-card,
.elevated-card,
.dashboard-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.soft-alert {
    border-radius: 18px;
    border: 0;
}

.hero-home {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, .9fr);
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 2rem;
}

.hero-home__content {
    background: linear-gradient(135deg, #10253e 0%, #153a59 45%, #0f766e 100%);
    color: #fff;
    padding: 2.5rem;
    border-radius: 34px;
    box-shadow: 0 24px 60px rgba(16, 37, 62, .18);
}

.hero-home__eyebrow,
.eyebrow-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255, 255, 255, .12);
    border-radius: 999px;
    padding: .45rem .95rem;
    font-size: .85rem;
    font-weight: 700;
}

.hero-home__logos {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.2rem 0 1.4rem;
}

.hero-home__brand-mark {
    width: 112px;
    height: 112px;
    object-fit: contain;
    padding: .85rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
}

.hero-home__support {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.hero-home__support img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    padding: .7rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
}

.hero-home h1,
.program-details-hero h1 {
    font-size: clamp(2rem, 4vw, 3.15rem);
    line-height: 1.25;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-home p,
.program-details-hero p {
    color: rgba(255, 255, 255, .88);
    max-width: 58ch;
    line-height: 1.9;
}

.hero-home__panel {
    background: var(--surface);
    border-radius: 32px;
    padding: 1.6rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.hero-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.section-block {
    margin-top: 2rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.section-head h1,
.section-head h2,
.dashboard-topbar h1,
.dashboard-hero h2 {
    margin: 0;
    font-weight: 800;
}

.section-head h1,
.section-head h2 {
    font-size: 1.45rem;
}

.section-head p,
.dashboard-topbar p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-counter {
    background: #f3f7fd;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: .55rem 1rem;
    font-weight: 700;
}

.program-grid,
.responsive-cards,
.quick-link-grid,
.stat-strip,
.dashboard-section-grid,
.dashboard-program-grid,
.info-grid,
.ticket-meta-grid,
.dashboard-kpis {
    display: grid;
    gap: 1rem;
}

.program-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.program-card {
    overflow: hidden;
}

.program-card--premium .program-card__image {
    min-height: 230px;
}

.program-card__image,
.program-details-hero__media {
    background-size: cover;
    background-position: center;
    background-color: #e8eef7;
}

.program-card__body {
    padding: 1.35rem;
}

.program-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: .7rem;
}

.program-card p {
    color: var(--muted);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .45rem;
    color: var(--muted);
}

.meta-list li {
    overflow-wrap: anywhere;
}

.badge-status,
.badge-gender,
.badge-soft {
    border-radius: 999px;
    padding: .45rem .8rem;
    font-weight: 700;
}

.status-upcoming {
    background: rgba(245, 158, 11, .16);
    color: #b45309;
}

.status-ongoing {
    background: rgba(59, 130, 246, .14);
    color: #1d4ed8;
}

.status-completed {
    background: rgba(34, 197, 94, .14);
    color: #15803d;
}

.status-cancelled,
.status-not_executed {
    background: rgba(239, 68, 68, .14);
    color: #b91c1c;
}

.badge-gender {
    background: rgba(15, 118, 110, .12);
    color: var(--primary);
}

.badge-soft {
    background: #eef2ff;
    color: #3448a2;
}

.program-badge-strip {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .55rem;
    padding: .6rem .75rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(8px);
}

.dashboard-body {
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, .08), transparent 28%),
        linear-gradient(180deg, #f7f9fd 0%, #eef2f8 100%);
}

.dashboard-shell {
    display: flex;
    min-height: 100vh;
}

.dashboard-sidebar {
    width: 308px;
    flex: 0 0 308px;
    background: linear-gradient(180deg, #0f2239 0%, #102d48 100%);
    color: #f5f9ff;
    padding: 1.4rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    position: static;
    min-height: 100vh;
    box-shadow: 16px 0 48px rgba(15, 23, 42, .08);
    z-index: 1002;
}

.dashboard-offcanvas {
    --bs-offcanvas-width: min(88vw, 320px);
    --bs-offcanvas-bg: #102d48;
    --bs-offcanvas-color: #f5f9ff;
    border-inline-start: 0;
    background: linear-gradient(180deg, #0f2239 0%, #102d48 100%);
    background-color: #102d48;
}

.dashboard-offcanvas::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(213, 163, 63, .16), transparent 24%),
        linear-gradient(180deg, rgba(15, 34, 57, .98) 0%, rgba(16, 45, 72, .99) 100%);
    pointer-events: none;
}

.dashboard-offcanvas > * {
    position: relative;
    z-index: 1;
}

.dashboard-offcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    padding: 1rem 1rem .9rem;
}

.dashboard-offcanvas .offcanvas-title {
    font-size: 1rem;
    font-weight: 800;
}

.dashboard-offcanvas .offcanvas-body {
    padding: 0;
}

.dashboard-sidebar--mobile {
    width: auto;
    flex: 1 1 auto;
    position: static;
    top: auto;
    height: auto;
    min-height: 100%;
    box-shadow: none;
    padding: 1.25rem 1rem;
    overflow: hidden;
    background: transparent;
}

.sidebar-brand,
.sidebar-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .9rem;
}

.sidebar-brand__link {
    display: flex;
    align-items: center;
    gap: .9rem;
    color: inherit;
}

.sidebar-brand__link strong,
.sidebar-profile strong {
    display: block;
    font-size: 1rem;
}

.sidebar-brand__link span,
.sidebar-profile span {
    display: block;
    color: rgba(245, 249, 255, .68);
    font-size: .84rem;
}

.sidebar-logo {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    object-fit: contain;
    background: rgba(255, 255, 255, .08);
    padding: .45rem;
}

.sidebar-logo.secondary {
    width: 52px;
    height: 52px;
}

.sidebar-brand-support {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: -.15rem;
    margin-bottom: .2rem;
}

.sidebar-profile {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 22px;
    padding: .95rem;
    justify-content: flex-start;
}

.sidebar-profile__meta {
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-profile__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f4b649 0%, #fff0cb 100%);
    color: #4a3410;
}

.sidebar-profile__edit {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    border-radius: 14px;
    color: rgba(245, 249, 255, .78);
    background: rgba(255, 255, 255, .08);
    transition: .2s ease;
}

.sidebar-profile__edit:hover,
.sidebar-profile__edit.active {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: auto;
    overflow: visible;
    padding-inline-end: .2rem;
}

.sidebar-nav__title {
    color: rgba(245, 249, 255, .58);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    margin: 0 0 .45rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .8rem;
    width: 100%;
    border: 0;
    background: transparent;
    color: rgba(245, 249, 255, .84);
    border-radius: 18px;
    padding: .82rem .95rem;
    font-weight: 700;
    transition: .2s ease;
}

.sidebar-link i {
    font-size: 1rem;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, .10);
    color: #fff;
}

.sidebar-link.active {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.sidebar-link--ghost {
    background: rgba(255, 255, 255, .05);
}

.sidebar-link--danger {
    background: rgba(180, 35, 24, .12);
    color: #ffd7d4;
    text-align: right;
}

.sidebar-link--danger:hover {
    background: rgba(180, 35, 24, .2);
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: .7rem;
    padding-top: .35rem;
}

.sidebar-footer form,
.sidebar-footer button {
    width: 100%;
}

.dashboard-main {
    flex: 1;
    min-width: 0;
    padding: 1.25rem;
    overflow-x: hidden;
}

.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dashboard-topbar__start,
.dashboard-topbar__end {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.dashboard-topbar__start p {
    display: none;
}

.dashboard-content {
    display: block;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 1rem;
}

.dashboard-hero__panel {
    background: linear-gradient(135deg, #11263f 0%, #194968 54%, #0f766e 100%);
    color: #fff;
    border-radius: 28px;
    padding: 1.7rem;
    box-shadow: var(--shadow);
}

.dashboard-hero__panel--light {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.dashboard-hero__panel p {
    margin: .9rem 0 0;
    color: rgba(255, 255, 255, .84);
    line-height: 1.9;
}

.dashboard-hero__panel--light p {
    color: var(--muted);
}

.dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: 100%;
}

.kpi-card,
.stat-card,
.mini-card,
.dashboard-program-card,
.quick-action-card,
.info-chip {
    background: var(--surface);
    border-radius: 20px;
    padding: 1rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    min-width: 0;
}

.kpi-card {
    background: linear-gradient(180deg, #fdfefe 0%, #f7fbfb 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .35rem;
}

.kpi-card span,
.info-chip span {
    color: var(--muted);
    font-size: .9rem;
}

.kpi-card strong,
.info-chip strong {
    font-size: 1.25rem;
    font-weight: 800;
    display: block;
    margin-top: .55rem;
    padding: .85rem 1rem;
    border-radius: 16px;
    background: #f7fafc;
    color: var(--text);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.readonly-field {
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: .8rem 1rem;
    background: #f8fafc;
    display: grid;
    gap: .25rem;
}

.readonly-field strong {
    font-size: .98rem;
}

.readonly-field span {
    color: var(--muted);
    font-size: .88rem;
}

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

.dashboard-card {
    padding: 1.4rem;
    min-width: 0;
}

.dashboard-program-grid,
.quick-link-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-program-card {
    display: block;
    color: inherit;
}

.dashboard-program-card--link {
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.dashboard-program-card--link:hover,
.dashboard-program-card--link.active {
    transform: translateY(-2px);
    border-color: rgba(15, 118, 110, .35);
    box-shadow: 0 18px 34px rgba(15, 118, 110, .1);
}

.dashboard-program-card__header,
.quick-action-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .8rem;
}

.quick-action-card {
    align-items: center;
}

.quick-action-card i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(15, 118, 110, .1);
    color: var(--primary);
    font-size: 1.15rem;
    flex: 0 0 44px;
}

.quick-action-card strong {
    display: block;
}

.quick-action-card span {
    color: var(--muted);
    font-size: .88rem;
}

.info-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.info-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.target-tags {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

.target-tag {
    background: #f1f7f6;
    color: var(--primary-dark);
    border: 1px solid rgba(15, 118, 110, .16);
    border-radius: 999px;
    padding: .48rem .82rem;
    font-weight: 700;
    font-size: .88rem;
}

.target-tree {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1rem;
    background: var(--surface-soft);
}

.target-tree__filters {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.target-filter {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: 999px;
    padding: .5rem .9rem;
    font-weight: 700;
}

.target-filter.active {
    background: rgba(15, 118, 110, .12);
    border-color: rgba(15, 118, 110, .28);
    color: var(--primary-dark);
}

.target-stage-group {
    display: grid;
    gap: .75rem;
    margin-bottom: 1rem;
}

.target-stage-group:last-child {
    margin-bottom: 0;
}

.target-stage-group__title {
    font-weight: 800;
}

.target-stage-group__grades {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.target-grade-option {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .85rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
}

.table-subtitle {
    color: var(--muted);
    font-size: .84rem;
    margin-top: .2rem;
}

.actions-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.btn-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
}

.btn-badge--attendance {
    padding-top: .1rem;
}

.btn-badge__count {
    position: absolute;
    top: -9px;
    left: -9px;
    min-width: 26px;
    height: 26px;
    padding: 0 .45rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #b42318;
    color: #fff;
    border: 2px solid #fff;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 10px 22px rgba(180, 35, 24, .22);
}

.btn-badge__count--mini {
    top: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 .3rem;
    font-size: .64rem;
    box-shadow: none;
}

.btn-badge__count--danger {
    background: #b42318;
    color: #fff;
    box-shadow: 0 8px 16px rgba(180, 35, 24, .22);
}

.btn-badge__count--warning {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    background: #f4b400;
    color: #533f03;
    box-shadow: 0 8px 16px rgba(244, 180, 0, .22);
}

.btn-badge__count--success {
    left: auto;
    right: -8px;
    background: #15803d;
    color: #fff;
    box-shadow: 0 8px 16px rgba(21, 128, 61, .22);
}

.ticket-dashboard-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.2rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.ticket-dashboard-alert--active {
    border-color: rgba(180, 35, 24, .24);
    background: #fff8f6;
}

.ticket-dashboard-alert span,
.ticket-dashboard-alert p {
    color: var(--muted);
}

.ticket-dashboard-alert strong {
    display: block;
    color: var(--danger);
    font-size: 2.3rem;
    line-height: 1;
    margin: .35rem 0;
}

.ticket-status {
    border-radius: 999px;
    padding: .45rem .8rem;
}

.ticket-status--open {
    background: #fff3cd;
    color: #8a5a00;
}

.ticket-status--closed {
    background: #e8f5ef;
    color: #146c43;
}

.ticket-meta-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.ticket-thread {
    display: grid;
    gap: 1rem;
}

.ticket-message {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    background: var(--surface-soft);
}

.ticket-message--admin {
    background: #edf7f5;
    border-color: rgba(15, 118, 110, .18);
}

.ticket-message__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .6rem;
}

.ticket-message__head span,
.ticket-message time {
    color: var(--muted);
    font-size: .85rem;
}

.ticket-message p {
    margin: 0 0 .75rem;
    line-height: 1.9;
}

.ticket-status-options {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.ticket-status-options .form-check {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin: 0;
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-soft);
    font-weight: 700;
}

.program-details-hero {
    display: grid;
    grid-template-columns: minmax(340px, .95fr) minmax(0, 1.25fr);
    gap: 1.2rem;
    align-items: stretch;
}

.program-details-hero__media {
    min-height: 420px;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.program-details-hero__content {
    background: linear-gradient(135deg, #10253e 0%, #18415f 48%, #0f766e 100%);
    color: #fff;
    border-radius: 28px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.program-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.program-details-grid .info-chip {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .12);
    box-shadow: none;
}

.program-details-grid .info-chip span,
.program-details-grid .info-chip strong {
    color: #fff;
}

.program-details-grid .info-chip strong {
    background: rgba(255, 255, 255, .12);
}

.program-details-hero__content .badge-status.status-upcoming {
    background: rgba(245, 158, 11, .26);
    color: #fff2cf;
}

.program-details-hero__content .badge-status.status-ongoing {
    background: rgba(59, 130, 246, .28);
    color: #e6f0ff;
}

.program-details-hero__content .badge-status.status-completed {
    background: rgba(34, 197, 94, .24);
    color: #e7ffe9;
}

.program-details-hero__content .badge-status.status-cancelled,
.program-details-hero__content .badge-status.status-not_executed {
    background: rgba(239, 68, 68, .24);
    color: #ffe3e3;
}

.program-details-hero__content .badge-gender {
    background: rgba(255, 255, 255, .18);
    color: #ffffff;
}

.program-details-hero__content .badge-soft {
    background: rgba(255, 255, 255, .16);
    color: #ffffff;
}

.auth-shell,
.dashboard-grid {
    display: grid;
    gap: 1rem;
}

.auth-shell {
    min-height: 76vh;
    align-items: center;
}

.auth-shell--split {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-content: start;
    padding-block: 1rem 2rem;
}

.auth-showcase {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 40%, #eef7f6 100%);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 2rem;
}

.auth-showcase h1 {
    font-weight: 800;
    margin-bottom: .75rem;
}

.auth-showcase p {
    color: var(--muted);
    max-width: 50ch;
}

.profile-review {
    display: grid;
    gap: .65rem;
    margin-top: 1.25rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1rem 1.1rem;
}

.auth-card {
    width: min(100%, 100%);
    padding: 1.75rem;
}

.auth-shell--split > .auth-showcase,
.auth-shell--split > .auth-card {
    width: min(100%, 760px);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.back-link {
    color: var(--primary);
    font-weight: 700;
}

.responsive-table {
    width: 100%;
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
}

.table th,
.table td {
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: anywhere;
}

.mobile-card-table th {
    white-space: nowrap;
}

.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.attendance-panel {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-soft);
    padding: 1rem;
}

.attendance-panel summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--text);
}

.attendance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .9rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.attendance-row:last-child {
    border-bottom: 0;
}

.attendance-row__identity {
    display: grid;
    gap: .2rem;
}

.attendance-row__identity span {
    color: var(--muted);
    font-size: .85rem;
}

.segmented {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.segmented label {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: .45rem .8rem;
    font-weight: 700;
}

.segmented label input:disabled {
    cursor: not-allowed;
}

.segmented--attendance input {
    accent-color: var(--primary);
}

.attendance-session-list {
    display: grid;
    gap: 1rem;
}

.attendance-session-card {
    padding: 0;
    overflow: hidden;
}

.attendance-session-card[open] {
    box-shadow: 0 22px 54px rgba(15, 23, 42, .12);
}

.attendance-session-card__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    background: linear-gradient(180deg, #fff 0%, #f8fbfd 100%);
}

.attendance-session-card__summary::-webkit-details-marker {
    display: none;
}

.attendance-session-card__summary--locked {
    cursor: default;
    background: linear-gradient(180deg, #fcfcfd 0%, #f3f5f8 100%);
}

.attendance-session-card__title {
    display: grid;
    gap: .2rem;
}

.attendance-session-card__index {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.attendance-session-card__title strong {
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.attendance-session-card__date {
    color: var(--primary-dark);
    font-size: 1rem;
    font-weight: 800;
}

.attendance-session-card__meta {
    display: grid;
    justify-items: end;
    gap: .45rem;
    color: var(--muted);
    font-weight: 700;
    text-align: left;
}

.attendance-session-card__toggle {
    color: var(--primary-dark);
}

.attendance-session-card[open] .attendance-session-card__toggle::after {
    content: "إخفاء التفاصيل";
}

.attendance-session-card[open] .attendance-session-card__toggle {
    font-size: 0;
}

.attendance-session-card__body {
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid var(--border);
}

.attendance-session-card--locked {
    border-style: dashed;
}

.empty-state {
    padding: 2.5rem;
    text-align: center;
    color: var(--muted);
}

.empty-state--compact {
    padding: 1.6rem;
}

.payload-code {
    display: inline-block;
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.error-card {
    padding: 2rem;
    text-align: center;
    max-width: 420px;
}

.certificate-sheet {
    padding: 24px;
    background: #f8fafc;
}

.certificate-frame {
    max-width: 1120px;
    margin: 0 auto;
    border: 14px solid rgba(15, 118, 110, .18);
    background: white;
    padding: 40px;
    border-radius: 18px;
}

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

.certificate-ministry-logos,
.certificate-platform {
    width: 250px;
    min-height: 122px;
}

.certificate-ministry-logos {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
}

.certificate-platform {
    display: grid;
    justify-items: start;
    align-content: start;
    gap: .35rem;
    text-align: right;
}

.certificate-logo {
    object-fit: contain;
}

.certificate-logo--moe {
    width: 118px;
    height: 118px;
}

.certificate-logo--talent {
    width: 92px;
    height: 92px;
    margin-top: 8px;
}

.certificate-logo--platform {
    width: 90px;
    height: 90px;
}

.certificate-brand {
    text-align: center;
    flex: 1 1 auto;
    padding-top: 18px;
}

.certificate-brand h1 {
    margin: 0;
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.certificate-platform p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    font-size: .78rem;
    line-height: 1.5;
}

.certificate-body {
    margin: 32px 0 26px;
    font-size: 1.35rem;
    line-height: 2;
    text-align: center;
}

.certificate-body p {
    margin: .5rem 0;
}

.certificate-name {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.certificate-school {
    font-size: 1.15rem;
    color: var(--muted);
    font-weight: 700;
}

.certificate-period {
    white-space: nowrap;
    font-size: 1.18rem;
}

.certificate-footer {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 210px minmax(180px, 1fr);
    align-items: end;
    gap: 1.25rem;
    text-align: center;
}

.certificate-signature,
.certificate-stamp,
.certificate-verification {
    display: grid;
    justify-items: center;
}

.certificate-manager-title {
    color: var(--muted);
    font-weight: 800;
    margin-bottom: .35rem;
}

.signature-box {
    width: 180px;
    height: 90px;
    display: grid;
    place-items: center;
    margin: .25rem 0 .45rem;
}

.signature-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.certificate-stamp strong {
    margin-bottom: .45rem;
}

.certificate-verification {
    gap: .25rem;
    align-self: end;
}

.certificate-verification__text,
.certificate-verification__hint {
    font-size: .78rem;
    line-height: 1.45;
    color: var(--muted);
    font-weight: 700;
}

.certificate-qr {
    width: 112px;
    height: 112px;
}

.certificate-qr svg {
    display: block;
    width: 100%;
    height: 100%;
}

.certificate-verify-body {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .09), transparent 32%),
        linear-gradient(225deg, rgba(212, 162, 59, .12), transparent 34%),
        #f6f8fb;
}

.certificate-verify-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
}

.certificate-verify-shell {
    width: min(980px, 100%);
    background: #fff;
    border: 1px solid rgba(221, 229, 240, .95);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.certificate-verify-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: center;
    padding: 28px;
    color: #fff;
    background: linear-gradient(135deg, #0a5953 0%, #10253e 72%);
}

.certificate-verify-header h1 {
    margin: .35rem 0 0;
    font-size: 2rem;
    font-weight: 800;
}

.certificate-verify-header span {
    color: rgba(255, 255, 255, .78);
    font-weight: 700;
}

.certificate-verify-logos {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem;
    background: #fff;
    border-radius: 14px;
}

.certificate-verify-logos img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.certificate-verify-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 18px 28px;
    border-bottom: 1px solid var(--border);
    background: #fbfcfe;
}

.certificate-verify-status span {
    color: var(--primary-dark);
    font-weight: 800;
}

.certificate-verify-status strong {
    color: var(--text);
}

.certificate-verify-table-wrap {
    padding: 28px;
}

.certificate-verify-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.certificate-verify-table th,
.certificate-verify-table td {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--border);
    text-align: right;
    line-height: 1.8;
}

.certificate-verify-table tr:last-child th,
.certificate-verify-table tr:last-child td {
    border-bottom: 0;
}

.certificate-verify-table th {
    width: 210px;
    background: #f8fafc;
    color: var(--muted);
    font-weight: 800;
}

.certificate-verify-table td {
    font-weight: 700;
}

.certificate-verify-missing {
    padding: 42px 28px;
    text-align: center;
}

.certificate-verify-missing h2 {
    margin: 0 0 .6rem;
    color: var(--danger);
    font-weight: 800;
}

.certificate-verify-missing p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.brochure-builder-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(212, 162, 59, .16), transparent 24%),
        radial-gradient(circle at bottom right, rgba(15, 118, 110, .14), transparent 28%),
        linear-gradient(135deg, #fdfefe 0%, #f3f7fb 100%);
}

.brochure-builder-hero__content {
    display: grid;
    gap: 1.4rem;
}

.brochure-builder-hero h2,
.brochure-builder-empty h3,
.brochure-map-section h3,
.brochure-instructions h3,
.brochure-cta-card h3 {
    margin: .5rem 0 0;
    font-weight: 800;
}

.brochure-builder-hero p,
.brochure-builder-section p,
.brochure-builder-empty p,
.brochure-map-section p {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.brochure-builder-form,
.brochure-builder-section {
    display: grid;
    gap: 1rem;
}

.brochure-builder-form__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
}

.brochure-builder-form__fields {
    display: grid;
    gap: 1rem;
}

.brochure-builder-form__actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.brochure-builder-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(15, 118, 110, .08) 0%, rgba(16, 37, 62, .06) 100%);
    border: 1px solid rgba(15, 118, 110, .12);
}

.brochure-builder-toolbar__count {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    font-weight: 800;
}

.brochure-builder-toolbar__count strong {
    min-width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    border-radius: 18px;
    background: #fff;
    color: var(--primary-dark);
    box-shadow: var(--shadow-soft);
}

.brochure-builder-toolbar__hint {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: var(--muted);
}

.brochure-builder-empty {
    padding: 2rem;
    border-radius: 24px;
    border: 1px dashed rgba(15, 118, 110, .24);
    background: rgba(255, 255, 255, .7);
    text-align: center;
}

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

.brochure-builder-table td:first-child,
.brochure-builder-table th:first-child {
    text-align: center;
}

.brochure-print-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
    gap: .65rem;
    padding: .8rem;
    background: rgba(238, 242, 247, .96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #d8e0ea;
}

.brochure-print-toolbar button,
.brochure-print-toolbar a {
    border: 1px solid #0f766e;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    padding: .55rem 1.1rem;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.brochure-print-toolbar a {
    background: #fff;
    color: #334155;
    border-color: #cbd5e1;
}

.brochure-document {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8mm;
    padding: 8mm 0 12mm;
}

.brochure-sheet {
    width: 194mm;
    min-height: 281mm;
    padding: 8mm;
    border-radius: 8mm;
    background:
        linear-gradient(rgba(255, 255, 255, .88), rgba(255, 255, 255, .88)),
        url('../images/ident_background.png') center center / cover no-repeat;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .12);
    border: 1px solid rgba(15, 118, 110, .08);
    display: flex;
    flex-direction: column;
    gap: 4mm;
    overflow: hidden;
    break-after: page;
    page-break-after: always;
    box-sizing: border-box;
    page: brochure-sheet;
}

.brochure-sheet:last-of-type {
    break-after: auto;
    page-break-after: auto;
}

.brochure-header {
    display: grid;
    grid-template-columns: 46mm minmax(0, 1fr) 30mm;
    align-items: center;
    gap: 3mm;
    padding: 0 0 3mm;
    border-bottom: 1px solid rgba(15, 118, 110, .14);
}

.brochure-header__logos {
    display: flex;
    align-items: center;
    gap: 2mm;
}

.brochure-header__logos img {
    width: 12mm;
    height: 12mm;
    object-fit: contain;
    padding: .9mm;
    background: rgba(255, 255, 255, .92);
    border-radius: 3.5mm;
    border: 1px solid rgba(15, 118, 110, .08);
}

.brochure-header__copy {
    display: grid;
    gap: .4mm;
}

.brochure-header__eyebrow,
.brochure-cta-card__eyebrow {
    color: var(--primary-dark);
    font-size: 8.5pt;
    font-weight: 800;
}

.brochure-header__copy h1 {
    margin: 0;
    font-size: 14.5pt;
    line-height: 1.35;
    font-weight: 800;
}

.brochure-header__copy p,
.brochure-cta-card__copy p {
    margin: 0;
    color: #526377;
    line-height: 1.8;
    font-size: 9.4pt;
}

.brochure-header__meta {
    display: grid;
    gap: 1.5mm;
}

.brochure-header__meta div {
    padding: 1.8mm 2mm;
    border-radius: 3mm;
    background: linear-gradient(135deg, #10253e 0%, #0f766e 100%);
    color: #fff;
}

.brochure-header__meta span,
.brochure-header__meta strong {
    display: block;
}

.brochure-header__meta span {
    font-size: 7.1pt;
    opacity: .84;
}

.brochure-header__meta strong {
    font-size: 8.8pt;
    margin-top: .4mm;
    font-weight: 800;
}

.brochure-program-list {
    display: grid;
    gap: 2.4mm;
    flex: 1 1 auto;
}

.brochure-program-list--compact {
    gap: 2mm;
}

.brochure-program-card {
    display: grid;
    grid-template-columns: 44mm minmax(0, 1fr);
    gap: 4mm;
    padding: 4mm;
    border-radius: 7mm;
    background: #fff;
    border: 1px solid rgba(15, 118, 110, .12);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    color: inherit;
    break-inside: avoid;
    page-break-inside: avoid;
}

.brochure-program-card--compact {
    grid-template-columns: 22mm minmax(0, 1fr);
    gap: 2mm;
    padding: 2mm;
    border-radius: 3.5mm;
}

.brochure-program-card__media {
    position: relative;
    overflow: hidden;
    border-radius: 5mm;
    min-height: 36mm;
    background: #e8eef7;
}

.brochure-program-card--compact .brochure-program-card__media {
    border-radius: 2.6mm;
    min-height: 18mm;
}

.brochure-program-card__media img {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
}

.brochure-program-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brochure-program-card__status,
.brochure-program-card__visit {
    position: absolute;
    inset-inline-end: 2.5mm;
    border-radius: 999px;
    font-weight: 800;
}

.brochure-program-card__status {
    inset-block-start: 2.5mm;
    padding: 1.1mm 2.4mm;
    background: rgba(255, 255, 255, .94);
    font-size: 7.1pt;
}

.brochure-program-card__visit {
    inset-block-end: 2.5mm;
    padding: 1.1mm 2.4mm;
    background: rgba(16, 37, 62, .9);
    color: #fff;
    font-size: 6.9pt;
}

.brochure-program-card--compact .brochure-program-card__status,
.brochure-program-card--compact .brochure-program-card__visit {
    inset-inline-end: 1.5mm;
    border-radius: 999px;
    padding: .55mm 1.3mm;
    font-size: 5.2pt;
}

.brochure-program-card--compact .brochure-program-card__status {
    inset-block-start: 1.5mm;
}

.brochure-program-card--compact .brochure-program-card__visit {
    inset-block-end: 1.5mm;
}

.brochure-program-card__content {
    display: grid;
    gap: 1.4mm;
    min-width: 0;
}

.brochure-program-card__head h2 {
    margin: 0 0 1mm;
    font-size: 12pt;
    line-height: 1.5;
    font-weight: 800;
}

.brochure-program-card__head p {
    margin: 0;
    color: #5b6b7f;
    line-height: 1.75;
    font-size: 8.8pt;
}

.brochure-program-card--compact .brochure-program-card__head h2 {
    font-size: 8.2pt;
    margin-bottom: .3mm;
    line-height: 1.35;
}

.brochure-program-card--compact .brochure-program-card__head p {
    font-size: 5.9pt;
    line-height: 1.45;
}

.brochure-program-card__details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2mm 3mm;
}

.brochure-program-card__details--compact {
    gap: .8mm 1.1mm;
}

.brochure-program-card__details div {
    padding: 2.1mm 2.5mm;
    border-radius: 4mm;
    background: #f5f8fb;
    border: 1px solid #e2e8f0;
}

.brochure-program-card__details--compact div {
    padding: .9mm 1.1mm;
    border-radius: 2mm;
}

.brochure-program-card__details span {
    display: block;
    color: #64748b;
    font-size: 7pt;
    margin-bottom: .7mm;
}

.brochure-program-card__details strong {
    display: block;
    color: #122033;
    font-size: 8.1pt;
    line-height: 1.6;
    font-weight: 800;
}

.brochure-program-card--compact .brochure-program-card__details span {
    font-size: 5.1pt;
    margin-bottom: .2mm;
}

.brochure-program-card--compact .brochure-program-card__details strong {
    font-size: 5.9pt;
    line-height: 1.35;
}

.brochure-program-card__targets {
    display: grid;
    gap: 1.4mm;
}

.brochure-program-card__targets-title {
    color: var(--primary-dark);
    font-size: 8pt;
    font-weight: 800;
}

.brochure-program-card__targets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5mm;
}

.brochure-program-card__targets-list span {
    padding: 1.2mm 2.3mm;
    border-radius: 999px;
    background: rgba(15, 118, 110, .08);
    border: 1px solid rgba(15, 118, 110, .14);
    color: #104c47;
    font-size: 7.1pt;
    font-weight: 700;
}

.brochure-program-card--compact .brochure-program-card__targets-title {
    font-size: 5.7pt;
}

.brochure-program-card--compact .brochure-program-card__targets-list {
    gap: 1mm;
}

.brochure-program-card--compact .brochure-program-card__targets-list span {
    padding: .45mm 1.1mm;
    font-size: 5pt;
}

.brochure-footer {
    display: grid;
    gap: 3mm;
}

.brochure-cta-card,
.brochure-map-section,
.brochure-instructions {
    border-radius: 5mm;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(15, 118, 110, .12);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.brochure-cta-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 33mm;
    gap: 4mm;
    align-items: center;
    padding: 4mm;
    background: linear-gradient(135deg, rgba(15, 118, 110, .08) 0%, rgba(212, 162, 59, .1) 100%);
}

.brochure-link {
    color: var(--primary-dark);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.brochure-link--inline {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.brochure-map-section {
    padding: 4mm;
    display: grid;
    gap: 3mm;
}

.brochure-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(26mm, 1fr));
    gap: 2mm;
}

.brochure-qr-card {
    display: grid;
    justify-items: center;
    gap: 1mm;
    padding: 2.8mm;
    border-radius: 5mm;
    background: #fff;
    border: 1px solid #dbe3ee;
    color: inherit;
    text-align: center;
}

.brochure-qr-card--platform {
    background: linear-gradient(180deg, #fff 0%, #f6fbfa 100%);
}

.brochure-qr-card__svg {
    width: 18mm;
    height: 18mm;
}

.brochure-qr-card__svg svg {
    width: 100%;
    height: 100%;
    display: block;
}

.brochure-qr-card strong {
    font-size: 8pt;
    line-height: 1.5;
}

.brochure-qr-card span {
    color: #64748b;
    font-size: 6.8pt;
    line-height: 1.55;
}

.brochure-instructions {
    padding: 4mm;
}

.brochure-instructions ul {
    margin: 2mm 0 0;
    padding: 0 4.5mm 0 0;
    display: grid;
    gap: 1.5mm;
}

.brochure-instructions li {
    line-height: 1.8;
    font-size: 7.5pt;
}

.brochure-sheet--closing {
    justify-content: flex-start;
}

@page brochure-sheet {
    size: A4 portrait;
    margin: 8mm;
}

@page attendance-sheet {
    size: A4 landscape;
    margin: 0;
}

.attendance-print-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: .5rem;
    padding: .75rem;
    background: #eef2f7;
    border-bottom: 1px solid #d7dee8;
}

.attendance-print-toolbar button {
    border: 1px solid #0f766e;
    border-radius: 6px;
    background: #0f766e;
    color: #fff;
    padding: .45rem 1rem;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
}

.attendance-print-toolbar button + button {
    background: #fff;
    color: #334155;
    border-color: #cbd5e1;
}

.attendance-print-document {
    display: flex;
    flex-direction: column;
    gap: 6mm;
    align-items: center;
    padding: 6mm 0 10mm;
}

.attendance-print-sheet {
    page: attendance-sheet;
    width: 285mm;
    height: 200mm;
    padding: 7mm 7mm 6mm;
    box-sizing: border-box;
    background: #fff;
    color: #111827;
    display: flex;
    flex-direction: column;
    break-after: page;
    page-break-after: always;
    overflow: hidden;
}

.attendance-print-sheet:last-of-type {
    break-after: auto;
    page-break-after: auto;
}

.attendance-print-sheet--single {
    height: auto;
    min-height: auto;
}

.attendance-print-page-head {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #0f766e;
}

.attendance-print-page-head__top,
.attendance-print-page-head__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.attendance-print-page-head__program,
.attendance-print-page-head__page {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.attendance-print-page-head__program strong,
.attendance-print-page-head__page span {
    font-size: .82rem;
    font-weight: 800;
    color: #0f172a;
}

.attendance-print-page-head__program span,
.attendance-print-page-head__meta span {
    color: #475569;
    font-size: .67rem;
    white-space: nowrap;
}

.attendance-print-footer strong {
    display: block;
    margin-top: .2rem;
    font-size: .86rem;
    font-weight: 800;
}

.attendance-print-table-wrap {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.attendance-print-table-scale {
    width: 100%;
}

.attendance-print-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    direction: rtl;
    font-size: .6rem;
}

.attendance-print-col-index {
    width: var(--attendance-index-width);
}

.attendance-print-col-name {
    width: var(--attendance-name-width);
}

.attendance-print-col-id {
    width: var(--attendance-id-width);
}

.attendance-print-col-session {
    width: var(--attendance-session-width);
}

.attendance-print-col-total {
    width: var(--attendance-total-width);
}

.attendance-print-table thead {
    display: table-header-group;
}

.attendance-print-table tbody {
    display: table-row-group;
}

.attendance-print-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
}

.attendance-print-table th,
.attendance-print-table td {
    border: 1px solid #94a3b8;
    padding: 3px 2px;
    text-align: center;
    vertical-align: middle;
}

.attendance-print-table th {
    background: #e6f3f1;
    color: #0f172a;
    font-weight: 800;
}

.attendance-print-index {
    white-space: nowrap;
}

.attendance-print-name {
    white-space: nowrap;
}

.attendance-print-id {
    white-space: nowrap;
}

.attendance-print-session {
    white-space: nowrap;
}

.attendance-print-total {
    white-space: nowrap;
}

.attendance-print-session span,
.attendance-print-session small,
.attendance-print-session em {
    display: block;
    line-height: 1.25;
    white-space: nowrap;
}

.attendance-print-session small {
    color: #475569;
    font-size: .58rem;
}

.attendance-print-session em {
    color: #64748b;
    font-size: .52rem;
    font-style: normal;
}

.attendance-print-name-cell {
    text-align: right;
    font-weight: 800;
    white-space: nowrap;
    padding-inline: 4px;
}

.attendance-print-mark {
    font-size: .9rem;
    font-weight: 800;
    line-height: 1;
}

.attendance-print-mark--present {
    color: #047857;
}

.attendance-print-mark--absent {
    color: #b91c1c;
}

.attendance-print-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    color: #64748b;
    font-weight: 800;
}

.attendance-print-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    flex: 0 0 10mm;
    margin-top: 2px;
    transform: translateY(-3mm);
}

.attendance-print-footer div {
    min-height: 0;
    border-top: 1px solid #94a3b8;
    padding-top: 3px;
    page-break-inside: avoid;
    break-inside: avoid;
}

.attendance-print-footer span {
    display: block;
    color: #64748b;
    font-size: .64rem;
    font-weight: 700;
}

.attendance-print-footer strong {
    margin-top: 0;
    font-size: .74rem;
}

@media print {
    .attendance-print-toolbar {
        display: none;
    }

    html,
    body,
    .print-body.attendance-print-body {
        width: auto;
        height: auto;
        overflow: visible;
        margin: 0;
        padding: 0;
        background: #fff !important;
    }

    .attendance-print-document {
        gap: 0;
        padding: 0;
    }

    .attendance-print-sheet {
        width: 297mm;
        height: 210mm;
        margin: 0;
        padding: 7mm 7mm 6mm;
        box-shadow: none;
        overflow: hidden;
    }

    .attendance-print-sheet:last-of-type {
        break-after: avoid-page;
        page-break-after: auto;
    }

    .attendance-print-page-head,
    .attendance-print-table th {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: .2rem;
}

.star-rating input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.star-rating label {
    font-size: 2rem;
    line-height: 1;
    color: #d4dae5;
    cursor: pointer;
    transition: color .18s ease, transform .18s ease;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #f6b90f;
}

.star-rating label:hover {
    transform: scale(1.04);
}

.evaluation-summary-list,
.evaluation-text-groups,
.evaluation-text-list,
.evaluation-person-list {
    display: grid;
    gap: 1rem;
}

.evaluation-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) 132px minmax(220px, .95fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
}

.evaluation-summary-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.evaluation-summary-row__main {
    display: grid;
    gap: .55rem;
}

.evaluation-summary-row__main h3,
.evaluation-text-group h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.evaluation-stars {
    display: flex;
    gap: .16rem;
    color: #d4dae5;
    font-size: 1.35rem;
    line-height: 1;
}

.evaluation-stars .is-filled {
    color: #f6b90f;
}

.evaluation-score-box {
    display: grid;
    gap: .15rem;
    justify-items: center;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f8fafc;
    padding: .85rem;
}

.evaluation-score-box strong {
    font-size: 1.55rem;
    color: var(--primary-dark);
}

.evaluation-score-box span,
.evaluation-text-answer__meta span,
.evaluation-person summary small {
    color: var(--muted);
    font-size: .86rem;
}

.evaluation-distribution {
    display: grid;
    gap: .4rem;
}

.evaluation-distribution__row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 34px;
    gap: .5rem;
    align-items: center;
    font-size: .86rem;
    font-weight: 700;
}

.evaluation-distribution__track {
    height: 9px;
    background: #edf2f7;
    border-radius: 999px;
    overflow: hidden;
}

.evaluation-distribution__track div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.evaluation-text-group {
    display: grid;
    gap: .85rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.evaluation-text-group:first-child {
    border-top: 0;
    padding-top: 0;
}

.evaluation-text-answer {
    display: grid;
    gap: .7rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f8fafc;
    padding: 1rem;
}

.evaluation-text-answer__meta {
    display: flex;
    gap: .7rem;
    align-items: center;
    flex-wrap: wrap;
}

.evaluation-text-answer p {
    margin: 0;
    line-height: 1.9;
}

.evaluation-person {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
}

.evaluation-person summary {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    font-weight: 800;
}

.evaluation-person summary span:first-child {
    display: grid;
    gap: .2rem;
}

.evaluation-person .responsive-table {
    border-top: 1px solid var(--border);
}

.evaluation-star-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    border-radius: 999px;
    padding: .42rem .7rem;
    background: rgba(246, 185, 15, .16);
    color: #8a5a00;
    font-weight: 800;
}

.dashboard-close {
    color: #fff;
    border-color: rgba(255, 255, 255, .15);
}

@media (max-width: 1399px) {
    .dashboard-section-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1199px) {
    .dashboard-hero,
    .program-details-hero,
    .hero-home,
    .auth-shell--split {
        grid-template-columns: 1fr;
    }

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

    .brochure-builder-form__header,
    .brochure-header,
    .brochure-cta-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .navbar {
        min-height: 84px;
    }

    .brand-logo {
        width: 62px;
        height: 62px;
    }

    .partner-logo {
        width: 46px;
        height: 46px;
    }

    .hero-home__brand-mark {
        width: 92px;
        height: 92px;
    }

    .hero-home__support img {
        width: 72px;
        height: 72px;
    }

    .dashboard-shell {
        display: block;
    }

    .dashboard-sidebar--mobile {
        border-radius: 0;
    }

    .dashboard-main {
        width: 100%;
        padding: 1rem;
    }

    .dashboard-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-topbar__start,
    .dashboard-topbar__end {
        width: 100%;
        justify-content: space-between;
    }

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

    .evaluation-score-box {
        justify-items: start;
    }

    .mobile-card-table thead {
        display: none;
    }

    .mobile-card-table tbody,
    .mobile-card-table tr,
    .mobile-card-table td {
        display: block;
        width: 100%;
    }

    .mobile-card-table tr {
        padding: 1rem;
        margin-bottom: .75rem;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: white;
        box-shadow: var(--shadow-soft);
    }

    .mobile-card-table td {
        border: 0 !important;
        padding: .35rem 0;
        text-align: right !important;
    }

    .mobile-card-table td::before {
        content: attr(data-label);
        display: block;
        color: var(--muted);
        font-size: .78rem;
        margin-bottom: .15rem;
    }

    .attendance-row {
        flex-direction: column;
        align-items: stretch;
    }

    .attendance-session-card__summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .attendance-session-card__meta {
        justify-items: start;
        text-align: right;
    }

    .actions-cell {
        padding-top: .5rem;
    }

    .certificate-frame {
        padding: 20px;
    }

    .certificate-top {
        display: grid;
        justify-items: center;
        text-align: center;
    }

    .certificate-ministry-logos,
    .certificate-platform {
        width: auto;
        min-height: auto;
        justify-items: center;
    }

    .certificate-footer {
        grid-template-columns: 1fr;
    }

    .certificate-period {
        white-space: normal;
    }

    .certificate-verify-header,
    .certificate-verify-status {
        grid-template-columns: 1fr;
        display: grid;
        text-align: center;
        justify-items: center;
    }

    .certificate-verify-table th,
    .certificate-verify-table td {
        display: block;
        width: 100%;
    }

    .ticket-dashboard-alert {
        align-items: stretch;
        flex-direction: column;
    }

    .ticket-message__head,
    .ticket-status-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .brochure-builder-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .brochure-builder-table td:first-child,
    .brochure-builder-table th:first-child {
        text-align: right;
    }
}

@media (max-width: 767px) {
    .hero-home__content,
    .program-details-hero__content,
    .dashboard-card,
    .hero-home__panel,
    .dashboard-hero__panel {
        padding: 1.25rem;
    }

    .dashboard-kpis,
    .program-details-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .quick-link-grid,
    .dashboard-program-grid,
    .program-grid {
        grid-template-columns: 1fr;
    }

    .program-details-hero__media {
        min-height: 260px;
    }

    .star-rating label {
        font-size: 1.8rem;
    }

    .brochure-builder-form__actions {
        justify-content: stretch;
    }

    .brochure-builder-form__actions .btn {
        width: 100%;
    }

    .brochure-program-card,
    .brochure-program-card--compact {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    .print-body:not(.attendance-print-body) {
        width: 281mm;
        height: 194mm;
        margin: 0;
        padding: 0;
        background: #fff !important;
        overflow: hidden;
    }

    .certificate-sheet {
        width: 277mm;
        height: 190mm;
        margin: 0 auto;
        padding: 0;
        background: white;
        display: flex;
        align-items: stretch;
        overflow: hidden;
        break-after: avoid;
        break-before: avoid;
        break-inside: avoid;
        page-break-after: avoid;
        page-break-before: avoid;
        page-break-inside: avoid;
    }

    .brochure-print-toolbar {
        display: none;
    }

    .print-body.brochure-print-body {
        width: auto;
        height: auto;
        margin: 0;
        padding: 0;
        background: #fff !important;
        overflow: visible;
    }

    .brochure-document {
        gap: 0;
        padding: 0;
    }

    .brochure-sheet {
        width: 194mm;
        min-height: 281mm;
        margin: 0;
        padding: 8mm;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background:
            linear-gradient(rgba(255, 255, 255, .88), rgba(255, 255, 255, .88)),
            url('../images/ident_background.png') center center / cover no-repeat;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        box-sizing: border-box;
    }

    .brochure-header,
    .brochure-program-card,
    .brochure-cta-card,
    .brochure-map-section,
    .brochure-instructions,
    .brochure-program-card__details div,
    .brochure-header__meta div,
    .brochure-program-card__targets-list span,
    .brochure-qr-card {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .brochure-program-card__media,
    .brochure-program-card__media img {
        overflow: hidden !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: cover !important;
    }

    .certificate-frame {
        width: 100%;
        height: 100%;
        max-width: none;
        min-height: 0;
        border-width: 6px;
        border-radius: 10px;
        box-shadow: none;
        padding: 8mm 10mm 6mm;
        display: grid;
        grid-template-rows: 29mm 1fr 38mm;
        overflow: hidden;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .certificate-top {
        display: grid;
        grid-template-columns: 58mm minmax(0, 1fr) 58mm;
        align-items: start;
        gap: 5mm;
        direction: ltr;
    }

    .certificate-ministry-logos,
    .certificate-platform {
        width: auto;
        min-height: 0;
        direction: rtl;
    }

    .certificate-platform {
        grid-column: 1;
        grid-row: 1;
        justify-items: start;
        text-align: right;
    }

    .certificate-brand {
        grid-column: 2;
        grid-row: 1;
    }

    .certificate-ministry-logos {
        grid-column: 3;
        grid-row: 1;
        justify-content: start;
    }

    .certificate-logo--moe {
        width: 27mm;
        height: 27mm;
    }

    .certificate-logo--talent {
        width: 20mm;
        height: 20mm;
        margin-top: 2mm;
    }

    .certificate-logo--platform {
        width: 20mm;
        height: 20mm;
    }

    .certificate-brand {
        padding-top: 3mm;
    }

    .certificate-brand h1 {
        font-size: 22pt;
    }

    .certificate-platform p {
        max-width: 52mm;
        font-size: 7pt;
        line-height: 1.25;
        white-space: normal;
    }

    .certificate-body {
        align-self: center;
        margin: 0;
        font-size: 14pt;
        line-height: 1.68;
    }

    .certificate-body p {
        margin: 1.15mm 0;
    }

    .certificate-name {
        font-size: 21pt;
    }

    .certificate-school {
        font-size: 11.5pt;
    }

    .certificate-period {
        font-size: 11.5pt;
        white-space: nowrap;
    }

    .certificate-footer {
        grid-template-columns: minmax(46mm, 1fr) 40mm minmax(46mm, 1fr);
        gap: 7mm;
        align-items: start;
        padding-top: 1mm;
    }

    .signature-box {
        width: 40mm;
        height: 17mm;
        margin: 1mm 0 1.2mm;
    }

    .certificate-manager-title,
    .certificate-signature strong,
    .certificate-stamp strong {
        font-size: 10pt;
    }

    .certificate-manager-title {
        margin-bottom: .5mm;
    }

    .certificate-stamp strong {
        margin-bottom: 1mm;
    }

    .certificate-verification {
        gap: 1mm;
        align-self: start;
    }

    .certificate-verification__text,
    .certificate-verification__hint {
        font-size: 7pt;
        line-height: 1.25;
    }

    .certificate-qr {
        width: 23mm;
        height: 23mm;
    }
}
