@font-face {
    font-family: VazirmatnLocal;
    src: url("../fonts/webfonts/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: VazirmatnLocal;
    src: url("../fonts/webfonts/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: VazirmatnLocal, Tahoma, Arial, sans-serif;
    background: #edf4f2;
    color: var(--text);
}

.public-shell {
    display: flex;
    justify-content: center;
    padding: 0;
}

.phone-frame {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    background: var(--background);
    overflow: hidden;
    min-width: 0;
}

.home-hero {
    min-height: 62vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 20px;
    background:
        linear-gradient(160deg, color-mix(in srgb, var(--primary) 12%, transparent), transparent 56%),
        var(--background);
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 26px;
    font-weight: 800;
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eyebrow {
    margin: 0 0 3px;
    font-size: 12px;
    color: color-mix(in srgb, var(--text) 64%, transparent);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 23px;
}

.hero-copy h2 {
    font-size: 38px;
    line-height: 1.25;
    margin-bottom: 16px;
}

.hero-copy p,
.feature-list p {
    line-height: 1.9;
    color: color-mix(in srgb, var(--text) 72%, transparent);
}

.primary-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    border-radius: 10px;
    padding: 0 18px;
    color: #fff;
    background: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.feature-list {
    display: grid;
    gap: 12px;
    padding: 18px 16px 28px;
}

.feature-list article {
    border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(31, 138, 112, .08);
}

.feature-list span {
    color: var(--accent);
    font-weight: 900;
}

.feature-list h3 {
    margin: 8px 0;
}

.auth-frame {
    display: grid;
    place-items: center;
    padding: 18px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--primary) 18%, transparent), transparent 48%),
        linear-gradient(20deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 44%),
        var(--background);
}

.auth-card {
    width: 100%;
    display: grid;
    gap: 2px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
    border-radius: 8px;
    padding: 22px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 24px 70px rgba(24, 35, 33, .14);
}

.login-copy h2,
.user-welcome h2 {
    margin-bottom: 10px;
    font-size: 30px;
    line-height: 1.35;
}

.login-copy p,
.user-welcome p,
.role-panel span {
    margin: 0;
    color: color-mix(in srgb, var(--text) 70%, transparent);
    line-height: 1.9;
}

.public-login-form {
    display: grid;
    gap: 14px;
}

.public-login-form label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

.public-login-form input {
    width: 100%;
    min-height: 48px;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    background: #fff;
    font: inherit;
}

.public-login-form input:focus {
    outline: 2px solid color-mix(in srgb, var(--primary) 28%, transparent);
    border-color: var(--primary);
}

.public-login-form button {
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.auth-error {
    border-radius: 8px;
    padding: 12px;
    color: #9f2424;
    background: #fff0f0;
    font-weight: 700;
}

.user-welcome {
    border-radius: 8px;
    padding: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 72%, #111));
}

.user-welcome span {
    display: inline-flex;
    border-radius: 8px;
    padding: 4px 10px;
    color: var(--primary);
    background: #fff;
    font-weight: 900;
}

.user-welcome p {
    color: rgba(255, 255, 255, .82);
}

.role-panel article {
    display: grid;
    gap: 8px;
    border: 1px solid color-mix(in srgb, var(--primary) 15%, transparent);
    border-radius: 8px;
    padding: 16px;
    background: color-mix(in srgb, var(--primary) 7%, #fff);
}

.role-panel b {
    color: var(--primary);
    font-size: 18px;
}

.secondary-action {
    text-decoration: none;
    background: color-mix(in srgb, var(--text) 82%, #000);
}

.mobile-app-frame {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--primary) 7%, #fff), #f6f8f7 220px),
        #f6f8f7;
}

.app-toolbar {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 5;
    width: min(100%, 430px);
    transform: translateX(-50%);
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--primary) 12%, #fff);
    border-radius: 0 0 22px 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .9)),
        color-mix(in srgb, var(--primary) 8%, #fff);
    box-shadow: 0 10px 28px rgba(24, 35, 33, .10);
    backdrop-filter: blur(16px);
}

.compact-brand {
    min-width: 0;
    gap: 9px;
}

.app-brand-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 16px;
    font-size: 20px;
}

.compact-brand .eyebrow {
    margin-bottom: 0;
    font-size: 11px;
}

.compact-brand h1 {
    font-size: 17px;
    line-height: 1.35;
}

.toolbar-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: #1e2d29;
    box-shadow: 0 10px 22px rgba(24, 35, 33, .18);
    cursor: pointer;
}

.notification-button {
    position: relative;
}

.notification-float-label {
    position: absolute;
    top: 50%;
    left: calc(100% + 2px);
    display: none;
    width: max-content;
    max-width: 128px;
    transform: translateY(-50%);
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    background: #e11d48;
    box-shadow: 0 10px 24px rgba(225, 29, 72, .24);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.5;
    pointer-events: none;
}

.notification-button.has-unread .notification-float-label {
    display: block;
}

.notification-button::after {
    content: "";
    position: absolute;
    top: 9px;
    left: 10px;
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--accent);
    opacity: 0;
    transform: scale(.4);
    transition: .18s ease;
}

.notification-button.has-unread::after {
    opacity: 1;
    transform: scale(1);
    background: #e11d48;
}

.toolbar-icon svg,
.bottom-nav svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.app-content {
    min-width: 0;
    flex: 1;
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 82px 14px 88px;
    overflow-y: auto;
    overflow-x: hidden;
}

.notification-panel {
    position: fixed;
    top: 74px;
    left: 50%;
    z-index: 6;
    width: min(calc(100% - 28px), 402px);
    max-height: min(62vh, 460px);
    transform: translateX(-50%);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 13%, #fff);
    border-radius: 18px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 22px 58px rgba(24, 35, 33, .18);
}

.notification-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f0;
}

.notification-panel-head button {
    min-height: 34px;
    border: 0;
    border-radius: 12px;
    padding: 0 12px;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
}

.notification-list {
    display: grid;
    gap: 8px;
    /* max-height: 380px; */
    max-height: min(50vh, 460px);
    overflow-y: auto;
    padding: 10px;
}

.notification-list article,
.empty-notifications {
    margin: 0;
    border: 1px solid #edf2f0;
    border-radius: 14px;
    padding: 11px 12px;
    background: #fff;
}

.notification-list article.is-unread {
    border-color: color-mix(in srgb, var(--primary) 32%, #fff);
    background: color-mix(in srgb, var(--primary) 8%, #fff);
}

.notification-list strong,
.notification-list p {
    margin: 0;
}

.notification-list p,
.empty-notifications {
    margin-top: 6px;
    color: color-mix(in srgb, var(--text) 68%, transparent);
    line-height: 1.8;
    font-size: 13px;
}

.app-login-card {
    margin-top: 18px;
}

/* Standalone public login */
.standalone-login-page {
    min-height: 100vh;
    margin: 0;
    overflow: auto;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 12%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 28%),
        #f4f7f6;
}

.standalone-login-shell {
    display: grid;
    grid-template-columns: minmax(420px, .9fr) minmax(460px, 1.1fr);
    width: min(1180px, calc(100% - 40px));
    min-height: min(740px, calc(100vh - 56px));
    margin: 28px auto;
    overflow: hidden;
    border: 1px solid rgba(25, 55, 48, .08);
    border-radius: 32px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(19, 52, 44, .13);
}

.standalone-login-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 44px;
    color: #fff;
    background:
        radial-gradient(circle at 10% 90%, rgba(255,255,255,.2), transparent 32%),
        linear-gradient(145deg, color-mix(in srgb, var(--primary) 74%, #102b26), var(--primary));
}

.login-visual-pattern::before,
.login-visual-pattern::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50%;
}
.login-visual-pattern::before { width: 390px; height: 390px; left: -190px; top: -110px; }
.login-visual-pattern::after { width: 240px; height: 240px; right: -110px; bottom: 80px; border-width: 42px; }

.standalone-school-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.standalone-school-logo {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 22px;
    color: var(--primary);
    background: #fff;
    box-shadow: 0 14px 35px rgba(0,0,0,.14);
    font-size: 28px;
    font-weight: 800;
}
.standalone-school-logo img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.standalone-school-brand small { color: rgba(255,255,255,.72); }
.standalone-school-brand h1 { margin: 4px 0 0; color: #fff; font-size: 24px; }
.login-welcome-copy { position: relative; z-index: 1; max-width: 480px; margin: auto 0; padding: 55px 0; }
.login-welcome-copy > span { display: inline-block; border-radius: 999px; padding: 5px 12px; background: rgba(255,255,255,.13); font-size: 12px; }
.login-welcome-copy h2 { margin: 16px 0 12px; color: #fff; font-size: clamp(27px, 3.2vw, 42px); line-height: 1.55; }
.login-welcome-copy p { margin: 0; color: rgba(255,255,255,.76); line-height: 2.1; }
.login-feature-pills { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.login-feature-pills span { border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 7px 12px; color: rgba(255,255,255,.82); font-size: 11px; background: rgba(255,255,255,.07); }

.standalone-login-form-side { display: grid; align-content: center; padding: clamp(30px, 6vw, 82px); }
.standalone-login-form-side .auth-card { width: 100%; max-width: 470px; margin: auto; border: 0; padding: 0; box-shadow: none; background: transparent; }
.standalone-login-form-side .login-copy h2 { margin-top: 7px; font-size: 28px; }
.login-form-eyebrow { color: var(--primary); font-size: 12px; font-weight: 800; }
.standalone-login-form-side .public-login-form { gap: 18px; margin-top: 28px; }
.standalone-login-form-side .public-login-form label { gap: 8px; color: #30433f; font-weight: 700; }
.login-input-wrap { position: relative; display: block; }
.login-input-wrap svg { position: absolute; z-index: 1; width: 20px; right: 15px; top: 50%; fill: #879994; transform: translateY(-50%); pointer-events: none; }
.standalone-login-form-side .login-input-wrap input { width: 100%; min-height: 56px; padding: 12px 46px 12px 14px; border: 1px solid #dfe8e5; border-radius: 15px; background: #f8faf9; }
.standalone-login-form-side .login-input-wrap input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 11%, transparent); }
.standalone-login-form-side .public-login-form button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; margin-top: 4px; border-radius: 15px; box-shadow: 0 13px 28px color-mix(in srgb, var(--primary) 25%, transparent); }
.standalone-login-form-side .public-login-form button svg { width: 21px; fill: currentColor; }
.login-support-note { margin: 25px auto 0; color: #7c8d88; font-size: 12px; text-align: center; }
.mobile-login-brand { display: none; }

@media (max-width: 840px) {
    .standalone-login-shell { grid-template-columns: 1fr; width: min(560px, calc(100% - 28px)); min-height: auto; margin: 14px auto; border-radius: 24px; }
    .standalone-login-visual { display: none; }
    .standalone-login-form-side { min-height: calc(100vh - 28px); padding: 32px 24px; }
    .mobile-login-brand { display: flex; align-items: center; gap: 12px; margin: 0 auto 42px; width: 100%; max-width: 470px; }
    .mobile-login-brand .standalone-school-logo { width: 58px; height: 58px; border: 1px solid #e1eae7; border-radius: 18px; box-shadow: 0 10px 25px rgba(20,50,43,.09); }
    .mobile-login-brand div { display: grid; gap: 3px; }
    .mobile-login-brand small { color: #81908c; }
    .mobile-login-brand strong { font-size: 18px; }
}

@media (max-width: 420px) {
    .standalone-login-shell { width: 100%; min-height: 100vh; margin: 0; border: 0; border-radius: 0; }
    .standalone-login-form-side { min-height: 100vh; padding: 28px 20px; }
}

.home-tab-stack {
    display: grid;
    gap: 16px;
}

.app-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.home-swiper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: 12px;
}

.home-swiper .swiper-wrapper {
    display: flex;
    min-width: 0;
}

.home-swiper .swiper-slide {
    width: 100% !important;
    min-width: 0;
    flex: 0 0 100%;
}

.slider-card {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    height: clamp(136px, 36vw, 158px);
    overflow: hidden;
    border-radius: 14px;
    background: #dfe9e5;
    box-shadow: 0 12px 26px rgba(24, 35, 33, .12);
    text-decoration: none;
}

.slider-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(13, 22, 20, .58));
    pointer-events: none;
}

.slider-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-card strong {
    position: absolute;
    right: 14px;
    bottom: 12px;
    z-index: 1;
    max-width: calc(100% - 28px);
    color: #fff;
    font-size: 13px;
    line-height: 1.7;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .42);
}

.home-swiper .swiper-pagination {
    bottom: 0;
}

.home-swiper .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: color-mix(in srgb, var(--text) 22%, #dfe9e5);
    opacity: 1;
    transition: width .2s ease, background .2s ease;
}

.home-swiper .swiper-pagination-bullet-active {
    width: 18px;
    border-radius: 999px;
    background: var(--primary);
}

.empty-slider {
    min-height: 126px;
    display: grid;
    align-content: center;
    gap: 8px;
    border: 1px dashed color-mix(in srgb, var(--primary) 28%, transparent);
    border-radius: 8px;
    padding: 18px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 7%, #fff);
}

.empty-slider span {
    color: color-mix(in srgb, var(--text) 66%, transparent);
}

.app-welcome {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, #fff);
    border-radius: 18px;
    padding: 18px;
    color: #fff;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 92%, #10231d), color-mix(in srgb, var(--accent) 42%, var(--primary))),
        var(--primary);
    box-shadow: 0 18px 44px color-mix(in srgb, var(--primary) 24%, transparent);
}

.app-welcome::before {
    content: "";
    position: absolute;
    left: -34px;
    top: -42px;
    width: 128px;
    height: 128px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
}

.app-welcome::after {
    content: "";
    position: absolute;
    right: 18px;
    bottom: -42px;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
}

.app-welcome > div,
.app-welcome > b {
    position: relative;
    z-index: 1;
}

.app-welcome span {
    display: inline-flex;
    margin-bottom: 10px;
    border-radius: 999px;
    padding: 4px 10px;
    color: color-mix(in srgb, var(--primary) 86%, #0f241f);
    background: rgba(255, 255, 255, .92);
    font-size: 12px;
    font-weight: 900;
}

.app-welcome h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.app-welcome p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    line-height: 1.8;
}

.app-welcome > b {
    flex: 0 0 auto;
    border-radius: 14px;
    padding: 8px 10px;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
    font-size: 12px;
    white-space: nowrap;
}

.occasion-today {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, #fff);
    border-radius: 18px;
    padding: 15px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, #fff), #fff),
        #fff;
    box-shadow: 0 14px 32px rgba(24, 35, 33, .08);
}

.occasion-ribbon {
    position: relative;
    isolation: isolate;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 16px;
    color: #fff;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, .32), transparent 27px),
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 92%, #123), color-mix(in srgb, var(--accent) 52%, var(--primary)));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--primary) 20%, transparent);
}

.occasion-ribbon::before {
    content: "";
    position: absolute;
    inset: 6px;
    z-index: -1;
    border-radius: 12px;
    background: rgba(255, 255, 255, .10);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}

.occasion-ribbon b,
.occasion-ribbon small {
    display: block;
    width: 100%;
    text-align: center;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .22);
}

.occasion-ribbon b {
    font-size: 22px;
    font-weight: 950;
}

.occasion-ribbon small {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.occasion-today span {
    display: inline-flex;
    border-radius: 999px;
    padding: 3px 9px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, #fff);
    font-size: 12px;
    font-weight: 900;
}

.occasion-today article {
    margin-top: 8px;
}

.occasion-today strong,
.occasion-today p {
    margin: 0;
}

.occasion-today strong {
    display: block;
    color: var(--text);
    font-size: 17px;
}

.occasion-today p {
    margin-top: 6px;
    color: color-mix(in srgb, var(--text) 70%, transparent);
    line-height: 1.8;
    font-size: 13px;
}

.weekly-schedule-panel {
    display: grid;
    gap: 14px;
}

.schedule-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, #fff);
    border-radius: 18px;
    padding: 16px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, #fff), #fff),
        #fff;
    box-shadow: 0 14px 32px rgba(24, 35, 33, .08);
}

.schedule-panel-head span {
    display: inline-flex;
    border-radius: 999px;
    padding: 3px 9px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, #fff);
    font-size: 12px;
    font-weight: 900;
}

.schedule-panel-head h2 {
    margin: 8px 0 0;
    color: var(--text);
    font-size: 21px;
}

.schedule-panel-head b {
    flex: 0 0 auto;
    border-radius: 14px;
    padding: 8px 11px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--accent) 55%, var(--primary)));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--primary) 18%, transparent);
    font-size: 12px;
}

