.internal-page {
    --internal-primary: #2c247c;
    --internal-border: rgba(44, 36, 124, 0.1);
    --internal-shadow: 0 18px 45px rgba(31, 41, 64, 0.08);
    --internal-text: #1f2940;
    --internal-muted: #667085;
}

.internal-page .internal-card,
.internal-page .internal-hero {
    border: 1px solid var(--internal-border);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--internal-shadow);
}

.internal-page .internal-hero {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.internal-page .internal-hero-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.internal-page .internal-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.45rem;
}

.internal-page .internal-heading-main {
    min-width: 0;
}

.internal-page .internal-title {
    color: var(--internal-text);
    font-size: clamp(1.2rem, 1.45vw, 1.55rem);
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.internal-page .internal-title-icon {
    color: var(--internal-primary);
    margin-right: 0.55rem;
}

.internal-page .internal-subtitle {
    color: var(--internal-muted);
    margin-bottom: 0;
}

.internal-page .internal-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    color: var(--internal-muted);
    font-size: 0.9rem;
}

.internal-page .internal-breadcrumb a {
    color: var(--internal-text);
    text-decoration: none;
}

.internal-page .internal-breadcrumb a:hover {
    color: var(--internal-primary);
}

.internal-page .internal-breadcrumb .is-current {
    color: #8c93a8;
}

.internal-page .internal-back {
    white-space: nowrap;
    font-size: 0.88rem;
    padding: 0.4rem 0.85rem;
}

.internal-page .internal-status-alert {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(220, 38, 38, 0.08);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    color: var(--internal-text);
}

.internal-page .internal-status-alert-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.internal-page .internal-status-alert-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.internal-page .internal-status-alert-text,
.internal-page .internal-status-alert-reason {
    display: block;
    line-height: 1.45;
}

.internal-page .internal-status-alert-reason {
    color: var(--internal-muted);
}

.internal-list-page {
    --list-border: rgba(44, 36, 124, 0.1);
    --list-shadow: 0 18px 45px rgba(31, 41, 64, 0.08);
    --list-text: #1f2940;
    --list-muted: #667085;
    --list-primary: #2c247c;
}

.internal-list-page .list-table-card {
    border: 1px solid var(--list-border);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--list-shadow);
    padding: 1.5rem;
}

.internal-list-page .list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.internal-list-page .list-search-form {
    display: flex;
    align-items: stretch;
    gap: 0.9rem;
    flex-wrap: wrap;
    width: 100%;
}

