﻿/* =====================================================
   à¸£à¸°à¸šà¸šà¸ˆà¸­à¸‡à¹‚à¸•à¹Šà¸°à¸›à¸±à¸ˆà¸‰à¸´à¸¡à¸¯ â€” Custom Styles
   =====================================================*/

/* Font */
body {
    font-family: 'Anuphan', 'Noto Sans Thai', sans-serif;
    background-color: #fffbf7;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
    /* Only hide horizontal */
    margin: 0 !important;
}

/* Modal overlay */
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* Club detail modal refresh */
.club-modal-panel {
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

.club-modal-header {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(130deg, #fff7ed 0%, #ffffff 56%, #f8fafc 100%);
}

.club-modal-title {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem;
    line-height: 1.25;
    color: #0f172a;
}

.club-modal-title span {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #fdba74;
    background: #fff7ed;
    color: #c2410c !important;
    font-size: 0.78rem;
    line-height: 1.1;
    font-weight: 800 !important;
}

.club-modal-seat-info {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #fed7aa;
    background: #ffedd5;
    color: #9a3412 !important;
    font-size: 0.78rem;
    line-height: 1.1;
    font-weight: 700;
}

.club-modal-close {
    border-radius: 0.75rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.club-modal-close:hover {
    color: #334155 !important;
    border-color: #cbd5e1;
    background: rgba(255, 255, 255, 0.95);
}

.club-modal-body {
    padding: 1rem;
    overscroll-behavior: contain;
    background: radial-gradient(circle at top right, rgba(255, 237, 213, 0.55), transparent 45%);
}

.club-modal-scroll {
    scrollbar-color: #cbd5e1 #f8fafc;
}

.club-modal-scroll::-webkit-scrollbar {
    width: 7px;
}

.club-modal-scroll::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 8px;
}

.club-modal-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
    border-radius: 8px;
}

.club-modal-content {
    display: grid;
    gap: 0.72rem;
    margin-bottom: 0.9rem;
}

.club-modal-section {
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.82rem;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.club-modal-section--description {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.club-modal-section--attendance {
    margin-top: 0.9rem;
    border-top: 1px solid #e2e8f0;
}

.club-modal-section-title {
    margin: 0;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.club-modal-description {
    margin-top: 0.46rem;
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.58;
}

.club-modal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.62rem;
}

.club-modal-info-card {
    border: 1px solid #fed7aa;
    border-radius: 0.8rem;
    padding: 0.68rem;
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

.club-modal-info-label {
    margin: 0 0 0.32rem;
    color: #f97316;
    font-size: 0.7rem;
    line-height: 1.1;
    font-weight: 800;
    text-transform: uppercase;
}

.club-modal-info-value {
    color: #7c2d12;
    font-size: 0.92rem;
    line-height: 1.4;
    font-weight: 700;
}

.club-modal-info-value--multiline p {
    margin: 0;
}

.club-modal-loading {
    border: 1px dashed #fdba74;
    border-radius: 0.75rem;
    color: #f97316;
    background: #fff7ed;
}

.club-modal-list {
    margin: 0 0 0.7rem;
    max-height: 15.8rem;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.82rem;
    background: #ffffff;
}

.club-modal-list--attendance {
    margin-bottom: 0.55rem;
    max-height: 16.2rem;
}

.club-modal-list--history {
    margin-bottom: 0;
    max-height: 12rem;
}

.club-modal-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.62rem 0.72rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.club-modal-list-item:last-child {
    border-bottom: none;
}

.club-modal-list-item.is-me {
    background: linear-gradient(90deg, #fff7ed 0%, #ffffff 100%);
}

.club-modal-list-main {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.club-modal-rank {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: #f1f5f9;
    font-size: 0.73rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.club-modal-name {
    color: #1e293b;
    font-weight: 600;
    line-height: 1.32;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.club-modal-name--me {
    color: #c2410c;
    font-weight: 800;
}

.club-modal-meta {
    color: #64748b;
    font-size: 0.74rem;
    line-height: 1.1;
    white-space: nowrap;
}

.club-modal-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    color: #64748b;
    background: #f8fafc;
}

.club-attendance-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.club-attendance-kpi {
    border-radius: 0.75rem;
    padding: 0.52rem 0.42rem;
    text-align: center;
    border: 1px solid transparent;
}

.club-attendance-kpi--present {
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.club-attendance-kpi--leave {
    border-color: #fde68a;
    background: #fffbeb;
}

.club-attendance-kpi--absent {
    border-color: #fda4af;
    background: #fff1f2;
}

.club-attendance-kpi--rate {
    border-color: #c7d2fe;
    background: #eef2ff;
}

.club-attendance-total {
    color: #64748b;
}

.club-modal-subtitle {
    margin: 0 0 0.5rem;
    color: #0f172a;
    font-size: 0.9rem;
    line-height: 1.3;
    font-weight: 700;
}

.club-attendance-summary {
    color: #475569;
}

.club-modal-action-btn {
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.club-modal-action-btn--primary {
    color: #ffffff;
    border-color: #f97316;
    background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
}

.club-modal-action-btn--primary:hover {
    filter: brightness(0.98);
}

.club-modal-action-btn--danger {
    color: #dc2626;
    border-color: #fecaca;
    background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
}

.club-modal-action-btn--danger:hover {
    color: #ffffff;
    border-color: #ef4444;
    background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
}

.club-modal-action-btn--disabled {
    color: #94a3b8;
    border-color: #e2e8f0;
    background: #f8fafc;
    box-shadow: none;
}

@media (max-width: 640px) {
    .club-modal-panel {
        border-radius: 1rem;
        max-height: 95dvh;
    }

    .club-modal-header {
        padding: 0.78rem 0.88rem;
    }

    .club-modal-title {
        font-size: 1.03rem;
        gap: 0.32rem;
    }

    .club-modal-title span {
        font-size: 0.72rem;
    }

    .club-modal-seat-info {
        font-size: 0.71rem;
    }

    .club-modal-body {
        padding: 0.78rem;
    }

    .club-modal-info-grid {
        grid-template-columns: 1fr;
    }

    .club-modal-list {
        max-height: 13rem;
    }

    .club-modal-list--attendance {
        max-height: 13.5rem;
    }

    .club-modal-list--history {
        max-height: 9.8rem;
    }

    .club-modal-list-item {
        padding: 0.56rem 0.62rem;
        gap: 0.52rem;
    }

    .club-modal-meta {
        font-size: 0.69rem;
    }
}

/* Fade-in-up animation */
.animate-fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Admin view + modal motion */
.admin-page .view-section {
    transition: opacity 220ms ease, transform 220ms ease;
    will-change: opacity, transform;
}

.admin-page .view-section.view-section--entering,
.admin-page .view-section.view-section--leaving {
    opacity: 0;
    pointer-events: none;
}

.admin-page .view-section.view-section--entering {
    transform: translateY(10px);
}

.admin-page .view-section.view-section--leaving {
    transform: translateY(-8px);
}

.admin-page .pp5-modal-shell:not(.hidden) {
    display: flex;
    opacity: 0;
    transition: opacity 260ms ease;
}

.admin-page .pp5-modal-shell.pp5-modal--visible {
    opacity: 1;
}

.admin-page .pp5-modal-shell .pp5-admin-modal-panel,
.admin-page .pp5-modal-shell > .bg-white.rounded-xl,
.admin-page .pp5-modal-shell > .bg-white.rounded-2xl,
.admin-page .pp5-modal-shell > .bg-white.w-full.max-w-4xl,
.admin-page .pp5-modal-shell > .inline-block.align-bottom,
.admin-page .pp5-modal-shell > div.relative.z-10 {
    transform: translateY(14px) scale(0.985);
    opacity: 0;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms ease;
}

.admin-page .pp5-modal-shell.pp5-modal--visible .pp5-admin-modal-panel,
.admin-page .pp5-modal-shell.pp5-modal--visible > .bg-white.rounded-xl,
.admin-page .pp5-modal-shell.pp5-modal--visible > .bg-white.rounded-2xl,
.admin-page .pp5-modal-shell.pp5-modal--visible > .bg-white.w-full.max-w-4xl,
.admin-page .pp5-modal-shell.pp5-modal--visible > .inline-block.align-bottom,
.admin-page .pp5-modal-shell.pp5-modal--visible > div.relative.z-10 {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.admin-page .pp5-modal-shell .animate-fade-in-up {
    animation: none;
}

body.pp5-modal-active {
    overflow: hidden;
}

@keyframes pp5SwalIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pp5SwalOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
}

@keyframes pp5BackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pp5BackdropOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.pp5-swal-animate-in {
    animation: pp5SwalIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

.pp5-swal-animate-out {
    animation: pp5SwalOut 0.2s ease forwards !important;
}

.pp5-swal-backdrop-in {
    animation: pp5BackdropIn 0.24s ease forwards !important;
}

.pp5-swal-backdrop-out {
    animation: pp5BackdropOut 0.2s ease forwards !important;
}

@media (prefers-reduced-motion: reduce) {
    .admin-page .view-section,
    .admin-page .pp5-modal-shell,
    .admin-page .pp5-modal-shell .pp5-admin-modal-panel,
    .admin-page .pp5-modal-shell > .bg-white,
    .admin-page .pp5-modal-shell > .inline-block.align-bottom,
    .admin-page .pp5-modal-shell > div.relative.z-10 {
        transition: none !important;
        transform: none !important;
    }

    .pp5-swal-animate-in,
    .pp5-swal-animate-out,
    .pp5-swal-backdrop-in,
    .pp5-swal-backdrop-out {
        animation: none !important;
    }
}

/* SweetAlert2 Custom Font */
.swal2-popup {
    font-family: 'Anuphan', 'Noto Sans Thai', sans-serif !important;
    border-radius: 1rem !important;
}

/* =========================================
   Admin Modal Refresh + Searchable Select
   ========================================= */
.pp5-swal-modal {
    border-radius: 24px !important;
    border: 1px solid #dbe4f0 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24) !important;
    padding: 1.2rem 1.2rem 1rem !important;
}

.pp5-swal-title {
    font-size: clamp(1.45rem, 2.2vw, 2.05rem) !important;
    font-weight: 800 !important;
    color: #24314a !important;
    margin-bottom: 0.3rem !important;
}

.pp5-swal-container {
    margin: 0 !important;
    padding: 0.15rem 0 !important;
}

.pp5-swal-btn {
    min-height: 44px;
    min-width: 120px;
    border-radius: 12px;
    font-size: 0.98rem;
    font-weight: 700;
    padding: 0.55rem 1.2rem;
    transition: all 0.2s ease;
}

.pp5-swal-btn--primary {
    border: 1px solid #4f46e5;
    background: linear-gradient(135deg, #5b6cff 0%, #4338ca 100%);
    color: #ffffff;
}

.pp5-swal-btn--primary:hover {
    filter: brightness(0.96);
    transform: translateY(-1px);
}

.pp5-swal-btn--secondary {
    border: 1px solid #d4dbe7;
    background: #ffffff;
    color: #4b5563;
}

.pp5-swal-btn--secondary:hover {
    background: #f8fafc;
}

.pp5-master-layout {
    text-align: left;
    display: grid;
    gap: 0.85rem;
}

.pp5-master-layout--single {
    gap: 0.8rem;
}

.pp5-master-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.pp5-master-field {
    display: grid;
    gap: 0.35rem;
}

.pp5-master-field--card {
    border: 1px solid #dde6f1;
    border-radius: 14px;
    background: #f8fbff;
    padding: 0.7rem 0.72rem;
}

.pp5-master-label {
    font-size: 0.82rem;
    line-height: 1.25;
    font-weight: 700;
    color: #344054;
}

.pp5-master-label--strong {
    color: #1e3a8a;
}

.pp5-master-input,
.pp5-master-select {
    width: 100%;
    margin: 0 !important;
    border: 1px solid #d5deea !important;
    border-radius: 12px !important;
    min-height: 44px;
    font-size: 1rem !important;
    line-height: 1.4;
    background: #ffffff !important;
}

.pp5-master-input:focus,
.pp5-master-select:focus {
    border-color: #7aa2ff !important;
    box-shadow: 0 0 0 3px rgba(96, 129, 255, 0.22) !important;
}

.pp5-master-advisor-block {
    border: 1px solid #d9e7ff;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    padding: 0.85rem;
    display: grid;
    gap: 0.7rem;
}

.pp5-master-help {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #64748b;
    font-weight: 600;
}

.pp5-master-help.is-success {
    color: #047857;
}

.pp5-master-help.is-warning {
    color: #b45309;
}

.pp5-master-help.is-danger {
    color: #dc2626;
}

.pp5-admin-modal-shell {
    backdrop-filter: blur(4px);
}

.pp5-admin-modal-panel {
    border-radius: 24px;
    border: 1px solid #dbe4f0;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.25);
    max-height: min(92vh, 920px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pp5-admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem 0.85rem;
    border-bottom: 1px solid #e5edf7;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.pp5-admin-modal-close {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 999px;
    border: 1px solid #d5deea;
    color: #64748b;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pp5-admin-modal-close:hover {
    color: #0f172a;
    background: #f8fafc;
    border-color: #bfccdf;
}

.pp5-admin-modal-form {
    min-height: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.pp5-admin-modal-body {
    padding: 1rem 1.2rem;
    overflow-y: auto;
    min-height: 0;
}

.pp5-admin-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
    padding: 0.85rem 1.2rem 1rem;
    border-top: 1px solid #e5edf7;
    background: #ffffff;
}

.pp5-admin-btn {
    min-height: 44px;
    min-width: 120px;
    padding: 0.55rem 1.15rem;
    border-radius: 12px;
    font-size: 0.97rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.pp5-admin-btn--ghost {
    border: 1px solid #d3dce8;
    background: #ffffff;
    color: #475569;
}

.pp5-admin-btn--ghost:hover {
    background: #f8fafc;
}

.pp5-admin-btn--primary {
    border: 1px solid #4f46e5;
    background: linear-gradient(135deg, #5b6cff 0%, #4338ca 100%);
    color: #ffffff;
}

.pp5-admin-btn--primary:hover {
    filter: brightness(0.96);
    transform: translateY(-1px);
}

.pp5-modern-select {
    border: 1px solid #d5deea !important;
    border-radius: 12px !important;
    min-height: 44px !important;
    box-shadow: none !important;
    background: #ffffff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pp5-modern-select:focus-within {
    border-color: #7aa2ff !important;
    box-shadow: 0 0 0 3px rgba(96, 129, 255, 0.22) !important;
}

.pp5-modern-select .ss-values,
.pp5-modern-select .ss-single {
    color: #24314a !important;
    font-size: 0.96rem !important;
}

.pp5-modern-select .ss-arrow path {
    stroke: #64748b !important;
    stroke-width: 2.2px !important;
}

.ss-content {
    border: 1px solid #d9e3f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18) !important;
    overflow: hidden;
}

.ss-content .ss-search {
    padding: 0.52rem 0.62rem !important;
    border-bottom: 1px solid #edf2f8 !important;
}

.ss-content .ss-search input {
    border-radius: 10px !important;
    border: 1px solid #d6dfec !important;
    min-height: 38px;
}

.ss-content .ss-option {
    border-radius: 10px !important;
    margin: 0.16rem 0.35rem !important;
    padding: 0.54rem 0.62rem !important;
    font-size: 0.92rem !important;
}

.ss-content .ss-option.ss-highlighted,
.ss-content .ss-option:hover {
    background: #eef3ff !important;
    color: #1e3a8a !important;
}

@media (max-width: 768px) {
    .pp5-master-grid-two {
        grid-template-columns: 1fr;
    }

    .pp5-swal-modal {
        border-radius: 18px !important;
        padding: 1rem 0.9rem 0.8rem !important;
    }

    .pp5-swal-btn {
        min-width: 108px;
        min-height: 42px;
        font-size: 0.92rem;
    }

    .pp5-admin-modal-panel {
        border-radius: 18px;
    }

    .pp5-admin-modal-header,
    .pp5-admin-modal-body,
    .pp5-admin-modal-footer {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .pp5-admin-modal-footer {
        flex-direction: column-reverse;
    }

    .pp5-admin-btn {
        width: 100%;
    }
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #f97316;
    /* Orange-500 */
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
    /* Orange-600 */
}

/* Keep club modal scrollbar neutral, not orange */
.club-modal-scroll.custom-scrollbar::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

.club-modal-scroll.custom-scrollbar::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 8px;
}

.club-modal-scroll.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
    border-radius: 8px;
}

.club-modal-scroll.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #94a3b8, #64748b);
}

/* Hide Scrollbar */
.hide-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Table card hover */
.table-card {
    transition: all 0.2s ease;
}

.table-card:not(.pointer-events-none):hover {
    transform: translateY(-2px);
}

.table-card.pointer-events-none {
    pointer-events: none !important;
    cursor: not-allowed !important;
    user-select: none;
}

/* Club card redesign (dashboard index) */
.club-card-modern {
    position: relative;
    overflow: hidden;
    border: 1px solid #d5e0ef;
    border-radius: 0.88rem;
    background: linear-gradient(165deg, #ffffff 0%, #f7fbff 62%, #fff7ef 100%);
    box-shadow:
        0 8px 18px rgba(15, 23, 42, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.05);
    transition:
        border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.24s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.club-card-modern::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ff7a18 0%, #ff3d6e 52%, #ffb302 100%);
    opacity: 1;
    z-index: 1;
}

.club-card-modern::after {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    right: -76px;
    top: -88px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 122, 24, 0.22) 0%, rgba(255, 122, 24, 0) 74%);
    pointer-events: none;
    z-index: 0;
}

.club-card-modern.table-card:not(.pointer-events-none):hover {
    transform: translateY(-1.5px);
    border-color: #bfd0e7;
    box-shadow:
        0 14px 24px rgba(15, 23, 42, 0.12),
        0 1px 2px rgba(15, 23, 42, 0.05);
}

.club-card-modern--my {
    border-color: #67e3a5;
    background: linear-gradient(165deg, #ffffff 0%, #f1fff7 62%, #edfff5 100%);
    box-shadow:
        0 12px 22px rgba(16, 185, 129, 0.13),
        0 1px 2px rgba(16, 185, 129, 0.14);
}

.club-card-modern--my::before {
    background: linear-gradient(90deg, #00b77a 0%, #1ed48f 56%, #5ce7b1 100%);
}

.club-card-modern--my::after {
    background: radial-gradient(circle, rgba(30, 212, 143, 0.2) 0%, rgba(30, 212, 143, 0) 74%);
}

.club-card-flat {
    cursor: pointer;
}

.club-card-flat.is-expanded {
    border-color: #ff9f43;
    box-shadow:
        0 18px 30px rgba(255, 159, 67, 0.22),
        0 1px 2px rgba(15, 23, 42, 0.05);
}

.club-card-flat:focus-visible {
    outline: none;
    border-color: #ff9f43;
    box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.24);
}

.club-card-flat__summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 0.66rem;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.club-main {
    min-width: 0;
}

.club-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.club-card-kicker {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.52rem;
    border-radius: 999px;
    border: 1px solid #ffb57b;
    background: linear-gradient(180deg, #fff5ea 0%, #ffebd2 100%);
    font-size: 0.6rem;
    line-height: 1.1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #e85d04;
}

.club-card-title {
    margin: 0.32rem 0 0;
    font-size: 1rem;
    line-height: 1.26;
    font-weight: 800;
    color: #0f172a;
    word-break: break-word;
}

.club-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.24rem 0.62rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.62rem;
    line-height: 1.2;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.club-main__meta {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
}

.club-main__meta-item {
    margin: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.14rem;
    padding: 0.3rem 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.58rem;
    background: rgba(255, 255, 255, 0.82);
}

.club-main__meta-item:first-child {
    grid-column: 1 / -1;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.club-main__meta-label {
    color: #94a3b8;
    font-size: 0.52rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.club-main__meta-value {
    min-width: 0;
    color: #1e293b;
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 700;
    white-space: normal;
    word-break: break-word;
}

.club-summary {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.38rem;
    padding: 0.55rem 0.62rem;
    border: 1px solid #d8e3f1;
    border-radius: 0.72rem;
    background: linear-gradient(180deg, #f8fbff 0%, #edf4fd 100%);
    transition:
        border-color 0.26s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.24s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.club-card-flat.is-expanded .club-summary {
    border-color: #ffbe82;
    background: linear-gradient(180deg, #fffaf2 0%, #ffeed9 100%);
    transform: translateY(-1px);
}

.club-summary__numbers {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.56rem;
}

.club-summary__registered {
    color: #0f172a;
    font-size: 0.96rem;
    line-height: 1;
    font-weight: 800;
}

.club-summary__remaining {
    display: inline-flex;
    align-items: center;
    padding: 0.13rem 0.45rem;
    border-radius: 999px;
    border: 1px solid #d5deea;
    background: rgba(255, 255, 255, 0.88);
    color: #475569;
    font-size: 0.64rem;
    line-height: 1.1;
    font-weight: 700;
}

.club-status-open {
    background: #fff2e8;
    border-color: #ffc59c;
    color: #ef5b09;
}

.club-status-my {
    background: #dcfce9;
    border-color: #7be7ad;
    color: #0f9f5a;
}

.club-status-closed {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.club-status-full {
    background: #ffe8ef;
    border-color: #ffb4c6;
    color: #e11d48;
}

.club-status-booked {
    background: #e6f0ff;
    border-color: #9bbcff;
    color: #1954d8;
}

.club-status-level {
    background: #fff6d6;
    border-color: #ffd766;
    color: #c57a00;
}

.club-card-desc {
    margin: 0;
    color: #334155;
    font-size: 0.85rem;
    line-height: 1.55;
}

.club-meta-list {
    margin-top: 0.62rem;
    border-top: 1px solid #e2e8f0;
}

.club-meta-row {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 0.62rem;
    align-items: start;
    padding: 0.46rem 0;
    border-bottom: 1px dashed #e7edf5;
}

.club-meta-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.club-meta-label {
    margin: 0;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.club-meta-value {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.45;
    color: #1f2937;
    word-break: break-word;
}

.club-meta-value--teachers {
    display: grid;
    gap: 0.12rem;
}

.club-teacher-line {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.club-teacher-line-full {
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    word-break: break-word;
}

.club-seat-track {
    height: 0.3rem;
    background: #dde6f2;
    border-radius: 999px;
    overflow: hidden;
}

.club-seat-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease;
}

.club-seat-fill--open {
    background: linear-gradient(90deg, #ff6b00 0%, #ff9e1b 100%);
}

.club-seat-fill--my {
    background: linear-gradient(90deg, #00b77a 0%, #39d98a 100%);
}

.club-seat-fill--full {
    background: linear-gradient(90deg, #ff5377 0%, #e11d48 100%);
}

.club-expand-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    width: auto;
    align-self: flex-end;
    padding: 0.24rem 0.45rem;
    border-radius: 999px;
    border: 1px solid #cfdced;
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
    font-size: 0.62rem;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
    transition:
        border-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.club-expand-toggle:hover {
    border-color: #ff9f43;
    color: #ef5b09;
    background: #fff7ed;
}

.club-expand-icon {
    width: 13px;
    height: 13px;
    transition: transform 0.22s ease;
}

.club-expand-toggle.is-expanded .club-expand-icon {
    transform: rotate(180deg);
}

.club-card-flat__details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    border-top: 1px solid transparent;
    margin-top: 0;
    padding-top: 0;
    transform: translateY(-6px);
    will-change: max-height, opacity, transform;
    transition:
        max-height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        margin-top 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        padding-top 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.club-card-flat__details.is-open {
    max-height: 1200px;
    opacity: 1;
    transform: translateY(0);
    border-top-color: #e2e8f0;
    margin-top: 0.68rem;
    padding-top: 0.68rem;
}

.club-card-flat__details .club-card-action {
    margin-top: 0.72rem;
}

.club-card-action .compact-mobile-btn {
    min-height: 2.25rem;
    border-radius: 0.72rem !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.club-card-action .compact-mobile-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

@media (max-width: 959px) {
    .club-card-flat__summary {
        grid-template-columns: 1fr;
        gap: 0.58rem;
    }

    .club-main__meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .club-main__meta-item:first-child {
        grid-column: 1 / -1;
    }

    .club-main__meta-value {
        max-width: none;
    }

    .club-summary {
        padding: 0.52rem 0.56rem;
    }

    .club-summary__registered {
        font-size: 0.9rem;
    }

    .club-expand-toggle {
        width: auto;
    }
}

@media (max-width: 640px) {
    .club-meta-row {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 0.54rem;
    }

    .club-card-action .compact-mobile-btn {
        min-height: 2.2rem;
        font-size: 0.7rem !important;
    }
}

@media (max-width: 420px) {
    .club-main__meta {
        grid-template-columns: 1fr;
    }

    .club-main__meta-item:first-child {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .club-card-modern,
    .club-summary,
    .club-expand-toggle,
    .club-card-flat__details,
    .club-expand-icon {
        transition: none !important;
        animation: none !important;
    }
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ea580c;
    /* Orange-600 */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Upload loading overlay */
.upload-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background:
        radial-gradient(circle at 15% 20%, rgba(251, 146, 60, 0.22), transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(56, 189, 248, 0.16), transparent 42%),
        rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
}

.upload-loading-card {
    width: min(92vw, 420px);
    border-radius: 20px;
    padding: 1.25rem 1.25rem 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.2);
}

.upload-loading-card.is-feedback {
    width: min(94vw, 760px);
}

.upload-loading-orb {
    position: relative;
    width: 74px;
    height: 74px;
    margin: 0 auto 0.9rem;
}

.upload-loading-ring {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    border: 2px solid rgba(249, 115, 22, 0.32);
    animation: uploadPulse 1.6s ease-out infinite;
}

.upload-loading-ring.upload-loading-ring--delay {
    animation-delay: 0.8s;
}

.upload-loading-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    border-radius: 9999px;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #f97316 0%, #fb7185 100%);
    box-shadow: 0 0 0 10px rgba(249, 115, 22, 0.14);
    animation: uploadDot 1.2s ease-in-out infinite alternate;
}

.upload-loading-progress {
    position: relative;
    height: 0.35rem;
    width: 100%;
    margin-top: 0.9rem;
    border-radius: 9999px;
    background: #e2e8f0;
    overflow: hidden;
}

.upload-loading-progress-bar {
    position: absolute;
    inset: 0;
    width: 42%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #f97316 0%, #38bdf8 100%);
    animation: uploadSweep 1.1s linear infinite;
}

@keyframes uploadPulse {
    0% {
        transform: scale(0.55);
        opacity: 0.9;
    }

    100% {
        transform: scale(1.18);
        opacity: 0;
    }
}

@keyframes uploadDot {
    0% {
        transform: translate(-50%, -50%) scale(0.85);
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes uploadSweep {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(320%);
    }
}

/* Shine Effect for buttons */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

/* Stats card pulse for clickable */
.stats-card-clickable {
    transition: all 0.2s ease;
    cursor: pointer;
}

.stats-card-clickable:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Dropdown */
.dropdown-item {
    transition: background-color 0.15s ease;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* =========================================
   Modern UI Additions
   ========================================= */

/* Hero Gradient Background */
/* Animated Hero Gradient: Red, Orange, Yellow, White */
@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-gradient {
    /* Red, Orange, Yellow, White */
    background: linear-gradient(-45deg, #dc2626, #f97316, #facc15, #ffffff);
    background-size: 300% 300%;
    animation: gradientAnimation 8s ease infinite;
    position: relative;
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(to right, #ea580c, #ca8a04);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Text Shadows for better contrast */
.text-shadow-sm {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.text-shadow-md {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.text-shadow-lg {
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Soft Shadow */
.shadow-soft {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
}

.shadow-soft:hover {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.12);
}

/* Button Gradient Hover */
.btn-gradient {
    background-size: 200% auto;
    transition: 0.5s;
}

.btn-gradient:hover {
    background-position: right center;
}

/* =========================================
   Admin Dashboard Layout (Header-Top Refactor)
   ========================================= */
:root {
    --app-header-height: 60px;
    --mobile-sidebar-gap: 8px;
    /* PP5 typography scale â€” à¹ƒà¸Šà¹‰à¸—à¸±à¹‰à¸‡ admin / teacher / à¸«à¸™à¹‰à¸²à¸«à¸¥à¸±à¸ */
    --pp5-type-caption: 0.75rem;   /* 12px meta, footer */
    --pp5-type-label: 0.8125rem;   /* 13px labels, table head */
    --pp5-type-body: 0.875rem;     /* 14px body, buttons, table */
    --pp5-type-lead: 0.9375rem;    /* 15px subtitles */
    --pp5-type-stat: 1rem;         /* 16px numbers */
    --pp5-type-display: 1.125rem;  /* 18px section title */
    --pp5-type-heading: 1.25rem;   /* 20px page title */
}

/* Baseline typography à¸ªà¸³à¸«à¸£à¸±à¸šà¸«à¸™à¹‰à¸²à¹à¸­à¸”à¸¡à¸´à¸™/à¸„à¸£à¸¹ */
.admin-page,
.teacher-admin-page {
    font-size: var(--pp5-type-body);
    line-height: 1.5;
}

.admin-page .admin-content,
.teacher-admin-page .admin-content {
    font-size: var(--pp5-type-body);
}

.admin-page .admin-footer,
.teacher-admin-page .admin-footer {
    font-size: var(--pp5-type-caption);
}

.admin-page table,
.teacher-admin-page table {
    font-size: var(--pp5-type-body);
}

.admin-page table thead th,
.teacher-admin-page table thead th {
    font-size: var(--pp5-type-label);
    font-weight: 700;
}

.admin-page .sidebar-link,
.teacher-admin-page .sidebar-link {
    font-size: var(--pp5-type-body);
}

.admin-page #page-title,
.teacher-admin-page #page-title {
    font-size: var(--pp5-type-body);
}

.admin-page .header-account-toggle,
.teacher-admin-page .header-account-toggle {
    font-size: var(--pp5-type-body);
}

.admin-page .header-account-toggle__name,
.teacher-admin-page .header-account-toggle__name {
    font-size: var(--pp5-type-body);
}

/* Main wrapper: Flex container (Sidebar + Content) */
.admin-layout {
    display: flex !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    overflow: hidden !important;
    height: calc(100vh - var(--app-header-height)) !important;
    height: calc(100dvh - var(--app-header-height)) !important;
    min-height: calc(100vh - var(--app-header-height)) !important;
    min-height: calc(100dvh - var(--app-header-height)) !important;
    max-height: calc(100vh - var(--app-header-height)) !important;
    max-height: calc(100dvh - var(--app-header-height)) !important;
    position: relative;
    align-items: stretch;
}

/* --- Header --- */
.admin-header {
    height: 60px;
    width: 100% !important;
    max-width: 100% !important;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 1rem;
    position: sticky !important;
    top: 0;
    /* Keep header pinned while content scrolls */
    flex: 0 0 auto !important;
    /* Fixed height */
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: visible !important;
    min-width: 0;
    box-sizing: border-box;
}

.admin-header__left {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex: 0 0 auto;
}

#admin-header-logout-btn,
.pp5-admin-toolbar > .header-logout-btn,
.app-header-right > .header-logout-btn {
    display: none !important;
}

.header-account-menu {
    position: relative;
    flex-shrink: 0;
}

.header-account-toggle {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    min-height: 40px;
    padding: 0.3rem 0.55rem 0.3rem 0.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px -24px rgba(15, 23, 42, 0.6);
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.header-account-toggle:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.header-account-toggle[aria-expanded="true"] {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
}

.header-account-toggle__avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: var(--pp5-type-label);
    color: #ffffff;
    background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
    flex: 0 0 auto;
}

.header-account-toggle__name {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-account-toggle__chevron {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.header-account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(290px, calc(100vw - 20px));
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 24px 42px -24px rgba(15, 23, 42, 0.35);
    z-index: 90;
    padding: 0.45rem;
}

.header-account-dropdown.hidden {
    display: none;
}

.header-account-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.5rem 0.55rem;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0.2rem;
}

.header-account-card__avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.84rem;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
    flex: 0 0 auto;
}

.header-account-card__name {
    margin: 0;
    font-size: 0.93rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.header-account-card__role {
    margin: 0.1rem 0 0;
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.25;
}

.header-account-actions {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.header-account-action {
    width: 100%;
    border: 0;
    background: #ffffff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.5rem 0.55rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.header-account-action:hover {
    background: #f8fafc;
    color: #1e293b;
}

.header-account-action.is-danger {
    color: #dc2626;
}

.header-account-action.is-danger:hover {
    background: #fff1f2;
    color: #b91c1c;
}

.header-account-action__icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

/* Hide legacy sidebar user card (moved to header) */
.admin-page .admin-sidebar-user {
    display: none !important;
}

/* --- Sidebar --- */
.admin-sidebar {
    width: 260px;
    min-width: 260px;
    background: #fff;
    border-right: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    position: relative;
    z-index: 40;
    transition: transform 0.3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
    align-self: stretch;
}

.admin-page .admin-sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: auto;
}

@media (min-width: 1024px) {
    .admin-page .admin-sidebar {
        position: sticky;
        top: var(--app-header-height);
        height: calc(100dvh - var(--app-header-height));
        min-height: calc(100dvh - var(--app-header-height));
        max-height: calc(100dvh - var(--app-header-height));
        overflow: hidden;
    }
}

/* Sidebar navigation links */
.admin-page #admin-sidebar .sidebar-link,
.teacher-admin-page #admin-sidebar .sidebar-link {
    position: relative;
    min-height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #334155 !important;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition:
        background-color 0.2s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.2s cubic-bezier(0.22, 1, 0.36, 1),
        color 0.2s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-page #admin-sidebar .sidebar-link:hover:not(.active),
.teacher-admin-page #admin-sidebar .sidebar-link:hover:not(.active) {
    background: #fffaf5;
    border-color: #fdba74;
    color: #9a3412 !important;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.08);
}

/* Active sidebar link */
.sidebar-link.active {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%) !important;
    border-color: #fb923c !important;
    color: #9a3412 !important;
    font-weight: 700;
    box-shadow:
        0 2px 10px rgba(234, 88, 12, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.sidebar-link:hover:not(.active) {
    background: #fffaf5;
}

/* --- Main Area --- */
.admin-main {
    flex: 1;
    /* Take remaining space */
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    position: relative;
    width: 0;
}

/* --- Content --- */
.admin-content {
    flex: 1;
    min-height: 0;
    padding: 1.5rem;
    overflow-y: auto;
    /* Scrollable area */
    background: #f8fafc;
}

/* --- Footer --- */
.admin-footer {
    padding: 1rem 1.5rem;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    font-size: var(--pp5-type-caption);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.site-footer-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: auto;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

#dashboard-view {
    min-height: 100vh;
    min-height: 100dvh;
}

.site-footer-line {
    margin: 0;
    white-space: nowrap;
    font-size: clamp(9px, 2.2vw, 13px);
    line-height: 1.2;
    color: #64748b;
}

/* --- Mobile Responsive --- */
@media (max-width: 1023px) {
    .admin-layout {
        height: auto !important;
        max-height: none !important;
        min-height: calc(100dvh - var(--app-header-height)) !important;
    }

    .admin-sidebar {
        position: fixed;
        /* Overlay on mobile */
        height: calc(100vh - var(--app-header-height) - var(--mobile-sidebar-gap));
        top: calc(var(--app-header-height) + var(--mobile-sidebar-gap));
        left: 0;
        transform: translateX(-100%);
        border-top-right-radius: 16px;
        box-shadow: 8px 0 30px rgba(15, 23, 42, 0.16);
        overflow: hidden;
    }

    .admin-page #admin-sidebar {
        top: var(--app-header-height);
        height: calc(100vh - var(--app-header-height));
        height: calc(100dvh - var(--app-header-height));
        border-top-right-radius: 0;
    }

    .admin-page #admin-sidebar .admin-sidebar-nav {
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    /* On mobile, main area takes full width naturally as sidebar is fixed/overlay */
}

/* Sidebar brand text */
.sidebar-brand {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================
   Mobile Table -> Card
   ========================================= */
@media (max-width: 767px) {
    .header-account-toggle__name {
        display: none;
    }

    .mobile-table-shell {
        overflow-x: visible !important;
    }

    .mobile-card-table {
        width: 100%;
        border-collapse: separate !important;
        border-spacing: 0 12px !important;
        table-layout: auto !important;
        background: transparent !important;
    }

    .mobile-card-table thead {
        display: none !important;
    }

    .mobile-card-table tbody,
    .mobile-card-table tr,
    .mobile-card-table td {
        display: block;
        width: 100%;
    }

    .mobile-card-table tr {
        margin: 0 0 0.75rem 0;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
        overflow: hidden;
    }

    .mobile-card-table tr:last-child {
        margin-bottom: 0;
    }

    .mobile-card-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.625rem 0.875rem !important;
        border: 0 !important;
        border-bottom: 1px dashed #e2e8f0;
        font-size: 0.8rem;
        line-height: 1.2;
        white-space: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        text-overflow: clip !important;
        scrollbar-width: none;
    }

    .mobile-card-table td::-webkit-scrollbar {
        display: none;
    }

    .mobile-card-table td:last-child {
        border-bottom: 0 !important;
    }

    .mobile-card-table td::before {
        content: attr(data-label);
        color: #475569;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        font-size: var(--pp5-type-caption);
        flex: 0 0 auto;
        margin-right: 0.75rem;
    }

    .mobile-card-table td>* {
        margin-left: auto;
        white-space: nowrap !important;
        text-overflow: clip !important;
        overflow: visible !important;
    }

    /* Attendance cards on teacher page: extra compact mobile layout */
    .mobile-card-table.teacher-attendance-table {
        border-spacing: 0 5px !important;
    }

    .mobile-card-table.teacher-attendance-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "order"
            "identity"
            "classnum"
            "status";
        border: 1px solid #dbe5f0;
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
        margin-bottom: 0.5rem;
        overflow: hidden;
    }

    .mobile-card-table.teacher-attendance-table tr:last-child {
        margin-bottom: 0;
    }

    .mobile-card-table.teacher-attendance-table tr::before {
        grid-area: identity;
        content: "à¸£à¸«à¸±à¸ªà¸™à¸±à¸à¹€à¸£à¸µà¸¢à¸™ " attr(data-mobile-student-id) "   à¸„à¸³à¸™à¸³à¸«à¸™à¹‰à¸² " attr(data-mobile-prefix) "   à¸Šà¸·à¹ˆà¸­-à¸ªà¸à¸¸à¸¥ " attr(data-mobile-name);
        display: block;
        padding: 0.2rem 0.58rem 0.24rem;
        border-bottom: 1px dashed #e5edf6;
        color: #334155;
        font-size: var(--pp5-type-caption);
        line-height: 1.2;
        word-break: break-word;
    }

    .mobile-card-table.teacher-attendance-table tr::after {
        grid-area: classnum;
        content: "à¸Šà¸±à¹‰à¸™ " attr(data-mobile-level-room) "   à¹€à¸¥à¸‚à¸—à¸µà¹ˆ " attr(data-mobile-number);
        display: block;
        padding: 0.2rem 0.58rem 0.28rem;
        border-bottom: 1px dashed #e5edf6;
        color: #1f2937;
        font-size: var(--pp5-type-caption);
        font-weight: 700;
        line-height: 1.2;
    }

    .mobile-card-table.teacher-attendance-table td {
        width: auto;
        min-height: 0;
        padding: 0.28rem 0.58rem !important;
        border: 0 !important;
        white-space: normal !important;
        overflow: visible !important;
        font-size: var(--pp5-type-caption);
        line-height: 1.2;
    }

    .mobile-card-table.teacher-attendance-table td::before {
        color: #64748b;
        font-size: 0.54rem;
        font-weight: 700;
        letter-spacing: 0.03em;
    }

    .mobile-card-table.teacher-attendance-table td>* {
        margin-left: 0 !important;
        max-width: 100%;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        font-size: var(--pp5-type-caption);
        line-height: 1.15;
        font-weight: 600;
    }

    .mobile-card-table.teacher-attendance-table td:nth-child(1) {
        grid-area: order;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.4rem;
        padding-top: 0.3rem !important;
        padding-bottom: 0.22rem !important;
        border-bottom: 1px dashed #e5edf6 !important;
    }

    .mobile-card-table.teacher-attendance-table td:nth-child(2),
    .mobile-card-table.teacher-attendance-table td:nth-child(3),
    .mobile-card-table.teacher-attendance-table td:nth-child(4),
    .mobile-card-table.teacher-attendance-table td:nth-child(5),
    .mobile-card-table.teacher-attendance-table td:nth-child(6),
    .mobile-card-table.teacher-attendance-table td:nth-child(7),
    .mobile-card-table.teacher-attendance-table td:nth-child(8) {
        display: none !important;
    }

    .mobile-card-table.teacher-attendance-table td:nth-child(9) {
        grid-area: status;
        padding-top: 0.28rem !important;
        padding-bottom: 0.34rem !important;
        align-items: stretch;
    }

    .mobile-card-table.teacher-attendance-table td:nth-child(9)>div {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border-radius: 9px;
        overflow: hidden;
    }

    .mobile-card-table.teacher-attendance-table .att-btn {
        min-width: 0 !important;
        width: 100%;
        padding: 0.26rem 0.12rem !important;
        font-size: 0.64rem !important;
        line-height: 1.15;
    }

    .mobile-card-table.teacher-attendance-table tr[data-att-status="present"] {
        border-color: #86efac;
    }

    .mobile-card-table.teacher-attendance-table tr[data-att-status="present"] td:nth-child(9) {
        background: #f0fdf4;
    }

    .mobile-card-table.teacher-attendance-table tr[data-att-status="leave"] {
        border-color: #fcd34d;
    }

    .mobile-card-table.teacher-attendance-table tr[data-att-status="leave"] td:nth-child(9) {
        background: #fffbeb;
    }

    .mobile-card-table.teacher-attendance-table tr[data-att-status="absent"] {
        border-color: #fda4af;
    }

    .mobile-card-table.teacher-attendance-table tr[data-att-status="absent"] td:nth-child(9) {
        background: #fff1f2;
    }

    .mobile-card-table.teacher-attendance-table tr[data-mobile-message="1"]::before,
    .mobile-card-table.teacher-attendance-table tr[data-mobile-message="1"]::after {
        display: none;
        content: '';
    }

    .mobile-card-table.teacher-attendance-table tr[data-mobile-message="1"] td {
        grid-column: 1 / -1;
    }

    .mobile-card-table tr[data-mobile-message="1"] td {
        justify-content: center;
        text-align: center;
        white-space: nowrap !important;
        padding: 0.85rem !important;
        border-bottom: 0 !important;
    }

    .mobile-card-table tr[data-mobile-message="1"] td::before {
        content: '';
        display: none;
    }

    .mobile-card-table tbody.divide-y> :not([hidden])~ :not([hidden]) {
        border-top-width: 0 !important;
        border-bottom-width: 0 !important;
    }
}

@media (max-width: 420px) {
    .mobile-card-table.teacher-attendance-table tr {
        border-radius: 10px;
    }

    .mobile-card-table.teacher-attendance-table td {
        padding: 0.24rem 0.46rem !important;
    }

    .mobile-card-table.teacher-attendance-table tr::before,
    .mobile-card-table.teacher-attendance-table tr::after {
        padding-left: 0.46rem;
        padding-right: 0.46rem;
        font-size: 0.68rem;
    }

    .mobile-card-table.teacher-attendance-table td>* {
        font-size: 0.7rem;
    }

    .mobile-card-table.teacher-attendance-table .att-btn {
        padding: 0.24rem 0.08rem !important;
        font-size: 0.6rem !important;
    }
}

/* =========================================
   Custom Tag Input Theme
   ========================================= */
.tag-item {
    animation: fadeIn 0.1s ease-out;
}

.tag-remove:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Scrollbar for results */
#tag-search-results::-webkit-scrollbar {
    width: 6px;
}

#tag-search-results::-webkit-scrollbar-track {
    background: #f1f5f9;
}

#tag-search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#tag-search-results::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Room Filter Custom Style */
.room-filter-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* =====================================================
   Flip Clock Countdown (Refined)
   ===================================================== */
.flip-clock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Increased gap */
}

.flip-clock .separator {
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    padding-bottom: 20px;
    /* Align with cards */
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0.3;
    }
}

.flip-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.flip-unit-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.flip-card {
    position: relative;
    width: 60px;
    /* Slightly larger */
    height: 70px;
    perspective: 400px;
    /* Increased perspective */
    border-radius: 6px;
    background: #1a1a1a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Common styles for all halves */
.flip-card .top,
.flip-card .bottom,
.flip-card .top-flip,
.flip-card .bottom-flip {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    overflow: hidden;
    backface-visibility: hidden;
    /* Crucial for 3D */
}

/* TOP HALF (Static & Animating) */
.flip-card .top,
.flip-card .top-flip {
    top: 0;
    background: #2d2d2d;
    /* Lighter top */
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
    /* Crease line */
    transform-origin: bottom;
    z-index: 1;
}

/* BOTTOM HALF (Static & Animating) */
.flip-card .bottom,
.flip-card .bottom-flip {
    bottom: 0;
    background: #1a1a1a;
    /* Darker bottom */
    border-radius: 0 0 6px 6px;
    transform-origin: top;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    /* Align bottom text */
}

/* Text positioning */
.flip-card .top span,
.flip-card .top-flip span {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: #f0f0f0;
}

.flip-card .bottom span,
.flip-card .bottom-flip span {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, 50%);
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: #f0f0f0;
}

/* ANIMATION LAYERS */
.flip-card .top-flip {
    z-index: 2;
    /* On top of static top */
    transform-origin: bottom;
}

.flip-card .bottom-flip {
    z-index: 2;
    /* On top of static bottom */
    transform-origin: top;
    transform: rotateX(90deg);
    /* Start folded up */
}

/* ANIMATION KEYFRAMES */
.flip-card.flip .top-flip {
    animation: flipTop 0.45s ease-in forwards;
}

.flip-card.flip .bottom-flip {
    animation: flipBottom 0.45s ease-out 0.45s forwards;
    /* Delay match top duration */
}

@keyframes flipTop {
    0% {
        transform: rotateX(0deg);
    }

    100% {
        transform: rotateX(-90deg);
    }
}

@keyframes flipBottom {
    0% {
        transform: rotateX(90deg);
    }

    100% {
        transform: rotateX(0deg);
    }
}

/* Countdown wrapper refined */
.countdown-wrapper {
    margin-top: 1.5rem;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    border: 0;
    display: inline-block;
    box-shadow: none;
}

.countdown-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.countdown-shell {
    width: 100%;
    display: flex;
    justify-content: center;
}

.countdown-shell .countdown-wrapper {
    margin-top: 0;
    width: min(100%, 980px);
    display: block;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0.25rem 0;
}

.countdown-shell .countdown-label {
    text-align: center;
    margin-bottom: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #111827;
    text-shadow: none;
}

.countdown-shell .flip-clock {
    width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 12px;
}

.countdown-shell .flip-unit {
    gap: 9px;
}

.countdown-shell .flip-unit-label {
    font-size: 1.125rem;
    letter-spacing: 0.06em;
    color: #111827;
    text-shadow: none;
}

.countdown-shell .flip-card {
    width: 90px;
    height: 105px;
    border-radius: 9px;
}

.countdown-shell .flip-card .top,
.countdown-shell .flip-card .top-flip {
    border-radius: 9px 9px 0 0;
}

.countdown-shell .flip-card .bottom,
.countdown-shell .flip-card .bottom-flip {
    border-radius: 0 0 9px 9px;
}

.countdown-shell .flip-card .top span,
.countdown-shell .flip-card .top-flip span,
.countdown-shell .flip-card .bottom span,
.countdown-shell .flip-card .bottom-flip span {
    font-size: 3.75rem;
}

.countdown-shell .flip-clock .separator {
    font-size: 3rem;
    padding-bottom: 30px;
    color: #111827;
    text-shadow: none;
}

/* Responsive */
@media (max-width: 480px) {
    .countdown-shell .flip-card {
        width: 63px;
        height: 84px;
        border-radius: 8px;
    }

    .countdown-shell .flip-card .top,
    .countdown-shell .flip-card .top-flip {
        border-radius: 8px 8px 0 0;
    }

    .countdown-shell .flip-card .bottom,
    .countdown-shell .flip-card .bottom-flip {
        border-radius: 0 0 8px 8px;
    }

    .countdown-shell .flip-card .top span,
    .countdown-shell .flip-card .bottom span,
    .countdown-shell .flip-card .top-flip span,
    .countdown-shell .flip-card .bottom-flip span {
        font-size: 2.7rem;
    }

    .countdown-shell .flip-clock .separator {
    font-size: 3rem;
    padding-bottom: 30px;
    color: #111827;
    text-shadow: none;
}

    .countdown-wrapper {
        padding: 0;
    }

    .countdown-shell .countdown-wrapper {
        border-radius: 0;
        padding: 0.25rem 0;
    }

    .countdown-shell .flip-clock {
        gap: 8px;
    }

    .countdown-shell .flip-unit-label {
    font-size: 1.125rem;
    letter-spacing: 0.06em;
    color: #111827;
    text-shadow: none;
}
}

/* =====================================================
   Index Mobile Readability Helpers
   ===================================================== */
.no-ellipsis-inline {
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

.compact-mobile-btn {
    white-space: nowrap;
}

@media (max-width: 640px) {
    #dashboard-view .mobile-brand-title {
        font-size: clamp(0.7rem, 3.6vw, 0.95rem);
        letter-spacing: -0.01em;
    }

    #dashboard-view .mobile-hero-title {
        font-size: clamp(1.05rem, 5.4vw, 1.6rem);
        line-height: 1.15;
        margin-bottom: 0.5rem;
        white-space: normal;
        text-wrap: balance;
    }

    #dashboard-view #hero-user-info {
        font-size: clamp(0.78rem, 3.3vw, 1rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: clip;
    }

    #dashboard-view .mobile-hero-search {
        font-size: 0.95rem;
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
        padding-left: 2.9rem;
        padding-right: 1rem;
    }

    #dashboard-view .mobile-filter-btn {
        font-size: 0.72rem;
        padding: 0.35rem 0.65rem;
    }

    #dashboard-view #club-filters {
        flex-wrap: nowrap;
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }

    #dashboard-view #club-filters::-webkit-scrollbar {
        display: none;
    }

    #dashboard-view .no-ellipsis-inline {
        font-size: clamp(0.67rem, 2.85vw, 0.95rem);
        letter-spacing: -0.01em;
    }

    #dashboard-view .compact-mobile-btn {
        font-size: 0.7rem !important;
        line-height: 1.2;
        padding-top: 0.48rem !important;
        padding-bottom: 0.48rem !important;
        padding-left: 0.56rem !important;
        padding-right: 0.56rem !important;
    }

    #dashboard-view .club-card-modern {
        padding: 0.78rem !important;
        border-radius: 0.82rem;
    }

    #dashboard-view .club-card-title {
        font-size: 0.95rem;
    }

    #dashboard-view .club-card-desc {
        font-size: 0.78rem;
    }

    #dashboard-view .club-meta-row {
        grid-template-columns: 66px minmax(0, 1fr);
        gap: 0.5rem;
        padding: 0.4rem 0;
    }

    #dashboard-view .club-meta-label {
        font-size: 0.57rem;
    }

    #dashboard-view .club-meta-value {
        font-size: 0.73rem;
    }

    #dashboard-view .club-status-pill {
        font-size: 0.58rem;
        padding: 0.2rem 0.5rem;
    }

    #dashboard-view .club-main__meta {
        gap: 0.24rem;
    }

    #dashboard-view .club-main__meta-item {
        padding: 0.28rem 0.36rem;
    }

    #dashboard-view .club-main__meta-label {
        font-size: 0.51rem;
    }

    #dashboard-view .club-main__meta-value {
        font-size: 0.68rem;
    }

    #dashboard-view .club-summary {
        gap: 0.32rem;
    }

    #dashboard-view .club-summary__registered {
        font-size: 0.88rem;
    }

    #dashboard-view .club-summary__remaining {
        font-size: 0.62rem;
    }

    #dashboard-view .club-expand-toggle {
        font-size: 0.58rem;
        padding: 0.22rem 0.42rem;
    }

    #dashboard-view .club-card-flat__details.is-open {
        max-height: 1400px;
    }
}

