/* =====================================================================
   Student dashboard top section redesign (index.php, #dashboard-view only)
   Loaded after style.css / dashboard-premium.css / rivr-design-system.css.
   Visual layer only: every JS hook (ids / data-* / state classes) is untouched.
   The login gate (#login-view) is NOT styled here.
   ===================================================================== */

#dashboard-view {
    --sh-navy: #12224b;
    --sh-ink: #1b2a52;
    --sh-muted: #5f6f93;
    --sh-blue: #1f6bff;
    --sh-blue-deep: #0b4fd6;
    --sh-orange: #ff8a1f;
    --sh-glass: rgba(255, 255, 255, 0.86);
    --sh-glass-border: rgba(255, 255, 255, 0.95);
    --sh-shadow: 0 14px 34px -16px rgba(26, 78, 168, 0.32);
    --sh-bg-img: url("../icons/home/bg-school-sm.webp");
}

@media (min-width: 900px) {
    #dashboard-view {
        --sh-bg-img: url("../icons/home/bg-school.webp");
    }
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body.student-dashboard #dashboard-view.dashboard-premium {
    background: linear-gradient(180deg, #eaf3ff 0%, #f6faff 38%, #ffffff 100%);
    font-family: 'Anuphan', 'Noto Sans Thai', sans-serif;
}

.sh-main {
    width: 100%;
}

/* ---------- capsule navbar ---------- */
.sh-navwrap {
    position: sticky;
    top: 0;
    z-index: 60;
    height: 0;
    overflow: visible;
}

.sh-nav-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    width: min(100% - 6.6vw, 120rem);
    margin: 0.85rem auto 0;
}

.sh-nav {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 2rem);
    min-width: 0;
    padding: 0.5rem 0.7rem 0.5rem 0.9rem;
    border-radius: 1.5rem;
    background: var(--sh-glass);
    border: 1px solid var(--sh-glass-border);
    box-shadow: var(--sh-shadow);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.sh-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    text-decoration: none;
    color: var(--sh-navy);
}

.sh-nav__logo {
    width: 2.9rem;
    height: 2.9rem;
    object-fit: contain;
    flex: 0 0 auto;
}

.sh-nav__brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.sh-nav__title {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--sh-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sh-nav__sub {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--sh-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sh-nav__links {
    display: none;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sh-nav__links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.05rem;
    border-radius: 0.85rem;
    color: var(--sh-ink);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.sh-nav__links a:hover {
    background: rgba(31, 107, 255, 0.09);
    color: var(--sh-blue-deep);
}

.sh-nav__links .is-active,
.sh-nav__links .is-active:hover {
    background: linear-gradient(180deg, #2b7bff 0%, #0b57e6 100%);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(11, 87, 230, 0.7);
}

.sh-nav__links svg {
    width: 1rem;
    height: 1rem;
}

@media (min-width: 1024px) {
    .sh-nav__links {
        display: flex;
    }
}

/* right capsule: account menu */
body.student-dashboard .sh-nav__auth {
    margin: 0;
    padding: 0.4rem 0.55rem;
    border-radius: 1.5rem;
    background: var(--sh-glass);
    border: 1px solid var(--sh-glass-border);
    box-shadow: var(--sh-shadow);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    flex: 0 0 auto;
}

body.student-dashboard .sh-nav__auth .header-account-toggle {
    min-height: 2.6rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--sh-navy);
    font-family: inherit;
    font-weight: 700;
}

body.student-dashboard .sh-nav__auth .header-account-toggle:hover {
    background: rgba(31, 107, 255, 0.08);
}

body.student-dashboard .sh-nav__auth .header-account-toggle__avatar {
    background: linear-gradient(135deg, #2b7bff 0%, #0b57e6 100%);
}

body.student-dashboard .sh-nav__auth .header-account-toggle__name {
    max-width: 11rem;
}

body.student-dashboard .sh-nav__auth .header-account-dropdown {
    border-radius: 1.2rem;
}

@media (max-width: 640px) {
    .sh-nav-row {
        width: min(100% - 1rem, 96rem);
        margin-top: 0.5rem;
        gap: 0.5rem;
    }

    .sh-nav {
        padding: 0.4rem 0.6rem;
        flex: 1 1 auto;
    }

    .sh-nav__logo {
        width: 2.3rem;
        height: 2.3rem;
    }

    .sh-nav__title {
        font-size: 0.86rem;
    }

    .sh-nav__sub {
        display: none;
    }

    body.student-dashboard .sh-nav__auth {
        padding: 0.3rem;
    }

    body.student-dashboard .sh-nav__auth .header-account-toggle__name {
        display: none;
    }
}

/* ---------- stage (hero + countdown + overview) ---------- */
.sh-stage {
    position: relative;
    isolation: isolate;
    padding: clamp(5rem, 8vw, 6.5rem) 0 clamp(3.25rem, 7vw, 6.5rem);
    background: #cfe6ff var(--sh-bg-img) center bottom / cover no-repeat;
}

.sh-stage__inner {
    position: relative;
}

.home-shell.sh-stage__inner {
    width: min(100% - 8vw, 112rem);
    max-width: none;
    margin-inline: auto;
    padding-inline: 0;
}

@media (max-width: 640px) {
    .home-shell.sh-stage__inner {
        width: calc(100% - 1.5rem);
    }
}

/* ---------- hero ---------- */
.sh-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 0.5rem 1rem;
    min-height: clamp(20rem, 35vw, 34rem);
}

.sh-hero__copy {
    position: relative;
    z-index: 2;
    padding-block: 0.5rem;
}

.sh-hero__title {
    margin: 0;
    font-family: 'Anuphan', 'Noto Sans Thai', sans-serif;
    font-size: clamp(2rem, 3.9vw, 5rem);
    font-weight: 800;
    font-style: italic;
    line-height: 1.22;
    letter-spacing: -0.01em;
    color: #101c3f;
    -webkit-text-stroke: 0.14em #fff;
    paint-order: stroke fill;
    text-shadow: 0 8px 22px rgba(255, 255, 255, 0.55);
}

.sh-hero__title > span {
    display: block;
}

.sh-hero__title-sub {
    color: var(--sh-blue-deep);
}

.sh-hero__title em {
    position: relative;
    font-style: inherit;
    color: var(--sh-orange);
    white-space: nowrap;
}

.sh-hero__title em::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.02em;
    height: 0.12em;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffb23d, #ff8a1f);
    transform: rotate(-1.2deg);
}

.sh-hero__lead {
    margin: 0.9rem 0 1.4rem;
    font-size: clamp(0.95rem, 1.5vw, 1.2rem);
    font-weight: 500;
    color: #2a3a63;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
}

.sh-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 3.5rem;
    padding: 0 1.6rem 0 1.4rem;
    border: 0;
    border-radius: 1.1rem;
    background: linear-gradient(180deg, #2b7bff 0%, #0b4fd6 100%);
    color: #fff;
    font: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 16px 28px -14px rgba(11, 79, 214, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sh-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 32px -14px rgba(11, 79, 214, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.sh-cta:active {
    transform: translateY(0);
}

.sh-cta svg {
    width: 1.5rem;
    height: 1.5rem;
    flex: 0 0 auto;
}

.sh-cta svg:last-child {
    width: 1.15rem;
    height: 1.15rem;
}

.sh-hero__art {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
}

.sh-hero__art img {
    display: block;
    width: min(112%, 58rem);
    margin-right: -3vw;
    height: auto;
    filter: drop-shadow(0 18px 22px rgba(24, 64, 140, 0.18));
}

@media (max-width: 860px) {
    .sh-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .sh-hero__art {
        justify-content: center;
        margin-top: 0.25rem;
    }

    .sh-hero__art img {
        width: min(100%, 26rem);
    }
}

/* ---------- countdown bar ---------- */
body.student-dashboard #countdown-container.countdown-shell {
    position: relative;
    z-index: 3;
    width: min(100%, 64rem);
    margin: clamp(-6.5rem, -5.5vw, -1rem) 0 1.6rem clamp(0rem, 8vw, 14rem);
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

body.student-dashboard #countdown-container.countdown-shell.hidden {
    display: none;
}

body.student-dashboard #countdown-container .countdown-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.6rem;
    margin: 0;
    width: 100%;
    padding: 0.95rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 1.6rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 38px -20px rgba(26, 78, 168, 0.4);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.sh-countdown__info {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.sh-countdown__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 3.3rem;
    height: 3.3rem;
    border-radius: 1rem;
    background: linear-gradient(145deg, #fff1e0 0%, #ffd9b0 100%);
    color: #f0701a;
    box-shadow: inset 0 1px 0 #fff, 0 8px 16px -10px rgba(240, 112, 26, 0.8);
}

.sh-countdown__icon svg {
    width: 1.8rem;
    height: 1.8rem;
}

.sh-countdown__copy {
    min-width: 0;
}

body.student-dashboard #countdown-container .countdown-label {
    margin: 0;
    text-align: left;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--sh-navy);
    line-height: 1.3;
}

.sh-countdown__term {
    margin: 0.1rem 0 0;
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--sh-muted);
    line-height: 1.35;
}

body.student-dashboard #countdown-container .countdown-schedule {
    display: flex;
    flex-wrap: wrap;
    gap: 0.1rem 0.9rem;
    margin: 0.2rem 0 0;
    padding: 0;
    background: transparent;
    border: 0;
}

body.student-dashboard #countdown-container .countdown-schedule-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 0.74rem;
    transform: none;
}

