.breadcrumb {
    background-color: transparent;
    font-size: 1.75rem;
    margin: 0;
    padding: 0;
}

@media (max-width: 576px) {
    .w-xs-100 {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .w-sm-100 {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .w-md-100 {
        width: 100%;
    }
}

@media (max-width: 1200px) {
    .w-lg-100 {
        width: 100%;
    }
}

@media (min-width: 1200px) {
    .w-xl-100 {
        width: 100%;
    }
}

.btn-icon-split {
    justify-content: start;
}

.btn-icon-split .text {
    width: 100%;
    text-align: center;
}

/* Student dashboard dark-hacker refresh (desktop-first). */
.student-dashboard {
    color: #d1d5db;
}

.dashboard-hero {
    border: 1px solid rgba(0, 255, 157, 0.25);
    border-radius: 0.75rem;
    background: linear-gradient(145deg, #0b1220, #0f172a 65%, #081510);
    box-shadow: 0 0 24px rgba(0, 255, 157, 0.09);
    padding: 1.25rem 1.5rem;
}

.dashboard-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #00ff9d;
    font-weight: 700;
    font-size: 0.75rem;
}

.dashboard-title {
    color: #f3f4f6;
    font-weight: 700;
}

.dashboard-cta {
    background-color: #00ff9d;
    border-color: #00ff9d;
    color: #06110d;
    font-weight: 700;
}

.dashboard-cta:hover {
    background-color: #2fffb0;
    border-color: #2fffb0;
    color: #06110d;
}

.dashboard-stat-card {
    border: 1px solid rgba(0, 255, 157, 0.2);
    background: #0f172a;
    box-shadow: 0 0 18px rgba(0, 255, 157, 0.06);
}

.dashboard-stat-label {
    color: #00ff9d;
    letter-spacing: 0.04em;
}

.dashboard-stat-value {
    color: #f9fafb;
}

.dashboard-stat-icon {
    color: rgba(0, 255, 157, 0.35);
}

.dashboard-panel {
    border: 1px solid rgba(0, 255, 157, 0.2);
    background: #0f172a;
    box-shadow: 0 0 18px rgba(0, 255, 157, 0.06);
}

.dashboard-panel-header {
    border-bottom: 1px solid rgba(0, 255, 157, 0.16);
    background: #111827;
}

.dashboard-panel-title {
    color: #00ff9d;
}

.student-dashboard a.dashboard-contest-link {
    color: #f3f4f6;
}

.student-dashboard a.dashboard-contest-link:hover {
    color: #ffffff;
}

.dashboard-help-icon {
    color: rgba(0, 255, 157, 0.8);
}

/* About (student area) */
.about-page {
    color: #d1d5db;
}

.about-page .breadcrumb-item a {
    color: #00ff9d;
}

.about-page .breadcrumb-item a:hover {
    color: #b7ffe0;
}

.about-page .breadcrumb-item.active {
    color: #9ca3af;
}

.about-page-divider {
    border: 0;
    border-top: 1px solid rgba(0, 255, 157, 0.14);
    margin: 0.75rem 0 1.25rem;
}

.about-page-lead {
    max-width: 40rem;
}

.about-page-list {
    color: #e5e7eb;
}

.about-page-list li {
    line-height: 1.55;
}

.about-page-link {
    color: #00ff9d !important;
    font-weight: 600;
}

.about-page-link:hover {
    color: #b7ffe0 !important;
    text-decoration: none;
}

.about-page-credit {
    border-top: 1px solid rgba(0, 255, 157, 0.1);
    padding-top: 1rem;
}

.about-page-credit-label {
    letter-spacing: 0.06em;
}

.about-page .text-muted {
    color: #9ca3af !important;
}

/* Profile (student area) */
.student-profile-page {
    color: #d1d5db;
}

.student-profile-page .breadcrumb-item a {
    color: #00ff9d;
}

.student-profile-page .breadcrumb-item a:hover {
    color: #b7ffe0;
}

.student-profile-page .breadcrumb-item.active {
    color: #9ca3af;
}

.student-profile-divider {
    border: 0;
    border-top: 1px solid rgba(0, 255, 157, 0.14);
    margin: 0.75rem 0 1.25rem;
}

.student-profile-lead {
    max-width: 40rem;
}

.student-profile-page .text-muted {
    color: #9ca3af !important;
}

.student-profile-form .form-group label,
.student-profile-form .col-form-label {
    color: #d1d5db;
}

.student-profile-form .form-control,
.student-profile-form .student-profile-input {
    background-color: #0b1220 !important;
    border-color: rgba(0, 255, 157, 0.22) !important;
    color: #e5e7eb !important;
}

.student-profile-form .form-control:focus {
    background-color: #0b1220 !important;
    border-color: rgba(0, 255, 157, 0.5) !important;
    color: #f9fafb !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 255, 157, 0.15);
}

.student-profile-form .form-text,
.student-profile-form .help-block,
.student-profile-form .invalid-feedback {
    color: #9ca3af !important;
}

.student-profile-form .alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

.progress-bar.dashboard-progress-bar {
    background: linear-gradient(90deg, #00ff9d, #00d68f);
}

/* Submission flow: upload / grading progress / results (matches student dashboard) */
.student-submission {
    color: #d1d5db;
}

.student-submission .text-muted {
    color: #9ca3af !important;
}

.submission-hero {
    border: 1px solid rgba(0, 255, 157, 0.25);
    border-radius: 0.75rem;
    background: linear-gradient(145deg, #0b1220, #0f172a 65%, #081510);
    box-shadow: 0 0 24px rgba(0, 255, 157, 0.09);
    padding: 1.1rem 1.35rem;
}

.submission-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #00ff9d;
    font-weight: 700;
    font-size: 0.75rem;
}

.submission-title {
    color: #f3f4f6;
    font-weight: 700;
    font-size: 1.35rem;
}

.submission-lead {
    max-width: 42rem;
}

.student-submission .submission-panel {
    border: 1px solid rgba(0, 255, 157, 0.2) !important;
    background: #0f172a;
    box-shadow: 0 0 18px rgba(0, 255, 157, 0.06);
}

.student-submission .submission-panel-header {
    border-bottom: 1px solid rgba(0, 255, 157, 0.16);
    background: #111827;
}

.student-submission .submission-panel-title {
    color: #00ff9d;
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
}

.student-submission .submission-alert {
    background: rgba(0, 255, 157, 0.08);
    border: 1px solid rgba(0, 255, 157, 0.25);
    color: #d1fae5;
}

.student-submission .alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

.student-submission .alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fde68a;
}

.student-submission .alert-info {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #bfdbfe;
}

.submission-progress-track {
    height: 1.35rem;
    background: #0b1220;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 157, 0.22);
}

.submission-progress-track .progress-bar {
    background: linear-gradient(90deg, #00ff9d, #00d68f);
    color: #06110d;
    font-size: 0.75rem;
    font-weight: 700;
}

.submission-progress-message {
    font-size: 0.9rem;
    color: #e5e7eb;
    min-height: 1.5rem;
}

.student-submission .submission-table {
    color: #e5e7eb;
    margin-bottom: 0;
}

.student-submission .submission-table thead th {
    border-color: rgba(0, 255, 157, 0.15);
    color: #9ca3af;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.student-submission .submission-table tbody td {
    border-color: rgba(0, 255, 157, 0.1);
    vertical-align: middle;
}

.student-submission .submission-table tbody tr:hover {
    background: rgba(0, 255, 157, 0.04);
}

.student-submission .submission-table-scroll {
    border-radius: 0.35rem;
    border: 1px solid rgba(0, 255, 157, 0.12);
}

.student-submission .btn-submission-action {
    border: 1px solid rgba(0, 255, 157, 0.45);
    color: #00ff9d;
    background: transparent;
    font-weight: 600;
}

.student-submission .btn-submission-action:hover {
    background: rgba(0, 255, 157, 0.12);
    border-color: rgba(0, 255, 157, 0.65);
    color: #b7ffe0;
}

/* Dark “submission history” card only inside the submission flow (same partial is used on contest dashboard). */
.student-submission .submission-history-card,
.student-contest-detail .submission-history-card {
    border: 1px solid rgba(0, 255, 157, 0.2);
    background: #0f172a;
    box-shadow: 0 0 18px rgba(0, 255, 157, 0.06);
}

.student-submission .submission-history-card .card-header,
.student-contest-detail .submission-history-card .card-header {
    border-bottom: 1px solid rgba(0, 255, 157, 0.16);
    background: #111827;
}

.student-submission .submission-history-card .card-header h5,
.student-contest-detail .submission-history-card .card-header h5 {
    color: #00ff9d !important;
}

.student-submission .submission-history-card .btn-outline-secondary,
.student-contest-detail .submission-history-card .btn-outline-secondary {
    border-color: rgba(0, 255, 157, 0.45);
    color: #00ff9d;
    background: transparent;
}

.student-submission .submission-history-card .btn-outline-secondary:hover,
.student-contest-detail .submission-history-card .btn-outline-secondary:hover {
    background: rgba(0, 255, 157, 0.12);
    border-color: rgba(0, 255, 157, 0.65);
    color: #b7ffe0;
}

.student-submission .modal-content {
    background: #0f172a;
    color: #e5e7eb;
    border: 1px solid rgba(0, 255, 157, 0.22);
}

.student-submission .modal-header {
    border-bottom-color: rgba(0, 255, 157, 0.15);
}

.student-submission .modal-footer {
    border-top-color: rgba(0, 255, 157, 0.15);
}

.student-submission .modal-body pre {
    background: #0b1220;
    color: #d1d5db;
    border: 1px solid rgba(0, 255, 157, 0.12);
    border-radius: 0.35rem;
    padding: 0.75rem 1rem;
}

/* Expected / obtained modal: wide dialog, two scrollable panes */
.student-submission .submission-diff-modal-dialog {
    max-width: min(96vw, 1600px);
    width: calc(100% - 2rem);
    margin: 1rem auto;
}

@media (min-width: 576px) {
    .student-submission .submission-diff-modal-dialog {
        margin: 1.75rem auto;
    }
}

.student-submission .submission-output-heading {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #00ff9d;
    margin-bottom: 0.5rem;
}

.student-submission .submission-output-panel {
    border: 1px solid rgba(0, 255, 157, 0.18);
    border-radius: 0.45rem;
    background: rgba(11, 18, 32, 0.6);
    padding: 0.75rem 0.85rem;
    min-height: 12rem;
    display: flex;
    flex-direction: column;
}

.student-submission .submission-output-pre {
    flex: 1 1 auto;
    max-height: min(70vh, 42rem);
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.8rem;
    line-height: 1.45;
    margin: 0;
    background: #0b1220;
    color: #e5e7eb;
    border: 1px solid rgba(0, 255, 157, 0.1);
    border-radius: 0.35rem;
    padding: 0.75rem 0.85rem;
}

.student-submission .submission-diff-details {
    border-top: 1px solid rgba(0, 255, 157, 0.12);
    padding-top: 0.75rem;
}

.student-submission .submission-diff-summary {
    cursor: pointer;
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 600;
    list-style: none;
    outline: none;
}

.student-submission .submission-diff-summary::-webkit-details-marker {
    display: none;
}

.student-submission .submission-diff-summary::before {
    content: "▸ ";
    color: #00ff9d;
}

.student-submission .submission-diff-details[open] .submission-diff-summary::before {
    content: "▾ ";
}

.student-submission .submission-diff-html {
    max-height: 40vh;
    overflow: auto;
    padding: 0.75rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(0, 255, 157, 0.1);
    background: #0b1220;
    font-size: 0.8rem;
}

.student-submission .close {
    color: #f3f4f6;
    text-shadow: none;
    opacity: 0.85;
}

/* Submission results: inner grid only (no outer table frame; card provides the edge) */
.student-submission .submission-results-table {
    border: none !important;
    border-collapse: separate;
    border-spacing: 0;
}

.student-submission .submission-results-table thead th {
    border-top: none;
    border-left: 1px solid rgba(0, 255, 157, 0.12);
    border-bottom: 1px solid rgba(0, 255, 157, 0.22);
    vertical-align: middle;
}

.student-submission .submission-results-table thead th:first-child {
    border-left: none;
}

.student-submission .submission-results-table tbody td {
    border-top: 1px solid rgba(0, 255, 157, 0.1);
    border-left: 1px solid rgba(0, 255, 157, 0.08);
    vertical-align: middle;
}

.student-submission .submission-results-table tbody td:first-child {
    border-left: none;
}

.student-submission .submission-results-table tbody tr:first-child td {
    border-top: none;
}

.student-submission .submission-summary-table tbody tr {
    border-bottom: 1px solid rgba(0, 255, 157, 0.1);
}

.student-submission .submission-summary-table tbody tr:last-child {
    border-bottom: none;
}

.student-submission .form-control,
.student-submission .custom-file-label {
    background-color: #0b1220;
    border-color: rgba(0, 255, 157, 0.22);
    color: #e5e7eb;
}

.student-submission .form-control:focus {
    background-color: #0b1220;
    border-color: rgba(0, 255, 157, 0.5);
    color: #f9fafb;
    box-shadow: 0 0 0 0.2rem rgba(0, 255, 157, 0.15);
}

.student-submission label,
.student-submission .col-form-label {
    color: #d1d5db;
}

/* Upload: full-area invisible file input + drag-and-drop zone */
.student-submission .submission-dropzone {
    position: relative;
    min-height: 11rem;
    border: 2px dashed rgba(0, 255, 157, 0.38);
    border-radius: 0.65rem;
    background: rgba(11, 18, 32, 0.75);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    overflow: hidden;
}

.student-submission .submission-dropzone.is-dragover {
    border-color: rgba(0, 255, 157, 0.85);
    box-shadow: 0 0 0 0.2rem rgba(0, 255, 157, 0.12);
    background: rgba(0, 255, 157, 0.06);
}

.student-submission .submission-dropzone.has-file {
    border-style: solid;
    border-color: rgba(0, 255, 157, 0.45);
}

.student-submission .submission-dropzone-ui {
    position: relative;
    z-index: 1;
    padding: 2rem 1.35rem;
    text-align: center;
    pointer-events: none;
}

.student-submission .submission-dropzone-icon {
    color: rgba(0, 255, 157, 0.65);
    display: block;
    margin-bottom: 0.65rem;
}

.student-submission .submission-dropzone-line {
    color: #e5e7eb;
    font-size: 0.95rem;
    font-weight: 600;
}

.student-submission .submission-dropzone-hint {
    color: #9ca3af !important;
}

.student-submission .submission-dropzone-filename {
    color: #00ff9d;
    font-weight: 700;
    font-size: 0.95rem;
    word-break: break-all;
}

.student-submission .submission-dropzone-input-wrap {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

.student-submission .submission-file-input-native {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

/* Contest + Groups shells: dark canvas (detail layouts) */
.contest-shell--dark,
.groups-shell--dark {
    margin: -1rem -1.5rem 0;
    padding: 1rem 1.5rem 2rem;
    background: linear-gradient(180deg, #0b1220 0%, #0f172a 40%, #111827 100%);
    color: #cbd5e1;
    border-radius: 0.35rem;
}

.contest-shell--dark .breadcrumb,
.groups-shell--dark .breadcrumb {
    background: transparent;
}

.contest-shell--dark .breadcrumb a,
.groups-shell--dark .breadcrumb a {
    color: #6ee7b7;
}

.contest-shell--dark .breadcrumb-item.active,
.contest-shell--dark .breadcrumb-item + .breadcrumb-item::before,
.groups-shell--dark .breadcrumb-item.active,
.groups-shell--dark .breadcrumb-item + .breadcrumb-item::before {
    color: #9ca3af;
}

.contest-shell--dark .contest-shell-divider,
.groups-shell--dark .contest-shell-divider {
    border-top-color: rgba(0, 255, 157, 0.15);
}

.contest-shell--dark .d-flex h5 {
    color: #f3f4f6 !important;
}

/* Groups content (list, join, group detail + contest lists) */
.student-groups-page {
    color: #d1d5db;
}

.student-groups-page .text-muted {
    color: #9ca3af !important;
}

/* Staff admin overview (manager_home) */
.staff-dashboard-page {
    color: #d1d5db;
}

.staff-dashboard-page .text-muted {
    color: #9ca3af !important;
}

.staff-dashboard-chart-body {
    background: transparent !important;
}

.staff-dashboard-chart-canvas {
    position: relative;
    min-height: 280px;
}

.staff-dashboard-chart-help {
    color: rgba(0, 255, 157, 0.65) !important;
    line-height: 1;
}

.staff-dashboard-chart-help:hover,
.staff-dashboard-chart-help:focus {
    color: #00ff9d !important;
    text-decoration: none;
}

/* Staff contests index (same shell + panel language as student groups) */
.staff-contests-page {
    color: #d1d5db;
}

.staff-contests-page .text-muted {
    color: #9ca3af !important;
}

.staff-contests-page .admin-contest-create-btn {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 157, 0.4);
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.08);
}

.staff-contests-page .admin-contest-create-btn:hover {
    color: #d1fae5;
    background: rgba(0, 255, 157, 0.14);
    border-color: rgba(0, 255, 157, 0.6);
    text-decoration: none;
}

/* Contest create/edit: centered card, capped width for long Markdown field */
.staff-contests-page .staff-contest-form-shell {
    width: 100%;
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

.staff-contests-page .staff-contest-form-shell > .card.dashboard-panel {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Contest manage: /staff/contests/<id>/ (tabs + overview) */
.contest-shell--dark .staff-contest-manage-page {
    color: #d1d5db;
}

.contest-shell--dark .staff-contest-manage-page .text-muted {
    color: #9ca3af !important;
}

.staff-contest-manage-page .dashboard-hero .dashboard-title {
    color: #f3f4f6;
}

.staff-contest-manage-page .dashboard-hero .dashboard-kicker {
    color: rgba(0, 255, 157, 0.85);
}

.staff-contest-manage-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    padding: 0.12rem 0.4rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 0.25rem;
    color: #a7f3d0;
}

.staff-contest-manage-status--open {
    color: #6ee7b7 !important;
}

.staff-contest-manage-status--closed {
    color: #fbbf24 !important;
}

.staff-contest-manage-details-body {
    background: transparent !important;
}

.staff-contest-manage-exports-label {
    color: #9ca3af;
    letter-spacing: 0.04em;
}

.staff-contest-table-wrap {
    border-top: 1px solid rgba(0, 255, 157, 0.12);
}

.staff-contest-table {
    color: #e5e7eb;
}

.staff-contest-table thead th {
    border-bottom: 1px solid rgba(0, 255, 157, 0.22) !important;
    border-top: none;
    color: #00ff9d;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    vertical-align: middle;
    padding: 0.75rem 1rem;
    background: #111827;
}

.staff-contest-table tbody td {
    border-top: 1px solid rgba(0, 255, 157, 0.1) !important;
    vertical-align: middle;
    padding: 0.65rem 1rem;
    background: rgba(11, 18, 32, 0.75);
}

.staff-contest-table tbody tr:hover td {
    background: rgba(0, 255, 157, 0.06);
}

.staff-contest-title {
    font-weight: 600;
    color: #f3f4f6;
}

.staff-contest-group-link {
    color: #6ee7b7;
    font-weight: 600;
}

.staff-contest-group-link:hover {
    color: #d1fae5;
    text-decoration: none;
}

.staff-contest-status-open {
    color: #34d399 !important;
}

.staff-contest-status-closed {
    color: #f87171 !important;
}

.staff-contest-action-btn {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 0.35rem;
}

.staff-contest-action-btn + .staff-contest-action-btn {
    margin-left: 0.35rem;
}

.staff-contest-action-btn--primary {
    border: 1px solid rgba(0, 255, 157, 0.45);
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.08);
}

.staff-contest-action-btn--primary:hover {
    color: #d1fae5;
    background: rgba(0, 255, 157, 0.14);
    border-color: rgba(0, 255, 157, 0.65);
    text-decoration: none;
}

.staff-contest-action-btn--secondary {
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.08);
}

.staff-contest-action-btn--secondary:hover {
    color: #fde68a;
    background: rgba(251, 191, 36, 0.14);
    border-color: rgba(251, 191, 36, 0.7);
    text-decoration: none;
}

/* Staff groups admin (/staff/groups/) */
.staff-groups-admin-page {
    color: #d1d5db;
}

.staff-groups-admin-page .text-muted {
    color: #9ca3af !important;
}

.staff-groups-admin-page .admin-group-create-btn {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 157, 0.4);
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.08);
}

.staff-groups-admin-page .admin-group-create-btn:hover {
    color: #d1fae5;
    background: rgba(0, 255, 157, 0.14);
    border-color: rgba(0, 255, 157, 0.6);
    text-decoration: none;
}

.staff-group-table-wrap {
    border-top: 1px solid rgba(0, 255, 157, 0.12);
}

.staff-group-table {
    color: #e5e7eb;
}

.staff-group-table thead th {
    border-bottom: 1px solid rgba(0, 255, 157, 0.22) !important;
    border-top: none;
    color: #00ff9d;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    vertical-align: middle;
    padding: 0.75rem 1rem;
    background: #111827;
}

.staff-group-table tbody td {
    border-top: 1px solid rgba(0, 255, 157, 0.1) !important;
    vertical-align: middle;
    padding: 0.65rem 1rem;
    background: rgba(11, 18, 32, 0.75);
}

.staff-group-table tbody tr:hover td {
    background: rgba(0, 255, 157, 0.06);
}

.staff-group-table-title {
    font-weight: 600;
    color: #f3f4f6;
}

.staff-group-code {
    background: rgba(0, 255, 157, 0.1);
    color: #b7ffe0;
    padding: 0.15rem 0.45rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
}

.staff-group-tabnav {
    gap: 0.5rem;
}

.staff-group-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 157, 0.35);
    color: #9ca3af;
    background: rgba(11, 18, 32, 0.6);
    text-decoration: none;
    margin-bottom: 0.35rem;
}