/* Login modal shell */
.login-modal-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.login-modal-shell.is-open {
    opacity: 1;
    pointer-events: auto;
}

.login-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background:
        radial-gradient(circle at 16% 20%, rgba(59, 130, 246, 0.22), transparent 44%),
        radial-gradient(circle at 82% 12%, rgba(16, 185, 129, 0.18), transparent 38%),
        rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(7px);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.login-modal-shell.is-open .login-modal-backdrop {
    opacity: 1;
}

.login-modal-panel {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(16px) scale(0.985);
    transition:
        opacity 0.22s ease,
        transform 0.22s cubic-bezier(0.2, 0.9, 0.22, 1);
}

.login-modal-shell.is-open .login-modal-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
}

body.login-modal-open {
    overflow: hidden;
}

/* Login form skeleton (à¹à¸—à¸™ loading overlay à¹€à¸•à¹‡à¸¡à¸ˆà¸­) */
.login-form-panel {
    position: relative;
}

.login-form-panel.is-loading #login-form-heading,
.login-form-panel.is-loading #login-form {
    display: none;
}

.login-form-panel.is-loading .login-form-skeleton {
    display: block;
}

.login-form-skeleton {
    display: none;
    padding-top: 0.15rem;
}

.login-skeleton-line,
.login-skeleton-field,
.login-skeleton-btn {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #e2e8f0;
}