body.student-dashboard #countdown-container .countdown-schedule-label,
body.student-dashboard #countdown-container .countdown-schedule-value {
    white-space: nowrap;
}

body.student-dashboard #countdown-container .countdown-schedule-label {
    padding: 0;
    background: transparent;
    border: 0;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--sh-muted);
}

body.student-dashboard #countdown-container .countdown-schedule-value {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--sh-ink);
}

body.student-dashboard #countdown-container .countdown-schedule-dot {
    width: 0.45rem;
    height: 0.45rem;
}

/* tiles */
body.student-dashboard #countdown-container .flip-clock {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    gap: 0.45rem;
}

body.student-dashboard #countdown-container .flip-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

body.student-dashboard #countdown-container .flip-unit-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--sh-ink);
    text-shadow: none;
}

body.student-dashboard #countdown-container .separator {
    padding: 0.55rem 0 0;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    color: var(--sh-navy);
    text-shadow: none;
    animation: none;
}

body.student-dashboard #countdown-container .flip-card {
    width: clamp(4rem, 4.2vw, 5.2rem);
    height: clamp(4rem, 4.2vw, 5.2rem);
    border-radius: 1rem;
    background: #0e1b3f;
    box-shadow: 0 12px 20px -12px rgba(14, 27, 63, 0.85);
}

body.student-dashboard #countdown-container .flip-card .top,
body.student-dashboard #countdown-container .flip-card .top-flip {
    border-radius: 1rem 1rem 0 0;
    background: linear-gradient(180deg, #1a2c5e 0%, #12224b 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.45);
}

body.student-dashboard #countdown-container .flip-card .bottom,
body.student-dashboard #countdown-container .flip-card .bottom-flip {
    border-radius: 0 0 1rem 1rem;
    background: #0e1b3f;
}

body.student-dashboard #countdown-container .flip-card .top span,
body.student-dashboard #countdown-container .flip-card .top-flip span,
body.student-dashboard #countdown-container .flip-card .bottom span,
body.student-dashboard #countdown-container .flip-card .bottom-flip span {
    font-size: clamp(2.3rem, 2.7vw, 3.4rem);
    font-weight: 800;
    color: #fff;
}

@media (max-width: 860px) {
    body.student-dashboard #countdown-container.countdown-shell {
        width: 100%;
        margin: 0.75rem 0 1.1rem;
    }
}

@media (max-width: 640px) {
    body.student-dashboard #countdown-container .countdown-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 0.85rem 0.9rem;
        border-radius: 1.3rem;
    }

    .sh-countdown__icon {
        width: 2.8rem;
        height: 2.8rem;
    }

    body.student-dashboard #countdown-container .flip-clock {
        width: 100%;
        gap: 0.3rem;
    }

    body.student-dashboard #countdown-container .flip-card {
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 0.85rem;
    }

    body.student-dashboard #countdown-container .flip-card .top span,
    body.student-dashboard #countdown-container .flip-card .top-flip span,
    body.student-dashboard #countdown-container .flip-card .bottom span,
    body.student-dashboard #countdown-container .flip-card .bottom-flip span {
        font-size: 2rem;
    }

    body.student-dashboard #countdown-container .separator {
        padding-top: 0.35rem;
        font-size: 1.3rem;
    }
}