.internal-list-page .list-search-shell {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1 1 520px;
    min-height: 58px;
    padding: 0.5rem 0.6rem 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(44, 36, 124, 0.12);
    background: linear-gradient(180deg, rgba(248, 249, 255, 0.98), rgba(255, 255, 255, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 30px rgba(31, 41, 64, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.internal-list-page .list-search-shell:focus-within {
    border-color: rgba(44, 36, 124, 0.28);
    box-shadow: 0 0 0 4px rgba(81, 99, 255, 0.08), 0 18px 35px rgba(31, 41, 64, 0.1);
    transform: translateY(-1px);
}

.internal-list-page .list-search-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(81, 99, 255, 0.1);
    color: var(--list-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.internal-list-page .list-search-form .form-control {
    min-width: 0;
    flex: 1 1 auto;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    font-size: 1rem;
    color: var(--list-text);
}

.internal-list-page .list-search-form .form-control:focus {
    box-shadow: none;
    background: transparent;
}

.internal-list-page .list-search-form .form-control::placeholder {
    color: #7b8498;
}

.internal-list-page .list-search-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding-left: 0.85rem;
    border-left: 1px solid rgba(44, 36, 124, 0.1);
    color: var(--list-muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.internal-list-page .list-search-meta i {
    color: var(--list-primary);
}

.internal-list-page .list-search-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.internal-list-page .list-search-form .btn {
    border-radius: 999px;
    min-height: 48px;
    padding-inline: 1.1rem;
}

.internal-list-page .list-search-submit {
    min-width: 120px;
    box-shadow: 0 12px 24px rgba(81, 99, 255, 0.18);
}

.internal-list-page .list-search-clear {
    min-width: 48px;
    padding-inline: 0.9rem;
}

.internal-list-page .list-table-card.is-live-search-loading .list-search-shell {
    opacity: 0.86;
}

.internal-list-page .list-table-card.is-live-search-loading .list-search-icon {
    animation: list-search-pulse 1s ease-in-out infinite;
}

.internal-list-page .list-table {
    margin-bottom: 0;
}

.internal-list-page .list-table thead th {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--list-text);
    border-bottom-color: rgba(44, 36, 124, 0.1);
    white-space: nowrap;
}

.internal-list-page .list-table tbody td {
    vertical-align: middle;
    color: var(--list-text);
    border-bottom-color: rgba(44, 36, 124, 0.08);
}

.internal-list-page .list-table tbody tr {
    transition: background-color 0.2s ease;
}

.internal-list-page .list-table tbody tr:hover {
    background: rgba(44, 36, 124, 0.03);
}

.internal-list-page .list-muted {
    color: var(--list-muted);
}

.internal-list-page .list-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5163ff, #8b5cf6);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.internal-list-page .list-name {
    font-weight: 600;
    color: var(--list-text);
}

.internal-list-page .list-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.internal-list-page .list-status.is-success {
    background: rgba(16, 185, 129, 0.12);
    color: #0f766e;
}

.internal-list-page .list-status.is-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.internal-list-page .list-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
}

.internal-list-page .list-empty {
    border: 1px dashed rgba(44, 36, 124, 0.16);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--list-muted);
    background: rgba(255, 255, 255, 0.7);
}

.internal-list-page .list-empty i {
    color: var(--list-primary);
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: inline-flex;
}

.internal-list-page .pagination {
    margin-bottom: 0;
}

.dashboard-home {
    --dashboard-primary: #2c247c;
    --dashboard-primary-soft: #f2efff;
    --dashboard-text: #1f2940;
    --dashboard-muted: #667085;
    --dashboard-border: rgba(44, 36, 124, 0.1);
    --dashboard-shadow: 0 18px 45px rgba(31, 41, 64, 0.08);
}

.dashboard-home .office-banner,
.dashboard-home .shortcut-card,
.dashboard-home .metric-card,
.dashboard-home .chart-card {
    border: 1px solid var(--dashboard-border);
    border-radius: 28px;
    box-shadow: var(--dashboard-shadow);
    background: rgba(255, 255, 255, 0.94);
}

.dashboard-home .office-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
}

.dashboard-home .office-banner-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    justify-content: flex-end;
}

.dashboard-home .office-banner-text {
    color: var(--dashboard-muted);
    font-size: 0.95rem;
    text-align: right;
}

.dashboard-home .office-banner .btn {
    border-radius: 999px;
    padding-inline: 1.25rem;
    white-space: nowrap;
    background: var(--dashboard-primary);
    border-color: var(--dashboard-primary);
    box-shadow: 0 12px 24px rgba(44, 36, 124, 0.18);
}

.dashboard-home .status-pill-alert {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(220, 38, 38, 0.08);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    color: #1f2940;
    margin-bottom: 1rem;
}

.dashboard-home .status-pill-alert-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.dashboard-home .status-pill-alert strong {
    font-weight: 700;
}

.dashboard-home .status-pill-alert-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.dashboard-home .status-pill-alert-text,
.dashboard-home .status-pill-alert-reason {
    display: block;
    line-height: 1.45;
}

.dashboard-home .status-pill-alert-reason {
    color: var(--dashboard-muted);
}

.dashboard-home .shortcut-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-home .shortcut-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    min-height: 148px;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.dashboard-home .shortcut-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 26px 42px rgba(31, 41, 64, 0.14);
    border-color: rgba(44, 36, 124, 0.2);
}

.dashboard-home .shortcut-card.is-disabled {
    opacity: 0.82;
    cursor: not-allowed;
}