.login-skeleton-line::after,
.login-skeleton-field::after,
.login-skeleton-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.55) 45%,
        transparent 90%
    );
    animation: loginSkeletonShimmer 1.35s ease-in-out infinite;
}

.login-skeleton-line--heading {
    height: 1.35rem;
    width: 42%;
    margin-bottom: 0.55rem;
}

.login-skeleton-line--desc {
    height: 0.85rem;
    width: 78%;
    margin-bottom: 1.35rem;
}

.login-skeleton-field {
    height: 3rem;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 14px;
}

.login-skeleton-line--check {
    height: 0.85rem;
    width: 36%;
    margin-bottom: 1.1rem;
}

.login-skeleton-btn {
    height: 3rem;
    width: 100%;
    border-radius: 14px;
    background: #fdba74;
}

.login-skeleton-hint {
    margin: 0.85rem 0 0;
    text-align: center;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
}

@keyframes loginSkeletonShimmer {
    100% {
        transform: translateX(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-skeleton-line::after,
    .login-skeleton-field::after,
    .login-skeleton-btn::after {
        animation: none;
        opacity: 0;
    }
}
.header-subline-nowrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}
.index-student-logout {
    margin-top: 0.1rem;
    box-shadow: 0 10px 22px -18px rgba(225, 29, 72, 0.8);
}

.index-student-logout:hover {
    transform: translateY(-1px);
}

/* =====================================================
   Student Dashboard UX Refresh
   ===================================================== */
.student-dashboard {
    --app-header-height: 60px;
    background: #f8fafc;
}

.student-app-shell {
    background: #f8fafc;
}

.student-topbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px -20px rgba(15, 23, 42, 0.22);
}