@media (max-width: 380px) {
    body.student-dashboard #countdown-container .flip-card {
        width: 3.05rem;
        height: 3.05rem;
    }

    body.student-dashboard #countdown-container .flip-card .top span,
    body.student-dashboard #countdown-container .flip-card .top-flip span,
    body.student-dashboard #countdown-container .flip-card .bottom span,
    body.student-dashboard #countdown-container .flip-card .bottom-flip span {
        font-size: 1.75rem;
    }
}

/* ---------- overview cards (profile + 3 stats) ---------- */
body.student-dashboard .home-overview {
    margin: 0;
}

body.student-dashboard .home-overview__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: stretch;
}

@media (min-width: 600px) {
    body.student-dashboard .home-overview__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.student-dashboard .home-overview__profile {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    body.student-dashboard .home-overview__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.1rem;
    }

    body.student-dashboard .home-overview__profile {
        grid-column: auto;
    }
}

body.student-dashboard #stats-grid.home-stat-grid {
    display: contents;
}

body.student-dashboard #stats-grid.home-stat-grid--loading {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

@media (min-width: 1024px) {
    body.student-dashboard #stats-grid.home-stat-grid--loading {
        grid-column: 2 / -1;
    }
}

body.student-dashboard #dashboard-view .home-stat-card,
body.student-dashboard #dashboard-view .home-profile-card {
    position: relative;
    height: 100%;
    min-height: 12.5rem;
    padding: 1.2rem 1.25rem;
    border-radius: 1.6rem;
    border: 1px solid var(--sh-card-border, #d7e6ff);
    background: var(--sh-card-bg, #fff);
    box-shadow: 0 18px 34px -24px var(--sh-card-shadow, rgba(26, 78, 168, 0.5)), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    overflow: hidden;
}

body.student-dashboard #dashboard-view .home-stat-card:hover,
body.student-dashboard #dashboard-view .home-profile-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 38px -24px var(--sh-card-shadow, rgba(26, 78, 168, 0.6)), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.student-dashboard #dashboard-view .home-stat-card::after,
body.student-dashboard #dashboard-view .home-profile-card::after {
    content: "";
    position: absolute;
    right: -2.2rem;
    top: -2.2rem;
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

body.student-dashboard #dashboard-view .home-profile-card {
    --sh-card-bg: linear-gradient(150deg, #eaf4ff 0%, #d4e8ff 100%);
    --sh-card-border: #c4dcff;
    --sh-card-shadow: rgba(31, 107, 255, 0.5);
}

body.student-dashboard #dashboard-view .home-stat-card--clubs {
    --sh-card-bg: linear-gradient(150deg, #fff6e9 0%, #ffe2bf 100%);
    --sh-card-border: #ffd7a6;
    --sh-card-shadow: rgba(255, 138, 31, 0.5);
    --sh-accent: #d4640a;
    --sh-icon-img: url("../icons/home/ic-clubs.webp");
}

body.student-dashboard #dashboard-view .home-stat-card--seats {
    --sh-card-bg: linear-gradient(150deg, #f5eeff 0%, #e3d5ff 100%);
    --sh-card-border: #d6c3ff;
    --sh-card-shadow: rgba(124, 77, 255, 0.5);
    --sh-accent: #6a3ce0;
    --sh-icon-img: url("../icons/home/ic-seats.webp");
}

body.student-dashboard #dashboard-view .home-stat-card--booked {
    --sh-card-bg: linear-gradient(150deg, #e9fbf2 0%, #cdf2e0 100%);
    --sh-card-border: #b3e8cf;
    --sh-card-shadow: rgba(22, 163, 100, 0.5);
    --sh-accent: #0d8a55;
    --sh-icon-img: url("../icons/home/ic-booked.webp");
}

/* stat cards: icon | body. style.css collapses these on phones, so restate the full card at every width. */
body.student-dashboard #dashboard-view .home-stat-card {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 1rem;
}

body.student-dashboard #dashboard-view .home-stat-card .home-stat-card__icon {
    width: 6.2rem;
    height: 6.2rem;
    min-width: 6.2rem;
    border-radius: 0 !important;
    border: 0 !important;
    background: var(--sh-icon-img) center / contain no-repeat !important;
    color: transparent !important;
    box-shadow: none !important;
}

body.student-dashboard #dashboard-view .home-stat-card .home-stat-card__icon svg {
    display: none;
}

body.student-dashboard #dashboard-view .home-stat-card__body {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    align-content: center;
    gap: 0.05rem 0.4rem;
    min-width: 0;
    flex: 1 1 auto;
}

body.student-dashboard #dashboard-view .home-stat-card__label {
    flex: 0 0 100%;
    margin: 0 0 0.15rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
    color: var(--sh-ink);
}

body.student-dashboard #dashboard-view .home-stat-card__label-full {
    display: inline;
}

body.student-dashboard #dashboard-view .home-stat-card__label-short {
    display: none;
}

body.student-dashboard #dashboard-view .home-stat-card__value {
    margin: 0;
    font-size: clamp(2rem, 2.8vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: #0f1c40;
}

body.student-dashboard #dashboard-view .home-stat-card__unit {
    display: block;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--sh-muted);
}

body.student-dashboard #dashboard-view .home-stat-card--seats .home-stat-card__unit {
    flex: 0 0 100%;
}

body.student-dashboard #dashboard-view .home-stat-card__action {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.65rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.72);
    color: var(--sh-accent, var(--sh-blue-deep));
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 16px -12px var(--sh-card-shadow);
    transition: background-color 0.16s ease, transform 0.16s ease;
}

body.student-dashboard #dashboard-view .home-stat-card__action:hover {
    background: #fff;
    transform: translateX(2px);
}

body.student-dashboard #dashboard-view .home-stat-card__action svg {
    width: 0.95rem;
    height: 0.95rem;
}

body.student-dashboard #dashboard-view .home-stat-card--skeleton {
    min-height: 11.5rem;
    border-radius: 1.6rem;
}