.staff-group-tab:hover {
    color: #d1fae5;
    border-color: rgba(0, 255, 157, 0.55);
    background: rgba(0, 255, 157, 0.08);
    text-decoration: none;
}

.staff-group-tab--active {
    color: #06110d !important;
    background: linear-gradient(90deg, #00ff9d, #00cc88);
    border-color: #00b377;
}

.staff-group-tab--accent:not(.staff-group-tab--active) {
    border-color: rgba(251, 191, 36, 0.45);
    color: #fcd34d;
}

.staff-group-tab--accent.staff-group-tab--active {
    color: #06110d !important;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-color: #d97706;
}

.staff-group-bulk-btn {
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.4rem;
}

.staff-group-bulk-btn--add {
    border: 1px solid rgba(0, 255, 157, 0.45);
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.08);
}

.staff-group-bulk-btn--add:hover:not(:disabled) {
    color: #d1fae5;
    background: rgba(0, 255, 157, 0.14);
    border-color: rgba(0, 255, 157, 0.65);
}

.staff-group-bulk-btn--remove {
    border: 1px solid rgba(248, 113, 113, 0.55);
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.1);
}

.staff-group-bulk-btn--remove:hover:not(:disabled) {
    color: #fecaca;
    background: rgba(248, 113, 113, 0.18);
    border-color: rgba(248, 113, 113, 0.75);
}