.public-class-schedule {
    display: grid;
    gap: 12px;
}

.public-class-schedule > header {
    border-radius: 14px;
    padding: 14px;
    color: #fff;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 92%, #10231d), color-mix(in srgb, var(--accent) 48%, var(--primary)));
    box-shadow: 0 14px 30px color-mix(in srgb, var(--primary) 20%, transparent);
}

.public-class-schedule header strong,
.public-class-schedule header span {
    display: block;
}

.public-class-schedule header strong {
    font-size: 18px;
}

.public-class-schedule header span {
    margin-top: 5px;
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
}

.public-schedule-days {
    display: grid;
    gap: 10px;
}

.public-schedule-days section {
    display: grid;
    gap: 8px;
    border: 1px solid color-mix(in srgb, var(--primary) 14%, #fff);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(24, 35, 33, .06);
}

.public-schedule-days section > strong {
    color: var(--primary);
    font-size: 14px;
}

.public-schedule-days div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 12px;
    padding: 9px 10px;
    background: color-mix(in srgb, var(--primary) 7%, #fff);
}

.public-schedule-days div span {
    flex: 0 0 auto;
    color: color-mix(in srgb, var(--text) 62%, transparent);
    font-size: 12px;
    font-weight: 800;
}

.public-schedule-days div b {
    color: var(--text);
    font-size: 14px;
    overflow-wrap: anywhere;
    text-align: left;
}

.public-schedule-days p {
    margin: 0;
    color: color-mix(in srgb, var(--text) 58%, transparent);
    font-size: 12px;
}

.public-exam-program {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 17px;
    padding: 19px;
    border: 1px solid color-mix(in srgb, #6366f1 18%, #e5e7eb);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0, rgba(99,102,241,.1), transparent 30%),
        #fff;
    box-shadow: 0 17px 40px rgba(49,46,129,.1);
}
.public-exam-heading {
    display: flex;
    align-items: center;
    gap: 13px;
}
.public-exam-heading-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(135deg,#4f46e5,#7c3aed);
    box-shadow: 0 11px 25px rgba(79,70,229,.25);
}
.public-exam-heading-icon svg { width: 27px; fill: currentColor; }
.public-exam-heading > div { min-width: 0; }
.public-exam-heading > div > span { color: #4f46e5; font-size: 10px; font-weight: 900; }
.public-exam-heading h2 { margin: 2px 0; color: var(--text); font-size: 20px; }
.public-exam-heading p { margin: 0; color: #77837f; font-size: 11px; }

.counselor-students-modal-box {
    width: min(820px, calc(100vw - 28px));
    max-height: 90vh;
    overflow-y: auto;
}
.counselor-folder-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 14px;
}
.counselor-folder-form input,
.counselor-folder-form button,
.counselor-student-list select {
    min-height: 42px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    padding: 8px 11px;
    font: inherit;
}
.counselor-folder-form button {
    border: 0;
    color: #fff;
    background: var(--primary);
    font-weight: 800;
}
.counselor-folder-tabs {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    margin-bottom: 14px;
    padding-bottom: 4px;
}
.counselor-folder-tabs > button,
.counselor-folder-tabs span {
    display: flex;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
}
.counselor-folder-tabs button {
    min-height: 36px;
    border: 0;
    padding: 0 12px;
    color: #64748b;
    background: transparent;
    font: inherit;
    font-weight: 700;
}
.counselor-folder-tabs > button.is-active,
.counselor-folder-tabs span.is-active {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 9%, #fff);
}
.counselor-folder-tabs [data-delete-counselor-folder] {
    padding: 0 9px;
    color: #b42318;
    border-right: 1px solid #e2e8f0;
}
.counselor-student-list { display: grid; gap: 9px; }
.counselor-student-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    align-items: center;
    gap: 12px;
    border: 1px solid #e8edf2;
    border-radius: 14px;
    padding: 10px;
}
.counselor-student-main {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    border: 0;
    padding: 0;
    text-align: right;
    color: var(--text);
    background: transparent;
    font: inherit;
}
.counselor-student-main > span:last-child { min-width: 0; }
.counselor-student-main strong,
.counselor-student-main small { display: block; }
.counselor-student-main small { margin-top: 3px; color: #64748b; font-size: .76rem; }
.counselor-student-avatar {
    display: block;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    overflow: hidden;
    border-radius: 50%;
    background: #f1f5f9;
}
.counselor-student-avatar img { width: 100%; height: 100%; object-fit: cover; }
.counselor-student-detail-box {
    width: min(600px, calc(100vw - 28px));
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.counselor-assessment-manager { margin-bottom: 14px; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px; background: #f8fafc; }
.counselor-assessment-manager summary { color: var(--primary); font-weight: 800; cursor: pointer; }
.counselor-assessment-manager .counselor-folder-form { margin: 12px 0 8px; }
.counselor-assessment-definitions { display: flex; flex-wrap: wrap; gap: 7px; }
.counselor-assessment-definitions span { display: flex; align-items: center; gap: 8px; border-radius: 18px; padding: 5px 10px; background: #fff; }
.counselor-assessment-definitions button { border: 0; padding: 0; color: #b42318; background: transparent; font: inherit; }
.counselor-private-note, .counselor-detail-section { margin-top: 16px; border-top: 1px solid #e2e8f0; padding-top: 14px; }
.counselor-private-note h3, .counselor-detail-section h3 { margin: 0 0 9px; font-size: .95rem; }
.counselor-private-note textarea { width: 100%; border: 1px solid #dbe3ea; border-radius: 10px; padding: 10px; font: inherit; line-height: 1.8; }
.counselor-private-note button { margin-top: 7px; border: 0; border-radius: 9px; padding: 8px 12px; color: #fff; background: var(--primary); font: inherit; font-weight: 800; }
.counselor-private-note small { margin-right: 8px; color: #15803d; }
.counselor-target-activities { display: grid; gap: 7px; }
.counselor-target-activities article { border-radius: 10px; padding: 10px; background: #f8fafc; }
.counselor-target-activities strong, .counselor-target-activities span { display: block; }
.counselor-target-activities span { margin-top: 3px; color: #64748b; font-size: .73rem; }
.counselor-target-activities p { margin: 6px 0 0; color: #475569; font-size: .8rem; }
.counselor-folder-students { display: flex; flex-wrap: wrap; gap: 7px; }
.counselor-folder-students button { border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 10px; color: var(--text); background: #fff; font: inherit; }
.counselor-folder-students small { display: block; color: #64748b; }
.counselor-student-assessments { display: grid; gap: 7px; }
.counselor-student-assessments label { display: grid; grid-template-columns: minmax(0, 1fr) 160px; align-items: center; gap: 10px; border-radius: 10px; padding: 9px; background: #f8fafc; font-weight: 700; }
.counselor-student-assessments select { min-height: 38px; border: 1px solid #dbe3ea; border-radius: 9px; padding: 6px; background: #fff; font: inherit; }
.counselor-folder-tabs [data-counselor-folder-detail] { color: var(--primary); font-size: .72rem; }
.counselor-detail-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.counselor-detail-hero h2, .counselor-detail-hero p { margin: 2px 0; }
.counselor-detail-hero > div > span { color: var(--primary); font-size: .78rem; font-weight: 800; }
.counselor-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; }
.counselor-detail-grid div { border-radius: 12px; padding: 11px; background: #f8fafc; }
.counselor-detail-grid dt { color: #64748b; font-size: .75rem; }
.counselor-detail-grid dd { margin: 4px 0 0; color: var(--text); font-weight: 800; }
.counselor-activities-modal-box {
    width: min(850px, calc(100vw - 28px));
    max-height: 90vh;
    overflow-y: auto;
}
.counselor-activity-form {
    display: grid;
    gap: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    padding: 14px;
    background: #f8fafc;
}
.counselor-activity-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.counselor-activity-form label { display: grid; gap: 5px; color: var(--text); font-size: .8rem; font-weight: 800; }
.counselor-activity-form input,
.counselor-activity-form select,
.counselor-activity-form textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #dbe3ea;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    font: inherit;
}
.counselor-activity-history-head { margin: 20px 0 10px; }
.counselor-activity-list { display: grid; gap: 10px; }
.counselor-activity-list article { border: 1px solid #e2e8f0; border-radius: 14px; padding: 13px; }
.counselor-activity-list header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.counselor-activity-list header span,
.counselor-activity-list header strong { display: block; }
.counselor-activity-list header span { color: var(--primary); font-size: .75rem; font-weight: 800; }
.counselor-activity-list header strong { margin-top: 3px; }
.counselor-activity-list header b { color: #64748b; font-size: .8rem; }
.counselor-activity-list p { margin: 8px 0; color: #64748b; font-size: .8rem; }
.counselor-activity-result { border-radius: 9px; padding: 9px; color: #475569; background: #f8fafc; font-size: .8rem; line-height: 1.8; }
.counselor-activity-list footer { display: flex; gap: 7px; margin-top: 10px; }
.counselor-activity-list footer button { border: 0; border-radius: 9px; padding: 7px 10px; color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, #fff); font: inherit; font-weight: 800; }
.counselor-activity-list footer button:last-child { color: #b42318; background: #fff1f1; }
.self-evaluation-campaign-list { display: grid; gap: 10px; }
.self-evaluation-campaign-list article { border: 1px solid #ddd6fe; border-radius: 14px; padding: 13px; background: #faf8ff; }
.self-evaluation-campaign-list header { display: flex; justify-content: space-between; gap: 12px; }
.self-evaluation-campaign-list header span, .self-evaluation-campaign-list header strong { display: block; }
.self-evaluation-campaign-list header span { color: #7c3aed; font-size: .75rem; font-weight: 800; }
.self-evaluation-campaign-list header b { color: #6d28d9; }
.self-evaluation-campaign-list p { color: #64748b; font-size: .8rem; }
.self-evaluation-campaign-list article > div { display: flex; gap: 8px; }
.self-evaluation-campaign-list button { border: 0; border-radius: 9px; padding: 8px 10px; color: #6d28d9; background: #ede9fe; font: inherit; font-weight: 800; }
.self-evaluation-recipient-list { position: sticky; bottom: 0; max-height: 55vh; overflow-y: auto; margin-top: 12px; border: 1px solid #cbd5e1; border-radius: 14px; padding: 12px; background: #fff; box-shadow: 0 -12px 35px rgba(15,23,42,.12); }
.self-evaluation-recipient-list > header { display: flex; justify-content: space-between; align-items: center; }
.self-evaluation-recipient-list > header button { border: 0; background: transparent; font-size: 1.4rem; }
.self-evaluation-recipient-list article { border-bottom: 1px solid #e2e8f0; padding: 10px 0; }
.self-evaluation-recipient-list article:last-child { border-bottom: 0; }
.self-evaluation-recipient-list span, .self-evaluation-recipient-list small { display: block; color: #64748b; font-size: .75rem; }
.self-evaluation-recipient-list p { margin: 7px 0; color: #334155; line-height: 1.8; }
.student-self-evaluation-inbox { display: grid; gap: 10px; margin-bottom: 14px; }
.student-self-evaluation-inbox article { overflow: hidden; border: 2px solid #8b5cf6; border-radius: 17px; padding: 14px; box-shadow: 0 12px 28px rgba(109,40,217,.12); }
.student-self-evaluation-inbox header { display: flex; justify-content: space-between; gap: 12px; }
.student-self-evaluation-inbox header span, .student-self-evaluation-inbox header strong { display: block; }
.student-self-evaluation-inbox header span { color: #7c3aed; font-size: .75rem; font-weight: 900; }
.student-self-evaluation-inbox header small { color: #64748b; }
.student-self-evaluation-inbox p { color: #4c1d95; line-height: 1.9; }
.student-self-evaluation-inbox form { display: grid; gap: 8px; }
.student-self-evaluation-inbox textarea { width: 100%; border: 1px solid #c4b5fd; border-radius: 11px; padding: 10px; font: inherit; line-height: 1.8; }
.student-self-evaluation-inbox button { border: 0; border-radius: 10px; padding: 10px; color: #fff; background: #7c3aed; font: inherit; font-weight: 800; }

.self-evaluation-floating {
    position: fixed;
    left: 50%;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 8;
    width: min(100%, 430px);
    height: 0;
    padding: 0 14px;
    transform: translateX(-50%);
    pointer-events: none;
}
.self-evaluation-floating-button {
    position: absolute;
    left: 14px;
    bottom: 0;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    box-shadow: 0 14px 30px rgba(109,40,217,.32);
    cursor: pointer;
    pointer-events: auto;
    animation: self-evaluation-float 2.8s ease-in-out infinite;
}
.self-evaluation-floating-button::before {
    content: "";
    position: absolute;
    inset: -5px;
    border: 2px solid rgba(124,58,237,.34);
    border-radius: inherit;
    animation: self-evaluation-ring 2s ease-out infinite;
}
.self-evaluation-floating-button svg { width: 27px; fill: currentColor; }
.self-evaluation-floating-button > span {
    position: absolute;
    top: -2px;
    left: -2px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: #e11d48;
    font-size: 11px;
    font-weight: 900;
}
.self-evaluation-tooltip {
    position: absolute;
    left: 14px;
    bottom: 66px;
    width: min(390px, calc(100% - 28px));
    max-height: min(65vh, 560px);
    overflow-y: auto;
    border: 1px solid #ddd6fe;
    border-radius: 22px;
    color: var(--text);
    background: rgba(255,255,255,.98);
    box-shadow: 0 24px 60px rgba(76,29,149,.25);
    pointer-events: auto;
    animation: self-evaluation-tooltip-in .22s ease-out;
}
.self-evaluation-tooltip > header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) 30px;
    align-items: center;
    gap: 10px;
    padding: 13px;
    border-bottom: 1px solid #ede9fe;
    background: linear-gradient(135deg, #f5f3ff, #fff);
}
.self-evaluation-tooltip-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #fff; background: linear-gradient(135deg,#7c3aed,#4f46e5); }
.self-evaluation-tooltip-icon svg { width: 23px; fill: currentColor; }
.self-evaluation-tooltip header div { display: grid; gap: 2px; }
.self-evaluation-tooltip header small { color: #7c3aed; font-size: 10px; font-weight: 900; }
.self-evaluation-tooltip header strong { font-size: 13px; }
.self-evaluation-tooltip header button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 10px; padding: 0; color: #6b7280; background: #ede9fe; font-size: 20px; cursor: pointer; }
.self-evaluation-tooltip .student-self-evaluation-inbox { gap: 0; margin: 0; padding: 10px; }
.self-evaluation-tooltip .student-self-evaluation-inbox article { border: 0; border-radius: 14px; box-shadow: none; }
@keyframes self-evaluation-float { 50% { transform: translateY(-5px); } }
@keyframes self-evaluation-ring {
    from { opacity: .75; transform: scale(.92); }
    to { opacity: 0; transform: scale(1.2); }
}
@keyframes self-evaluation-tooltip-in {
    from { opacity: 0; transform: translateY(8px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .self-evaluation-floating-button,
    .self-evaluation-floating-button::before,
    .self-evaluation-tooltip { animation: none; }
}
.counselor-self-evaluation-history { display: grid; gap: 7px; }
.counselor-self-evaluation-history article { border-radius: 10px; padding: 10px; background: #f8fafc; }
.counselor-self-evaluation-history header { display: flex; justify-content: space-between; gap: 10px; }
.counselor-self-evaluation-history span { color: #64748b; font-size: .72rem; }
.counselor-self-evaluation-history p { margin: 7px 0 0; line-height: 1.8; }
.self-evaluation-confirm-box { width: min(430px, calc(100vw - 28px)); text-align: center; }
.self-evaluation-confirm-icon {
    display: grid;
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #7c3aed;
    font-size: 1.7rem;
    font-weight: 900;
}
.self-evaluation-confirm-box h2 { margin: 0 0 8px; }
.self-evaluation-confirm-box p { color: #64748b; line-height: 1.9; }
.self-evaluation-confirm-box small { display: block; min-height: 22px; margin-top: 8px; color: #7c3aed; }
@media (max-width: 600px) {
    .counselor-folder-form, .counselor-student-list article, .counselor-detail-grid, .counselor-activity-form-grid { grid-template-columns: 1fr; }
    .counselor-student-assessments label { grid-template-columns: 1fr; }
}
.public-exam-classes { display: grid; gap: 16px; }
.public-exam-class {
    overflow: hidden;
    border: 1px solid #e5e7f2;
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(49,46,129,.07);
}
.public-exam-class > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg,#f5f3ff,#fafaff);
}
.public-exam-class > header strong, .public-exam-class > header span { display: block; }
.public-exam-class > header span { margin-top: 2px; color: #64748b; font-size: .75rem; }
.public-exam-class > header b {
    border-radius: 20px;
    padding: 6px 10px;
    color: #4f46e5;
    background: #fff;
    font-size: .75rem;
}
.public-exam-list { display: grid; gap: 10px; padding: 12px; }
.public-exam-list > section {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border: 1px solid #ebeaf5;
    border-radius: 16px;
    padding: 11px;
    background: linear-gradient(135deg,#fafaff,#fff);
    transition: transform .2s ease, box-shadow .2s ease;
}
.public-exam-list > section:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(79,70,229,.1); }
.public-exam-date {
    align-self: start;
    border-radius: 14px;
    padding: 9px 7px;
    text-align: center;
    color: #fff;
    background: linear-gradient(145deg,#4338ca,#7c3aed);
    box-shadow: 0 9px 20px rgba(79,70,229,.22);
}
.public-exam-date b,
.public-exam-date strong,
.public-exam-date span { display: block; }
.public-exam-date b { margin-bottom: 4px; color: #ddd6fe; font-size: 11px; }
.public-exam-date strong { font-size: 13px; }
.public-exam-date span { margin-top: 3px; font-size: .72rem; opacity: .86; }
.public-exam-info h3 { margin: 5px 0 0; color: #25224a; font-size: 1rem; }
.public-exam-info .exam-status-label { display: inline-flex; margin: 0; border-radius: 999px; padding: 3px 8px; color: #6d28d9; background: #ede9fe; font-size: 9px; font-weight: 900; }
.public-exam-info .exam-duration { display: inline-block; margin-top: 5px; color: #4f46e5; font-size: .72rem; font-weight: 900; }
.public-exam-info p { margin: 7px 0 0; color: #64748b; font-size: .8rem; line-height: 1.8; }
@media (max-width: 520px) {
    .public-exam-list > section { grid-template-columns: 105px minmax(0,1fr); gap: 10px; }
    .public-exam-date { text-align: center; }
}
@media (max-width: 360px) {
    .public-exam-list > section { grid-template-columns: 1fr; }
    .public-exam-date { text-align: right; }
}

.teacher-resource-card,
.question-bank-entry {
    display: grid;
    gap: 10px;
    border: 1px solid color-mix(in srgb, var(--primary) 16%, #fff);
    border-radius: 18px;
    padding: 16px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, #fff), #fff),
        #fff;
    box-shadow: 0 14px 32px rgba(24, 35, 33, .08);
}

.competitive-league-entry {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 164px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 26px;
    color: #fff;
    background:
        radial-gradient(circle at 8% 110%, rgba(250,204,21,.34), transparent 34%),
        linear-gradient(135deg, #111827, #312e81 48%, #6d28d9);
    box-shadow: 0 20px 48px rgba(49, 46, 129, .28);
}

.school-introduction {
    position: relative;
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    overflow: hidden;
    padding: 24px;
    border: 1px solid color-mix(in srgb, var(--primary) 16%, #fff);
    border-radius: 24px;
    background:
        radial-gradient(circle at 8% 20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%),
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, #fff), #fff);
    box-shadow: 0 16px 36px rgba(24, 35, 33, .08);
}
.school-introduction::after {
    position: absolute;
    inset: auto auto -48px -38px;
    width: 130px;
    height: 130px;
    border: 20px solid color-mix(in srgb, var(--primary) 8%, transparent);
    border-radius: 50%;
    content: "";
}
.school-introduction-logo {
    position: relative;
    z-index: 1;
    display: grid;
    width: 104px;
    height: 104px;
    place-items: center;
    overflow: hidden;
    border: 5px solid #fff;
    border-radius: 26px;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 24%, transparent);
    font-size: 2.4rem;
    font-weight: 900;
}
.school-introduction-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}
.school-introduction-copy { position: relative; z-index: 1; }
.school-introduction-copy > span {
    color: var(--primary);
    font-size: .8rem;
    font-weight: 900;
}
.school-introduction-copy h2 {
    margin: 4px 0 8px;
    color: var(--text);
    font-size: 1.45rem;
}
.school-introduction-copy p {
    margin: 0;
    color: color-mix(in srgb, var(--text) 70%, transparent);
    font-size: .9rem;
    line-height: 2;
}
@media (max-width: 520px) {
    .school-introduction {
        grid-template-columns: 72px minmax(0, 1fr);
        align-items: start;
        gap: 14px;
        padding: 18px;
    }
    .school-introduction-logo { width: 72px; height: 72px; border-radius: 20px; }
    .school-introduction-copy h2 { font-size: 1.15rem; }
}
.league-entry-orbit {
    position: absolute;
    z-index: -1;
    width: 190px;
    height: 190px;
    left: -70px;
    top: -95px;
    border: 28px solid rgba(255,255,255,.055);
    border-radius: 50%;
}
.league-entry-orbit::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    right: -32px;
    bottom: 35px;
    border-radius: 50%;
    background: #facc15;
    box-shadow: 0 0 0 7px rgba(250,204,21,.13);
}
.league-entry-content { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; min-width: 0; }
.league-entry-trophy {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 19px;
    color: #facc15;
    background: rgba(255,255,255,.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    transform: rotate(-4deg);
}
.league-entry-trophy svg { width: 31px; fill: currentColor; }
.competitive-league-entry .league-entry-content > div > span { color: #fde68a; font-size: .72rem; font-weight: 800; }
.competitive-league-entry h2 { margin: 5px 0; color: #fff; font-size: 1.35rem; }
.competitive-league-entry p { max-width: 390px; margin: 0; color: rgba(255,255,255,.72); font-size: .78rem; line-height: 1.8; }
.competitive-league-entry button {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 15px;
    padding: 12px 15px;
    color: #312e81;
    background: linear-gradient(135deg, #fff, #fef3c7);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(12,10,50,.22);
    transition: transform .2s ease, box-shadow .2s ease;
}
.competitive-league-entry button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(12,10,50,.3); }
.competitive-league-entry button svg { width: 18px; fill: currentColor; }
.competition-winners-entry {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 21px;
    border: 1px solid #f8d26a;
    border-radius: 25px;
    color: #592e0a;
    background:
        radial-gradient(circle at 8% 110%, rgba(255,255,255,.75), transparent 32%),
        linear-gradient(135deg, #fff9db, #fde68a 58%, #fbbf24);
    box-shadow: 0 18px 42px rgba(180, 83, 9, .18);
}
.winners-entry-glow { position: absolute; z-index: -1; width: 180px; height: 180px; left: -85px; top: -100px; border: 25px solid rgba(255,255,255,.28); border-radius: 50%; }
.winners-entry-content { display: flex; align-items: center; gap: 13px; min-width: 0; }
.winners-entry-medal { display: grid; place-items: center; width: 58px; height: 58px; flex: 0 0 auto; border: 1px solid rgba(146,64,14,.12); border-radius: 19px; color: #fff; background: linear-gradient(135deg, #b45309, #f59e0b); box-shadow: 0 11px 25px rgba(180,83,9,.25); transform: rotate(-5deg); }
.winners-entry-medal svg { width: 32px; fill: currentColor; }
.winners-entry-content > div > span { color: #92400e; font-size: .7rem; font-weight: 900; }
.competition-winners-entry h2 { margin: 4px 0; font-size: 1.22rem; }
.competition-winners-entry p { margin: 0; color: rgba(89,46,10,.72); font-size: .72rem; line-height: 1.8; }
.competition-winners-entry p b { color: #92400e; font-size: .85rem; }
.competition-winners-entry button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    border-radius: 14px;
    padding: 11px 14px;
    color: #fff;
    background: linear-gradient(135deg, #92400e, #b45309);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 9px 20px rgba(146,64,14,.24);
    cursor: pointer;
    transition: transform .2s ease;
}
.competition-winners-entry button:hover { transform: translateY(-2px); }
.competition-winners-entry button svg { width: 18px; fill: currentColor; }
.competition-winners-list { display: grid; gap: 10px; }
.competition-winners-list article {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid #f5deb0;
    border-radius: 16px;
    background: linear-gradient(135deg, #fffaf0, #fff);
    box-shadow: 0 8px 20px rgba(146,64,14,.06);
}
.winner-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #d97706, #fbbf24); box-shadow: 0 7px 15px rgba(217,119,6,.2); font-size: 16px; font-weight: 950; }
.competition-winners-list article:nth-child(3n + 2) .winner-avatar { background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.competition-winners-list article:nth-child(3n) .winner-avatar { background: linear-gradient(135deg, #0f766e, #2dd4bf); }
.competition-winners-list strong, .competition-winners-list small { display: block; }
.competition-winners-list strong { color: #422006; font-size: 14px; }
.competition-winners-list small { margin-top: 3px; color: #8a7664; font-size: 11px; }
.competition-winners-list b { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 6px 9px; color: #92400e; background: #fef3c7; font-size: 11px; }
.competition-winners-list b i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; background: #d97706; font-size: 9px; font-style: normal; }
.winners-modal-box { background: linear-gradient(180deg, #fffdf7, #fff); }
.winners-modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 5px 0 13px; border-bottom: 1px solid #f5e5bd; }
.winners-modal-cup { display: grid; place-items: center; width: 49px; height: 49px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #b45309, #fbbf24); font-size: 22px; box-shadow: 0 9px 20px rgba(180,83,9,.2); }
.winners-modal-head > div { display: grid; gap: 1px; }
.winners-modal-head > div > span { color: #b45309; font-size: 10px; font-weight: 900; }
.winners-modal-head h2 { margin: 0; color: #422006; font-size: 20px; }
.winners-modal-head p { margin: 0; color: #8a7664; font-size: 11px; }
.league-modal-box { width: min(760px, calc(100vw - 28px)); max-height: 88vh; overflow: auto; }
.league-modal-head { margin-bottom: 16px; }
.league-modal-head span { color: #7c3aed; font-weight: 700; }
.league-modal-head h2 { margin: 3px 0 0; }
.league-month-label { display: inline-flex; width: fit-content; margin: 7px 0 0; border-radius: 999px; padding: 5px 10px; color: #5b21b6; background: #ede9fe; font-size: 11px; font-weight: 900; }
.league-tabs, .league-class-picker { display: flex; gap: 8px; overflow-x: auto; padding: 4px; }
.league-tabs { margin-bottom: 18px; border-radius: 15px; background: #f3f4f6; }
.league-tabs button, .league-class-picker button {
    border: 0;
    border-radius: 11px;
    padding: 10px 15px;
    white-space: nowrap;
    color: #64748b;
    background: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.league-tabs button { flex: 1; }
.league-tabs button.is-active, .league-class-picker button.is-active {
    color: #fff;
    background: #6d28d9;
    box-shadow: 0 6px 16px rgba(109, 40, 217, .22);
}
.league-class-picker { margin-bottom: 14px; }
.league-ranking-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.league-ranking-list li {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid #e8e5f0;
    border-radius: 15px;
    background: #fff;
}
.league-ranking-list li.is-podium { background: linear-gradient(90deg, #fffbeb, #fff); }
.league-ranking-list .rank-1 { border-color: #fbbf24; }
.league-ranking-list .rank-2 { border-color: #cbd5e1; }
.league-ranking-list .rank-3 { border-color: #d97706; }
.league-rank {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    color: #6d28d9;
    background: #ede9fe;
    font-weight: 900;
}
.league-rank img, .top-student-list li > span img, .chat-avatar img, .profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.league-rank.is-empty, .top-student-list li > span.is-empty, .profile-avatar.is-empty, .chat-avatar:empty {
    visibility: hidden;
}
.league-rank:has(img), .top-student-list li > span:has(img) { overflow: hidden; padding: 0; }
.league-rank.has-initial,
.top-student-list li > span.has-initial {
    visibility: visible;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 25% 20%, rgba(255,255,255,.28), transparent 35%),
        linear-gradient(135deg, #7c3aed, #4f46e5);
    box-shadow: 0 7px 16px rgba(79, 70, 229, .22);
    font-size: 15px;
    font-weight: 950;
}
.league-ranking-list li:nth-child(3n + 2) .league-rank.has-initial,
.top-student-list li:nth-child(3n + 2) > span.has-initial {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
}
.league-ranking-list li:nth-child(3n) .league-rank.has-initial,
.top-student-list li:nth-child(3n) > span.has-initial {
    background: linear-gradient(135deg, #c2410c, #f59e0b);
}
.league-ranking-list strong, .league-ranking-list small { display: block; }
.league-ranking-list small { margin-top: 3px; color: #64748b; font-size: .78rem; }
.league-ranking-list b { color: #6d28d9; font-size: 1.05rem; }
.league-student-class h3 { margin: 0 0 12px; }
.league-student-class h3 small { color: #94a3b8; font-size: .75rem; }
@media (max-width: 600px) {
    .competitive-league-entry { align-items: stretch; flex-direction: column; padding: 19px; }
    .competitive-league-entry button { width: 100%; }
    .competition-winners-entry { align-items: stretch; flex-direction: column; }
    .competition-winners-list article { grid-template-columns: 34px minmax(0, 1fr); }
    .competition-winners-list article b { grid-column: 2; }
}

.question-bank-entry {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.question-bank-entry span,
.teacher-resource-card strong {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

.question-bank-entry h2,
.question-bank-entry p,
.teacher-resource-card p {
    margin: 0;
}

.question-bank-entry h2 {
    margin-top: 5px;
    color: var(--text);
    font-size: 20px;
}

.question-bank-entry p,
.teacher-resource-card p {
    color: color-mix(in srgb, var(--text) 64%, transparent);
    font-size: 13px;
    line-height: 1.8;
}

.question-bank-entry button,
.teacher-resource-card button,
.teacher-resource-form button {
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    padding: 0 14px;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-weight: 900;
}

.teacher-resource-form {
    display: grid;
    gap: 12px;
}

.teacher-resource-form label {
    display: grid;
    gap: 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.teacher-resource-form input,
.teacher-resource-form textarea,
.teacher-resource-form select,
.question-bank-search {
    width: 100%;
    min-height: 42px;
    border: 1px solid color-mix(in srgb, var(--primary) 16%, #fff);
    border-radius: 12px;
    padding: 8px 10px;
    font: inherit;
    background: #fff;
}

.teacher-resource-form textarea {
    min-height: 92px;
    resize: vertical;
}

.service-calendar-card {
    display: grid;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--primary) 16%, #fff);
    border-radius: 18px;
    padding: 16px;
    background:
        radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 64px),
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 7%, #fff), #fff);
    box-shadow: 0 14px 32px rgba(24, 35, 33, .08);
}

.service-calendar-card > header strong,
.service-calendar-card > header p {
    display: block;
    margin: 0;
}

.service-calendar-card > header strong {
    color: var(--primary);
    font-size: 15px;
}

.service-calendar-card > header p {
    margin-top: 5px;
    color: color-mix(in srgb, var(--text) 64%, transparent);
    font-size: 13px;
    line-height: 1.8;
}

.service-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 14px;
    padding: 10px;
    background: #fff;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 10%, #fff);
}

.service-calendar-head button {
    width: 42px;
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-size: 24px;
    font-weight: 900;
}

.service-calendar-head div {
    display: grid;
    gap: 4px;
    text-align: center;
}

.service-calendar-head b {
    color: var(--text);
    font-size: 16px;
}

.service-calendar-head span {
    color: color-mix(in srgb, var(--text) 58%, transparent);
    font-size: 12px;
    font-weight: 800;
}

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

.service-calendar-weekdays span {
    color: color-mix(in srgb, var(--text) 62%, transparent);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.service-calendar-days button,
.service-calendar-empty {
    aspect-ratio: 1;
    min-height: 38px;
    border-radius: 12px;
}

.service-calendar-days button {
    position: relative;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--primary) 12%, #fff);
    color: var(--text);
    background: #fff;
    font: inherit;
    cursor: pointer;
}

.service-calendar-days button.is-today {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.service-calendar-days button.is-selected {
    color: #fff;
    background: var(--primary);
}

.service-calendar-days button.has-event {
    background: color-mix(in srgb, var(--accent) 13%, #fff);
}

.service-calendar-days button.has-reminder {
    background: color-mix(in srgb, #38bdf8 12%, #fff);
}

.service-calendar-days button.has-system {
    background: color-mix(in srgb, #64748b 10%, #fff);
}

.service-calendar-days button.has-exam {
    color: #6d28d9;
    background: #ede9fe;
    box-shadow: inset 0 0 0 1px #c4b5fd;
}

.service-calendar-days button.is-selected.has-event,
.service-calendar-days button.is-selected.has-reminder,
.service-calendar-days button.is-selected.has-system {
    background: var(--primary);
}

.service-calendar-days button.is-selected.has-exam {
    color: #fff;
    background: #6d28d9;
}

.service-calendar-days button i {
    position: absolute;
    bottom: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.service-calendar-days button.has-reminder i {
    background: #0284c7;
}

.service-calendar-days button.is-selected i {
    background: #fff;
}

.service-calendar-day-panel,
.service-calendar-due {
    display: grid;
    gap: 8px;
}

.service-calendar-day-panel article,
.service-calendar-due article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 14px;
    padding: 10px;
    background: #fff;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 10%, #fff);
}

.service-calendar-day-panel article.is-event {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, #fff);
}

.service-calendar-day-panel article.is-system {
    background: color-mix(in srgb, #64748b 7%, #fff);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, #64748b 16%, #fff);
}

.service-calendar-day-panel article.is-exam {
    border-right: 4px solid #7c3aed;
    background: linear-gradient(135deg,#f5f3ff,#fff);
    box-shadow: inset 0 0 0 1px #ddd6fe;
}
.service-calendar-day-panel article.is-exam span { color: #6d28d9; }

.service-calendar-day-panel span,
.service-calendar-due span {
    color: color-mix(in srgb, var(--text) 62%, transparent);
    font-size: 12px;
    font-weight: 800;
}

.service-calendar-day-panel strong,
.service-calendar-due b {
    display: block;
    margin-top: 3px;
    color: var(--text);
    font-size: 14px;
}

.service-calendar-day-panel p {
    margin: 4px 0 0;
    color: color-mix(in srgb, var(--text) 66%, transparent);
    font-size: 12px;
    line-height: 1.8;
}

.service-calendar-due {
    border-radius: 14px;
    padding: 10px;
    background: color-mix(in srgb, var(--accent) 10%, #fff);
}

.service-calendar-due > strong {
    color: var(--primary);
    font-size: 13px;
}

.service-calendar-form {
    border-top: 1px solid color-mix(in srgb, var(--primary) 12%, #fff);
    padding-top: 12px;
}

.service-notice {
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 900;
}

.service-notice.success {
    color: #176b4d;
    background: #eaf8f1;
}

.service-notice.error {
    color: #9f2424;
    background: #fff0f0;
}

.question-bank-modal-box {
    max-height: min(82vh, 720px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.question-bank-modal-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

.question-bank-modal-head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    padding-bottom: 16px;
}

.question-bank-modal-content {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    padding-top: 10px;
}

.question-bank-list {
    display: grid;
    gap: 10px;
    margin-top: 0;
}

.question-bank-list article {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    border: 1px solid color-mix(in srgb, var(--primary) 14%, #fff);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

.question-bank-list strong,
.question-bank-list span {
    display: block;
}

.question-bank-list strong {
    color: var(--text);
    font-size: 14px;
}

.question-bank-list span {
    margin-top: 5px;
    color: color-mix(in srgb, var(--text) 62%, transparent);
    font-size: 12px;
}

.question-bank-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    padding: 8px 12px;
    color: #fff;
    background: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 7px 16px color-mix(in srgb, var(--primary) 22%, transparent);
    transition: transform .18s ease, box-shadow .18s ease;
}

.question-bank-list a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 30%, transparent);
}

.question-bank-download svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.question-bank-download span {
    display: inline;
    margin: 0;
    color: inherit;
    font-size: inherit;
}

.question-bank-empty {
    margin: 0;
    color: color-mix(in srgb, var(--text) 62%, transparent);
    font-size: 13px;
}

.teacher-resource-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.teacher-resource-list-modal-box {
    max-height: min(82vh, 720px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.teacher-resource-list-shell {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 10px;
}

.teacher-resource-list {
    display: grid;
    gap: 10px;
}

.teacher-resource-list article {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 14%, #fff);
    border-radius: 14px;
    background: #fff;
}

.teacher-resource-list article > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.teacher-resource-list-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.teacher-resource-list-actions a,
.teacher-resource-list-actions button {
    padding: 8px 12px;
    border-radius: 12px;
    border: 0;
    font: inherit;
}

.teacher-resource-list-actions a {
    background: color-mix(in srgb, var(--primary) 16%, #fff);
    color: var(--primary);
    text-decoration: none;
}

.teacher-resource-list-actions button {
    background: #f5f5f5;
    color: color-mix(in srgb, var(--text) 72%, transparent);
}

.teacher-report-card-modal-box {
    width: min(100%, 404px);
    max-height: min(84vh, 720px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.teacher-report-card-controls {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.teacher-date-preset-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.teacher-date-preset-list button {
    flex: 0 0 auto;
    min-height: 36px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, #fff);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, #fff);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
}

.teacher-date-preset-list button.active {
    color: #fff;
    background: var(--primary);
}

.teacher-report-class-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 0 12px;
    padding-bottom: 2px;
}

.teacher-report-class-list button {
    flex: 0 0 auto;
    min-height: 38px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, #fff);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, #fff);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
}

.teacher-report-class-list button.active {
    color: #fff;
    background: var(--primary);
}

.teacher-report-card-controls label {
    display: grid;
    gap: 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.teacher-report-card-controls input,
.teacher-report-card-controls select,
.teacher-report-card-row input {
    min-height: 42px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, #fff);
    border-radius: 12px;
    padding: 8px 10px;
    font: inherit;
}

.teacher-report-card-controls button,
.teacher-report-card-form button {
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-weight: 900;
}

.teacher-report-card-controls .teacher-date-preset-list button {
    min-height: 36px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, #fff);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, #fff);
    font-size: 12px;
}

.teacher-report-card-controls .teacher-date-preset-list button.active {
    color: #fff;
    background: var(--primary);
}

.teacher-report-card-form {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.teacher-report-card-rows {
    min-height: 0;
    max-height: 320px;
    overflow-y: auto;
    display: grid;
    gap: 10px;
}

.teacher-report-card-row {
    display: grid;
    grid-template-columns: 1fr 82px;
    gap: 8px;
    border: 1px solid color-mix(in srgb, var(--primary) 14%, #fff);
    border-radius: 14px;
    padding: 10px;
    background: #fff;
}

.teacher-report-card-row span {
    grid-column: 1 / -1;
    color: var(--text);
    font-weight: 900;
}

.teacher-report-card-row input:last-child {
    grid-column: 1 / -1;
}

.teacher-finance-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.teacher-finance-summary article {
    border: 1px solid color-mix(in srgb, var(--primary) 14%, #fff);
    border-radius: 14px;
    padding: 10px;
    background: #fff;
}

.teacher-finance-summary span,
.teacher-finance-summary strong {
    display: block;
}

.teacher-finance-summary span {
    color: color-mix(in srgb, var(--text) 58%, transparent);
    font-size: 11px;
}

.teacher-finance-summary strong {
    margin-top: 5px;
    color: var(--primary);
    font-size: 13px;
    line-height: 1.6;
}

.confirm-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.confirm-modal-actions button {
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    padding: 0 16px;
    font: inherit;
    font-weight: 900;
}

.confirm-modal-actions [data-confirm-delete] {
    background: #d32f2f;
    color: #fff;
}

.confirm-modal-actions [data-cancel-delete] {
    background: color-mix(in srgb, var(--text) 10%, #fff);
    color: color-mix(in srgb, var(--text) 72%, transparent);
}

.poll-modal-box {
    display: grid;
    gap: 12px;
}

.poll-public-options {
    display: grid;
    gap: 10px;
}

.poll-public-options label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 1px solid color-mix(in srgb, var(--primary) 15%, #fff);
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
}

.poll-public-options input {
    width: 18px;
    height: 18px;
}

.public-profile-panel {
    display: grid;
    gap: 14px;
}

.home-blog-section {
    display: grid;
    gap: 12px;
}

.monthly-top-students {
    display: grid;
    gap: 12px;
}

.top-student-months {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 0 6px;
    scroll-snap-type: x mandatory;
}

.top-student-month {
    flex: 0 0 min(92%, 360px);
    scroll-snap-align: start;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 14%, #fff);
    border-radius: 18px;
    background:
        radial-gradient(circle at 12% 0, rgba(255, 193, 7, .24), transparent 34%),
        linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--accent) 8%, #fff));
    box-shadow: 0 18px 34px rgba(25, 40, 38, .09);
}

.top-student-month > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 10px;
}

.top-student-month > header span {
    border-radius: 999px;
    padding: 4px 10px;
    color: #7c3aed;
    background: rgba(124, 58, 237, .1);
    font-size: 12px;
    font-weight: 900;
}

.top-student-month > header strong {
    color: var(--text);
    font-size: 18px;
}

.top-student-class-list {
    display: grid;
    gap: 10px;
    padding: 0 12px 12px;
}

.top-student-class {
    border-radius: 14px;
    padding: 10px;
    background: rgba(255, 255, 255, .72);
    box-shadow: inset 0 0 0 1px rgba(24, 35, 33, .06);
}

.top-student-class-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.top-student-class-head strong,
.top-student-class-head small {
    display: block;
}

.top-student-class-head strong {
    color: var(--text);
    font-size: 14px;
}

.top-student-class-head small {
    margin-top: 2px;
    color: color-mix(in srgb, var(--text) 58%, transparent);
    font-size: 11px;
    font-weight: 800;
}

.top-student-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.top-student-list li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    border-radius: 12px;
    padding: 8px;
    background: #fff;
}

.top-student-list li > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: #64748b;
    font-size: 15px;
    font-weight: 1000;
}

.top-student-list li.rank-1 > span {
    background: linear-gradient(135deg, #f59e0b, #eab308);
}

.top-student-list li.rank-2 > span {
    background: linear-gradient(135deg, #64748b, #94a3b8);
}

.top-student-list li.rank-3 > span {
    background: linear-gradient(135deg, #b45309, #f97316);
}

.top-student-list li strong,
.top-student-list li small {
    display: block;
}

.top-student-list li strong {
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 13px;
    line-height: 1.6;
}

.top-student-list li small {
    color: color-mix(in srgb, var(--text) 54%, transparent);
    font-size: 11px;
}

.top-student-list li b {
    border-radius: 999px;
    padding: 6px 9px;
    color: #0f766e;
    background: rgba(20, 184, 166, .12);
    font-size: 13px;
}

.discipline-public-panel {
    display: grid;
    gap: 14px;
    overflow: hidden;
    border: 1px solid rgba(220, 38, 38, .27);
    border-radius: 21px;
    padding: 16px;
    background:
        radial-gradient(circle at 100% 0, rgba(239, 68, 68, .13), transparent 35%),
        linear-gradient(145deg, #fff8f7, #fff);
    box-shadow: 0 16px 38px rgba(153, 27, 27, .12);
}

.discipline-warning-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.discipline-warning-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 10px 24px rgba(220, 38, 38, .27);
}

.discipline-warning-icon svg {
    width: 27px;
    fill: currentColor;
}

.discipline-warning-head > div {
    display: grid;
    gap: 2px;
}

.discipline-warning-head span {
    color: #b91c1c;
    font-size: 11px;
    font-weight: 950;
}

.discipline-warning-head h2 {
    margin: 0;
    color: #631717;
    font-size: 18px;
    font-weight: 950;
}

.public-report-card-panel,
.public-report-student {
    display: grid;
    gap: 12px;
}

.public-report-child {
    display: block;
    border-radius: 14px;
    padding: 10px 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--accent) 45%, var(--primary)));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--primary) 16%, transparent);
}

.public-report-month-card {
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 16%, #fff);
    border-radius: 18px;
    padding: 14px;
    background:
        radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 58px),
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, #fff), #fff);
    box-shadow: 0 16px 34px rgba(24, 35, 33, .09);
}

.public-report-month-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.public-report-month-card header span {
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.public-report-month-card h3 {
    margin: 4px 0 0;
    color: var(--text);
    font-size: 22px;
}

.public-report-month-card header b {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 7px 10px;
    color: #fff;
    background: color-mix(in srgb, var(--text) 82%, #000);
    font-size: 12px;
}

.public-report-preview {
    position: relative;
}

.public-report-preview.is-up {
    border-color: rgba(22, 163, 74, .28);
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 197, 94, .24), transparent 58px),
        linear-gradient(135deg, rgba(240, 253, 244, .96), #fff);
}

.public-report-preview.is-down {
    border-color: rgba(225, 29, 72, .22);
    background:
        radial-gradient(circle at 12% 8%, rgba(251, 113, 133, .2), transparent 58px),
        linear-gradient(135deg, rgba(255, 241, 242, .92), #fff);
}

.public-report-summary-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 16px;
    margin: -2px 0 12px;
    padding: 10px 12px;
    color: var(--text);
    background: rgba(255, 255, 255, .78);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 10%, #fff);
}

.public-report-summary-pill strong,
.public-report-summary-pill span {
    display: block;
}

.public-report-summary-pill strong {
    color: var(--primary);
    font-size: 13px;
    font-weight: 1000;
}

.public-report-summary-pill span {
    color: color-mix(in srgb, var(--text) 62%, transparent);
    font-size: 12px;
    font-weight: 800;
}

.public-report-details {
    margin-top: 12px;
}

.public-report-details summary {
    width: fit-content;
    border-radius: 999px;
    padding: 10px 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    box-shadow: 0 12px 24px color-mix(in srgb, var(--primary) 18%, transparent);
    cursor: pointer;
    font-weight: 900;
    list-style: none;
}

.public-report-details summary::-webkit-details-marker {
    display: none;
}

.public-report-filter-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.public-report-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.public-report-mode-tabs button,
.public-report-filter-controls select {
    min-height: 42px;
    border: 0;
    border-radius: 14px;
    padding: 9px 10px;
    background: #fff;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 12%, #fff);
    color: var(--text);
    font: inherit;
    font-weight: 850;
}

.public-report-mode-tabs button {
    cursor: pointer;
}

.public-report-mode-tabs button.active {
    color: #fff;
    background: color-mix(in srgb, var(--text) 84%, #000);
}

.public-report-filter-controls label,
.public-report-range-controls {
    display: grid;
    gap: 6px;
    color: color-mix(in srgb, var(--text) 64%, transparent);
    font-size: 12px;
    font-weight: 900;
}

.public-report-range-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-report-range-summary {
    display: grid;
    gap: 4px;
    border-radius: 16px;
    margin: 12px 0;
    padding: 12px;
    background: color-mix(in srgb, var(--accent) 10%, #fff);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, #fff);
}

.public-report-range-summary strong,
.public-report-range-summary span,
.public-report-range-summary b {
    display: block;
}

.public-report-range-summary strong {
    color: var(--text);
    font-size: 14px;
}

.public-report-range-summary span,
.public-report-range-summary b {
    color: color-mix(in srgb, var(--text) 66%, transparent);
    font-size: 12px;
}

.public-report-detail-list {
    display: grid;
    gap: 10px;
}

.public-report-detail-card {
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 10px 22px rgba(24, 35, 33, .07);
}

.public-report-subjects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.public-report-subjects button {
    min-height: 74px;
    display: grid;
    align-content: center;
    gap: 6px;
    border: 0;
    border-radius: 16px;
    padding: 10px;
    color: var(--text);
    background: #fff;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 12%, #fff), 0 10px 20px rgba(24, 35, 33, .06);
    font: inherit;
    text-align: right;
}

.public-report-subjects button span,
.public-report-subjects button b {
    display: block;
}

.public-report-subjects button span {
    color: color-mix(in srgb, var(--text) 68%, transparent);
    font-size: 12px;
    font-weight: 900;
}

.public-report-subjects button b {
    color: var(--primary);
    font-size: 21px;
}

.report-approval-row {
    display: flex;
    justify-content: flex-end;
    margin: -2px 0 12px;
}

.report-approval-row span,
.report-approval-row button {
    border: 0;
    border-radius: 999px;
    padding: 9px 12px;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
}

.report-approval-row span {
    color: #0f766e;
    background: rgba(20, 184, 166, .14);
}

.report-approval-row button {
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #16a34a);
    cursor: pointer;
    box-shadow: 0 12px 22px rgba(15, 118, 110, .2);
}

.tuition-parent-card {
    display: grid;
    gap: 12px;
}

.tuition-parent-summary-list {
    display: grid;
    gap: 9px;
}

.tuition-parent-summary-list article {
    display: grid;
    gap: 8px;
    border: 1px solid color-mix(in srgb, var(--primary) 14%, #fff);
    border-radius: 14px;
    padding: 10px;
    background: #fff;
}

.tuition-parent-summary-list strong,
.tuition-parent-summary-list span,
.tuition-parent-summary-list b,
.tuition-parent-summary-list small {
    display: block;
}

.tuition-parent-summary-list span,
.tuition-parent-summary-list small {
    color: color-mix(in srgb, var(--text) 58%, transparent);
    font-size: 12px;
}

.tuition-parent-summary-list b {
    color: #0f766e;
}

.tuition-card-number {
    display: grid;
    gap: 5px;
    border-radius: 14px;
    padding: 12px;
    background: color-mix(in srgb, var(--primary) 8%, #fff);
}

.tuition-card-number span,
.tuition-card-number strong {
    display: block;
}

.tuition-card-number span {
    color: color-mix(in srgb, var(--text) 62%, transparent);
    font-size: 12px;
}

.tuition-card-number strong {
    color: var(--text);
    direction: ltr;
    text-align: left;
    font-size: 18px;
}

.report-signature-pad {
    display: grid;
    gap: 10px;
    margin: 10px 0 14px;
}

.report-signature-pad strong {
    color: var(--text);
}

.report-signature-pad canvas {
    width: 100%;
    max-width: 560px;
    height: 180px;
    border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
    border-radius: 8px;
    background: #fff;
    touch-action: none;
}

.report-signature-pad button {
    justify-self: start;
    border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
    background: #fff;
    color: var(--text);
}

.subject-chart-modal-box {
    width: min(100%, 430px);
    overflow: hidden;
    border: 1px solid #e2e6f4;
    border-radius: 25px;
    padding: 0;
    background: linear-gradient(180deg,#f8f9ff,#fff);
    box-shadow: 0 30px 80px rgba(30,41,90,.3);
}

.subject-chart-modal-box > .public-modal-close {
    top: 13px;
    left: 13px;
    z-index: 3;
}

.subject-chart-modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 20px;
    padding: 20px 18px 17px 55px;
    color: #fff;
    background:
        radial-gradient(circle at 100% 0, rgba(255,255,255,.16), transparent 32%),
        linear-gradient(135deg,#312e81,#6366f1);
}
.subject-chart-modal-icon { display: grid; place-items: center; width: 49px; height: 49px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.2); border-radius: 16px; background: rgba(255,255,255,.12); }
.subject-chart-modal-icon svg { width: 27px; fill: currentColor; }
.subject-chart-modal-head > div { min-width: 0; }
.subject-chart-modal-head span { color: #c7d2fe; font-size: 10px; font-weight: 800; }
.subject-chart-modal-head h2 { margin: 2px 0; color: #fff; font-size: 19px; }
.subject-chart-modal-head p { margin: 0; color: rgba(255,255,255,.68); font-size: 10px; }

.subject-chart-stats {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 8px;
    padding: 13px 13px 0;
}
.subject-chart-stats:empty { display: none; }
.subject-chart-stats div { display: grid; gap: 3px; border: 1px solid #e8eaf5; border-radius: 13px; padding: 9px; text-align: center; background: #fff; }
.subject-chart-stats span { color: #7c849e; font-size: 9px; }
.subject-chart-stats strong { color: #312e81; font-size: 16px; }
.subject-chart-stats .is-up strong { color: #16a34a; }
.subject-chart-stats .is-down strong { color: #dc2626; }


.subject-chart-bars {
    min-height: 245px;
    display: block;
    overflow-x: auto;
    margin: 12px;
    border: 1px solid #e8eaf5;
    border-radius: 18px;
    padding: 8px 5px 3px;
    background:
        radial-gradient(circle at 95% 5%, rgba(99,102,241,.08), transparent 35%),
        #fff;
    direction: ltr;
}

.subject-line-chart {
    width: 100%;
    min-width: 340px;
    height: 245px;
    color: #6366f1;
}

.subject-line-chart polyline {
    fill: none;
    stroke: currentColor;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.subject-line-chart.is-up polyline {
    stroke: #16a34a;
}

.subject-line-chart.is-down polyline {
    stroke: #dc2626;
}

.subject-line-chart.is-up { color: #16a34a; }
.subject-line-chart.is-down { color: #dc2626; }
.subject-chart-area { fill: url(#subjectChartArea); }
.subject-chart-grid line { stroke: #e7e9f2; stroke-width: 1; stroke-dasharray: 4 4; }
.subject-chart-grid text { fill: #9ba2b5; font-size: 9px; font-weight: 500; }

.subject-line-chart circle {
    fill: #fff;
    stroke: currentColor;
    stroke-width: 3;
    color: #64748b;
}

.subject-line-chart.is-up circle {
    color: #16a34a;
}

.subject-line-chart.is-down circle {
    color: #dc2626;
}

.subject-line-chart text {
    direction: rtl;
    text-anchor: middle;
    fill: var(--text);
    font-size: 12px;
    font-weight: 900;
}

.subject-line-chart .subject-line-month {
    fill: color-mix(in srgb, var(--text) 58%, transparent);
    font-size: 10px;
}

.subject-line-axis {
    stroke: color-mix(in srgb, var(--text) 14%, transparent);
    stroke-width: 2;
}

/* Modern report status */
.public-report-card-panel {
    gap: 16px;
    border: 1px solid color-mix(in srgb, #6366f1 15%, #e5e7eb);
    border-radius: 24px;
    padding: 18px;
    background:
        radial-gradient(circle at 100% 0, rgba(99,102,241,.09), transparent 28%),
        #fff;
    box-shadow: 0 17px 42px rgba(49,46,129,.09);
}
.report-status-heading { display: flex; align-items: center; gap: 12px; }
.report-status-heading-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 auto; border-radius: 17px; color: #fff; background: linear-gradient(135deg,#4338ca,#7c3aed); box-shadow: 0 11px 24px rgba(79,70,229,.25); }
.report-status-heading-icon svg { width: 27px; fill: currentColor; }
.report-status-heading > div { min-width: 0; }
.report-status-heading > div > span { color: #5b21b6; font-size: 10px; font-weight: 900; }
.report-status-heading h2 { margin: 2px 0; color: var(--text); font-size: 20px; }
.report-status-heading p { margin: 0; color: #7b8582; font-size: 11px; }

.public-report-preview {
    border-radius: 21px;
    padding: 16px;
    background:
        radial-gradient(circle at 100% 0, rgba(99,102,241,.12), transparent 32%),
        linear-gradient(145deg,#f8f7ff,#fff);
    box-shadow: 0 15px 34px rgba(49,46,129,.1);
}
.public-report-preview::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: #6366f1;
}
.public-report-preview.is-up::after { background: #22c55e; }
.public-report-preview.is-down::after { background: #ef4444; }
.public-report-month-card header { margin-bottom: 14px; }
.public-report-month-card header span { color: #6366f1; font-size: 11px; }
.public-report-month-card h3 { color: #25234b; font-size: 24px; }
.public-report-month-card header b { color: #4338ca; background: #ede9fe; }
.public-report-summary-pill {
    position: relative;
    border: 1px solid #e7e5f3;
    border-radius: 15px;
    padding: 11px 13px;
    background: rgba(255,255,255,.88);
    box-shadow: none;
}
.public-report-summary-pill strong { color: #4338ca; }
.public-report-preview.is-up .public-report-summary-pill strong { color: #15803d; }
.public-report-preview.is-down .public-report-summary-pill strong { color: #be123c; }
.public-report-subjects button {
    position: relative;
    overflow: hidden;
    min-height: 80px;
    border: 1px solid #e8e8f2;
    border-radius: 15px;
    background: linear-gradient(145deg,#fff,#fafaff);
    box-shadow: 0 8px 20px rgba(49,46,129,.06);
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.public-report-subjects button::after { content: "نمودار"; position: absolute; left: 8px; bottom: 7px; color: #8b8fa6; font-size: 8px; font-weight: 800; }
.public-report-subjects button:hover { transform: translateY(-2px); border-color: #c7d2fe; box-shadow: 0 12px 25px rgba(79,70,229,.11); }
.public-report-subjects button b { color: #4f46e5; font-size: 23px; }

.subject-chart-point {
    min-width: 54px;
    height: 190px;
    display: grid;
    grid-template-rows: 1fr auto auto;
    justify-items: center;
    gap: 5px;
}

.subject-chart-point span {
    align-self: end;
    width: 30px;
    border-radius: 999px 999px 8px 8px;
    background: #8aa39b;
    box-shadow: 0 10px 18px rgba(24, 35, 33, .12);
}

.subject-chart-point.is-up span {
    background: linear-gradient(180deg, #4ade80, #16a34a);
}

.subject-chart-point.is-down span {
    background: linear-gradient(180deg, #fb7185, #dc2626);
}

.subject-chart-point b {
    color: var(--text);
    font-size: 13px;
}

.subject-chart-point small {
    color: color-mix(in srgb, var(--text) 58%, transparent);
    font-size: 11px;
    white-space: nowrap;
}

.discipline-public-list {
    display: grid;
    gap: 10px;
}

.discipline-public-list article {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 9px;
    border: 1px solid rgba(220, 38, 38, .25);
    border-right: 5px solid #dc2626;
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(254, 226, 226, .7), #fff 65%);
    box-shadow: 0 10px 25px rgba(127, 29, 29, .09);
}

.discipline-public-list article > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.discipline-public-list strong,
.discipline-public-list small,
.discipline-public-list b {
    display: block;
}

.discipline-public-list strong {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #7f1d1d;
    font-size: 15px;
    font-weight: 950;
    line-height: 1.7;
}

.discipline-public-list strong i {
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    border-radius: 7px;
    color: #fff;
    background: #dc2626;
    font-size: 13px;
    font-style: normal;
    line-height: 1;
}

.discipline-public-list small {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 4px 9px;
    color: #9f2424;
    background: #fff0f0;
    font-size: 11px;
    font-weight: 900;
}

.discipline-public-list b {
    width: fit-content;
    border-radius: 9px;
    padding: 5px 9px;
    color: #991b1b;
    background: rgba(254, 202, 202, .55);
    font-size: 12px;
    font-weight: 950;
    line-height: 1.7;
}

.discipline-public-list p {
    margin: 0;
    color: #562424;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.9;
}

.home-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
}

.home-section-head span {
    display: inline-flex;
    border-radius: 999px;
    padding: 3px 9px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, #fff);
    font-size: 12px;
    font-weight: 900;
}

.home-section-head h2 {
    margin: 8px 0 0;
    color: var(--text);
    font-size: 20px;
}

.home-blog-list {
    display: grid;
    gap: 10px;
}

.home-faq-section {
    display: grid;
    gap: 16px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 14%, #e8efed);
    border-radius: 22px;
    padding: 18px;
    background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--primary) 10%, transparent), transparent 34%),
        #fff;
    box-shadow: 0 16px 38px rgba(24, 35, 33, .08);
}

.home-faq-heading {
    display: flex;
    align-items: center;
    gap: 13px;
}

.home-faq-heading-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--accent) 55%, var(--primary)));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 24%, transparent);
}

.home-faq-heading-icon svg {
    width: 27px;
    fill: currentColor;
}

.home-faq-heading > div {
    min-width: 0;
}

.home-faq-heading > div > span {
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
}

.home-faq-heading h2 {
    margin: 2px 0;
    color: var(--text);
    font-size: 19px;
}

.home-faq-heading p {
    margin: 0;
    color: color-mix(in srgb, var(--text) 58%, transparent);
    font-size: 11px;
}

.home-faq-list {
    display: grid;
    gap: 10px;
}

.home-faq-list details {
    overflow: hidden;
    border: 1px solid #e4ece9;
    border-radius: 15px;
    background: #fbfcfc;
    transition: border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.home-faq-list details[open] {
    border-color: color-mix(in srgb, var(--primary) 32%, #e4ece9);
    background: #fff;
    box-shadow: 0 11px 26px color-mix(in srgb, var(--primary) 10%, transparent);
}

.home-faq-list summary {
    position: relative;
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    padding: 13px;
    color: var(--text);
    cursor: pointer;
    line-height: 1.8;
    list-style: none;
}

.home-faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-number {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 10px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 9%, #fff);
    font-size: 10px;
    font-weight: 900;
}

.home-faq-list summary > strong {
    font-size: 13px;
    font-weight: 900;
}

.faq-toggle-icon {
    position: relative;
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--primary) 8%, #fff);
}

.faq-toggle-icon::before,
.faq-toggle-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 11px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
    transform: translate(-50%, -50%);
    transition: transform .2s ease;
}

.faq-toggle-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.home-faq-list details[open] .faq-toggle-icon {
    color: #fff;
    background: var(--primary);
}

.home-faq-list details[open] .faq-toggle-icon::before,
.home-faq-list details[open] .faq-toggle-icon::after {
    background: #fff;
}

.home-faq-list details[open] .faq-toggle-icon::after {
    transform: translate(-50%, -50%) rotate(0);
}

.faq-answer {
    margin: 0 54px 0 13px;
    border-top: 1px dashed color-mix(in srgb, var(--primary) 18%, #e4ece9);
    padding: 11px 0 14px;
}

.home-faq-list .faq-answer p {
    margin: 0;
    padding: 0;
    border: 0;
    color: color-mix(in srgb, var(--text) 68%, transparent);
    font-size: 12px;
    line-height: 1.9;
}

.home-blog-list article {
    position: relative;
    overflow: visible;
    border: 0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(24, 35, 33, .08);
}

.home-blog-card {
    width: 100%;
    min-height: 104px;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 16px;
    padding: 10px;
    color: inherit;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 6%, #fff), #fff),
        #fff;
    font-family: inherit;
    text-align: right;
    cursor: pointer;
}

.home-blog-card img,
.home-blog-thumb {
    display: block;
    width: 92px;
    height: 92px;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(24, 35, 33, .10);
}

.home-blog-card img {
    object-fit: cover;
}

.home-blog-thumb {
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--accent) 55%, var(--primary)));
    font-size: 28px;
    font-weight: 950;
}

.home-blog-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.home-blog-copy strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.home-blog-copy small {
    display: -webkit-box;
    overflow: hidden;
    color: color-mix(in srgb, var(--text) 62%, transparent);
    font-size: 12px;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.home-blog-action {
    align-self: center;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--accent) 45%, var(--primary)));
    box-shadow: 0 10px 18px color-mix(in srgb, var(--primary) 18%, transparent);
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.home-staff-section {
    display: grid;
    gap: 14px;
}

.home-staff-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.home-staff-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    padding: 10px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, #fff), #fff),
        #fff;
    box-shadow: 0 12px 28px rgba(24, 35, 33, .08);
}

.home-staff-card img {
    width: 88px;
    height: 88px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 10px 20px rgba(24, 35, 33, .10);
}

.home-staff-card div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.home-staff-card strong,
.home-staff-card span,
.home-staff-card p {
    display: block;
}

.home-staff-card strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
}

.home-staff-card span {
    width: fit-content;
    border-radius: 999px;
    padding: 3px 9px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, #fff);
    font-size: 12px;
    font-weight: 900;
}

.home-staff-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 2px 0 0;
    color: color-mix(in srgb, var(--text) 62%, transparent);
    font-size: 12px;
    line-height: 1.8;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 720px) {
    .home-staff-list {
        grid-template-columns: 1fr;
    }

    .public-profile-medals > div {
        grid-template-columns: 1fr;
    }

    .home-blog-action {
        width: fit-content;
    }

    .home-blog-card img,
    .home-blog-thumb {
        width: 76px;
        height: 76px;
    }
}

.blog-post-body {
    color: color-mix(in srgb, var(--text) 72%, transparent);
    font-size: 13px;
    line-height: 1.9;
}

.blog-post-body p {
    margin: 0 0 8px;
}

.blog-post-body a {
    color: var(--primary);
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.blog-post-body img {
    display: block;
    max-width: 100%;
    margin: 8px 0;
    border-radius: 10px;
}

.custom-media-player {
    overflow: hidden;
    display: grid;
    gap: 0;
    margin: 14px 0;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, #fff);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(24, 35, 33, .12);
    font-family: inherit;
}

.custom-media-player video,
.custom-media-player audio {
    width: 100%;
    margin: 0;
    border-radius: 0;
}

.custom-media-player video {
    display: block;
    max-height: 260px;
    object-fit: contain;
    background: #111816;
}

.custom-media-player audio {
    display: none;
}

.custom-media-player.is-audio {
    position: relative;
    padding-top: 42px;
    background:
        radial-gradient(circle at 18% 20%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 40px),
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, #fff), #fff);
}

.custom-media-player.is-audio::before {
    content: "فایل صوتی";
    position: absolute;
    top: 14px;
    right: 14px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

.custom-media-controls {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto 58px;
    align-items: center;
    gap: 9px;
    padding: 10px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, #fff), #fff),
        #fff;
    font-family: inherit;
}

.custom-media-play,
.custom-media-mute {
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
}

.custom-media-play {
    width: 38px;
    padding: 0;
}

.custom-media-mute {
    padding: 0 10px;
    background: color-mix(in srgb, var(--text) 82%, #000);
}

.custom-media-range {
    width: 100%;
    accent-color: var(--primary);
}

.custom-media-time {
    color: color-mix(in srgb, var(--text) 64%, transparent);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.blog-post-modal-box {
    max-height: min(82vh, 720px);
    overflow-y: auto;
}

.blog-post-modal-box > img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 12px;
}

.blog-post-modal-box h2 {
    margin: 0 0 12px;
}

.public-messages-panel {
    display: grid;
    gap: 14px;
}

body.messages-tab-active {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}
body.messages-tab-active .mobile-app-frame {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
}
body.messages-tab-active .app-content {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: 66px 0 calc(68px + env(safe-area-inset-bottom));
}
body.messages-tab-active .public-messages-panel {
    height: 100%;
    min-height: calc(100vh - 134px);
    min-height: calc(100dvh - 134px);
    gap: 0;
}
body.messages-tab-active .chat-shell {
    width: 100%;
    height: calc(100vh - 134px);
    height: calc(100dvh - 134px);
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.public-message-list {
    display: grid;
    gap: 10px;
}

.public-message-list article {
    border: 1px solid color-mix(in srgb, var(--primary) 14%, #fff);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(24, 35, 33, .06);
}

.public-message-list article.is-unread {
    border-color: color-mix(in srgb, var(--primary) 32%, #fff);
    background: color-mix(in srgb, var(--primary) 7%, #fff);
}

.public-message-list strong,
.public-message-list p {
    margin: 0;
}

.public-message-list strong {
    color: var(--text);
    font-size: 14px;
}

.public-message-list p {
    margin-top: 6px;
    color: color-mix(in srgb, var(--text) 68%, transparent);
    font-size: 13px;
    line-height: 1.8;
}

.chat-shell {
    position: relative;
    overflow: hidden;
    height: min(68vh, 640px);
    min-height: 520px;
    display: block;
    border: 1px solid color-mix(in srgb, var(--primary) 14%, #fff);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 36px rgba(24, 35, 33, .1);
}

.chat-sidebar,
.chat-window {
    position: absolute;
    inset: 0;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.chat-sidebar {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 0;
}

.chat-window {
    transform: translateX(-105%);
    transition: transform .22s ease;
}

.chat-shell.is-chat-open .chat-window {
    transform: translateX(0);
}

.chat-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    padding: 12px;
    margin: 0;
    align-items: center;
}

.chat-search-row input,
.chat-send-form input,
.chat-target-modal input {
    border: 1px solid color-mix(in srgb, var(--primary) 16%, #fff);
    border-radius: 999px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

.chat-search-row button,
.chat-send-form button {
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-weight: 900;
    width: 40px;
    height: 40px;
}

.chat-thread-list,
.chat-target-list {
    display: grid;
    align-content: start;
    gap: 0;
    max-height: none;
    overflow-y: auto;
}

.chat-thread-list button,
.chat-target-list button {
    width: 100%;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 0;
    padding: 11px 12px;
    text-align: right;
    background: #fff;
    font: inherit;
    cursor: pointer;
    box-shadow: inset 0 -1px 0 rgba(24, 35, 33, .06);
}

.chat-thread-list button.active {
    color: var(--text);
    background: color-mix(in srgb, var(--primary) 8%, #fff);
}

.chat-thread-list strong,
.chat-thread-list small,
.chat-target-list strong,
.chat-target-list small,
.chat-target-list span {
    display: block;
}

.chat-thread-list strong,
.chat-target-list strong {
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 14px;
}

.chat-thread-list small,
.chat-target-list small,
.chat-target-list span {
    margin-top: 3px;
    color: color-mix(in srgb, currentColor 62%, transparent);
    font-size: 12px;
}

.chat-avatar {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #16a34a);
    font-size: 17px;
    font-weight: 1000;
    overflow: hidden;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-active-avatar { width: 38px; height: 38px; flex: 0 0 auto; border: 2px solid rgba(255,255,255,.5); font-size: 14px; }

.chat-thread-list b {
    min-width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: #dc2626;
    font-size: 11px;
}

.chat-window {
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.chat-window-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--accent) 34%, var(--primary)));
    border-bottom: 0;
}

.chat-window-head button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    font-size: 22px;
}

.chat-window-head strong,
.chat-window-head span {
    display: block;
}

.chat-window-head strong {
    color: #fff;
    font-size: 14px;
}

.chat-window-head span {
    margin-top: 3px;
    color: rgba(255, 255, 255, .76);
    font-size: 11px;
}

.chat-window-head .chat-active-avatar {
    margin-top: 0;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-message-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding: 12px;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .06) 25%, transparent 25%) 0 0 / 24px 24px,
        linear-gradient(315deg, rgba(14, 165, 233, .05) 25%, transparent 25%) 0 0 / 24px 24px,
        #eef7f4;
}

.chat-message {
    max-width: 84%;
    border-radius: 16px;
    padding: 8px 10px 6px;
    box-shadow: 0 6px 16px rgba(24, 35, 33, .08);
}

.chat-message.mine {
    align-self: flex-start;
    color: #0f2f2a;
    background: #d9fdd3;
    border-bottom-left-radius: 4px;
}

.chat-message.theirs {
    align-self: flex-end;
    color: var(--text);
    background: #fff;
    border: 0;
    border-bottom-right-radius: 4px;
}

.chat-message p,
.chat-message small {
    margin: 0;
}

.chat-message p {
    font-size: 13px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.chat-message small {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 5px;
    opacity: .72;
    font-size: 10px;
}

.chat-message small span {
    letter-spacing: 1px;
}

.chat-send-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 8px;
    background: #eef7f4;
    border-top: 0;
}

.chat-send-form button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 0;
}

.chat-send-form button::before {
    content: "➤";
    display: block;
    transform: rotate(180deg);
    font-size: 18px;
}

.chat-send-form button:disabled,
.chat-send-form input:disabled {
    opacity: .55;
}

.chat-target-modal {
    display: grid;
    gap: 10px;
}

.chat-target-list {
    max-height: 420px;
}

.public-profile-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: 18px;
    padding: 16px;
    color: #fff;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 92%, #10231d), color-mix(in srgb, var(--accent) 48%, var(--primary))),
        var(--primary);
    box-shadow: 0 18px 44px color-mix(in srgb, var(--primary) 22%, transparent);
}

.profile-avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    flex: 0 0 58px;
    overflow: hidden;
    border-radius: 50%;
    color: color-mix(in srgb, var(--primary) 85%, #123);
    background: rgba(255, 255, 255, .92);
    font-size: 24px;
    font-weight: 950;
}

.public-profile-hero span,
.public-profile-hero h2,
.public-profile-hero p {
    margin: 0;
}

.public-profile-hero span {
    display: inline-flex;
    border-radius: 999px;
    padding: 3px 9px;
    color: color-mix(in srgb, var(--primary) 86%, #10231d);
    background: rgba(255, 255, 255, .92);
    font-size: 12px;
    font-weight: 900;
}

.public-profile-hero h2 {
    margin-top: 8px;
    font-size: 21px;
    line-height: 1.55;
}

.public-profile-hero p {
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
}

.public-profile-details {
    display: grid;
    gap: 10px;
    margin: 0;
}

.public-profile-details div,
.public-profile-related {
    border: 1px solid color-mix(in srgb, var(--primary) 14%, #fff);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(24, 35, 33, .06);
}

.public-profile-details dt {
    color: color-mix(in srgb, var(--text) 58%, transparent);
    font-size: 12px;
    font-weight: 800;
}

.public-profile-details dd {
    margin: 6px 0 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.public-profile-related {
    display: grid;
    gap: 10px;
}

.public-profile-related > strong {
    color: var(--primary);
    font-size: 14px;
}

.public-profile-related div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.public-profile-related span {
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--text);
    background: color-mix(in srgb, var(--primary) 8%, #fff);
    font-size: 12px;
    font-weight: 800;
}

.public-profile-related p {
    margin: 0;
    color: color-mix(in srgb, var(--text) 58%, transparent);
    font-size: 12px;
}

.public-profile-medals {
    display: grid;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, #fff);
    border-radius: 16px;
    padding: 14px;
    background:
        radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 58px),
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, #fff), #fff);
    box-shadow: 0 12px 28px rgba(24, 35, 33, .08);
}

.public-profile-medals > strong {
    color: var(--primary);
    font-size: 15px;
}

.public-profile-medals > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.public-profile-medals article {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    padding: 9px;
    background: rgba(255, 255, 255, .84);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, #fff);
}

.public-profile-medals img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
}

.public-profile-medals span,
.public-profile-medals b,
.public-profile-medals small {
    display: block;
}

.public-profile-medals b {
    color: var(--text);
    font-size: 13px;
}

.public-profile-medals small {
    margin-top: 4px;
    color: color-mix(in srgb, var(--text) 62%, transparent);
    font-size: 11px;
    line-height: 1.7;
}

@media (max-width: 720px) {
    .public-profile-medals > div {
        grid-template-columns: 1fr;
    }
}

.profile-logout-button {
    min-height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: #b42318;
    font-weight: 900;
    text-decoration: none;
}

/* Modern user profile */
.public-profile-panel {
    gap: 18px;
    padding-bottom: 8px;
}

.public-profile-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 110px;
    align-items: flex-end;
    gap: 16px;
    border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
    border-radius: 26px;
    padding: 25px 21px;
    background:
        radial-gradient(circle at 12% 115%, rgba(255,255,255,.22), transparent 34%),
        linear-gradient(145deg, color-mix(in srgb, var(--primary) 76%, #10231d), var(--primary) 58%, color-mix(in srgb, var(--accent) 42%, var(--primary)));
    box-shadow: 0 22px 52px color-mix(in srgb, var(--primary) 26%, transparent);
}

.profile-hero-pattern::before,
.profile-hero-pattern::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 50%;
}
.profile-hero-pattern::before { width: 220px; height: 220px; left: -105px; top: -125px; border-width: 30px; }
.profile-hero-pattern::after { width: 110px; height: 110px; right: -45px; bottom: -58px; }

.public-profile-hero .profile-avatar {
    width: 84px;
    height: 84px;
    flex-basis: 84px;
    visibility: visible;
    border: 4px solid rgba(255,255,255,.9);
    border-radius: 25px;
    color: var(--primary);
    background: #fff;
    box-shadow: 0 14px 30px rgba(8,30,24,.22);
    font-size: 31px;
    transform: rotate(-3deg);
}
.public-profile-hero .profile-avatar.has-image img { transform: rotate(3deg) scale(1.04); }
.public-profile-hero .profile-avatar.has-initial {
    background:
        radial-gradient(circle at 25% 20%, rgba(255,255,255,.72), transparent 30%),
        #fff;
}

.profile-hero-copy {
    min-width: 0;
    padding-bottom: 3px;
}
.public-profile-hero .profile-hero-copy > span {
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 4px 9px;
    color: #fff;
    background: rgba(255,255,255,.14);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.17);
    backdrop-filter: blur(7px);
}
.profile-hero-copy > span i { width: 7px; height: 7px; border: 2px solid rgba(255,255,255,.6); border-radius: 50%; background: #4ade80; }
.public-profile-hero h2 { margin-top: 9px; color: #fff; font-size: 23px; }
.public-profile-hero p { margin-top: 2px; direction: ltr; text-align: right; color: rgba(255,255,255,.68); }
.profile-verified-mark {
    position: absolute;
    top: 18px;
    left: 18px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 12px;
    color: #fff;
    background: rgba(255,255,255,.13);
    backdrop-filter: blur(8px);
}
.profile-verified-mark svg { width: 21px; fill: currentColor; }

.public-profile-information,
.public-profile-related,
.public-profile-medals {
    display: grid;
    gap: 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 12%, #e5ecea);
    border-radius: 21px;
    padding: 17px;
    background: #fff;
    box-shadow: 0 13px 34px rgba(24,35,33,.075);
}

.profile-section-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-bottom: 13px;
    border-bottom: 1px solid #edf1f0;
}
.profile-section-heading > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 14px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, #fff);
}
.profile-section-heading svg { width: 22px; fill: currentColor; }
.profile-section-heading > div { display: grid; gap: 2px; }
.profile-section-heading small { color: var(--primary); font-size: 10px; font-weight: 900; }
.profile-section-heading strong { color: var(--text); font-size: 15px; }

.public-profile-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}
.public-profile-details div {
    position: relative;
    overflow: hidden;
    min-height: 78px;
    border: 1px solid #edf1f0;
    border-radius: 14px;
    padding: 12px;
    background: #fafcfb;
    box-shadow: none;
}
.public-profile-details div::after {
    content: "";
    position: absolute;
    right: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 3px 0 0 3px;
    background: color-mix(in srgb, var(--primary) 58%, transparent);
}
.public-profile-details dt { padding-right: 4px; color: #7b8985; font-size: 10px; }
.public-profile-details dd { padding-right: 4px; color: #213530; font-size: 13px; }

.public-profile-related { gap: 13px; }
.public-profile-related div { gap: 7px; }
.public-profile-related span {
    border: 1px solid color-mix(in srgb, var(--primary) 13%, #e7eeec);
    padding: 7px 11px;
    color: color-mix(in srgb, var(--primary) 78%, #19362f);
    background: color-mix(in srgb, var(--primary) 6%, #fff);
}

.public-profile-medals { border-color: #f4d78c; background: linear-gradient(145deg,#fffdf5,#fff); }
.public-profile-medals .profile-section-heading > span { color: #b45309; background: #fef3c7; }
.public-profile-medals .profile-section-heading small { color: #b45309; }
.public-profile-medals article { border: 1px solid #f6e6bc; box-shadow: 0 8px 20px rgba(146,64,14,.06); }

.public-profile-panel .profile-logout-button {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #fecaca;
    border-radius: 18px;
    padding: 11px 16px;
    color: #991b1b;
    background: linear-gradient(135deg,#fff5f5,#fff);
    box-shadow: 0 10px 26px rgba(153,27,27,.08);
    transition: transform .2s ease, box-shadow .2s ease;
}
.public-profile-panel .profile-logout-button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(153,27,27,.13); }
.profile-logout-button > span { display: grid; gap: 2px; }
.profile-logout-button strong { font-size: 14px; }
.profile-logout-button small { color: #b66a6a; font-size: 10px; font-weight: 500; }
.profile-logout-button svg { width: 25px; fill: currentColor; }

@media (max-width: 380px) {
    /* .public-profile-details { grid-template-columns: 1fr; } */
    .public-profile-hero { min-height: 110px; padding: 21px 17px; }
    .public-profile-hero .profile-avatar { width: 72px; height: 72px; flex-basis: 72px; }
    .public-profile-hero h2 { font-size: 19px; }
}

.birthday-celebration {
    position: relative;
    overflow: hidden;
    min-height: 154px;
    display: grid;
    grid-template-columns: 104px 1fr;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(255, 190, 92, .56);
    border-radius: 22px;
    padding: 16px;
    color: #4a2f04;
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 255, 255, .78), transparent 24%),
        linear-gradient(135deg, #fff7d8, #ffd8e5 52%, #dff8ff);
    box-shadow: 0 18px 42px rgba(191, 105, 31, .18);
    animation: birthday-card-arrive .55s cubic-bezier(.2,.8,.2,1) both;
}

.birthday-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.birthday-shine::before {
    content: "";
    position: absolute;
    top: -90%;
    left: -45%;
    width: 36%;
    height: 280%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
    transform: rotate(24deg);
    animation: birthday-shimmer 4.5s ease-in-out infinite 1s;
}

.birthday-burst {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.birthday-burst i {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ff4d8d;
    animation: birthday-pop 1.9s ease-in-out infinite;
}

.birthday-burst i:nth-child(1) { top: 20px; right: 24px; background: #ff4d8d; animation-delay: 0s; }
.birthday-burst i:nth-child(2) { top: 28px; left: 54px; background: #20c997; animation-delay: .16s; }
.birthday-burst i:nth-child(3) { top: 78px; right: 48px; background: #6c63ff; animation-delay: .28s; }
.birthday-burst i:nth-child(4) { bottom: 28px; left: 24px; background: #ffb703; animation-delay: .42s; }
.birthday-burst i:nth-child(5) { bottom: 34px; right: 130px; background: #00b4d8; animation-delay: .58s; }
.birthday-burst i:nth-child(6) { top: 52px; left: 128px; background: #fb5607; animation-delay: .74s; }
.birthday-burst i:nth-child(7) { top: 16px; right: 48%; width: 6px; height: 13px; border-radius: 3px; background: #9b5de5; animation-delay: .9s; }
.birthday-burst i:nth-child(8) { bottom: 18px; right: 44px; width: 12px; height: 5px; border-radius: 3px; background: #00bbf9; animation-delay: 1.05s; }

.birthday-balloons {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.birthday-balloons i {
    position: absolute;
    width: 17px;
    height: 22px;
    border-radius: 50% 50% 48% 48%;
    opacity: .75;
    animation: birthday-balloon 4s ease-in-out infinite;
}
.birthday-balloons i::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 21px;
    width: 1px;
    height: 24px;
    background: rgba(95,64,25,.28);
}
.birthday-balloons i:nth-child(1) { top: 18px; left: 18px; background: #ff5d8f; }
.birthday-balloons i:nth-child(2) { top: 38px; left: 42px; background: #5e60ce; animation-delay: -.8s; transform: scale(.8); }
.birthday-balloons i:nth-child(3) { top: 12px; right: 46%; background: #20c997; animation-delay: -1.5s; transform: scale(.65); }

.birthday-cake {
    position: relative;
    z-index: 1;
    width: 96px;
    height: 112px;
    animation: cake-bounce 2.6s ease-in-out infinite;
}

.cake-plate,
.cake-body,
.cake-top,
.cake-candle,
.cake-flame {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.cake-plate {
    bottom: 6px;
    width: 86px;
    height: 12px;
    border-radius: 999px;
    background: rgba(74, 47, 4, .18);
}

.cake-body {
    bottom: 17px;
    width: 72px;
    height: 42px;
    border-radius: 12px 12px 16px 16px;
    background: linear-gradient(135deg, #ff7ca8, #ff4d8d);
    box-shadow: inset 0 -9px 0 rgba(0, 0, 0, .08);
}

.cake-body::before {
    content: "";
    position: absolute;
    inset: 12px 10px auto;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .68);
    box-shadow: 18px 13px 0 rgba(255, 255, 255, .44), -8px 17px 0 rgba(255, 255, 255, .38);
}

.cake-top {
    bottom: 52px;
    width: 78px;
    height: 24px;
    border-radius: 18px 18px 10px 10px;
    background: #fff4c7;
}

.cake-top::after {
    content: "";
    position: absolute;
    right: 13px;
    bottom: -10px;
    width: 12px;
    height: 18px;
    border-radius: 0 0 999px 999px;
    background: #fff4c7;
    box-shadow: 24px 0 0 #fff4c7;
}

.cake-candle {
    bottom: 74px;
    width: 10px;
    height: 28px;
    border-radius: 6px;
    background: repeating-linear-gradient(135deg, #fff 0 5px, #6c63ff 5px 10px);
}

.cake-flame {
    bottom: 100px;
    width: 17px;
    height: 22px;
    border-radius: 999px 999px 999px 0;
    background: linear-gradient(135deg, #fff176, #ff8a00);
    transform: translateX(-50%) rotate(-38deg);
    animation: flame-flicker .7s ease-in-out infinite alternate;
}

.birthday-copy {
    position: relative;
    z-index: 1;
}

.birthday-copy span {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 10px;
    color: #9a4a00;
    background: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 900;
}

.birthday-copy h2 {
    margin: 8px 0 6px;
    font-size: 24px;
    line-height: 1.45;
}

.birthday-copy p {
    margin: 0;
    color: #6b4309;
    line-height: 1.8;
    font-weight: 900;
}

.birthday-copy small {
    display: block;
    margin-top: 6px;
    color: rgba(107, 67, 9, .72);
    font-size: 10px;
}

@keyframes birthday-pop {
    0%, 100% {
        opacity: .35;
        transform: scale(.75) translateY(0);
    }
    45% {
        opacity: 1;
        transform: scale(1.7) translateY(-8px);
    }
}

@keyframes birthday-card-arrive {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes birthday-shimmer {
    0%, 62% { left: -45%; opacity: 0; }
    72% { opacity: 1; }
    100% { left: 125%; opacity: 0; }
}

@keyframes birthday-balloon {
    0%, 100% { translate: 0 0; rotate: -3deg; }
    50% { translate: 0 -8px; rotate: 4deg; }
}

@keyframes cake-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes flame-flicker {
    from {
        filter: drop-shadow(0 0 5px rgba(255, 138, 0, .5));
        transform: translateX(-50%) rotate(-43deg) scale(.94);
    }
    to {
        filter: drop-shadow(0 0 12px rgba(255, 138, 0, .8));
        transform: translateX(-50%) rotate(-32deg) scale(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .birthday-celebration,
    .birthday-shine::before,
    .birthday-burst i,
    .birthday-balloons i,
    .birthday-cake,
    .cake-flame {
        animation: none;
    }
}

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

.app-quick-grid article {
    min-height: 96px;
    display: grid;
    align-content: center;
    gap: 8px;
    border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(24, 35, 33, .06);
}

.app-quick-grid b {
    color: var(--primary);
}

.app-quick-grid span {
    color: color-mix(in srgb, var(--text) 64%, transparent);
    font-size: 13px;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 4;
    width: min(100%, 430px);
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 0;
    border-top: 1px solid rgba(30, 45, 41, .08);
    border-radius: 22px 22px 0 0;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .82)),
        #fff;
    box-shadow: 0 18px 42px rgba(24, 35, 33, .17);
    backdrop-filter: blur(16px);
}

.floating-occasion {
    position: fixed;
    left: 50%;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 7;
    width: min(100%, 430px);
    height: 0;
    padding: 0 14px;
    transform: translateX(-50%);
    pointer-events: none;
}

.floating-occasion-button {
    position: absolute;
    left: 14px;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 50px;
    padding: 7px;
    color: #fff;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 88%, #102d26), var(--primary));
    box-shadow: 0 13px 30px color-mix(in srgb, var(--primary) 32%, transparent);
    cursor: pointer;
    pointer-events: auto;
    animation: occasion-float 3s ease-in-out infinite;
}

.floating-occasion-button::before {
    content: "";
    position: absolute;
    inset: -5px;
    z-index: -1;
    border: 2px solid color-mix(in srgb, var(--primary) 42%, transparent);
    border-radius: 50px;
    animation: occasion-pulse 2.2s ease-out infinite;
}

.occasion-button-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50px;
    background: rgba(255,255,255,.16);
}
.occasion-button-icon svg { width: 21px; fill: currentColor; }
.floating-occasion-button > span:nth-child(2) { display: grid; text-align: right; line-height: 1.3; }
.floating-occasion-button small { color: rgba(255,255,255,.68); font-size: 9px; }
.floating-occasion-button strong { color: #fff; font-size: 12px; white-space: nowrap; }
.floating-occasion-button i {
    position: absolute;
    top: 3px;
    left: 5px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    background: #fff;
}

.occasion-tooltip {
    position: absolute;
    left: 14px;
    bottom: 65px;
    width: min(370px, calc(100% - 28px));
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 17%, #e6eeeb);
    border-radius: 22px;
    color: var(--text);
    background: rgba(255,255,255,.97);
    box-shadow: 0 22px 55px rgba(17,44,37,.22);
    backdrop-filter: blur(18px);
    pointer-events: auto;
    transform-origin: bottom right;
    animation: occasion-tooltip-in .22s ease-out;
}
.occasion-tooltip::after {
    content: "";
    position: absolute;
    right: 35px;
    bottom: -7px;
    width: 14px;
    height: 14px;
    border-right: 1px solid #e2ebe8;
    border-bottom: 1px solid #e2ebe8;
    background: #fff;
    transform: rotate(45deg);
}
.occasion-tooltip header { display: grid; grid-template-columns: 48px 1fr 30px; align-items: center; gap: 11px; padding: 14px; background: color-mix(in srgb, var(--primary) 7%, #fff); }
.occasion-tooltip header > div:nth-child(2) { display: grid; gap: 2px; }
.occasion-tooltip header span { color: var(--primary); font-size: 10px; font-weight: 800; }
.occasion-tooltip header strong { font-size: 15px; }
.occasion-tooltip header > button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 10px; padding: 0; color: #71817d; background: rgba(0,0,0,.045); font-size: 20px; cursor: pointer; }
.occasion-tooltip-date { display: grid; place-items: center; align-content: center; width: 48px; height: 48px; border-radius: 14px; color: #fff; background: var(--primary); line-height: 1; box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 22%, transparent); }
.occasion-tooltip-date b { font-size: 19px; }
.occasion-tooltip-date small { margin-top: 4px; color: rgba(255,255,255,.8); font-size: 8px; }
.occasion-tooltip-content { display: grid; max-height: min(330px, 45vh); overflow-y: auto; padding: 5px 14px 14px; }
.occasion-tooltip-content article { padding: 12px 2px; }
.occasion-tooltip-content article + article { border-top: 1px dashed #dce7e3; }
.occasion-tooltip-content strong { display: block; font-size: 14px; }
.occasion-tooltip-content p { margin: 5px 0 0; color: color-mix(in srgb, var(--text) 68%, transparent); font-size: 12px; line-height: 1.9; }

@keyframes occasion-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
@keyframes occasion-pulse {
    0% { opacity: .65; transform: scale(.96); }
    75%, 100% { opacity: 0; transform: scale(1.14); }
}
@keyframes occasion-tooltip-in {
    from { opacity: 0; transform: translateY(9px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .floating-occasion-button,
    .floating-occasion-button::before,
    .occasion-tooltip { animation: none; }
}

.bottom-nav a {
    position: relative;
    min-height: 54px;
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 18px;
    color: color-mix(in srgb, var(--text) 58%, transparent);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.bottom-nav a svg {
    width: 23px;
    height: 23px;
    padding: 0;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s ease, stroke-width .2s ease;
}

.bottom-nav a span {
    font-size: 11px;
}

.chat-tab-badge {
    position: absolute;
    top: 4px;
    left: 18px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    padding: 0 5px;
    color: #fff;
    background: #dc2626;
    font-size: 10px;
    line-height: 1;
}

.self-evaluation-tab-dot {
    position: absolute;
    top: 5px;
    right: 18px;
    width: 11px;
    height: 11px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, .18);
    animation: self-evaluation-dot-pulse 1.8s ease-in-out infinite;
}

@keyframes self-evaluation-dot-pulse {
    50% { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(139, 92, 246, 0); }
}

.bottom-nav a.active {
    color: #fff;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 92%, #17221f), color-mix(in srgb, var(--accent) 38%, var(--primary)));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 24%, transparent);
    transform: translateY(-1px);
}

.bottom-nav a.active svg {
    stroke-width: 2.1;
    transform: translateY(-1px) scale(1.04);
}

.public-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(10, 18, 16, .42);
    backdrop-filter: blur(6px);
}

.public-modal-box {
    position: relative;
    width: min(100%, 380px);
    border-radius: 18px;
    padding: 22px;
    background: #fff;
    box-shadow: 0 26px 70px rgba(10, 18, 16, .26);
}

.public-modal-box span {
    font-size: 12px;
    font-weight: 900;
}

.public-modal-box h2 {
    margin: 8px 0 10px;
    font-size: 22px;
}

.public-modal-box p {
    color: color-mix(in srgb, var(--text) 72%, transparent);
    line-height: 1.9;
}

.public-modal-box > button:not(.public-modal-close) {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-weight: 900;
}

.public-modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    color: color-mix(in srgb, var(--text) 62%, transparent);
    background: #f0f4f2;
    font-size: 22px;
    z-index: 2;
}