@media (max-width: 599px) {
    body.student-dashboard #dashboard-view .home-stat-card,
    body.student-dashboard #dashboard-view .home-profile-card {
        min-height: 0;
    }

    body.student-dashboard #dashboard-view .home-stat-card .home-stat-card__icon {
        width: 4.6rem;
        height: 4.6rem;
        min-width: 4.6rem;
    }
}

/* profile card (ข้อมูลนักเรียน) */
body.student-dashboard #dashboard-view .home-profile-card__avatar {
    width: 4.8rem;
    height: 4.8rem;
    flex: 0 0 auto;
    border-radius: 0;
    background: url("../icons/home/ic-students.webp") center / contain no-repeat;
    color: transparent;
    text-indent: -9999px;
    overflow: hidden;
    box-shadow: none;
}

body.student-dashboard #dashboard-view .home-profile-card__label {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
    color: var(--sh-ink);
}

body.student-dashboard #dashboard-view .home-profile-card__name {
    font-weight: 800;
    color: #0f1c40;
}

body.student-dashboard #dashboard-view .home-profile-card__badge {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.95);
}

body.student-dashboard #dashboard-view .home-profile-card__btn--outline {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(255, 255, 255, 0.95);
    color: var(--sh-blue-deep);
}

body.student-dashboard #dashboard-view .home-profile-card__btn--ghost,
body.student-dashboard #dashboard-view .home-profile-card__btn--danger {
    border-radius: 999px;
}

/* ---------- below the stage ---------- */
.sh-rest {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}

#club-section,
#home-announcements,
#student-info-card,
#site-footer {
    scroll-margin-top: 5.5rem;
}

body.student-dashboard #dashboard-view .home-clubs-toolbar,
body.student-dashboard #dashboard-view .club-toolbar-shell {
    border-radius: 1.5rem !important;
    border-color: #d7e6ff !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 16px 32px -24px rgba(26, 78, 168, 0.4) !important;
}

body.student-dashboard #dashboard-view .club-filter-pill--active {
    background: linear-gradient(180deg, #2b7bff 0%, #0b4fd6 100%) !important;
    border-color: transparent !important;
    box-shadow: 0 10px 18px -10px rgba(11, 79, 214, 0.8) !important;
}

body.student-dashboard #dashboard-view .home-announcements .public-announcement-collapsible {
    border-radius: 1.5rem;
    border-color: #d7e6ff;
}

body.student-dashboard #dashboard-view .home-announcements .public-announcement-collapsible::before {
    background: linear-gradient(90deg, #2b7bff, #ff8a1f);
}

/* hero decorations (sparkle strokes + paper-plane trail) */
.sh-hero__spark {
    position: absolute;
    left: -2.6rem;
    top: -0.6rem;
    width: 3.6rem;
    height: 3.6rem;
    pointer-events: none;
}

.sh-hero__plane {
    position: absolute;
    left: min(66%, 34rem);
    top: -2.4rem;
    width: clamp(7rem, 11vw, 12rem);
    pointer-events: none;
}

@media (max-width: 860px) {
    .sh-hero__spark,
    .sh-hero__plane {
        display: none;
    }
}

/* =====================================================================
   Desktop (>=1200px): the whole stage scales like the mockup image.
   1em = 10px at a 1672px-wide viewport, so every size below is the
   mockup's pixel size / 10 and the composition keeps its proportions.
   ===================================================================== */