.student-hero {
    border-bottom-left-radius: 32px;
    border-bottom-right-radius: 32px;
}

.hero-kicker {
    margin: 0 0 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 9999px;
    padding: 0.34rem 0.72rem;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-ux-pills {
    margin: 1rem auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
}

.hero-ux-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    padding: 0.38rem 0.72rem;
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.hero-ux-pill span {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    font-size: 0.67rem;
    font-weight: 800;
}

.student-main {
    position: relative;
}

.club-section-head {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.club-section-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.35;
    font-weight: 500;
}

.club-toolbar-shell {
    position: static;
    top: auto;
    z-index: auto;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    background: #ffffff;
    box-shadow: none;
    backdrop-filter: none;
}

.club-toolbar-note {
    margin-top: 0.45rem;
    padding-top: 0.4rem;
    border-top: 1px dashed #e2e8f0;
}

.club-results-meta {
    margin: 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.2;
    font-weight: 600;
}

.club-results-meta--empty {
    color: #b45309;
}

.club-filter-pill {
    box-shadow: none;
}

.club-filter-pill--active {
    box-shadow: 0 10px 20px -14px rgba(249, 115, 22, 0.85);
}

.club-empty-state {
    box-shadow: 0 14px 30px -24px rgba(15, 23, 42, 0.25);
}

.stats-card-modern {
    position: relative;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 14px 26px -22px rgba(15, 23, 42, 0.6);
}

.stats-card-modern__bg-icon {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 74px;
    height: 74px;
    color: rgba(255, 255, 255, 0.24);
    opacity: 0.98;
    pointer-events: none;
    z-index: 1;
    transform: rotate(-10deg);
}

.stats-card-modern__bg-icon svg {
    width: 100%;
    height: 100%;
}

.stats-card-modern__bg-icon--seats {
    transform: rotate(8deg);
}

.stats-card-modern__bg-icon--booked {
    transform: rotate(-6deg);
}

.stats-card-modern--clubs {
    background: linear-gradient(150deg, #ef4444 0%, #f97316 85%);
}

.stats-card-modern--seats {
    background: linear-gradient(150deg, #fb923c 0%, #f59e0b 88%);
}

.stats-card-modern--booked {
    background: linear-gradient(150deg, #f43f5e 0%, #e11d48 86%);
}


@media (max-width: 640px) {
    .stats-card-modern__bg-icon {
        width: 58px;
        height: 58px;
        top: 0.3rem;
        right: 0.3rem;
        color: rgba(255, 255, 255, 0.22);
    }
}
.student-profile-card {
    box-shadow: 0 18px 34px -28px rgba(15, 23, 42, 0.45);
}

.student-meta-row {
    flex-wrap: wrap;
    row-gap: 0.2rem;
}

.student-meta-chip {
    font-weight: 700;
}

@media (max-width: 640px) {
    body input,
    body select,
    body textarea {
        font-size: 16px !important;
    }

    #dashboard-view .mobile-hero-search {
        font-size: 16px !important;
    }

    .student-hero {
        border-bottom-left-radius: 24px;
        border-bottom-right-radius: 24px;
    }

    .hero-kicker {
        font-size: 0.64rem;
        padding: 0.3rem 0.56rem;
        letter-spacing: 0.04em;
    }

    .hero-ux-pills {
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 0.15rem;
        margin-top: 0.8rem;
    }

    .hero-ux-pills::-webkit-scrollbar {
        display: none;
    }

    .hero-ux-pill {
        font-size: 0.67rem;
        padding: 0.34rem 0.64rem;
    }

    .hero-ux-pill span {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }

    .club-toolbar-shell {
        top: calc(var(--app-header-height) + 6px);
        padding: 0.56rem;
        border-radius: 14px;
    }

    .club-section-title {
        font-size: 1.35rem !important;
    }

    .club-section-subtitle {
        font-size: 0.76rem;
    }

    .club-results-meta {
        font-size: 0.66rem;
    }

    .student-profile-card {
        padding: 0.95rem !important;
        border-radius: 1rem;
    }
}

/* =====================================================
   Club Card - Catalog Style (No Image)
   ===================================================== */
.club-card-modern {
    border: 1px solid #dce6f5;
    border-radius: 0.98rem;
    background: #ffffff;
    box-shadow:
        0 10px 22px rgba(15, 23, 42, 0.1),
        0 1px 2px rgba(15, 23, 42, 0.04);
}

.club-card-modern::before,
.club-card-modern::after {
    display: none;
}

.club-card-flat__summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.54rem;
}

.club-main {
    display: grid;
    gap: 0.5rem;
}

.club-card-top {
    position: relative;
    border-radius: 0.88rem;
    padding: 0.7rem 0.76rem 0.74rem;
    min-height: 82px;
    background: linear-gradient(136deg, #ff8a00 0%, #ff5f6d 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 10px 20px rgba(255, 95, 109, 0.24);
}

.club-card-modern--my .club-card-top {
    background: linear-gradient(136deg, #0ecb8f 0%, #18b7cf 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 10px 20px rgba(14, 203, 143, 0.24);
}

.club-card-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.48rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.58rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.club-card-title {
    margin: 0.42rem 0 0;
    color: #ffffff;
    font-size: 1.01rem;
    line-height: 1.28;
    font-weight: 800;
    padding-right: 5.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.club-status-pill {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.26rem;
    padding: 0.26rem 0.62rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0.01em;
    box-shadow:
        0 8px 16px rgba(15, 23, 42, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.club-status-pill__icon {
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
}

.club-status-pill__icon svg {
    width: 0.65rem;
    height: 0.65rem;
}

.club-status-pill__text {
    line-height: 1;
}

.club-status-open {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    border-color: #15803d;
    color: #f0fdf4;
}

.club-status-my {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.club-status-booked {
    background: #eaf1ff;
    border-color: #b7cbff;
    color: #3159cc;
}

.club-status-full {
    background: #ffe4e6;
    border-color: #fda4af;
    color: #be123c;
}

.club-status-level {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.club-status-closed {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
}

.club-main__meta {
    margin-top: 0;
    grid-template-columns: 1fr;
    gap: 0.24rem;
}

.club-main__meta-item {
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
    padding: 0.38rem 0.48rem;
    border: 1px solid #e3ebf7;
    border-radius: 0.62rem;
    background: #f8fbff;
}

.club-main__meta-item:first-child {
    grid-column: auto;
}

.club-main__meta-label {
    font-size: 0.52rem;
    font-weight: 800;
    color: #7e92aa;
    white-space: nowrap;
}

.club-main__meta-value {
    font-size: 0.72rem;
    line-height: 1.2;
    color: #1f2f46;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.club-summary {
    gap: 0.35rem;
    padding: 0.52rem 0.6rem;
    border: 1px solid #dce7f5;
    border-radius: 0.75rem;
    background: #f4f8ff;
}

.club-card-flat.is-expanded .club-summary {
    border-color: #ffce9c;
    background: #fff6eb;
}

.club-summary__registered {
    font-size: 1rem;
}

.club-summary__remaining {
    padding: 0.12rem 0.44rem;
    font-size: 0.63rem;
    border-color: #d4dfed;
    background: #ffffff;
}

.club-seat-track {
    height: 0.34rem;
    background: #d7e1ee;
}

.club-seat-fill--open {
    background: linear-gradient(90deg, #ff7605 0%, #ffb302 100%);
}

.club-seat-fill--my {
    background: linear-gradient(90deg, #0ecb8f 0%, #19b8cd 100%);
}

.club-seat-fill--full {
    background: linear-gradient(90deg, #ff5c84 0%, #e11d48 100%);
}

.club-quick-book-btn {
    width: 100%;
    min-height: 2.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.34rem 0.62rem;
    border-radius: 0.62rem;
    border: 1px solid #1d4ed8;
    background: linear-gradient(90deg, #1d4ed8 0%, #0ea5e9 100%);
    color: #ffffff;
    font-size: 0.7rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 16px rgba(29, 78, 216, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.club-quick-book-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(29, 78, 216, 0.33);
    filter: saturate(1.12);
}

.club-card-modern--my .club-quick-book-btn {
    border-color: #1d4ed8;
    background: linear-gradient(90deg, #1d4ed8 0%, #0ea5e9 100%);
    box-shadow: 0 8px 16px rgba(29, 78, 216, 0.28);
}

.club-expand-toggle {
    width: auto;
    align-self: flex-start;
    padding: 0.22rem 0.44rem;
    font-size: 0.6rem;
    border-radius: 999px;
    border-color: #cfdcf0;
    background: #ffffff;
    color: #39506d;
}

.club-expand-toggle:hover {
    border-color: #ff9f43;
    background: #fff8ef;
    color: #e85d04;
}

.club-card-flat__details.is-open {
    margin-top: 0.62rem;
    padding-top: 0.62rem;
}

.club-card-flat__details .club-card-action {
    margin-top: 0.66rem;
}

.club-card-action .compact-mobile-btn {
    min-height: 2.2rem;
    border-radius: 0.72rem !important;
    font-size: 0.71rem !important;
    font-weight: 800;
}

.club-modal-action-zone {
    margin-top: 0.75rem;
    padding-top: 0.72rem;
    border-top: 1px solid #dbe5f3;
}

.club-grid-responsive {
    grid-template-columns: 1fr !important;
}

@media (min-width: 860px) {
    .club-grid-responsive {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1280px) {
    .club-grid-responsive {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1680px) {
    .club-grid-responsive {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    #dashboard-view .club-card-modern {
        padding: 0.72rem !important;
        border-radius: 0.92rem;
    }

    #dashboard-view .club-card-top {
        min-height: 76px;
        padding: 0.62rem 0.66rem 0.66rem;
        border-radius: 0.8rem;
    }

    #dashboard-view .club-card-kicker {
        font-size: 0.54rem;
        padding: 0.16rem 0.42rem;
    }

    #dashboard-view .club-card-title {
        font-size: 0.92rem;
        padding-right: 4.9rem;
        margin-top: 0.34rem;
    }

    #dashboard-view .club-status-pill {
        font-size: 0.55rem;
        padding: 0.18rem 0.46rem;
    }

    #dashboard-view .club-main__meta-item {
        padding: 0.31rem 0.38rem;
        border-radius: 0.56rem;
    }

    #dashboard-view .club-main__meta-label {
        font-size: 0.49rem;
    }

    #dashboard-view .club-main__meta-value {
        font-size: 0.67rem;
    }

    #dashboard-view .club-summary {
        padding: 0.48rem 0.52rem;
        border-radius: 0.68rem;
    }

    #dashboard-view .club-summary__registered {
        font-size: 0.88rem;
    }

    #dashboard-view .club-summary__remaining {
        font-size: 0.6rem;
    }

    #dashboard-view .club-quick-book-btn {
        min-height: 1.9rem;
        font-size: 0.66rem;
        border-radius: 0.56rem;
    }

    #dashboard-view .club-expand-toggle {
        font-size: 0.56rem;
        padding: 0.18rem 0.4rem;
    }

    #dashboard-view .club-card-action .compact-mobile-btn {
        min-height: 2.05rem;
        font-size: 0.68rem !important;
    }

    #dashboard-view .club-grid-responsive {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Club Modal UX/UI Polish
   ===================================================== */
.club-modal-panel {
    border: 1px solid #d9e3f1;
    border-radius: 1.1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.2);
}

.club-modal-header {
    padding: 0.86rem 0.96rem;
    border-bottom: 1px solid #dde6f3;
    background:
        radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.12), transparent 34%),
        radial-gradient(circle at 90% 0%, rgba(255, 122, 24, 0.14), transparent 32%),
        #ffffff;
}

.club-modal-title {
    font-size: clamp(1rem, 1vw + 0.8rem, 1.22rem);
    font-weight: 800;
}

.club-modal-title span {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8 !important;
    font-size: 0.72rem;
}

.club-modal-seat-info {
    border-color: #bae6fd;
    background: #ecfeff;
    color: #0e7490 !important;
    font-size: 0.72rem;
}

.club-modal-body {
    padding: 0.88rem;
    background:
        radial-gradient(circle at top right, rgba(191, 219, 254, 0.26), transparent 44%),
        radial-gradient(circle at top left, rgba(255, 237, 213, 0.34), transparent 40%),
        #f8fbff;
}

.club-modal-content {
    gap: 0.56rem;
    margin-bottom: 0.68rem;
}

.club-modal-section {
    border: 1px solid #dbe6f4;
    border-radius: 0.86rem;
    padding: 0.68rem;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.club-modal-section--description {
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.club-modal-section--attendance {
    margin-top: 0.62rem;
    border-top: 1px solid #e2e8f0;
}

.club-modal-section-title {
    color: #4b5f77;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

.club-modal-description {
    margin-top: 0.34rem;
    font-size: 0.88rem;
    line-height: 1.48;
}

.club-modal-info-grid {
    gap: 0.52rem;
}

.club-modal-info-card {
    border: 1px solid #d9e6f8;
    border-radius: 0.76rem;
    padding: 0.58rem;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.club-modal-info-label {
    margin: 0 0 0.26rem;
    color: #475569;
    font-size: 0.64rem;
}

.club-modal-info-value {
    color: #0f172a;
    font-size: 0.86rem;
    line-height: 1.35;
    font-weight: 700;
}

.club-modal-list {
    border-color: #dbe6f4;
    border-radius: 0.78rem;
    background: #ffffff;
}

.club-modal-list-item {
    padding: 0.55rem 0.62rem;
}

.club-modal-list-item.is-me {
    background: linear-gradient(90deg, #fff7ed 0%, #f9fcff 100%);
}

.club-modal-rank {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.68rem;
}

.club-modal-name {
    font-size: 0.89rem;
}

.club-modal-meta {
    font-size: 0.7rem;
}

.club-attendance-kpi-grid {
    gap: 0.44rem;
}

.club-attendance-kpi {
    border-radius: 0.68rem;
    padding: 0.44rem 0.34rem;
}

.club-modal-subtitle {
    margin: 0 0 0.38rem;
    font-size: 0.84rem;
    line-height: 1.26;
}

.club-attendance-summary {
    font-size: 0.71rem;
}

.club-modal-action-zone {
    margin-top: 0.72rem;
    padding-top: 0.72rem;
    border-top: 1px solid #dbe5f3;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0) 0%, rgba(248, 251, 255, 0.85) 36%);
}

.club-modal-action-btn {
    min-height: 2.65rem;
    border-radius: 0.8rem !important;
}

.club-modal-action-btn--primary {
    border-color: #2563eb;
    background: linear-gradient(90deg, #1d4ed8 0%, #0ea5e9 100%);
}

.club-modal-action-btn--danger {
    color: #dc2626;
    border-color: #fca5a5;
    background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
}

.club-modal-action-btn--danger:hover {
    color: #ffffff;
    border-color: #ef4444;
    background: linear-gradient(90deg, #ef4444 0%, #fb7185 100%);
}

@media (max-width: 640px) {
    .club-modal-panel {
        border-radius: 0.96rem;
    }

    .club-modal-header {
        padding: 0.72rem 0.8rem;
    }

    .club-modal-title {
        font-size: 1rem;
    }

    .club-modal-title span {
        font-size: 0.66rem;
        padding: 0.12rem 0.46rem;
    }

    .club-modal-seat-info {
        font-size: 0.66rem;
        padding: 0.16rem 0.48rem;
    }

    .club-modal-body {
        padding: 0.72rem;
    }

    .club-modal-section {
        border-radius: 0.78rem;
        padding: 0.56rem;
    }

    .club-modal-description {
        font-size: 0.82rem;
    }

    .club-modal-info-label {
        font-size: 0.6rem;
    }

    .club-modal-info-value {
        font-size: 0.8rem;
    }

    .club-modal-list-item {
        padding: 0.48rem 0.54rem;
    }

    .club-modal-name {
        font-size: 0.8rem;
    }

    .club-modal-meta {
        font-size: 0.64rem;
    }

    .club-modal-action-zone {
        margin-top: 0.62rem;
        padding-top: 0.62rem;
    }

    .club-modal-action-btn {
        min-height: 2.45rem;
    }
}

/* =====================================================
   Club Card UX Upgrade (Layer + Icon + Smart Progress)
   ===================================================== */
.club-card-modern {
    border: 1px solid rgba(214, 226, 243, 0.95);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 255, 0.96) 100%);
    box-shadow:
        0 14px 28px rgba(15, 23, 42, 0.1),
        0 1px 2px rgba(15, 23, 42, 0.04);
}

.club-card-modern.table-card:not(.pointer-events-none):hover {
    transform: translateY(-3px);
    box-shadow:
        0 22px 34px rgba(15, 23, 42, 0.14),
        0 2px 4px rgba(15, 23, 42, 0.05);
}

.club-card-top {
    min-height: 96px;
    border-radius: 0.9rem;
}

.club-card-subtitle {
    margin: 0.3rem 0 0;
    color: rgba(255, 255, 255, 0.93);
    font-size: 0.76rem;
    line-height: 1.3;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.club-main__meta {
    margin-top: 0.55rem;
    display: grid;
    gap: 0;
    grid-template-columns: 1fr;
}

.club-main__meta-item {
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr);
    align-items: center;
    gap: 0.36rem;
    padding: 0.34rem 0;
    border-radius: 0;
    border: 0;
    background: transparent;
}

.club-main__meta-item:first-child {
    background: transparent;
}

.club-main__meta-item + .club-main__meta-item {
    border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.club-main__meta-icon {
    width: 1rem;
    height: 1rem;
    color: #3b82f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.club-main__meta-icon svg {
    width: 1rem;
    height: 1rem;
}

.club-main__meta-label {
    font-size: 0.56rem;
}

.club-main__meta-value {
    color: #23364f;
    font-size: 0.74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.club-summary {
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.26);
    background: transparent;
    border-radius: 0;
    padding: 0.52rem 0 0;
    gap: 0.44rem;
}

.club-card-flat.is-expanded .club-summary {
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.32);
    background: transparent;
    transform: none;
}

.club-summary__numbers {
    align-items: center;
    justify-content: flex-start;
}

.club-summary__registered {
    font-size: 1rem;
}

.club-summary__percent {
    display: none;
    align-items: center;
    padding: 0.14rem 0.46rem;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.64rem;
    line-height: 1;
    font-weight: 800;
}

.club-seat-track {
    position: relative;
    height: 0.5rem;
    border-radius: 999px;
    overflow: hidden;
    background: #c3d2e6;
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.12);
}

.club-seat-fill {
    position: relative;
    overflow: hidden;
    border-radius: inherit;
}

.club-seat-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 34%;
    height: 100%;
    background: rgba(255, 255, 255, 0.42);
    filter: blur(1px);
    animation: clubSeatShimmer 2s linear infinite;
}

@keyframes clubSeatShimmer {
    0% {
        left: -40%;
    }

    100% {
        left: 120%;
    }
}

.club-seat-state-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 0.16rem 0.52rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.64rem;
    line-height: 1.1;
    font-weight: 800;
}

.club-seat-state-open {
    background: #ecfdf5;
    border-color: #86efac;
    color: #047857;
}

.club-seat-state-near {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #b45309;
}

.club-seat-state-full {
    background: #fff1f2;
    border-color: #fda4af;
    color: #be123c;
}

.club-quick-book-btn {
    min-height: 2.2rem;
    padding: 0.38rem 0.7rem;
}

.club-quick-book-btn__icon {
    width: 0.88rem;
    height: 0.88rem;
    transition: transform 0.2s ease;
}

.club-quick-book-btn:hover .club-quick-book-btn__icon {
    transform: translateX(2px);
}

.club-expand-toggle {
    margin-top: 0.24rem;
    align-self: flex-start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #36506c;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1.2px;
    text-underline-offset: 0.18em;
}

.club-expand-toggle:hover {
    border: 0;
    background: transparent;
    color: #1d4ed8;
}

.club-expand-toggle:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
    border-radius: 0.24rem;
}

.club-expand-toggle .club-expand-icon {
    width: 0.88rem;
    height: 0.88rem;
}

@media (max-width: 1024px) {
    .club-card-top {
        min-height: 90px;
    }

    .club-main__meta-item {
        grid-template-columns: 0.95rem minmax(0, 1fr);
        gap: 0.32rem;
    }
}

@media (max-width: 640px) {
    #dashboard-view .club-card-subtitle {
        font-size: 0.68rem;
    }

    #dashboard-view .club-main__meta-item {
        padding: 0.3rem 0;
    }

    #dashboard-view .club-main__meta-label {
        font-size: 0.48rem;
    }

    #dashboard-view .club-main__meta-value {
        font-size: 0.66rem;
    }

    #dashboard-view .club-summary__percent {
        font-size: 0.58rem;
    }

    #dashboard-view .club-seat-state-badge {
        font-size: 0.58rem;
    }
}