.dashboard-home .shortcut-card.is-disabled:hover {
    transform: none;
    box-shadow: var(--dashboard-shadow);
}

.dashboard-home .shortcut-icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.72), 0 14px 28px rgba(31, 41, 64, 0.12);
}

.dashboard-home .shortcut-body {
    min-width: 0;
    flex: 1;
}

.dashboard-home .shortcut-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin-bottom: 0.35rem;
}

.dashboard-home .shortcut-description {
    font-size: 0.96rem;
    line-height: 1.45;
    color: var(--dashboard-muted);
    margin-bottom: 0.85rem;
}

.dashboard-home .shortcut-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dashboard-home .shortcut-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.dashboard-home .shortcut-badge.is-primary {
    background: rgba(44, 36, 124, 0.1);
    color: var(--dashboard-primary);
}

.dashboard-home .shortcut-badge.is-success {
    background: rgba(16, 185, 129, 0.12);
    color: #0f766e;
}

.dashboard-home .shortcut-badge.is-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.dashboard-home .shortcut-badge.is-muted {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

.dashboard-home .shortcut-arrow {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8f7ff;
    color: var(--dashboard-primary);
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.dashboard-home .shortcut-card:hover .shortcut-arrow {
    transform: translateX(4px);
    background: var(--dashboard-primary);
    color: #fff;
}

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

@media (min-width: 1200px) {
    .dashboard-home .shortcut-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .dashboard-home .shortcut-card {
        flex-direction: column;
        align-items: flex-start;
        min-height: 100%;
    }

    .dashboard-home .shortcut-arrow {
        margin-top: auto;
    }
}

@media (max-width: 767.98px) {
    .internal-page .internal-heading {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .internal-page .internal-hero-top {
        justify-content: flex-start;
        margin-bottom: 0.75rem;
    }

    .internal-list-page .list-table-card {
        padding: 1rem;
    }

    .internal-list-page .list-search-form,
    .internal-list-page .list-search-shell,
    .internal-list-page .list-search-actions,
    .internal-list-page .list-actions .btn {
        width: 100%;
    }

    .internal-list-page .list-search-shell {
        border-radius: 24px;
        padding: 0.75rem 0.9rem;
        min-height: 0;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .internal-list-page .list-search-meta {
        width: 100%;
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid rgba(44, 36, 124, 0.08);
        padding-top: 0.65rem;
    }

    .internal-list-page .list-search-actions {
        gap: 0.5rem;
    }

    .internal-list-page .list-search-actions .btn {
        width: 100%;
    }

    .internal-list-page .list-actions {
        align-items: stretch;
    }

    .dashboard-home .office-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-home .office-banner-cta {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }

    .dashboard-home .office-banner-text {
        text-align: left;
    }

    .dashboard-home .shortcut-title {
        font-size: 1.15rem;
    }

    .dashboard-home .shortcut-description {
        font-size: 0.9rem;
    }
}

@keyframes list-search-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.92);
        opacity: 0.72;
    }
}

.profile-page .profile-alert {
    border: 1px solid rgba(255, 193, 7, 0.25);
    border-radius: 22px;
    box-shadow: 0 16px 36px rgba(255, 193, 7, 0.08);
}

.profile-tabs {
    gap: 0.35rem;
    border-bottom: 0;
    padding: 0;
    margin-bottom: 0;
}

.profile-tabs .nav-item {
    margin-bottom: 0;
}

.profile-tabs .nav-link {
    border: 1px solid #e9edf2;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    color: #495057;
    font-weight: 600;
    padding: 0.9rem 1.45rem;
    background: #f5f7fb;
    margin-bottom: 0;
}

.profile-tabs .nav-link.active {
    background: #4054d6;
    border-color: #4054d6;
    color: #fff;
    position: relative;
    z-index: 2;
    border-bottom-color: rgba(44, 36, 124, 0.1);
}

.profile-tab-card {
    overflow: hidden;
    margin-top: -1px;
    border-top-left-radius: 0 !important;
}

.profile-tab-card .tab-pane .card-body {
    padding-top: 1.25rem;
}

.documents-page .upload-card {
    border-radius: 28px;
}

.documents-page .documents-empty {
    border: 1px dashed rgba(44, 36, 124, 0.18);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    padding: 1rem 1.1rem;
    color: var(--internal-muted);
    margin-bottom: 1rem;
}

.documents-page .upload-zone {
    border: 2px dashed #dcdcdc;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: .2s;
    background: #fafafa;
}

.documents-page .upload-zone:hover {
    border-color: #0d6efd;
    background: #f2f7ff;
}

.documents-page .preview-img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #e6e6e6;
    margin-top: 10px;
}