.staff-group-bulk-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.staff-group-save-btn {
    background: linear-gradient(180deg, #2fffb0, #00cc88);
    border: 1px solid #00b377;
    color: #06110d;
    font-weight: 700;
    padding: 0.55rem 1rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.staff-group-save-btn:hover {
    filter: brightness(1.06);
    color: #06110d;
}

.staff-group-form-body .form-control,
.staff-group-form-body select,
.staff-group-form-body textarea,
.staff-contest-form-body .form-control,
.staff-contest-form-body select,
.staff-contest-form-body textarea {
    background-color: #0b1220 !important;
    border-color: rgba(0, 255, 157, 0.22) !important;
    color: #e5e7eb !important;
}

.staff-contest-form-body input[type="file"] {
    background-color: #0b1220 !important;
    border: 1px dashed rgba(0, 255, 157, 0.35) !important;
    color: #d1d5db !important;
    padding: 0.5rem 0.75rem;
    border-radius: 0.35rem;
}

.staff-group-form-body .form-control:focus,
.staff-contest-form-body .form-control:focus {
    border-color: rgba(0, 255, 157, 0.5) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 255, 157, 0.15);
    color: #f9fafb !important;
}

.staff-group-form-body label,
.staff-group-form-body .col-form-label,
.staff-group-form-body .form-text,
.staff-contest-form-body label,
.staff-contest-form-body .col-form-label,
.staff-contest-form-body .form-text,
.staff-contest-form-body legend.col-form-label {
    color: #d1d5db;
}

.staff-contest-form-body .form-check-label {
    color: #e5e7eb;
}

.staff-group-form-body .invalid-feedback,
.staff-contest-form-body .invalid-feedback {
    color: #fca5a5;
}

.staff-group-info-body {
    background: transparent !important;
}

.staff-group-info-name {
    color: #f3f4f6 !important;
}

.staff-group-info-table th {
    color: #9ca3af;
    font-weight: 600;
    width: 40%;
    border-top: 1px solid rgba(0, 255, 157, 0.1);
    vertical-align: middle;
}

.staff-group-info-table td {
    border-top: 1px solid rgba(0, 255, 157, 0.1);
    color: #e5e7eb;
    vertical-align: middle;
}

.staff-group-info-table tr:first-child th,
.staff-group-info-table tr:first-child td {
    border-top: none;
}

.staff-groups-admin-page .dataTables_wrapper .dataTables_length,
.staff-groups-admin-page .dataTables_wrapper .dataTables_filter,
.staff-groups-admin-page .dataTables_wrapper .dataTables_info,
.staff-groups-admin-page .dataTables_wrapper .dataTables_paginate {
    color: #9ca3af;
    font-size: 0.85rem;
    padding: 0.5rem 1rem 0;
}

.staff-groups-admin-page .dataTables_wrapper .dataTables_filter input {
    background: #0b1220;
    border: 1px solid rgba(0, 255, 157, 0.22);
    color: #e5e7eb;
    border-radius: 0.35rem;
    margin-left: 0.35rem;
}

.staff-groups-admin-page .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #00ff9d !important;
}