/* Club card typography tune: readable on all devices + Thai-safe fallback */
#dashboard-view .club-card-modern,
#dashboard-view .club-card-modern * {
    font-family: 'Anuphan', 'Noto Sans Thai', 'Noto Sans Thai Looped', Tahoma, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

#dashboard-view .club-card-kicker {
    font-size: clamp(0.72rem, 0.2vw + 0.68rem, 0.84rem);
    line-height: 1.3;
    letter-spacing: 0.01em;
    text-transform: none;
}

#dashboard-view .club-card-title {
    font-size: clamp(1.06rem, 0.4vw + 0.95rem, 1.28rem);
    line-height: 1.36;
}

#dashboard-view .club-card-subtitle {
    font-size: clamp(0.86rem, 0.24vw + 0.8rem, 0.98rem);
    line-height: 1.45;
    -webkit-line-clamp: 2;
}

#dashboard-view .club-status-pill {
    font-size: clamp(0.74rem, 0.18vw + 0.7rem, 0.86rem);
    line-height: 1.24;
    letter-spacing: 0.01em;
}

#dashboard-view .club-main__meta-label {
    font-size: clamp(0.7rem, 0.16vw + 0.66rem, 0.8rem);
    line-height: 1.3;
    letter-spacing: 0.01em;
    text-transform: none;
}

#dashboard-view .club-main__meta-value {
    font-size: clamp(0.84rem, 0.2vw + 0.8rem, 0.96rem);
    line-height: 1.42;
}

#dashboard-view .club-summary__registered {
    font-size: clamp(1.36rem, 0.28vw + 1.3rem, 1.52rem);
    line-height: 1.05;
}

#dashboard-view .club-summary__percent,
#dashboard-view .club-seat-state-badge,
#dashboard-view .club-expand-toggle {
    font-size: clamp(0.74rem, 0.16vw + 0.7rem, 0.86rem);
    line-height: 1.22;
}

#dashboard-view .club-quick-book-btn,
#dashboard-view .club-card-action .compact-mobile-btn {
    font-size: clamp(0.84rem, 0.2vw + 0.8rem, 0.96rem) !important;
    line-height: 1.3;
}

#dashboard-view .club-card-desc {
    font-size: clamp(0.9rem, 0.18vw + 0.86rem, 1rem);
    line-height: 1.56;
}