@media (min-width: 1200px) {
    .sh-navwrap,
    .sh-stage {
        font-size: clamp(7.2px, min(0.588vw, 1.04vh), 12.5px);
    }

    /* navbar */
    .sh-nav-row {
        width: 155.9em;
        max-width: calc(100% - 2em);
        margin: 1em auto 0;
        padding-left: 0.7em;
    }

    .sh-nav {
        height: 7.5em;
        padding: 0 2.4em 0 2.6em;
        gap: 4.6em;
        border-radius: 2.4em;
    }

    .sh-nav__logo {
        width: 5.6em;
        height: 5.6em;
    }

    .sh-nav__title {
        font-size: 1.9em;
    }

    .sh-nav__sub {
        font-size: 1.4em;
    }

    .sh-nav__links {
        gap: 0.6em;
    }

    .sh-nav__links a {
        height: 3.4em;
        padding: 0 1.6em;
        font-size: 1.55em;
        border-radius: 0.8em;
    }

    .sh-nav__links svg {
        width: 1.1em;
        height: 1.1em;
    }

    body.student-dashboard .sh-nav__auth {
        display: flex;
        align-items: center;
        height: 6.6em;
        min-width: 24em;
        padding: 0 1.8em;
        border-radius: 2.2em;
    }

    body.student-dashboard .sh-nav__auth .header-account-toggle {
        min-height: 0;
        font-size: 1.5em;
    }

    body.student-dashboard .sh-nav__auth .header-account-toggle__avatar {
        width: 2.1em;
        height: 2.1em;
        font-size: 0.9em;
    }

    /* stage */
    .sh-stage {
        overflow-x: clip;
        padding: 0 0 7em;
    }

    .home-shell.sh-stage__inner {
        width: 167.2em;
        max-width: 100%;
    }

    /* closed-system notice floats under the navbar so it never shifts the layout */
    .sh-stage__inner .home-alert {
        position: absolute;
        top: 9.6em;
        left: 50%;
        z-index: 5;
        width: 68em;
        margin: 0;
        padding: 0.5em 1.4em;
        align-items: center;
        transform: translateX(-50%);
        font-size: 1.15em;
    }

    .sh-stage__inner .home-alert .home-alert__copy {
        display: flex;
        align-items: baseline;
        gap: 1em;
    }

    .sh-stage__inner .home-alert .home-alert__text {
        margin: 0;
    }

    .sh-stage__inner .home-alert .home-alert__icon {
        margin-top: 0;
    }

    /* hero */
    .sh-hero {
        display: block;
        position: relative;
        height: 48.7em;
        min-height: 0;
    }

    .sh-hero__copy {
        position: absolute;
        left: 11.5em;
        top: 15.5em;
        width: 70em;
        padding: 0;
    }

    .sh-hero__title {
        font-size: 6.4em;
        line-height: 1.18;
    }

    .sh-hero__lead {
        margin: 1.8em 0 0.8em;
        font-size: 2.2em;
    }

    .sh-cta {
        height: 3.05em;
        min-height: 0;
        padding: 0 1.4em 0 1.2em;
        gap: 0.6em;
        border-radius: 0.8em;
        font-size: 2.2em;
    }

    .sh-cta svg {
        width: 1.3em;
        height: 1.3em;
    }

    .sh-cta svg:last-child {
        width: 1em;
        height: 1em;
    }

    .sh-hero__art {
        position: absolute;
        left: 80.5em;
        top: 7em;
        width: 86em;
        display: block;
    }

    .sh-hero__art img {
        width: 100%;
        margin: 0;
    }

    .sh-hero__spark {
        left: -6em;
        top: -1.4em;
        width: 6.5em;
        height: 7em;
    }

    .sh-hero__plane {
        left: 60em;
        top: -3.4em;
        width: 12em;
    }

    /* countdown bar */
    body.student-dashboard #countdown-container.countdown-shell {
        width: 88em;
        margin: 0 0 3em 29em;
        font-size: 1em;
    }

    body.student-dashboard #countdown-container .countdown-inner {
        height: 12.3em;
        padding: 0 3.6em 0 3.9em;
        border-radius: 2.4em;
    }

    .sh-countdown__info {
        gap: 1.5em;
    }

    .sh-countdown__icon {
        width: 6.4em;
        height: 6.4em;
        border-radius: 1.8em;
    }

    .sh-countdown__icon svg {
        width: 3.6em;
        height: 3.6em;
    }

    body.student-dashboard #countdown-container .countdown-label {
        font-size: 2em;
    }

    .sh-countdown__term {
        font-size: 1.2em;
    }

    body.student-dashboard #countdown-container .countdown-schedule-item,
    body.student-dashboard #countdown-container .countdown-schedule-label,
    body.student-dashboard #countdown-container .countdown-schedule-value {
        font-size: 1em;
    }

    body.student-dashboard #countdown-container .countdown-schedule {
        font-size: 1.2em;
    }

    body.student-dashboard #countdown-container .flip-clock {
        gap: 1.2em;
    }

    body.student-dashboard #countdown-container .flip-card {
        width: 7.8em;
        height: 7.8em;
        border-radius: 1.6em;
    }

    body.student-dashboard #countdown-container .flip-card .top,
    body.student-dashboard #countdown-container .flip-card .top-flip {
        border-radius: 1.6em 1.6em 0 0;
    }

    body.student-dashboard #countdown-container .flip-card .bottom,
    body.student-dashboard #countdown-container .flip-card .bottom-flip {
        border-radius: 0 0 1.6em 1.6em;
    }

    body.student-dashboard #countdown-container .flip-card .top span,
    body.student-dashboard #countdown-container .flip-card .top-flip span,
    body.student-dashboard #countdown-container .flip-card .bottom span,
    body.student-dashboard #countdown-container .flip-card .bottom-flip span {
        font-size: 4.8em;
    }

    body.student-dashboard #countdown-container .separator {
        padding-top: 0.9em;
        font-size: 4em;
    }

    body.student-dashboard #countdown-container .flip-unit-label {
        font-size: 1.5em;
    }

    /* cards */
    body.student-dashboard .home-overview__grid {
        grid-template-columns: repeat(4, 36.5em);
        gap: 1.6em;
        margin-left: 8.4em;
        align-items: stretch;
    }

    body.student-dashboard #dashboard-view .home-stat-card,
    body.student-dashboard #dashboard-view .home-profile-card {
        min-height: 20.4em;
        padding: 1.6em 2em;
        border-radius: 2.4em;
    }

    body.student-dashboard #dashboard-view .home-profile-card {
        gap: 0.6em;
    }

    body.student-dashboard #dashboard-view .home-stat-card {
        gap: 1em;
    }

    body.student-dashboard #dashboard-view .home-stat-card .home-stat-card__icon {
        width: 12.5em;
        height: 12.5em;
        min-width: 12.5em;
        margin-left: -1.2em;
    }

    body.student-dashboard #dashboard-view .home-stat-card__label {
        font-size: 2.1em;
        margin-bottom: 0.1em;
    }

    body.student-dashboard #dashboard-view .home-stat-card__value {
        font-size: 5em;
    }

    body.student-dashboard #dashboard-view .home-stat-card__unit {
        font-size: 2em;
    }

    body.student-dashboard #dashboard-view .home-stat-card__action {
        margin-top: 0.8em;
        padding: 0 1.4em;
        height: 3.6em;
        border-radius: 1.4em;
        font-size: 1.75em;
    }

    body.student-dashboard #dashboard-view .home-stat-card__action svg {
        width: 1.1em;
        height: 1.1em;
    }

    body.student-dashboard #dashboard-view .home-profile-card__avatar {
        width: 7em;
        height: 7em;
    }

    body.student-dashboard #dashboard-view .home-profile-card__label {
        font-size: 2.1em;
    }

    body.student-dashboard #dashboard-view .home-profile-card__name {
        font-size: 2.3em;
    }

    body.student-dashboard #dashboard-view .home-profile-card__logout-desktop {
        display: none;
    }
}

/* =====================================================================
   Card depth: layered shadows, top sheen, inner edge shade, glow on icons
   ===================================================================== */
body.student-dashboard #dashboard-view .home-profile-card {
    --sh-card-bg: linear-gradient(155deg, #eef6ff 0%, #cfe3ff 100%);
    --sh-card-border: #a9ccff;
    --sh-card-edge: rgba(31, 107, 255, 0.28);
}

body.student-dashboard #dashboard-view .home-stat-card--clubs {
    --sh-card-bg: linear-gradient(155deg, #fff4e3 0%, #ffd9a6 100%);
    --sh-card-border: #ffc98a;
    --sh-card-edge: rgba(255, 138, 31, 0.3);
}

body.student-dashboard #dashboard-view .home-stat-card--seats {
    --sh-card-bg: linear-gradient(155deg, #f5eeff 0%, #dccbff 100%);
    --sh-card-border: #c9b2ff;
    --sh-card-edge: rgba(124, 77, 255, 0.28);
}

body.student-dashboard #dashboard-view .home-stat-card--booked {
    --sh-card-bg: linear-gradient(155deg, #e8faf1 0%, #bfeed7 100%);
    --sh-card-border: #9fe3c2;
    --sh-card-edge: rgba(22, 163, 100, 0.28);
}