.staff-groups-admin-page .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.staff-groups-admin-page .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: rgba(0, 255, 157, 0.2) !important;
    border-color: rgba(0, 255, 157, 0.45) !important;
    color: #fff !important;
}

.staff-groups-admin-page .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(0, 255, 157, 0.1) !important;
    border-color: rgba(0, 255, 157, 0.35) !important;
    color: #d1fae5 !important;
}

.staff-group-manager-page {
    color: #d1d5db;
}

.staff-group-manager-page .text-muted {
    color: #9ca3af !important;
}

.staff-group-manager-badge {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 157, 0.35);
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.1);
}

.staff-group-manager-toolbar {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    background: rgba(11, 18, 32, 0.55) !important;
    border-color: rgba(0, 255, 157, 0.12) !important;
}

.staff-join-code-label {
    color: #9ca3af;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
}

.staff-join-code-input {
    background: #0b1220 !important;
    border: 1px solid rgba(0, 255, 157, 0.28) !important;
    color: #e5e7eb !important;
    min-width: 12rem;
}

.staff-join-code-copy-btn {
    border: 1px solid rgba(0, 255, 157, 0.45);
    color: #06110d;
    background: linear-gradient(90deg, #00ff9d, #00cc88);
    font-weight: 700;
    white-space: nowrap;
    padding: 0.45rem 1rem;
    border-radius: 0.45rem;
}

.staff-join-code-copy-btn:hover {
    color: #06110d;
    filter: brightness(1.06);
}

.student-groups-page .groups-list-item {
    background: rgba(11, 18, 32, 0.85) !important;
    border-color: rgba(0, 255, 157, 0.12) !important;
}

.student-groups-page .groups-list-link {
    color: #f3f4f6;
    font-weight: 600;
}

.student-groups-page .groups-list-link:hover {
    color: #ffffff;
    text-decoration: none;
}

/* Contests list embedded on group detail */
.student-groups-page .row > .col-lg-6 > .card,
.student-groups-page .row > [class*="col-"] > .card {
    background: rgba(17, 24, 39, 0.92);
    border: 1px solid rgba(0, 255, 157, 0.18);
    color: #e5e7eb;
}

.student-groups-page .card-header {
    background: #111827 !important;
    border-bottom: 1px solid rgba(0, 255, 157, 0.12) !important;
}

.student-groups-page .card-header h6.text-success {
    color: #00ff9d !important;
}

.student-groups-page .card-header h6.text-danger {
    color: #f87171 !important;
}

.student-groups-page .list-group-item {
    background: transparent !important;
    border-color: rgba(0, 255, 157, 0.1) !important;
    color: #d1d5db;
}

.student-groups-page .list-group-item a {
    color: #f3f4f6;
}

.student-groups-page .list-group-item .float-right {
    color: #9ca3af;
    font-size: 0.85rem;
}

.student-groups-page .form-control,
.student-groups-page .custom-file-label,
.student-groups-page select {
    background-color: #0b1220 !important;
    border-color: rgba(0, 255, 157, 0.22) !important;
    color: #e5e7eb !important;
}

.student-groups-page .form-control:focus {
    border-color: rgba(0, 255, 157, 0.45) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 255, 157, 0.12);
}