#dashboard-view .club-meta-label {
    font-size: clamp(0.72rem, 0.16vw + 0.68rem, 0.82rem);
    line-height: 1.28;
    letter-spacing: 0.01em;
    text-transform: none;
}

#dashboard-view .club-meta-value {
    font-size: clamp(0.86rem, 0.2vw + 0.82rem, 0.98rem);
    line-height: 1.5;
}

@media (max-width: 640px) {
    #dashboard-view .club-card-kicker {
        font-size: 0.72rem;
    }

    #dashboard-view .club-card-title {
        font-size: 1rem;
        line-height: 1.34;
    }

    #dashboard-view .club-card-subtitle {
        font-size: 0.84rem;
        line-height: 1.42;
    }

    #dashboard-view .club-status-pill {
        font-size: 0.72rem;
    }

    #dashboard-view .club-main__meta-label {
        font-size: 0.68rem;
    }

    #dashboard-view .club-main__meta-value {
        font-size: 0.82rem;
    }

    #dashboard-view .club-summary__registered {
        font-size: 1.24rem;
    }

    #dashboard-view .club-summary__percent,
    #dashboard-view .club-seat-state-badge,
    #dashboard-view .club-expand-toggle {
        font-size: 0.72rem;
    }

    #dashboard-view .club-quick-book-btn,
    #dashboard-view .club-card-action .compact-mobile-btn {
        font-size: 0.82rem !important;
    }
}

/* Dashboard info/stat cards: readable typography + Thai-safe fallback */
#dashboard-view .student-profile-card,
#dashboard-view .student-profile-card *,
#dashboard-view .stats-card-modern,
#dashboard-view .stats-card-modern * {
    font-family: 'Anuphan', 'Noto Sans Thai', 'Noto Sans Thai Looped', Tahoma, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

#dashboard-view .student-profile-card__kicker {
    font-size: clamp(0.82rem, 0.14vw + 0.78rem, 0.92rem);
    line-height: 1.3;
    letter-spacing: 0.01em;
    text-transform: none;
}

#dashboard-view .student-profile-card__name {
    font-size: clamp(1.24rem, 0.3vw + 1.16rem, 1.42rem);
    line-height: 1.32;
}

#dashboard-view .student-profile-card__meta {
    font-size: clamp(0.84rem, 0.14vw + 0.8rem, 0.94rem);
    line-height: 1.4;
}

#dashboard-view .student-profile-card__chip {
    font-size: clamp(0.84rem, 0.14vw + 0.8rem, 0.94rem);
    line-height: 1.2;
}

#dashboard-view .student-profile-card__status-label {
    font-size: clamp(0.76rem, 0.14vw + 0.72rem, 0.86rem);
    line-height: 1.26;
    letter-spacing: 0.01em;
    text-transform: none;
}

#dashboard-view .student-profile-card__status-value {
    font-size: clamp(1rem, 0.18vw + 0.95rem, 1.1rem);
    line-height: 1.34;
}

#dashboard-view .student-profile-card .bg-amber-50 .text-xs.text-gray-500 {
    font-size: clamp(0.82rem, 0.12vw + 0.78rem, 0.9rem);
    line-height: 1.42;
}

#dashboard-view .student-profile-card .compact-mobile-btn {
    font-size: clamp(0.9rem, 0.14vw + 0.86rem, 0.98rem) !important;
    line-height: 1.3;
}

#dashboard-view .stats-card-modern__label {
    font-size: clamp(0.84rem, 0.14vw + 0.8rem, 0.94rem);
    line-height: 1.3;
    letter-spacing: 0.01em;
    text-transform: none;
}

#dashboard-view .stats-card-modern__value {
    font-size: clamp(2.1rem, 0.7vw + 1.88rem, 2.62rem);
    line-height: 1.06;
}

#dashboard-view .stats-card-modern__unit {
    font-size: clamp(0.88rem, 0.14vw + 0.84rem, 0.98rem);
    line-height: 1.36;
    letter-spacing: 0.005em;
    text-transform: none;
}

@media (max-width: 640px) {
    #dashboard-view .student-profile-card__kicker {
        font-size: 0.8rem;
    }

    #dashboard-view .student-profile-card__name {
        font-size: 1.14rem;
    }

    #dashboard-view .student-profile-card__meta,
    #dashboard-view .student-profile-card__chip {
        font-size: 0.8rem;
    }

    #dashboard-view .student-profile-card__status-label {
        font-size: 0.74rem;
    }

    #dashboard-view .student-profile-card__status-value {
        font-size: 0.96rem;
    }

    #dashboard-view .student-profile-card .bg-amber-50 .text-xs.text-gray-500 {
        font-size: 0.8rem;
    }

    #dashboard-view .student-profile-card .compact-mobile-btn {
        font-size: 0.86rem !important;
    }

    #dashboard-view .stats-card-modern__label {
        font-size: 0.78rem;
    }

    #dashboard-view .stats-card-modern__value {
        font-size: 1.86rem;
    }

    #dashboard-view .stats-card-modern__unit {
        font-size: 0.82rem;
    }
}

/* =====================================================
   Theme Color Bindings
   ===================================================== */
:root {
    --site-primary-color: #ff8a00;
    --site-secondary-color: #ff5f6d;
    --site-button-color: #ea580c;
    --site-badge-color: #16a34a;
    --site-progress-color: #ff7605;
}

.club-card-top {
    background: linear-gradient(136deg, var(--site-primary-color) 0%, var(--site-secondary-color) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 10px 20px rgba(15, 23, 42, 0.22);
}

.club-card-modern--my .club-card-top {
    background: linear-gradient(136deg, var(--site-secondary-color) 0%, var(--site-primary-color) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 10px 20px rgba(15, 23, 42, 0.22);
}

.club-status-open {
    background: var(--site-badge-color);
    border-color: var(--site-badge-color);
    color: #f8fafc;
}

.club-seat-fill--open {
    background: linear-gradient(90deg, var(--site-progress-color) 0%, var(--site-progress-color) 100%);
}

.club-quick-book-btn,
.club-card-modern--my .club-quick-book-btn,
.club-modal-action-btn--primary {
    border-color: var(--site-button-color);
    background: linear-gradient(90deg, var(--site-button-color) 0%, var(--site-button-color) 100%);
    color: #ffffff;
}

.club-quick-book-btn:hover,
.club-modal-action-btn--primary:hover {
    filter: brightness(0.95);
}

/* =====================================================
   Mobile UX Overrides (All User Types)
   ===================================================== */
@media (max-width: 640px) {
    :root {
        --app-header-height: 56px;
    }

    html {
        -webkit-text-size-adjust: 100%;
    }

    body {
        font-size: 14px;
    }

    .admin-header {
        height: var(--app-header-height);
        padding: 0 0.75rem;
    }

    .admin-header #page-title {
        max-width: 58vw;
        font-size: 0.9rem;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .admin-header #header-brand-meta {
        display: none;
    }

    .admin-layout {
        min-height: calc(100dvh - var(--app-header-height)) !important;
    }

    .admin-sidebar {
        width: min(86vw, 320px);
        min-width: min(86vw, 320px);
    }

    .admin-page #admin-sidebar .admin-sidebar-nav {
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }

    .admin-page #admin-sidebar .sidebar-link {
        padding: 0.58rem 0.65rem;
        border-radius: 0.72rem;
        font-size: var(--pp5-type-body);
        gap: 0.5rem;
    }

    .admin-page #admin-sidebar .sidebar-link svg {
        width: 17px;
        height: 17px;
    }

    .admin-content {
        padding: 0.75rem;
    }

    .admin-footer {
        padding: 0.65rem 0.75rem;
    }

    .admin-page .overflow-x-auto table {
        font-size: var(--pp5-type-body);
    }

    .admin-page .overflow-x-auto th,
    .admin-page .overflow-x-auto td {
        white-space: nowrap;
    }

    #dashboard-view .student-main {
        max-width: 100% !important;
        padding-left: 0.7rem !important;
        padding-right: 0.7rem !important;
        padding-top: 0.75rem !important;
    }

    #dashboard-view .mobile-brand-title {
        max-width: 58vw;
        font-size: 0.95rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #dashboard-view #student-info-card > div {
        padding: 0.85rem !important;
        border-radius: 1rem !important;
    }

    #dashboard-view #stats-grid > div {
        min-height: 112px !important;
        padding: 0.8rem !important;
        border-radius: 1rem !important;
    }

    #dashboard-view #stats-grid p.text-5xl {
        font-size: 2rem !important;
    }

    #dashboard-view #stats-grid p.text-4xl {
        font-size: 1.5rem !important;
    }

    #dashboard-view .club-toolbar-shell {
        position: static;
        top: auto;
        padding: 0.5rem;
        border-radius: 0.85rem;
    }

    #dashboard-view .club-section-title {
        font-size: 1.15rem !important;
        line-height: 1.25;
    }

    #dashboard-view .club-section-subtitle {
        font-size: 0.78rem;
    }

    #dashboard-view #table-grid-container .grid {
        gap: 0.55rem !important;
    }

    #dashboard-view #table-grid-container button[data-course-id] {
        padding: 0.72rem !important;
        border-radius: 0.9rem !important;
    }

    #dashboard-view #table-grid-container button[data-course-id] h3 {
        font-size: 0.98rem !important;
        line-height: 1.3;
    }

    #table-modal {
        padding: 0.5rem !important;
    }

    #table-modal .club-modal-panel {
        width: 100%;
        max-width: none;
        max-height: 94dvh;
        border-radius: 1rem;
    }

    #table-modal .club-modal-header {
        padding: 0.7rem 0.75rem;
    }

    #table-modal .club-modal-title {
        font-size: 1rem !important;
    }

    #table-modal .club-modal-seat-info {
        margin-top: 0.2rem;
        padding: 0.14rem 0.45rem;
        font-size: 0.72rem !important;
    }

    #table-modal .club-modal-body {
        padding: 0.65rem !important;
    }

    .app-modal {
        padding: 0.5rem;
    }

    .modal-shell {
        width: 100%;
        max-height: 94dvh;
        border-radius: 16px;
    }

    input[type="text"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="date"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px !important;
    }

    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .swal2-popup {
        width: min(94vw, 420px) !important;
        padding: 0.9rem !important;
        border-radius: 0.95rem !important;
    }

    .swal2-title {
        font-size: 1.2rem !important;
        line-height: 1.3 !important;
    }

    .swal2-html-container {
        margin-top: 0.45rem !important;
        font-size: 0.88rem !important;
        line-height: 1.45 !important;
    }

    .swal2-actions .swal2-styled {
        min-height: 38px !important;
        padding: 0.5rem 0.95rem !important;
        font-size: 0.88rem !important;
        border-radius: 0.65rem !important;
    }

    #dashboard-view .club-toolbar-shell .flex {
        align-items: stretch;
        gap: 0.55rem;
    }

    #dashboard-view #content-search {
        min-height: 2.45rem;
        font-size: 0.9rem;
    }

    #dashboard-view .club-results-meta {
        font-size: 0.78rem;
    }

    .teacher-admin-page .course-detail-tabs {
        scrollbar-width: none;
    }

    .teacher-admin-page .course-detail-tabs::-webkit-scrollbar {
        display: none;
    }

    .teacher-admin-page .student-table-shell {
        border-radius: 0.9rem;
    }
}

@media (max-width: 420px) {
    .admin-header {
        padding: 0 0.55rem;
    }

    .admin-header #page-title {
        max-width: 52vw;
        font-size: 0.83rem;
    }

    .admin-page #admin-sidebar .sidebar-link {
        padding: 0.52rem 0.58rem;
        font-size: 0.79rem;
    }

    .admin-content {
        padding: 0.62rem;
    }

    #dashboard-view .student-main {
        padding-left: 0.55rem !important;
        padding-right: 0.55rem !important;
    }

    #dashboard-view #stats-grid > div {
        min-height: 100px !important;
        padding: 0.72rem !important;
    }

    #dashboard-view #table-grid-container button[data-course-id] {
        padding: 0.62rem !important;
    }

    #table-modal .club-modal-panel {
        border-radius: 0.85rem;
    }

    .swal2-popup {
        width: min(96vw, 360px) !important;
        padding: 0.75rem !important;
    }

    .swal2-title {
        font-size: 1.08rem !important;
    }

    .swal2-html-container {
        font-size: 0.83rem !important;
    }

    .swal2-actions .swal2-styled {
        min-height: 35px !important;
        padding: 0.45rem 0.76rem !important;
        font-size: 0.82rem !important;
    }

    #dashboard-view #content-search {
        min-height: 2.25rem;
        font-size: 0.84rem;
    }
}

/* =====================================================
   Student Dashboard - SaaS Layout Refresh
   ===================================================== */
#dashboard-view.dashboard-saas {
    position: relative;
    background: #f8fafc;
}

#dashboard-view.dashboard-saas::before,
#dashboard-view.dashboard-saas::after {
    content: none;
}

#dashboard-view.dashboard-saas .student-main {
    position: relative;
    z-index: 1;
}

#dashboard-view.dashboard-saas .club-toolbar-shell {
    border: 1px solid #d7e3f3;
    border-radius: 18px;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 28px -24px rgba(15, 23, 42, 0.32);
}

#dashboard-view.dashboard-saas .club-toolbar-note {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #dbe6f5;
}

#dashboard-view.dashboard-saas .club-results-meta {
    font-size: 0.8rem;
    color: #64748b;
}

#dashboard-view.dashboard-saas .saas-student-card {
    border: 1px solid #d7e3f3;
    border-radius: 18px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 16px 30px -26px rgba(15, 23, 42, 0.32);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#dashboard-view.dashboard-saas .saas-student-card--guest {
    justify-content: center;
}

#dashboard-view.dashboard-saas .saas-student-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

#dashboard-view.dashboard-saas .saas-student-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    border: 1px solid #d9e4f3;
    background: linear-gradient(140deg, #ffffff 0%, #eef3f9 100%);
    flex: 0 0 auto;
}

#dashboard-view.dashboard-saas .saas-student-avatar svg {
    width: 24px;
    height: 24px;
}

#dashboard-view.dashboard-saas .saas-student-kicker {
    margin: 0;
    color: #2563eb;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
}

#dashboard-view.dashboard-saas .saas-student-name {
    margin: 0.16rem 0 0;
    color: #0f172a;
    font-size: 1.02rem;
    line-height: 1.25;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-student-meta {
    margin: 0.18rem 0 0;
    color: #475569;
    font-size: 0.82rem;
    line-height: 1.35;
}

#dashboard-view.dashboard-saas .saas-student-tools {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

#dashboard-view.dashboard-saas .saas-student-select {
    flex: 1;
    min-height: 2.35rem;
    border-radius: 10px;
    border: 1px solid #dbe5f4;
    background: #ffffff;
    color: #334155;
    font-size: 0.84rem;
    padding: 0 0.72rem;
}

#dashboard-view.dashboard-saas .saas-student-select:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#dashboard-view.dashboard-saas .saas-student-clear {
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}

#dashboard-view.dashboard-saas .saas-student-clear:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

#dashboard-view.dashboard-saas .saas-student-scope {
    border: 1px solid #dbe6f5;
    border-radius: 12px;
    background: #f7fbff;
    padding: 0.62rem 0.72rem;
}

#dashboard-view.dashboard-saas .saas-student-scope p {
    margin: 0;
    color: #475569;
    font-size: 0.8rem;
    line-height: 1.35;
}

#dashboard-view.dashboard-saas .saas-student-advisors {
    border: 1px solid #dbe6f5;
    border-radius: 12px;
    background: #f8fbff;
    padding: 0.62rem 0.72rem;
}

#dashboard-view.dashboard-saas .saas-student-advisors-title {
    margin: 0;
    color: #1e3a8a;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
}

#dashboard-view.dashboard-saas .saas-student-advisors-empty {
    margin: 0.4rem 0 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
}

#dashboard-view.dashboard-saas .saas-student-advisors-list {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