body.student-dashboard #dashboard-view .home-stat-card,
body.student-dashboard #dashboard-view .home-profile-card {
    border: 1.5px solid var(--sh-card-border);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.95),
        inset 0 -12px 18px -12px var(--sh-card-edge),
        0 26px 34px -20px var(--sh-card-shadow),
        0 10px 16px -8px rgba(30, 60, 120, 0.2);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

body.student-dashboard #dashboard-view .home-stat-card:hover,
body.student-dashboard #dashboard-view .home-profile-card:hover {
    transform: translateY(-5px);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.95),
        inset 0 -12px 18px -12px var(--sh-card-edge),
        0 34px 40px -20px var(--sh-card-shadow),
        0 14px 22px -8px rgba(30, 60, 120, 0.24);
}

/* glossy sheen along the top edge */
body.student-dashboard #dashboard-view .home-stat-card::before,
body.student-dashboard #dashboard-view .home-profile-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 42%;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

/* card content sits above the decorative layers */
body.student-dashboard #dashboard-view .home-stat-card > *,
body.student-dashboard #dashboard-view .home-profile-card > * {
    position: relative;
    z-index: 1;
}

/* illustrations float above the card */
body.student-dashboard #dashboard-view .home-stat-card .home-stat-card__icon,
body.student-dashboard #dashboard-view .home-profile-card__avatar {
    filter: drop-shadow(0 12px 10px var(--sh-card-shadow, rgba(26, 78, 168, 0.4)));
}

/* raised pill buttons */
body.student-dashboard #dashboard-view .home-stat-card__action {
    border: 1px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.78) 100%);
    box-shadow:
        inset 0 1px 0 #fff,
        0 10px 16px -8px var(--sh-card-shadow),
        0 2px 4px rgba(30, 60, 120, 0.12);
}

/* =====================================================================
   3D cards: solid side edge (thickness), glossy bevel, embossed numbers,
   floating illustrations and pressable buttons
   ===================================================================== */
body.student-dashboard #dashboard-view .home-profile-card {
    --sh-card-side: #86aee8;
    --sh-card-hi: rgba(255, 255, 255, 0.95);
}

body.student-dashboard #dashboard-view .home-stat-card--clubs {
    --sh-card-side: #eda35a;
}

body.student-dashboard #dashboard-view .home-stat-card--seats {
    --sh-card-side: #a98df0;
}

body.student-dashboard #dashboard-view .home-stat-card--booked {
    --sh-card-side: #6fcaa0;
}

body.student-dashboard #dashboard-view .home-stat-card,
body.student-dashboard #dashboard-view .home-profile-card {
    margin-bottom: 8px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background:
        radial-gradient(120% 90% at 12% 0%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 55%),
        var(--sh-card-bg);
    box-shadow:
        inset 0 3px 0 #fff,
        inset 0 -14px 22px -10px var(--sh-card-edge),
        inset 3px 0 6px -3px rgba(255, 255, 255, 0.9),
        0 8px 0 var(--sh-card-side),
        0 12px 0 rgba(20, 40, 90, 0.08),
        0 30px 36px -14px var(--sh-card-shadow),
        0 18px 26px -10px rgba(30, 60, 120, 0.28);
}

body.student-dashboard #dashboard-view .home-stat-card:hover,
body.student-dashboard #dashboard-view .home-profile-card:hover {
    transform: translateY(-6px);
    box-shadow:
        inset 0 3px 0 #fff,
        inset 0 -14px 22px -10px var(--sh-card-edge),
        inset 3px 0 6px -3px rgba(255, 255, 255, 0.9),
        0 14px 0 var(--sh-card-side),
        0 18px 0 rgba(20, 40, 90, 0.08),
        0 40px 44px -14px var(--sh-card-shadow),
        0 24px 32px -10px rgba(30, 60, 120, 0.3);
}

/* illustrations: bigger lift + contact shadow */
body.student-dashboard #dashboard-view .home-stat-card .home-stat-card__icon,
body.student-dashboard #dashboard-view .home-profile-card__avatar {
    filter:
        drop-shadow(0 3px 2px rgba(20, 40, 90, 0.25))
        drop-shadow(0 16px 12px var(--sh-card-shadow, rgba(26, 78, 168, 0.45)));
    transform: scale(1.06);
}

/* embossed numbers and labels */
body.student-dashboard #dashboard-view .home-stat-card__value {
    text-shadow: 0 2px 0 #fff, 0 5px 8px rgba(20, 40, 90, 0.22);
}

body.student-dashboard #dashboard-view .home-stat-card__label,
body.student-dashboard #dashboard-view .home-profile-card__label {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* 3D pressable buttons */
body.student-dashboard #dashboard-view .home-stat-card__action {
    border: 1px solid #fff;
    background: linear-gradient(180deg, #ffffff 0%, #eef3ff 100%);
    box-shadow:
        inset 0 2px 0 #fff,
        0 4px 0 var(--sh-card-side),
        0 10px 14px -6px var(--sh-card-shadow);
    transform: translateY(0);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

body.student-dashboard #dashboard-view .home-stat-card__action:hover {
    background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
    transform: translateY(-2px);
    box-shadow:
        inset 0 2px 0 #fff,
        0 6px 0 var(--sh-card-side),
        0 14px 16px -6px var(--sh-card-shadow);
}

body.student-dashboard #dashboard-view .home-stat-card__action:active {
    transform: translateY(3px);
    box-shadow:
        inset 0 2px 0 #fff,
        0 1px 0 var(--sh-card-side);
}

@media (prefers-reduced-motion: reduce) {
    body.student-dashboard #dashboard-view .home-stat-card,
    body.student-dashboard #dashboard-view .home-profile-card,
    body.student-dashboard #dashboard-view .home-stat-card__action {
        transition: none;
    }
}

/* =====================================================================
   Club list cards: same 3D look as the overview cards
   (header gradient is set inline by components.js, hence !important)
   ===================================================================== */