.student-groups-page label,
.student-groups-page .col-form-label {
    color: #d1d5db;
}

/* Contest detail body: all cards share one surface (no white card-body) */
.student-contest-detail {
    color: #d1d5db;
}

.student-contest-detail .card {
    background: rgba(17, 24, 39, 0.92);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 0.75rem;
    color: #e5e7eb;
    box-shadow: 0 0 22px rgba(0, 255, 157, 0.07);
}

.student-contest-detail .card-header {
    background: #111827 !important;
    border-bottom: 1px solid rgba(0, 255, 157, 0.14) !important;
}

.student-contest-detail .card-body {
    background: transparent !important;
}

.student-contest-detail .card .card {
    background: rgba(11, 18, 32, 0.9);
    border: 1px solid rgba(0, 255, 157, 0.12);
    box-shadow: none;
}

.student-contest-detail .text-primary,
.student-contest-detail .contest-status-block .text-primary {
    color: #00ff9d !important;
}

.student-contest-detail .text-success {
    color: #00ff9d !important;
}

.student-contest-detail .contest-detail-block .text-gray-800,
.student-contest-detail .contest-status-block .text-gray-800 {
    color: #f3f4f6 !important;
}

.student-contest-detail .contest-detail-block .text-gray-700 {
    color: #cbd5e1 !important;
}