.documents-page .overlay-loading {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.documents-page .overlay-loading .box {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
}

.olympiad-materials-page .materials-subtitle {
    color: var(--internal-muted);
    margin-bottom: 0;
}

.olympiad-materials-page .materials-grid {
    display: grid;
    gap: 1.5rem;
}

.olympiad-materials-page .materials-list {
    display: grid;
    gap: 0.9rem;
}

.olympiad-materials-page .material-item {
    border: 1px solid rgba(44, 36, 124, 0.08);
    border-radius: 22px;
    padding: 1rem 1.1rem;
    background: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.olympiad-materials-page .material-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(44, 36, 124, 0.12);
    border-color: rgba(44, 36, 124, 0.2);
}

.olympiad-materials-page .material-main {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
}

.olympiad-materials-page .material-item + .material-item {
    margin-top: 0.9rem;
}

.olympiad-materials-page .material-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.olympiad-materials-page .material-copy {
    min-width: 0;
}

.olympiad-materials-page .material-title {
    color: var(--internal-text);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.olympiad-materials-page .material-description,
.olympiad-materials-page .material-content {
    color: var(--internal-muted);
    margin-bottom: 0;
}

.olympiad-materials-page .material-empty {
    color: var(--internal-muted);
    margin-bottom: 0;
}

.olympiad-materials-page .materials-empty {
    border: 1px dashed rgba(44, 36, 124, 0.18);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    padding: 2rem 1.5rem;
    text-align: center;
}

.olympiad-materials-page .materials-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 36, 124, 0.08);
    color: var(--internal-primary);
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.olympiad-materials-page .materials-empty-title {
    color: var(--internal-text);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.olympiad-materials-page .materials-empty-text {
    color: var(--internal-muted);
    margin-bottom: 0;
}

.institution-panel-page .panel-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.institution-panel-page .panel-card,
.institution-panel-page .panel-chart-card {
    border: 1px solid var(--internal-border);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--internal-shadow);
}

.institution-panel-page .panel-card {
    padding: 1.15rem 1.2rem;
    height: 100%;
}

.institution-panel-page .panel-card h2 {
    font-size: 0.95rem;
    color: var(--internal-muted);
    margin-bottom: 0.65rem;
    min-height: 2.5rem;
}

.institution-panel-page .panel-card strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
    color: var(--internal-text);
    margin-bottom: 0.55rem;
}

.institution-panel-page .panel-card a {
    color: var(--internal-primary);
    font-weight: 600;
    text-decoration: none;
}

.institution-panel-page .panel-card a:hover {
    text-decoration: underline;
}

.institution-panel-page .panel-chart-card {
    padding: 1rem;
    height: 100%;
}

.institution-panel-page .panel-chart-card h3 {
    color: var(--internal-text);
    font-size: 1.05rem;
    text-align: center;
    margin-bottom: 1rem;
}

.institution-panel-page .panel-chart-wrap {
    position: relative;
    min-height: 320px;
}

@media (min-width: 768px) {
    .institution-panel-page .panel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .institution-panel-page .panel-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .profile-page .profile-hero-top,
    .documents-page .documents-hero-top {
        justify-content: flex-start;
        margin-bottom: 0.75rem;
    }

    .olympiad-materials-page .material-item {
        flex-direction: column;
        align-items: stretch;
    }

    .olympiad-materials-page .material-main {
        align-items: flex-start;
    }
}