body.student-dashboard #dashboard-view.dashboard-premium .cc-card.club-card-modern {
    --sh-edge: #b4cdf3;
    margin-bottom: 8px;
    border: 2px solid #fff !important;
    border-radius: 1.5rem !important;
    background: #fff !important;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.95),
        0 7px 0 var(--sh-edge),
        0 11px 0 rgba(20, 40, 90, 0.07),
        0 26px 30px -16px rgba(31, 107, 255, 0.45) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-card.club-card-modern.cc-card--mine {
    --sh-edge: #86d9b3;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.95),
        0 7px 0 var(--sh-edge),
        0 11px 0 rgba(20, 40, 90, 0.07),
        0 26px 30px -16px rgba(16, 163, 100, 0.5) !important;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-card.club-card-modern.table-card:not(.pointer-events-none):hover {
    transform: translateY(-5px) !important;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.95),
        0 12px 0 var(--sh-edge),
        0 16px 0 rgba(20, 40, 90, 0.07),
        0 34px 36px -16px rgba(31, 107, 255, 0.5) !important;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-card .cc-header {
    background: linear-gradient(135deg, #4f9bff 0%, #1f6bff 55%, #0b4fd6 100%) !important;
    min-height: 5.4rem;
    padding: 0.8rem 0.95rem 0.9rem;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-card--mine .cc-header {
    background: linear-gradient(135deg, #43dba0 0%, #17b673 55%, #0b8a55 100%) !important;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-header::before {
    content: "";
    position: absolute;
    inset: 0 0 45% 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-header > :not(.cc-header__deco) {
    position: relative;
    z-index: 1;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-header__name {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    text-shadow: 0 2px 0 rgba(8, 40, 120, 0.35);
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-badge {
    padding: 0.22rem 0.7rem;
    border: 1px solid #fff;
    background: linear-gradient(180deg, #ffffff 0%, #e9f1ff 100%);
    color: #0b4fd6;
    font-size: 0.68rem;
    font-weight: 800;
    box-shadow: 0 3px 0 rgba(8, 40, 120, 0.25);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-badge--full {
    background: linear-gradient(180deg, #fff 0%, #ffe3e3 100%);
    color: #c81e1e;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-badge--my {
    background: linear-gradient(180deg, #fff 0%, #dcfbea 100%);
    color: #0b8a55;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-body {
    background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
    padding: 0.85rem 0.95rem 1rem;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-meta__icon {
    color: #5b8ede;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-meta__text {
    color: #33425f;
    font-weight: 600;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-track {
    height: 0.55rem;
    background: #d9e6fb;
    box-shadow: inset 0 2px 3px rgba(20, 50, 120, 0.18);
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-track__fill {
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45);
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-track__count {
    color: #12224b;
    font-weight: 800;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-btn-detail,
body.student-dashboard #dashboard-view.dashboard-premium .cc-btn-register {
    border-radius: 0.95rem;
    padding: 0.62rem 0.8rem;
    font-weight: 800;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-btn-detail {
    border: 1px solid #fff;
    background: linear-gradient(180deg, #ffffff 0%, #e9f1ff 100%) !important;
    color: #0b4fd6 !important;
    box-shadow: inset 0 2px 0 #fff, 0 4px 0 #b4cdf3, 0 10px 14px -8px rgba(31, 107, 255, 0.5);
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-btn-register {
    background: linear-gradient(180deg, #3d8bff 0%, #0b57e6 100%) !important;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 4px 0 #0a3fb0, 0 10px 14px -6px rgba(11, 87, 230, 0.6);
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-btn-detail:hover,
body.student-dashboard #dashboard-view.dashboard-premium .cc-btn-register:hover {
    transform: translateY(-2px);
}

body.student-dashboard #dashboard-view.dashboard-premium .cc-btn-detail:active,
body.student-dashboard #dashboard-view.dashboard-premium .cc-btn-register:active {
    transform: translateY(3px);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 1px 0 #0a3fb0;
}

@media (prefers-reduced-motion: reduce) {
    body.student-dashboard #dashboard-view.dashboard-premium .cc-card.club-card-modern,
    body.student-dashboard #dashboard-view.dashboard-premium .cc-btn-detail,
    body.student-dashboard #dashboard-view.dashboard-premium .cc-btn-register {
        transition: none !important;
    }
}

/* =========================================
   Club details modal v2 (landing style: pastel cards, pills, line icons)
   ========================================= */
#table-modal .club-modal-panel { width: 100%; max-width: 40rem; border: 0; border-radius: 26px; background: #f6f9ff; box-shadow: 0 28px 70px rgba(37, 99, 235, 0.22); }
#table-modal .club-modal-header { align-items: center; gap: 0.75rem; padding: 0.8rem 1rem; border-bottom: 0; background: linear-gradient(120deg, #dbeafe 0%, #ede9fe 52%, #ffedd5 100%); }
#table-modal .cm-header-icon { width: 42px; height: 42px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; background: #fff; color: #2563eb; box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18); }
#table-modal .cm-header-icon svg { width: 22px; height: 22px; }
#table-modal .club-modal-title { display: block; margin: 0; font-size: 1.1rem; font-weight: 800; line-height: 1.25; color: #0f2a5c; overflow-wrap: anywhere; }
#table-modal .club-modal-seat-info { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.35rem; padding: 0; border: 0; background: transparent; }
#table-modal .cm-pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.14rem 0.55rem; border-radius: 999px; font-size: 0.74rem; font-weight: 800; line-height: 1.3; background: #fff; color: #1d4ed8; }
#table-modal .cm-pill .cm-icon { width: 13px; height: 13px; }
#table-modal .cm-pill--free { background: #dcfce7; color: #15803d; }
#table-modal .cm-pill--full { background: #fee2e2; color: #b91c1c; }
#table-modal .cm-seat-bar { flex: 1 1 5rem; min-width: 4.5rem; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.75); overflow: hidden; }
#table-modal .cm-seat-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2563eb, #7c3aed); }
#table-modal .club-modal-close { width: 34px; height: 34px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 12px; background: #fff; color: #64748b !important; }
#table-modal .club-modal-close:hover { background: #eff6ff; color: #1e3a8a !important; }
#table-modal .club-modal-close svg { width: 18px; height: 18px; }
#table-modal .club-modal-body { padding: 0.7rem 1rem 0; background: transparent; }

#table-modal .cm-icon { width: 16px; height: 16px; flex: 0 0 auto; }
#table-modal .cm-info-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.45rem; }
#table-modal .cm-info-chip { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.6rem; border-radius: 16px; min-width: 0; }
#table-modal .cm-info-chip--place { background: #fff1e0; color: #c2410c; }
#table-modal .cm-info-chip--teacher { background: #e0ecff; color: #1d4ed8; }
#table-modal .cm-info-chip--level { background: #ede9fe; color: #6d28d9; }
#table-modal .cm-info-icon { width: 30px; height: 30px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255, 255, 255, 0.85); }
#table-modal .cm-info-text { min-width: 0; display: flex; flex-direction: column; }
#table-modal .cm-info-label { font-size: 0.68rem; font-weight: 700; opacity: 0.8; line-height: 1.2; }
#table-modal .cm-info-value { font-size: 0.84rem; font-weight: 800; color: #0f172a; line-height: 1.3; overflow-wrap: anywhere; }
#table-modal .cm-teacher-name { margin: 0; }
#table-modal .cm-desc { margin-top: 0.5rem; padding: 0.55rem 0.7rem; border-radius: 16px; background: #fff; border: 1px solid #e3ebfb; }
#table-modal .cm-desc-title { display: flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; font-weight: 800; color: #1e3a8a; }
#table-modal .cm-desc-text { margin: 0.25rem 0 0; max-height: 5.2rem; overflow-y: auto; font-size: 0.84rem; line-height: 1.5; color: #475569; }

#table-modal .club-modal-section { margin-top: 0.6rem; padding: 0.65rem 0.75rem; border-radius: 18px; background: #fff; border: 1px solid #e3ebfb; box-shadow: none; }
#table-modal .club-modal-section .club-modal-section { margin-top: 0.6rem; padding: 0.5rem 0 0; border: 0; border-top: 1px dashed #d6e2f7; border-radius: 0; background: transparent; }
#table-modal .cm-section-title { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.5rem; font-size: 0.88rem; font-weight: 800; color: #1e3a8a; }
#table-modal .cm-section-title .cm-icon { width: 24px; height: 24px; padding: 4px; border-radius: 8px; background: #e0ecff; color: #2563eb; }
#table-modal .cm-count { margin-left: auto; padding: 0.1rem 0.55rem; border-radius: 999px; background: #e0ecff; color: #1d4ed8; font-size: 0.72rem; }

#table-modal .club-modal-list { list-style: none; margin: 0; padding: 0; }
#table-modal .cm-member-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3rem; max-height: 11rem; overflow-y: auto; }
@media (max-width: 560px) { #table-modal .cm-member-list { grid-template-columns: minmax(0, 1fr); } }
#table-modal .cm-member-list { overflow-x: hidden; }
#table-modal .cm-member-list .club-modal-list-item { display: flex; align-items: center; gap: 0.4rem; margin: 0; padding: 0.28rem 0.5rem; border: 0; border-radius: 12px; background: #f4f7ff; }
#table-modal .cm-member-list .club-modal-list-item.is-me { background: #ede9fe; box-shadow: inset 0 0 0 1.5px #c4b5fd; }
#table-modal .club-modal-rank { width: 20px; height: 20px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #e0e7ff; color: #4338ca; font-size: 0.68rem; font-weight: 800; }
#table-modal .cm-member-list .club-modal-name { flex: 1 1 auto; min-width: 0; font-size: 0.8rem; font-weight: 600; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#table-modal .cm-member-list .club-modal-name--me { color: #5b21b6; font-weight: 800; }
#table-modal .cm-me-tag { padding: 0.02rem 0.4rem; border-radius: 999px; background: #7c3aed; color: #fff; font-size: 0.62rem; font-weight: 800; }
#table-modal .cm-member-list .club-modal-meta { flex: 0 0 auto; padding: 0.05rem 0.4rem; border-radius: 999px; background: #fff; color: #64748b; font-size: 0.68rem; font-weight: 700; }

#table-modal .club-modal-section--attendance { display: flex; flex-direction: column; gap: 0.3rem; }
#table-modal .club-attendance-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem; }
@media (max-width: 480px) { #table-modal .club-attendance-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#table-modal .club-attendance-kpi { padding: 0.3rem 0.35rem; border-radius: 14px; text-align: center; line-height: 1.2; }
#table-modal .club-attendance-kpi p:first-child { font-size: 0.66rem; }
#table-modal .club-attendance-kpi p:last-child { font-size: 1rem; }
#table-modal .club-attendance-total { margin-top: 0.3rem; }
#table-modal .cm-fold { margin-top: 0.3rem; padding-top: 0.4rem; border-top: 1px dashed #d6e2f7; }
#table-modal .cm-fold-summary { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; list-style: none; cursor: pointer; font-size: 0.8rem; font-weight: 800; color: #1e3a8a; }
#table-modal .cm-fold-summary::-webkit-details-marker { display: none; }
#table-modal .cm-fold-summary .cm-icon { transition: transform 0.2s; }
#table-modal .cm-fold[open] .cm-fold-summary .cm-icon { transform: rotate(180deg); }
#table-modal .club-modal-list--attendance, #table-modal .club-modal-list--history { display: flex; flex-direction: column; gap: 0.25rem; max-height: 9rem; overflow-y: auto; margin-top: 0.35rem; }
#table-modal .club-modal-list--attendance .club-modal-list-item, #table-modal .club-modal-list--history .club-modal-list-item { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 0.28rem 0.5rem; border: 0; border-radius: 12px; background: #f4f7ff; }

#table-modal .club-modal-action-zone { position: sticky; bottom: 0; z-index: 3; margin: 0.6rem -1rem 0; padding: 0.6rem 1rem 0.8rem; border-top: 0; background: linear-gradient(180deg, rgba(246, 249, 255, 0), #f6f9ff 38%); }
#table-modal .club-modal-action-btn { padding: 0.65rem 1rem; border-radius: 999px; font-size: 0.92rem; font-weight: 800; }
#table-modal .club-modal-action-btn--primary { border: 0; background: linear-gradient(90deg, #2563eb, #7c3aed); box-shadow: 0 8px 18px rgba(79, 70, 229, 0.3); }
#table-modal .club-modal-action-btn--danger { border: 1.5px solid #fecaca; background: #fff; color: #dc2626; box-shadow: none; }