.student-contest-detail .contest-description-md {
    line-height: 1.55;
    word-wrap: break-word;
}

.student-contest-detail .contest-description-md h1,
.student-contest-detail .contest-description-md h2,
.student-contest-detail .contest-description-md h3 {
    color: #f3f4f6;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.student-contest-detail .contest-description-md h1 { font-size: 1.35rem; }
.student-contest-detail .contest-description-md h2 { font-size: 1.15rem; }
.student-contest-detail .contest-description-md h3 { font-size: 1.05rem; }

.student-contest-detail .contest-description-md p {
    margin-bottom: 0.75rem;
}

.student-contest-detail .contest-description-md ul,
.student-contest-detail .contest-description-md ol {
    margin-bottom: 0.75rem;
    padding-left: 1.25rem;
}

.student-contest-detail .contest-description-md pre {
    background: rgba(0, 0, 0, 0.35);
    padding: 0.75rem 1rem;
    border-radius: 0.35rem;
    overflow-x: auto;
    font-size: 0.875rem;
}

.student-contest-detail .contest-description-md code {
    font-size: 0.9em;
    color: #a5f3d0;
}

.student-contest-detail .contest-description-md pre code {
    color: #e2e8f0;
}

.student-contest-detail .contest-description-md table {
    width: 100%;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.student-contest-detail .contest-description-md th,
.student-contest-detail .contest-description-md td {
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 0.35rem 0.5rem;
}

.student-contest-detail .contest-description-md a {
    color: #00ff9d;
    text-decoration: underline;
}

.student-contest-detail .contest-detail-block .text-muted,
.student-contest-detail .contest-status-block .text-muted {
    color: #9ca3af !important;
}

.student-contest-detail .contest-detail-block .border-left-primary,
.student-contest-detail .contest-status-block .border-left-primary {
    border-left-color: #00ff9d !important;
}

.student-contest-detail .contest-sow-detail-box {
    background: rgba(0, 0, 0, 0.22);
    border-radius: 0.4rem;
}

.student-contest-detail .contest-sow-detail-link {
    color: #6ee7b7 !important;
    text-decoration: none;
}

.student-contest-detail .contest-sow-detail-link:hover {
    color: #d1fae5 !important;
    text-decoration: underline;
}

.student-contest-detail .contest-description-fullwidth {
    width: 100%;
}

.student-contest-detail .btn-success {
    background: linear-gradient(180deg, #2fffb0, #00cc88) !important;
    border-color: #00b377 !important;
    color: #06110d !important;
    font-weight: 700;
}

.student-contest-detail .btn-success:hover {
    filter: brightness(1.06);
    color: #06110d !important;
}

.student-contest-detail .btn-info {
    background: transparent !important;
    border: 1px solid rgba(0, 255, 157, 0.45) !important;
    color: #00ff9d !important;
}

.student-contest-detail .btn-info:hover {
    background: rgba(0, 255, 157, 0.12) !important;
    border-color: rgba(0, 255, 157, 0.65) !important;
    color: #d1fae5 !important;
}

.student-contest-detail .table {
    color: #e5e7eb;
}

.student-contest-detail .table thead th {
    color: #9ca3af;
    border-color: rgba(0, 255, 157, 0.12);
}

.student-contest-detail .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 255, 157, 0.05);
}

.student-contest-detail .table td,
.student-contest-detail .table th {
    border-color: rgba(0, 255, 157, 0.1);
}

/* Contest title row: terminal-style submit */
.contest-shell--dark .contest-title-row .contest-page-title {
    color: #f3f4f6 !important;
}

.contest-submit-header {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.4rem 0.75rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(0, 255, 157, 0.45);
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.08);
    white-space: nowrap;
}