#dashboard-view.dashboard-saas .saas-student-advisor-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    padding: 0.45rem 0.55rem;
}

#dashboard-view.dashboard-saas .saas-student-advisor-meta {
    min-width: 0;
}

#dashboard-view.dashboard-saas .saas-student-advisor-role {
    margin: 0;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 600;
}

#dashboard-view.dashboard-saas .saas-student-advisor-name {
    margin: 0.08rem 0 0;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#dashboard-view.dashboard-saas .saas-student-advisor-phone {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.65rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
}

#dashboard-view.dashboard-saas .saas-student-advisor-phone:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

#dashboard-view.dashboard-saas .saas-student-advisor-phone--empty {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

#dashboard-view.dashboard-saas .saas-student-login-btn {
    width: 100%;
    min-height: 2.35rem;
    border: 1px solid #1d4ed8;
    border-radius: 10px;
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    min-height: 150px;
    padding: 1rem;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 20px 36px -30px rgba(15, 23, 42, 0.5);
}

#dashboard-view.dashboard-saas .saas-stat-card--blue {
    background: linear-gradient(132deg, #5aa4ff 0%, #7db8ff 44%, #9ac5ff 100%);
}

#dashboard-view.dashboard-saas .saas-stat-card--cyan {
    background: linear-gradient(132deg, #37b7c6 0%, #2eb6bf 48%, #4ad8b8 100%);
}

#dashboard-view.dashboard-saas .saas-stat-card--green {
    background: linear-gradient(132deg, #7fd4a0 0%, #6ecb98 52%, #8ce2b4 100%);
}

#dashboard-view.dashboard-saas .saas-stat-glow {
    position: absolute;
    inset: auto;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 62%);
}

#dashboard-view.dashboard-saas .saas-stat-glow--left {
    top: -120px;
    right: -72px;
}

#dashboard-view.dashboard-saas .saas-stat-glow--center {
    top: -110px;
    right: -64px;
}

#dashboard-view.dashboard-saas .saas-stat-glow--right {
    top: -122px;
    right: -80px;
}

#dashboard-view.dashboard-saas .saas-stat-icon {
    position: absolute;
    right: 1rem;
    top: 0.9rem;
    opacity: 0.35;
}

#dashboard-view.dashboard-saas .saas-stat-icon svg {
    width: 46px;
    height: 46px;
}

#dashboard-view.dashboard-saas .saas-stat-value {
    margin: 0.2rem 0 0;
    font-size: 3.1rem;
    line-height: 1;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-stat-label {
    margin: 0.36rem 0 0;
    font-size: 1.03rem;
    line-height: 1.3;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-stat-card--compact {
    min-height: 112px;
    padding: 0.85rem 0.95rem;
}

#dashboard-view.dashboard-saas .saas-stat-card--compact .saas-stat-icon {
    right: 0.85rem;
    top: 0.75rem;
    opacity: 0.2;
}

#dashboard-view.dashboard-saas .saas-stat-card--compact .saas-stat-icon svg {
    width: 34px;
    height: 34px;
}

#dashboard-view.dashboard-saas .saas-stat-card--compact .saas-stat-label {
    margin-top: 0;
    font-size: 0.88rem;
}

#dashboard-view.dashboard-saas .saas-stat-card--compact .saas-stat-value {
    margin-top: 0.32rem;
    font-size: 2.35rem;
}

#dashboard-view.dashboard-saas .saas-stat-subtext {
    margin: 0.24rem 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.72rem;
    line-height: 1.35;
    font-weight: 600;
}

#dashboard-view.dashboard-saas .saas-stat-value-separator {
    margin: 0 0.08em;
    font-size: 0.72em;
    opacity: 0.86;
}

#dashboard-view.dashboard-saas .saas-donut {
    --thickness: 9px;
    position: absolute;
    right: 0.9rem;
    top: 0.65rem;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: conic-gradient(#1f9d66 var(--progress), rgba(255, 255, 255, 0.52) 0);
}

#dashboard-view.dashboard-saas .saas-donut::after {
    content: '';
    position: absolute;
    inset: var(--thickness);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
}

#dashboard-view.dashboard-saas .saas-donut-center {
    position: relative;
    z-index: 1;
    margin-top: 0.48rem;
}

#dashboard-view.dashboard-saas .saas-donut-value {
    margin: 0;
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-donut-value span {
    opacity: 0.8;
}

#dashboard-view.dashboard-saas .saas-donut-label {
    margin: 0.3rem 0 0;
    font-size: 0.94rem;
    line-height: 1.3;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-course-table {
    border: 1px solid #d7e3f3;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 32px -28px rgba(15, 23, 42, 0.35);
}

#dashboard-view.dashboard-saas .saas-course-head {
    display: grid;
    grid-template-columns: 2.35fr 0.9fr 1.75fr 1.35fr 0.92fr;
    gap: 0;
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid #dbe6f5;
    background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
    color: #475569;
    font-size: 0.77rem;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-course-head span:last-child {
    text-align: right;
}

#dashboard-view.dashboard-saas .saas-course-body {
    display: flex;
    flex-direction: column;
}

#dashboard-view.dashboard-saas .saas-course-row {
    display: grid;
    grid-template-columns: 2.35fr 0.9fr 1.75fr 1.35fr 0.92fr;
    gap: 0;
    width: 100%;
    border: 0;
    border-bottom: 1px solid #e5edf8;
    background: transparent;
    padding: 0.8rem 0.9rem;
    text-align: left;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

#dashboard-view.dashboard-saas .saas-course-row:last-child {
    border-bottom: 0;
}

#dashboard-view.dashboard-saas .saas-course-row:hover {
    background: #f8fbff;
}

#dashboard-view.dashboard-saas .saas-course-cell {
    padding: 0 0.45rem;
    min-width: 0;
}

#dashboard-view.dashboard-saas .saas-course-mobile-label {
    display: none;
    margin: 0 0 0.24rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-course-kicker {
    margin: 0;
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-course-title {
    margin: 0.2rem 0 0;
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.28;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-course-room,
#dashboard-view.dashboard-saas .saas-course-teacher {
    margin: 0;
    color: #0f172a;
    font-size: 0.85rem;
    line-height: 1.35;
    font-weight: 600;
}

#dashboard-view.dashboard-saas .saas-course-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    font-size: 0.78rem;
    line-height: 1.25;
}

#dashboard-view.dashboard-saas .saas-course-stat + .saas-course-stat {
    margin-top: 0.15rem;
}

#dashboard-view.dashboard-saas .saas-course-stat strong {
    color: #0f172a;
    font-size: 0.82rem;
}

#dashboard-view.dashboard-saas .saas-progress-wrap {
    display: grid;
    gap: 0.24rem;
    margin-bottom: 0.34rem;
}

#dashboard-view.dashboard-saas .saas-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    color: #475569;
    font-size: 0.74rem;
    line-height: 1.2;
    font-weight: 600;
}

#dashboard-view.dashboard-saas .saas-progress-head strong {
    font-size: 0.82rem;
    font-weight: 800;
    color: #1d4ed8;
}

#dashboard-view.dashboard-saas .saas-progress-track {
    height: 7px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
}

#dashboard-view.dashboard-saas .saas-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 100%);
}

#dashboard-view.dashboard-saas .saas-progress-meta {
    margin: 0;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.28;
    font-weight: 600;
}

#dashboard-view.dashboard-saas .saas-progress-meta--secondary {
    margin-top: 0.38rem;
}

#dashboard-view.dashboard-saas .saas-progress-wrap--attendance .saas-progress-head strong {
    color: #15803d;
}

#dashboard-view.dashboard-saas .saas-progress-wrap--attendance .saas-progress-track {
    background: #dcfce7;
}

#dashboard-view.dashboard-saas .saas-progress-wrap--attendance .saas-progress-fill {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

#dashboard-view.dashboard-saas .saas-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.2rem 0.5rem;
    font-size: 0.69rem;
    line-height: 1.1;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-chip--idle {
    color: #475569;
    border-color: #cbd5e1;
    background: #f8fafc;
}

#dashboard-view.dashboard-saas .saas-chip--warning {
    color: #b45309;
    border-color: #fcd34d;
    background: #fef3c7;
}

#dashboard-view.dashboard-saas .saas-chip--success {
    color: #15803d;
    border-color: #86efac;
    background: #dcfce7;
}

#dashboard-view.dashboard-saas .saas-course-cell--action {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

#dashboard-view.dashboard-saas .saas-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.36rem 0.66rem;
}

#dashboard-view.dashboard-saas .saas-action-btn svg {
    width: 14px;
    height: 14px;
}

#dashboard-view.dashboard-saas .saas-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    border-radius: 24px;
    border: 1px solid #d7e3f3;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 18px 36px -28px rgba(15, 23, 42, 0.28);
}

#dashboard-view.dashboard-saas .saas-banner--ok {
    background: linear-gradient(135deg, #f8fffb 0%, #ecfdf5 100%);
    border-color: #bbf7d0;
}

#dashboard-view.dashboard-saas .saas-banner--alert {
    background: linear-gradient(135deg, #fff8f1 0%, #fff1f2 100%);
    border-color: #fdba74;
}

#dashboard-view.dashboard-saas .saas-banner-copy {
    display: grid;
    gap: 0.28rem;
}

#dashboard-view.dashboard-saas .saas-banner-kicker {
    margin: 0;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#dashboard-view.dashboard-saas .saas-banner-title {
    margin: 0;
    color: #0f172a;
    font-size: 1.2rem;
    line-height: 1.3;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-banner-text {
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.55;
    font-weight: 600;
}

#dashboard-view.dashboard-saas .saas-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

#dashboard-view.dashboard-saas .saas-banner-chip,
#dashboard-view.dashboard-saas .saas-banner-btn,
#dashboard-view.dashboard-saas .saas-text-link,
#dashboard-view.dashboard-saas .saas-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.76rem;
    line-height: 1.2;
    font-weight: 800;
    white-space: nowrap;
}

#dashboard-view.dashboard-saas .saas-banner-chip {
    border: 1px solid #86efac;
    background: #dcfce7;
    color: #166534;
    padding: 0.52rem 0.82rem;
}

#dashboard-view.dashboard-saas .saas-banner-btn {
    border: 1px solid #cbd5e1;
    background: rgba(255, 255, 255, 0.9);
    color: #334155;
    padding: 0.6rem 0.92rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#dashboard-view.dashboard-saas .saas-banner-btn:hover {
    background: #ffffff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

#dashboard-view.dashboard-saas .saas-banner-btn--primary {
    border-color: #2563eb;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
}

#dashboard-view.dashboard-saas .saas-banner-btn--primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    color: #ffffff;
}

#dashboard-view.dashboard-saas .saas-exec-card {
    display: grid;
    gap: 1rem;
    height: 100%;
    min-height: 176px;
    border: 1px solid #d7e3f3;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    padding: 1.15rem 1.2rem;
    box-shadow: 0 18px 32px -28px rgba(15, 23, 42, 0.35);
}

#dashboard-view.dashboard-saas .saas-exec-card--metric {
    min-height: 176px;
}

#dashboard-view.dashboard-saas .saas-exec-head {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

#dashboard-view.dashboard-saas .saas-exec-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 18px;
    flex: 0 0 auto;
}

#dashboard-view.dashboard-saas .saas-exec-icon svg {
    width: 1.45rem;
    height: 1.45rem;
}

#dashboard-view.dashboard-saas .saas-exec-icon--blue {
    background: #dbeafe;
    color: #1d4ed8;
}

#dashboard-view.dashboard-saas .saas-exec-icon--indigo {
    background: #e0e7ff;
    color: #4338ca;
}

#dashboard-view.dashboard-saas .saas-exec-icon--green {
    background: #dcfce7;
    color: #15803d;
}

#dashboard-view.dashboard-saas .saas-exec-icon--amber {
    background: #fef3c7;
    color: #b45309;
}

#dashboard-view.dashboard-saas .saas-exec-label {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.25;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-exec-value {
    margin: 0.2rem 0 0;
    color: #0f172a;
    font-size: 2.2rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.03em;
}

#dashboard-view.dashboard-saas .saas-exec-meta {
    margin: 0.38rem 0 0;
    color: #475569;
    font-size: 0.78rem;
    line-height: 1.45;
    font-weight: 600;
}

#dashboard-view.dashboard-saas .saas-exec-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-top: auto;
}

#dashboard-view.dashboard-saas .saas-text-link {
    border: 0;
    background: transparent;
    color: #1d4ed8;
    padding: 0;
}

#dashboard-view.dashboard-saas .saas-text-link:hover {
    color: #1e40af;
}

#dashboard-view.dashboard-saas .saas-status-badge {
    gap: 0.3rem;
    border: 1px solid transparent;
    padding: 0.42rem 0.72rem;
}

#dashboard-view.dashboard-saas .saas-status-badge--success {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

#dashboard-view.dashboard-saas .saas-status-badge--warning {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #b45309;
}

#dashboard-view.dashboard-saas .saas-status-badge--danger {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

#dashboard-view.dashboard-saas .saas-status-badge--neutral {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

#dashboard-view.dashboard-saas .saas-progress-wrap--thick {
    gap: 0.34rem;
}

#dashboard-view.dashboard-saas .saas-progress-track--thick {
    height: 10px;
    background: #e2e8f0;
}

#dashboard-view.dashboard-saas .saas-progress-fill--success {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

#dashboard-view.dashboard-saas .saas-progress-fill--warning {
    background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
}

#dashboard-view.dashboard-saas .saas-progress-fill--danger {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

#dashboard-view.dashboard-saas .saas-insights--executive {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr) minmax(0, 1fr);
}

#dashboard-view.dashboard-saas .saas-insight-card--executive {
    padding: 1rem 1.05rem;
}

#dashboard-view.dashboard-saas .saas-insight-head--executive {
    margin-bottom: 0.8rem;
}

#dashboard-view.dashboard-saas .saas-insight-pill {
    padding: 0.4rem 0.72rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

#dashboard-view.dashboard-saas .saas-insight-pill--soft {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #0f766e;
}

#dashboard-view.dashboard-saas .saas-insight-pill--success {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

#dashboard-view.dashboard-saas .saas-insight-pill--danger {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

#dashboard-view.dashboard-saas .saas-chart-shell {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

#dashboard-view.dashboard-saas .saas-chart-shell--bar {
    padding: 0.55rem 0.7rem 0.4rem;
}

#dashboard-view.dashboard-saas .saas-chart {
    min-height: 220px;
}

#dashboard-view.dashboard-saas .saas-chart--bar {
    min-height: 260px;
}

#dashboard-view.dashboard-saas .saas-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

#dashboard-view.dashboard-saas .saas-kpi-grid--inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#dashboard-view.dashboard-saas .saas-kpi-tile {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fbff;
    padding: 0.65rem 0.72rem;
}

#dashboard-view.dashboard-saas .saas-kpi-tile span {
    display: block;
    margin: 0;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
}

#dashboard-view.dashboard-saas .saas-kpi-tile strong {
    display: block;
    margin-top: 0.16rem;
    color: #0f172a;
    font-size: 1.2rem;
    line-height: 1.15;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-kpi-tile small {
    display: block;
    margin-top: 0.22rem;
    color: #475569;
    font-size: 0.68rem;
    line-height: 1.35;
    font-weight: 600;
}

#dashboard-view.dashboard-saas .saas-risk-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

#dashboard-view.dashboard-saas .saas-risk-summary-box {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    padding: 0.62rem 0.72rem;
}

#dashboard-view.dashboard-saas .saas-risk-summary-box span {
    display: block;
    color: #64748b;
    font-size: 0.7rem;
    line-height: 1.3;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-risk-summary-box strong {
    display: block;
    margin-top: 0.16rem;
    color: #0f172a;
    font-size: 1.24rem;
    line-height: 1.1;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-risk-summary-box--danger {
    background: #fff1f2;
    border-color: #fecdd3;
}

#dashboard-view.dashboard-saas .saas-risk-summary-box--warning {
    background: #fff7ed;
    border-color: #fdba74;
}