.contest-submit-header:hover {
    color: #d1fae5;
    background: rgba(0, 255, 157, 0.14);
    border-color: rgba(0, 255, 157, 0.65);
    text-decoration: none;
}

.contest-submit-prompt {
    opacity: 0.85;
    margin-right: 0.25rem;
}

.contest-submit-header-msg {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem !important;
    max-width: 22rem;
    text-align: left !important;
}

.student-groups-page .groups-card-join-btn {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 157, 0.4);
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.08);
}

.student-groups-page .groups-card-join-btn:hover {
    color: #d1fae5;
    background: rgba(0, 255, 157, 0.14);
    border-color: rgba(0, 255, 157, 0.6);
}

/* Inline submit (submission details page) */
.student-contest-detail .contest-submit-inline .contest-submit-discrete,
.student-submission .contest-submit-inline .contest-submit-discrete {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    padding: 0.45rem 0.75rem;
    border-radius: 0.45rem;
    border: 1px solid rgba(0, 255, 157, 0.35);
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.06);
    box-shadow: none;
}

.student-contest-detail .contest-submit-inline .contest-submit-discrete:hover,
.student-submission .contest-submit-inline .contest-submit-discrete:hover {
    color: #d1fae5;
    background: rgba(0, 255, 157, 0.12);
    border-color: rgba(0, 255, 157, 0.55);
}

.student-contest-detail .contest-inline-alert {
    background: rgba(0, 255, 157, 0.08);
    border: 1px solid rgba(0, 255, 157, 0.24);
    color: #d1fae5;
}

.student-contest-detail .contest-inline-alert.alert-success {
    background: rgba(0, 255, 157, 0.08);
    border-color: rgba(0, 255, 157, 0.28);
    color: #d1fae5;
}

.student-contest-detail .btn-download-last {
    border: 1px solid rgba(0, 255, 157, 0.4);
    color: #06110d;
    background: linear-gradient(90deg, #00ff9d, #00cc88);
    font-weight: 700;
    padding: 0.65rem 1rem;
    border-radius: 0.5rem;
    width: 100%;
    box-shadow: 0 0 16px rgba(0, 255, 157, 0.25);
}

.student-contest-detail .btn-download-last:hover {
    color: #06110d;
    filter: brightness(1.08);
}

/* Contest leaderboard: hero rank + full table */
.student-contest-detail .contest-leaderboard-card .contest-leaderboard-card-header {
    border-bottom: 1px solid rgba(0, 255, 157, 0.14);
}

.student-contest-detail .contest-leaderboard-hero {
    border-radius: 0.65rem;
    overflow: hidden;
}

.student-contest-detail .contest-leaderboard-hero-inner {
    padding: 1.25rem 1.35rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(0, 255, 157, 0.22);
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.12) 0%, rgba(17, 24, 39, 0.95) 45%, rgba(15, 23, 42, 0.98) 100%);
}

.student-contest-detail .contest-leaderboard-hero-inner--pending {
    background: rgba(11, 18, 32, 0.85);
    border-color: rgba(148, 163, 184, 0.25);
}

.student-contest-detail .contest-leaderboard-kicker {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00ff9d;
    margin: 0;
}

.student-contest-detail .contest-leaderboard-rank-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    margin: 0.35rem 0 0.5rem;
}

.student-contest-detail .contest-leaderboard-rank-big {
    font-size: clamp(2.5rem, 8vw, 3.75rem);
    font-weight: 800;
    line-height: 1;
    color: #f9fafb;
    text-shadow: 0 0 28px rgba(0, 255, 157, 0.35);
}

.student-contest-detail .contest-leaderboard-rank-of {
    font-size: 1rem;
}

.student-contest-detail .contest-leaderboard-pending-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #e5e7eb;
    margin: 0;
}

.student-contest-detail .contest-leaderboard-hero-meta {
    font-size: 0.95rem;
    color: #cbd5e1;
}

.student-contest-detail .contest-leaderboard-table-wrap {
    max-height: min(55vh, 28rem);
    overflow-y: auto;
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 255, 157, 0.12);
}

.student-contest-detail .contest-leaderboard-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #111827;
    box-shadow: 0 1px 0 rgba(0, 255, 157, 0.12);
}

.student-contest-detail .contest-leaderboard-row--you {
    background: rgba(0, 255, 157, 0.1) !important;
    box-shadow: inset 3px 0 0 #00ff9d;
}

.student-contest-detail .contest-leaderboard-row--you td {
    font-weight: 600;
}

.student-contest-detail .contest-leaderboard-you-badge {
    font-size: 0.65rem;
    font-weight: 700;
    vertical-align: middle;
    background: rgba(0, 255, 157, 0.2);
    color: #00ff9d;
    border: 1px solid rgba(0, 255, 157, 0.45);
}

/* Logged-in shell: sidebar + main column (neon / slate, no white strip) */
.student-area-content-wrapper {
    background: linear-gradient(180deg, #0b1220 0%, #0f172a 35%, #111827 100%) !important;
}

/* Student sidebar shell + nav list share the same surface */
.student-area-sidebar.bg-gradient-dark,
.student-area-sidebar-shell.bg-gradient-dark,
ul.student-area-sidebar {
    background-color: #111827 !important;
    background-image: linear-gradient(180deg, #111827 0%, #0f172a 55%, #111827 100%) !important;
    background-size: cover !important;
    border-right: 1px solid rgba(0, 255, 157, 0.12);
}

.student-area-sidebar-footer {
    border-top-color: rgba(0, 255, 157, 0.12) !important;
    overflow: visible;
}

.student-area-sidebar-toggle {
    color: #9ca3af !important;
    padding: 0.35rem 0.5rem;
}

.student-area-sidebar-toggle:hover {
    color: #00ff9d !important;
}

.student-area-sidebar-user {
    color: #e5e7eb !important;
    border: 1px solid transparent;
}

.student-area-sidebar-user:hover,
.student-area-sidebar-user:focus {
    color: #00ff9d !important;
    background: rgba(0, 255, 157, 0.08);
    border-color: rgba(0, 255, 157, 0.2);
}

.student-area-sidebar-user-name {
    color: inherit;
}

.student-area-sidebar-user-icon {
    color: #e5e7eb;
}

.sidebar.toggled .student-area-sidebar-user-name {
    display: none !important;
}

.sidebar.toggled .student-area-sidebar-user-icon {
    display: block !important;
    margin: 0 auto;
}

.sidebar.toggled .student-area-sidebar-user {
    justify-content: center !important;
}

.sidebar.toggled .student-area-sidebar-footer .dropdown-toggle::after {
    display: none;
}

.student-area-sidebar .sidebar-brand-text {
    color: #f3f4f6;
}

.student-area-sidebar .nav-link {
    color: #b8c5d3 !important;
}

.student-area-sidebar .nav-link:hover {
    color: #00ff9d !important;
}

.student-area-sidebar .nav-item.active .nav-link {
    color: #00ff9d !important;
    font-weight: 700;
}

.student-area-sidebar .sidebar-divider {
    border-top: 1px solid rgba(0, 255, 157, 0.12) !important;
}