#dashboard-view.dashboard-saas .saas-risk-summary-box--neutral {
    background: #f8fbff;
    border-color: #bfdbfe;
}

#dashboard-view.dashboard-saas .saas-risk-list {
    display: grid;
    gap: 0.5rem;
}

#dashboard-view.dashboard-saas .saas-risk-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    padding: 0.72rem 0.8rem;
}

#dashboard-view.dashboard-saas .saas-risk-item--danger {
    border-color: #fecaca;
    background: #fff5f5;
}

#dashboard-view.dashboard-saas .saas-risk-item--warning {
    border-color: #fcd34d;
    background: #fffbeb;
}

#dashboard-view.dashboard-saas .saas-risk-item-title {
    margin: 0;
    color: #0f172a;
    font-size: 0.8rem;
    line-height: 1.3;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-risk-item-meta {
    margin: 0.16rem 0 0;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.4;
    font-weight: 600;
}

#dashboard-view.dashboard-saas .saas-risk-empty {
    margin: 0;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.45;
    padding: 0.9rem 1rem;
}

#dashboard-view.dashboard-saas .saas-group-stack {
    display: grid;
    gap: 1rem;
}

#dashboard-view.dashboard-saas .saas-group-card {
    border: 1px solid #d7e3f3;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 40px -32px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

#dashboard-view.dashboard-saas .saas-group-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem 0.95rem;
    border-bottom: 1px solid #e5edf8;
}

#dashboard-view.dashboard-saas .saas-group-heading {
    min-width: 0;
}

#dashboard-view.dashboard-saas .saas-group-kicker {
    margin: 0;
    color: #2563eb;
    font-size: 0.75rem;
    line-height: 1.2;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#dashboard-view.dashboard-saas .saas-group-title {
    margin: 0.22rem 0 0;
    color: #0f172a;
    font-size: 1.08rem;
    line-height: 1.3;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-group-meta,
#dashboard-view.dashboard-saas .saas-group-summary-text,
#dashboard-view.dashboard-saas .saas-group-note {
    margin: 0.24rem 0 0;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.45;
    font-weight: 600;
}

#dashboard-view.dashboard-saas .saas-group-summary {
    display: grid;
    justify-items: end;
    text-align: right;
    min-width: 160px;
}

#dashboard-view.dashboard-saas .saas-group-table {
    padding: 0 1.1rem 1rem;
}

#dashboard-view.dashboard-saas .saas-group-table-head,
#dashboard-view.dashboard-saas .saas-group-row {
    display: grid;
    grid-template-columns: 0.72fr 2.2fr 1.2fr 0.9fr;
    gap: 0.8rem;
    align-items: center;
}

#dashboard-view.dashboard-saas .saas-group-table-head {
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 800;
    padding: 0.75rem 0.1rem 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#dashboard-view.dashboard-saas .saas-group-table-body {
    display: grid;
}

#dashboard-view.dashboard-saas .saas-group-row {
    border-top: 1px solid #e5edf8;
    padding: 0.88rem 0.1rem;
}

#dashboard-view.dashboard-saas .saas-group-cell {
    min-width: 0;
}

#dashboard-view.dashboard-saas .saas-group-cell--action {
    display: flex;
    justify-content: flex-end;
}

#dashboard-view.dashboard-saas .saas-room-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.44rem 0.7rem;
    font-size: 0.78rem;
    line-height: 1.1;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-empty-state {
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    padding: 2rem 1.1rem;
    text-align: center;
}

@media (max-width: 1279px) {
    #dashboard-view.dashboard-saas .saas-course-head,
    #dashboard-view.dashboard-saas .saas-course-row {
        grid-template-columns: 2.2fr 0.95fr 1.65fr 1.25fr 0.92fr;
    }

    #dashboard-view.dashboard-saas .saas-insights--executive {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1023px) {
    #dashboard-view.dashboard-saas .saas-course-head {
        display: none;
    }

    #dashboard-view.dashboard-saas .saas-course-row {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        border-bottom: 1px solid #dce8f6;
    }

    #dashboard-view.dashboard-saas .saas-course-cell {
        padding: 0;
    }

    #dashboard-view.dashboard-saas .saas-course-mobile-label {
        display: block;
    }

    #dashboard-view.dashboard-saas .saas-course-cell--action {
        justify-content: flex-start;
    }

    #dashboard-view.dashboard-saas .saas-banner {
        grid-template-columns: 1fr;
    }

    #dashboard-view.dashboard-saas .saas-banner-actions,
    #dashboard-view.dashboard-saas .saas-group-summary {
        justify-content: flex-start;
        justify-items: start;
        text-align: left;
    }

    #dashboard-view.dashboard-saas .saas-kpi-grid,
    #dashboard-view.dashboard-saas .saas-kpi-grid--inline,
    #dashboard-view.dashboard-saas .saas-risk-summary-grid {
        grid-template-columns: 1fr;
    }

    #dashboard-view.dashboard-saas .saas-group-header {
        grid-template-columns: 1fr;
        display: grid;
    }

    #dashboard-view.dashboard-saas .saas-group-table-head {
        display: none;
    }

    #dashboard-view.dashboard-saas .saas-group-row {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    #dashboard-view.dashboard-saas .saas-group-cell--action {
        justify-content: flex-start;
    }

    #dashboard-view.dashboard-saas .saas-stat-card {
        min-height: 132px;
    }

    #dashboard-view.dashboard-saas .saas-donut {
        width: 78px;
        height: 78px;
    }

    #dashboard-view.dashboard-saas .saas-donut-value {
        font-size: 1.78rem;
    }
}

@media (max-width: 640px) {
    #dashboard-view.dashboard-saas::before,
    #dashboard-view.dashboard-saas::after {
        opacity: 0.13;
    }

    #dashboard-view.dashboard-saas .student-main {
        padding-left: 0.7rem !important;
        padding-right: 0.7rem !important;
        padding-top: 0.75rem !important;
    }

    #dashboard-view.dashboard-saas .saas-student-card,
    #dashboard-view.dashboard-saas .saas-stat-card,
    #dashboard-view.dashboard-saas .club-toolbar-shell,
    #dashboard-view.dashboard-saas .saas-course-table,
    #dashboard-view.dashboard-saas .saas-empty-state {
        border-radius: 14px;
    }

    #dashboard-view.dashboard-saas .saas-stat-value {
        font-size: 2.45rem;
    }

    #dashboard-view.dashboard-saas .saas-stat-label {
        font-size: 0.92rem;
    }

    #dashboard-view.dashboard-saas .saas-donut {
        right: 0.75rem;
        top: 0.58rem;
    }

    #dashboard-view.dashboard-saas .saas-course-title {
        font-size: 0.95rem;
    }

    #dashboard-view.dashboard-saas .saas-action-btn {
        font-size: 0.74rem;
        padding: 0.32rem 0.58rem;
    }

    #dashboard-view.dashboard-saas .saas-banner,
    #dashboard-view.dashboard-saas .saas-exec-card,
    #dashboard-view.dashboard-saas .saas-group-card {
        border-radius: 18px;
    }

    #dashboard-view.dashboard-saas .saas-banner-title {
        font-size: 1.02rem;
    }

    #dashboard-view.dashboard-saas .saas-exec-value {
        font-size: 1.9rem;
    }

    #dashboard-view.dashboard-saas .saas-group-title {
        font-size: 0.96rem;
    }
}

/* Insights charts */
#dashboard-view.dashboard-saas .saas-insights {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

#dashboard-view.dashboard-saas .saas-insight-card {
    border: 1px solid #d7e3f3;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 14px 28px -24px rgba(15, 23, 42, 0.35);
    padding: 0.9rem 1rem;
}

#dashboard-view.dashboard-saas .saas-insight-summary {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

#dashboard-view.dashboard-saas .saas-insight-title {
    margin: 0;
    color: #0f172a;
    font-size: 0.94rem;
    line-height: 1.25;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-insight-subtitle {
    margin: 0.14rem 0 0;
    color: #64748b;
    font-size: 0.75rem;
}

#dashboard-view.dashboard-saas .saas-insight-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}

#dashboard-view.dashboard-saas .saas-insight-metric {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fbff;
    padding: 0.5rem 0.56rem;
}

#dashboard-view.dashboard-saas .saas-insight-metric span {
    display: block;
    color: #64748b;
    font-size: 0.7rem;
    line-height: 1.2;
    margin-bottom: 0.1rem;
}

#dashboard-view.dashboard-saas .saas-insight-metric strong {
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.2;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-insight-metric small {
    display: block;
    margin-top: 0.14rem;
    color: #64748b;
    font-size: 0.63rem;
    line-height: 1.3;
    font-weight: 600;
}

#dashboard-view.dashboard-saas .saas-insight-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

#dashboard-view.dashboard-saas .saas-insight-status-box {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fbff;
    padding: 0.42rem 0.5rem;
}

#dashboard-view.dashboard-saas .saas-insight-status-box--good {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

#dashboard-view.dashboard-saas .saas-insight-status-box--risk {
    border-color: #fecaca;
    background: #fef2f2;
}

#dashboard-view.dashboard-saas .saas-insight-status-title {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    color: #0f172a;
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-insight-status-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
    padding: 0 0.32rem;
}

#dashboard-view.dashboard-saas .saas-insight-status-list {
    margin: 0.34rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.3rem;
}

#dashboard-view.dashboard-saas .saas-insight-status-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    padding: 0.28rem 0.34rem;
}

#dashboard-view.dashboard-saas .saas-insight-status-name {
    margin: 0;
    color: #1e293b;
    font-size: 0.69rem;
    line-height: 1.25;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-insight-status-chips {
    margin-top: 0.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}

#dashboard-view.dashboard-saas .saas-insight-status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    padding: 0.1rem 0.38rem;
    font-size: 0.62rem;
    line-height: 1.2;
    font-weight: 700;
    color: #334155;
    background: #f8fafc;
}

#dashboard-view.dashboard-saas .saas-insight-status-chip--good {
    border-color: #86efac;
    background: #dcfce7;
    color: #166534;
}

#dashboard-view.dashboard-saas .saas-insight-status-chip--risk {
    border-color: #fca5a5;
    background: #fee2e2;
    color: #991b1b;
}

#dashboard-view.dashboard-saas .saas-insight-status-empty {
    margin: 0.36rem 0 0;
    color: #64748b;
    font-size: 0.67rem;
    line-height: 1.3;
    font-weight: 600;
}

#dashboard-view.dashboard-saas .saas-insight-status-note {
    margin: 0.28rem 0 0;
    color: #991b1b;
    font-size: 0.64rem;
    line-height: 1.25;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-insight-progress {
    margin-top: 0.1rem;
}

#dashboard-view.dashboard-saas .saas-insight-progress-track {
    height: 8px;
    border-radius: 999px;
    background: #dce6f5;
    overflow: hidden;
}

#dashboard-view.dashboard-saas .saas-insight-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
}

#dashboard-view.dashboard-saas .saas-insight-progress p {
    margin: 0.28rem 0 0;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 600;
}

#dashboard-view.dashboard-saas .saas-insight-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}

#dashboard-view.dashboard-saas .saas-insight-head span {
    color: #334155;
    font-size: 0.74rem;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-insights--compact {
    grid-template-columns: 1fr;
}

#dashboard-view.dashboard-saas .saas-insight-card--compact {
    padding: 0.85rem 0.95rem;
}

#dashboard-view.dashboard-saas .saas-insight-head--compact {
    margin-bottom: 0.55rem;
}

#dashboard-view.dashboard-saas .saas-insight-metrics--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0.65rem;
}

#dashboard-view.dashboard-saas .saas-insight-progress--compact {
    margin-bottom: 0.7rem;
}

#dashboard-view.dashboard-saas .saas-insight-brief-box {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fbff;
    padding: 0.7rem 0.8rem;
}

#dashboard-view.dashboard-saas .saas-insight-brief-box--risk {
    border-color: #fecaca;
    background: #fff5f5;
}

#dashboard-view.dashboard-saas .saas-insight-brief-box--neutral {
    border-color: #cbd5e1;
    background: #f8fafc;
}

#dashboard-view.dashboard-saas .saas-insight-brief-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

#dashboard-view.dashboard-saas .saas-insight-brief-head p {
    margin: 0;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-insight-brief-head span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    padding: 0 0.38rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.68rem;
    font-weight: 800;
}

#dashboard-view.dashboard-saas .saas-insight-brief-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.42rem;
}

#dashboard-view.dashboard-saas .saas-insight-brief-item {
    display: grid;
    gap: 0.14rem;
}

#dashboard-view.dashboard-saas .saas-insight-brief-item strong {
    color: #1e293b;
    font-size: 0.76rem;
    line-height: 1.25;
    font-weight: 700;
}

#dashboard-view.dashboard-saas .saas-insight-brief-item span,
#dashboard-view.dashboard-saas .saas-insight-brief-empty,
#dashboard-view.dashboard-saas .saas-insight-brief-note {
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.4;
    margin: 0;
}

@media (max-width: 1023px) {
    #dashboard-view.dashboard-saas .saas-insight-metrics--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

#dashboard-view.dashboard-saas .saas-chart-canvas {
    min-height: 220px;
}

#dashboard-view.dashboard-saas .saas-chart-fallback {
    margin: 0;
    min-height: 220px;
    display: grid;
    place-items: center;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 600;
}

@media (max-width: 1180px) {
    #dashboard-view.dashboard-saas .saas-insights {
        grid-template-columns: 1fr;
    }

    #dashboard-view.dashboard-saas .saas-chart-canvas {
        min-height: 210px;
    }
}

@media (max-width: 640px) {
    #dashboard-view.dashboard-saas .saas-insight-card {
        border-radius: 14px;
        padding: 0.76rem 0.8rem;
    }

    #dashboard-view.dashboard-saas .saas-stat-card--compact {
        min-height: 100px;
    }

    #dashboard-view.dashboard-saas .saas-stat-card--compact .saas-stat-value {
        font-size: 2rem;
    }

    #dashboard-view.dashboard-saas .saas-insight-metrics {
        grid-template-columns: 1fr 1fr;
    }

    #dashboard-view.dashboard-saas .saas-insight-metrics--compact {
        grid-template-columns: 1fr 1fr;
    }

    #dashboard-view.dashboard-saas .saas-insight-status-grid {
        grid-template-columns: 1fr;
    }

    #dashboard-view.dashboard-saas .saas-insight-brief-grid {
        grid-template-columns: 1fr;
    }

    #dashboard-view.dashboard-saas .saas-chart-canvas {
        min-height: 195px;
    }
}

/* Student score visibility toggle */
.saas-score-toggle {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.9rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.saas-score-toggle-title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}

.saas-score-toggle-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}

.saas-score-toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.saas-score-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.saas-score-toggle-track {
    width: 46px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #e2e8f0;
    display: inline-flex;
    align-items: center;
    padding: 2px;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.saas-score-toggle-thumb {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.15);
    transform: translateX(0);
    transition: transform 0.2s ease;
}

.saas-score-toggle-input:checked + .saas-score-toggle-track {
    background: #2563eb;
    border-color: #1d4ed8;
}

.saas-score-toggle-input:checked + .saas-score-toggle-track .saas-score-toggle-thumb {
    transform: translateX(20px);
}

.saas-score-toggle-input:focus-visible + .saas-score-toggle-track {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

@media (max-width: 640px) {
    .saas-score-toggle {
        padding: 0.6rem 0.65rem;
    }

    .saas-score-toggle-title {
        font-size: 0.78rem;
    }

    .saas-score-toggle-subtitle {
        font-size: 0.68rem;
    }
}

