/* 
Theme Name: UniCep
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.9.3
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --uc-green: #16a34a;
    --uc-green-dark: #14532d;
    --uc-green-light: #f0fdf4;
    --uc-green-border: #bbf7d0;
    --uc-ink: #111827;
    --uc-ink-2: #374151;
    --uc-ink-3: #6b7280;
    --uc-ink-4: #9ca3af;
    --uc-surface: #ffffff;
    --uc-bg: #f9fafb;
    --uc-border: #e5e7eb;
    --uc-border-2: #d1d5db;
    /* Hairline drawn between rows and sections inside a card. */
    --uc-divider: #f1f5f9;
    --uc-pad-x: 22px;
    /* Inputs, selects and the buttons beside them all stand this tall. */
    --uc-control-h: 38px;
    --uc-warn-bg: #fffbeb;
    --uc-warn-bd: #fde68a;
    --uc-warn-txt: #92400e;
    --uc-error-bg: #fef2f2;
    --uc-error-bd: #fecaca;
    --uc-error-txt: #991b1b;
    --uc-radius: 8px;
    --uc-radius-lg: 12px;
    --uc-radius-xl: 16px;
    --uc-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .05);
    --uc-shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
    --uc-font: "Inter", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
    --uc-t: 0.15s ease;
}

/* ============================================================
   SHARED RESET — scoped to our wrappers only
   ============================================================ */
#unicep-portal-wrapper *,
#unicep-supervisor-wrapper * {
    box-sizing: border-box;
}

/* ============================================================
   STUDENT PORTAL
   ============================================================ */
#unicep-portal-wrapper {
    max-width: 680px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: var(--uc-font);
    color: var(--uc-ink);
}

/* ── Profile Header ─────────────────────────────────────────── */
.uc-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px;
    background: linear-gradient(135deg, var(--uc-green-dark) 0%, var(--uc-green) 100%);
    color: #fff;
    border-radius: var(--uc-radius-xl);
    margin-bottom: 14px;
    box-shadow: 0 4px 20px rgba(22, 163, 74, .25);
}

.uc-profile-header-info {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 10px;
}

.uc-avatar {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, .18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, .28);
    letter-spacing: -0.5px;
}

.uc-profile-name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 0 0 3px;
    line-height: 1.2;
}

.uc-profile-meta {
    font-size: 13px;
    opacity: .72;
    margin: 0;
}

.uc-round-pill {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    color: #fff;
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.uc-profile-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.uc-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: var(--uc-radius);
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.2px;
    transition: all var(--uc-t);
    white-space: nowrap;
    cursor: pointer;
}

.uc-logout-btn svg {
    flex-shrink: 0;
    transition: transform var(--uc-t);
}

.uc-logout-btn:hover {
    background: rgba(255, 255, 255, .28);
    border-color: rgba(255, 255, 255, .45);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.uc-logout-btn:hover svg {
    transform: translateX(2px);
}

.uc-logout-btn:active {
    transform: translateY(0);
}

/* ── Card ───────────────────────────────────────────────────── */
.uc-card {
    background: var(--uc-surface);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius-xl);
    box-shadow: var(--uc-shadow);
    overflow: hidden;
    margin-bottom: 14px;
}

.uc-card-body {
    padding: 18px var(--uc-pad-x);
}

.uc-card-body> :first-child {
    margin-top: 0;
}

.uc-card-body> :last-child {
    margin-bottom: 0;
}

/* ── Banners ────────────────────────────────────────────────── */
.uc-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: var(--uc-radius);
    margin-bottom: 14px;
    border: 1px solid transparent;
    font-size: 14px;
}

.uc-banner-warning {
    background: var(--uc-warn-bg);
    border-color: var(--uc-warn-bd);
    color: var(--uc-warn-txt);
}

.uc-banner-success {
    background: var(--uc-green-light);
    border-color: var(--uc-green-border);
    color: var(--uc-green-dark);
}

.uc-banner-info {
    background: var(--uc-bg);
    border-color: var(--uc-border);
    color: var(--uc-ink-2);
}

.uc-banner-body {
    flex: 1;
    line-height: 1.45;
}

.uc-banner-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: .65;
    margin-bottom: 2px;
}

.uc-banner-value {
    font-size: 14px;
    font-weight: 600;
}

/* ── Score Card ─────────────────────────────────────────────── */
.uc-score-card {
    text-align: center;
    padding: 40px 28px;
    background: var(--uc-green-light);
    border: 1px solid var(--uc-green-border);
    border-radius: var(--uc-radius-xl);
    margin-bottom: 14px;
    box-shadow: var(--uc-shadow);
}

.uc-score-trophy {
    font-size: 40px;
    margin-bottom: 10px;
}

.uc-score-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--uc-ink);
    margin: 0 0 6px;
}

.uc-score-sub {
    font-size: 13px;
    color: var(--uc-ink-3);
    margin: 0 0 24px;
}

.uc-score-bubble {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: var(--uc-surface);
    border: 2px solid var(--uc-green);
    border-radius: var(--uc-radius-lg);
    padding: 16px 36px;
    box-shadow: var(--uc-shadow);
}

.uc-score-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--uc-ink-3);
    margin-bottom: 4px;
}

.uc-score-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--uc-green-dark);
    line-height: 1;
}

.uc-score-footer {
    font-size: 12px;
    color: var(--uc-ink-4);
    margin-top: 16px;
}

/* ── Result Rows ─────────────────────────────────── */
.uc-result-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px var(--uc-pad-x);
    border-bottom: 1px solid var(--uc-divider);
}

.uc-result-row.is-pass,
.uc-result-row.is-ready {
    box-shadow: inset 3px 0 0 var(--uc-green);
}

.uc-result-row.is-fail {
    box-shadow: inset 3px 0 0 #f87171;
}

.uc-result-row.is-pending {
    box-shadow: inset 3px 0 0 #f59e0b;
}

.uc-result-body {
    flex: 1 1 190px;
    min-width: 0;
}

.uc-result-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 3px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--uc-ink);
}

.uc-result-code {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--uc-bg);
    border: 1px solid var(--uc-border);
    color: var(--uc-ink-3);
}

.uc-result-meta {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--uc-ink-4);
}

.uc-result-verdict {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
}

.uc-result-score {
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
    color: var(--uc-green-dark);
    /* Scores line up column-wise down the list. */
    font-variant-numeric: tabular-nums;
}

.uc-verdict-tag {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

/* A closing note inside a card, on the same inset as everything above it. */
.uc-card-note {
    margin: 0;
    padding: 12px var(--uc-pad-x);
    font-size: 12px;
    color: var(--uc-ink-4);
}

/* ── Exam Card ──────────────────────────────────────────────── */
.uc-exam-card {
    text-align: center;
    padding: 32px 28px;
}

.uc-exam-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--uc-ink);
    margin: 0 0 16px;
}

.uc-exam-empty {
    font-size: 14px;
    color: var(--uc-ink-3);
}

/* ── Section Header ─────────────────────────────────────────── */
.uc-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px var(--uc-pad-x);
    border-bottom: 1px solid var(--uc-divider);
}

.uc-section-header .uc-section-title,
#unicep-portal-wrapper .uc-section-title,
#unicep-supervisor-wrapper .uc-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--uc-ink);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.uc-table-header .uc-card-heading,
#unicep-portal-wrapper .uc-card-heading,
#unicep-supervisor-wrapper .uc-card-heading {
    font-size: 15px;
    font-weight: 700;
    color: var(--uc-ink);
    margin: 0;
    line-height: 1.3;
}

/* The same again for the headings that are not card titles. */
.uc-gr-invite .uc-gr-invite-title,
#unicep-portal-wrapper .uc-gr-invite-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--uc-green-dark);
    margin: 0 0 6px;
}

.uc-access-box .uc-access-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--uc-ink);
    margin: 0 0 8px;
}

.uc-empty-state .uc-empty-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--uc-ink);
    margin: 0 0 6px;
}

/* ── Info Rows ──────────────────────────────────────────────── */
.uc-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    padding: 13px var(--uc-pad-x);
    border-bottom: 1px solid var(--uc-divider);
    gap: 10px;
    transition: background var(--uc-t);
}

.uc-info-row:last-child {
    border-bottom: none;
}

.uc-info-row:hover {
    background: var(--uc-bg);
}

.uc-info-row.is-locked:hover {
    background: transparent;
}

.uc-row-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--uc-ink-4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-top: 4px;
}

.uc-row-value {
    font-size: 14px;
    color: var(--uc-ink-2);
    font-weight: 500;
    line-height: 1.5;
}

.uc-row-value.is-locked {
    color: var(--uc-ink-3);
}

.uc-view-mode {
    display: block;
}

.uc-edit-mode {
    display: none;
    margin-top: 6px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.uc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px !important;
    border-radius: var(--uc-radius) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: var(--uc-font);
    cursor: pointer;
    transition: all var(--uc-t);
    border: none;
    text-decoration: none !important;
    line-height: 1;
    white-space: nowrap;
    outline: none;
    background-color: transparent !important;
}

.uc-btn-primary {
    background: var(--uc-green) !important;
    color: #fff !important;
    box-shadow: 0 1px 4px rgba(22, 163, 74, .3);
}

.uc-btn-primary:hover {
    background: var(--uc-green-dark) !important;
    box-shadow: 0 3px 8px rgba(22, 163, 74, .35);
    transform: translateY(-1px);
}

.uc-btn-ghost {
    background: transparent !important;
    color: var(--uc-ink-2) !important;
    border: 1px solid var(--uc-border-2) !important;
}

.uc-btn-ghost:hover {
    background: var(--uc-bg) !important;
    color: var(--uc-ink) !important;
}

.uc-btn-edit {
    background: transparent !important;
    color: var(--uc-ink-4) !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    border: 1px solid transparent !important;
    cursor: pointer;
    font-family: var(--uc-font);
    line-height: 1;
    transition: all var(--uc-t);
}

.uc-btn-edit:hover {
    background: var(--uc-bg) !important;
    color: var(--uc-green) !important;
    border-color: var(--uc-border) !important;
}

.uc-btn-warning {
    background: #f59e0b !important;
    color: #fff !important;
}

.uc-btn-warning:hover {
    background: #d97706 !important;
    transform: translateY(-1px);
}

.uc-btn-lg {
    padding: 11px 24px;
    font-size: 14px;
}

.uc-locked-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: var(--uc-ink-4);
    background: var(--uc-bg);
    border-radius: 999px;
    padding: 3px 9px;
    border: 1px solid var(--uc-border);
}

/* ── Inputs — strong override to beat WooCommerce/Elementor ── */
#unicep-portal-wrapper .uc-input,
#unicep-portal-wrapper input[type="text"].uc-input,
#unicep-portal-wrapper input[type="email"].uc-input,
#unicep-portal-wrapper input[type="tel"].uc-input,
#unicep-portal-wrapper input[type="password"].uc-input,
#unicep-supervisor-wrapper .uc-input,
#unicep-supervisor-wrapper input[type="text"].uc-input,
#unicep-supervisor-wrapper input[type="email"].uc-input,
#unicep-supervisor-wrapper input[type="tel"].uc-input,
#unicep-supervisor-wrapper input[type="password"].uc-input {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid var(--uc-border-2) !important;
    border-radius: var(--uc-radius) !important;
    font-size: 14px !important;
    font-family: var(--uc-font) !important;
    color: var(--uc-ink) !important;
    background: var(--uc-surface) !important;
    box-shadow: none !important;
    height: auto !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: border-color var(--uc-t), box-shadow var(--uc-t);
    margin: 0 !important;
}

#unicep-portal-wrapper .uc-input:focus,
#unicep-portal-wrapper input[type="text"].uc-input:focus,
#unicep-portal-wrapper input[type="password"].uc-input:focus,
#unicep-supervisor-wrapper .uc-input:focus,
#unicep-supervisor-wrapper input[type="text"].uc-input:focus,
#unicep-supervisor-wrapper input[type="password"].uc-input:focus {
    border-color: var(--uc-green) !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .1) !important;
}

.uc-input-row {
    display: flex;
    gap: 8px;
}

.uc-input-row .uc-input {
    flex: 1;
}

/* ── Checkboxes / Radios ────────────────────────────────────── */
.uc-option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--uc-ink-2);
    cursor: pointer;
    padding: 4px 0;
    line-height: 1.45;
}

.uc-option-label input {
    width: 15px;
    height: 15px;
    accent-color: var(--uc-green);
    flex-shrink: 0;
    cursor: pointer;
}

/* ── Competition Warning ────────────────────────────────────── */
.uc-comp-warning {
    margin-top: 10px;
    padding: 10px 13px;
    background: var(--uc-warn-bg);
    border: 1px solid var(--uc-warn-bd);
    border-radius: var(--uc-radius);
    font-size: 13px;
    color: var(--uc-warn-txt);
    display: none;
}

.uc-grade-note {
    font-size: 12px;
    color: var(--uc-ink-4);
    font-style: italic;
    margin: 0;
}

/* ── Action Bar ─────────────────────────────────────────────── */
.uc-action-bar {
    display: none;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    padding: 14px var(--uc-pad-x);
    border-top: 1px solid var(--uc-divider);
    background: var(--uc-bg);
}

.uc-action-bar.is-visible {
    display: flex;
}

.uc-status-msg {
    font-size: 13px;
    font-weight: 600;
    flex: 1;
}

/* ── Access / Error Boxes ───────────────────────────────────── */
.uc-access-box {
    max-width: 400px;
    margin: 60px auto;
    text-align: center;
    padding: 40px 28px;
    background: var(--uc-surface);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius-xl);
    box-shadow: var(--uc-shadow-md);
    font-family: var(--uc-font);
}

.uc-access-icon {
    font-size: 36px;
    margin-bottom: 14px;
}

.uc-access-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--uc-ink);
    margin: 0 0 8px;
}

.uc-access-desc {
    font-size: 14px;
    color: var(--uc-ink-3);
    margin: 0 0 22px;
    line-height: 1.6;
}

.uc-error-box {
    padding: 16px 20px;
    background: var(--uc-error-bg);
    border: 1px solid var(--uc-error-bd);
    color: var(--uc-error-txt);
    border-radius: var(--uc-radius);
    max-width: 600px;
    margin: 20px auto;
    font-family: var(--uc-font);
    font-size: 14px;
}

/* ============================================================
   SUPERVISOR PORTAL
   ============================================================ */
#unicep-supervisor-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: var(--uc-font);
    color: var(--uc-ink);
}

.uc-sup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    background: linear-gradient(135deg, var(--uc-green-dark) 0%, var(--uc-green) 100%);
    border-radius: var(--uc-radius-xl);
    box-shadow: 0 4px 20px rgba(22, 163, 74, .25);
    color: #fff;
    margin-bottom: 14px;
}

.uc-sup-header-info {
    flex: 1;
}

.uc-sup-greeting {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 0 0 3px;
    line-height: 1.2;
}

.uc-sup-school {
    font-size: 13px;
    opacity: .75;
    margin: 0;
}

.uc-sup-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.uc-logout-btn-supervisor {
    padding: 8px 14px;
}

.uc-tid-badge {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: var(--uc-radius-lg);
    padding: 10px 18px;
    text-align: center;
    min-width: 110px;
    flex-shrink: 0;
}

.uc-tid-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: .75;
    margin-bottom: 3px;
}

.uc-tid-value {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1;
}

.uc-tip-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: var(--uc-green-light);
    border: 1px solid var(--uc-green-border);
    border-radius: var(--uc-radius-xl);
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--uc-green-dark);
    line-height: 1.6;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.06);
}

.uc-tip-icon {
    font-size: 17px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Tabs (Segmented Control) ───────────────────────────────── */
/* Maximum-specificity block to override all Elementor/theme button styles */
#unicep-supervisor-wrapper .uc-tabs,
#unicep-supervisor-wrapper .uc-tabs:where(*) {
    display: flex !important;
    align-items: stretch !important;
    gap: 4px !important;
    margin-bottom: 18px !important;
    background: #f0f2f5 !important;
    border-radius: 12px !important;
    padding: 5px !important;
    border: none !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

#unicep-supervisor-wrapper button.uc-tab-btn,
#unicep-supervisor-wrapper .uc-tabs button,
#unicep-supervisor-wrapper .uc-tabs button[type="button"],
#unicep-supervisor-wrapper .uc-tab-btn[type="button"] {
    flex: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 10px 14px !important;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    outline: none !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-family: var(--uc-font) !important;
    white-space: nowrap !important;
    text-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1.4 !important;
    min-height: unset !important;
    height: auto !important;
    width: auto !important;
    margin: 0 !important;
}

#unicep-supervisor-wrapper button.uc-tab-btn svg,
#unicep-supervisor-wrapper .uc-tab-btn[type="button"] svg {
    flex-shrink: 0 !important;
    opacity: 0.65 !important;
    transition: opacity 0.2s ease !important;
    color: currentColor !important;
    width: 15px !important;
    height: 15px !important;
}

#unicep-supervisor-wrapper button.uc-tab-btn:hover,
#unicep-supervisor-wrapper .uc-tab-btn[type="button"]:hover {
    background: rgba(255, 255, 255, 0.72) !important;
    background-color: rgba(255, 255, 255, 0.72) !important;
    color: #1e293b !important;
}

#unicep-supervisor-wrapper button.uc-tab-btn:hover svg,
#unicep-supervisor-wrapper .uc-tab-btn[type="button"]:hover svg {
    opacity: 0.9 !important;
}

#unicep-supervisor-wrapper button.uc-tab-btn.active,
#unicep-supervisor-wrapper .uc-tab-btn[type="button"].active {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #111827 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10) !important;
    font-weight: 700 !important;
}

#unicep-supervisor-wrapper button.uc-tab-btn.active svg,
#unicep-supervisor-wrapper .uc-tab-btn[type="button"].active svg {
    opacity: 1 !important;
    color: var(--uc-green) !important;
}

.uc-tab-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #dde3ea !important;
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    padding: 1px 7px !important;
    line-height: 1.4 !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

#unicep-supervisor-wrapper button.uc-tab-btn.active .uc-tab-badge,
#unicep-supervisor-wrapper .uc-tab-btn[type="button"].active .uc-tab-badge {
    background: #dcfce7 !important;
    color: #15803d !important;
}

.uc-tab-panel {
    display: none;
}

.uc-tab-panel.is-active {
    display: block;
}

/* ── Supervisor Card & Table ────────────────────────────────── */
.uc-sup-table-card {
    overflow: hidden;
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius-xl);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    background: var(--uc-surface);
}

.uc-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px var(--uc-pad-x);
    border-bottom: 1px solid var(--uc-divider);
    background: #ffffff;
}

.uc-table-header-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.uc-table-header-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
}

.uc-card-heading {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--uc-ink);
    line-height: 1.3;
}

.uc-count-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    border-radius: 999px;
    line-height: 1.5;
}

.uc-table-subtitle {
    font-size: 12.5px;
    color: var(--uc-ink-3);
    margin: 3px 0 0;
    line-height: 1.4;
}

.uc-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

#unicep-supervisor-wrapper table.uc-sup-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: none !important;
    margin: 0;
}

#unicep-supervisor-wrapper table.uc-sup-table thead tr {
    background: #f8fafc;
}

#unicep-supervisor-wrapper table.uc-sup-table th {
    padding: 13px 22px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    white-space: nowrap;
}

#unicep-supervisor-wrapper table.uc-sup-table td {
    padding: 16px 22px;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 13.5px;
    color: var(--uc-ink-2);
    vertical-align: middle;
}

#unicep-supervisor-wrapper table.uc-sup-table tbody tr:last-child td {
    border-bottom: none !important;
}

#unicep-supervisor-wrapper table.uc-sup-table tbody tr {
    transition: background 0.15s ease;
}

#unicep-supervisor-wrapper table.uc-sup-table tbody tr:hover td {
    background: #f8fafc;
}

/* ── Student Column Cell ────────────────────────────────────── */
.uc-td-student {
    min-width: 220px;
}

.uc-student-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.uc-student-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1.5px solid #bbf7d0;
    color: #15803d;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: -0.3px;
}

.uc-student-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.uc-student-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--uc-ink);
    line-height: 1.3;
}

.uc-student-email {
    font-size: 12px;
    color: var(--uc-ink-3);
    line-height: 1.2;
}

/* ── Grade & Competition Pills ──────────────────────────────── */
.uc-grade-pill {
    display: inline-block;
    padding: 4px 10px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.uc-comp-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 320px;
}

.uc-comp-pill {
    display: inline-block;
    padding: 3px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    white-space: nowrap;
}

.uc-score-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    font-size: 13px;
    color: #15803d;
    white-space: nowrap;
}

.uc-score-icon {
    font-size: 14px;
}

/* ── Status Badges with Dot Indicator ───────────────────────── */
.uc-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.uc-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.uc-status-paid {
    background: #dcfce7;
    color: #15803d;
}

.uc-status-paid .uc-status-dot {
    background: #16a34a;
}

.uc-status-pending {
    background: #fef9c3;
    color: #854d0e;
}

.uc-status-pending .uc-status-dot {
    background: #ca8a04;
}

.uc-status-unpaid {
    background: #fee2e2;
    color: #b91c1c;
}

.uc-status-unpaid .uc-status-dot {
    background: #dc2626;
}

.uc-status-gray {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.uc-status-gray .uc-status-dot {
    background: #94a3b8;
}

/* ── Empty State ────────────────────────────────────────────── */
.uc-td-empty {
    text-align: center;
    padding: 48px 24px !important;
}

.uc-empty-state {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.uc-empty-icon {
    font-size: 38px;
    margin-bottom: 12px;
    display: block;
    line-height: 1;
}

.uc-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--uc-ink);
    margin: 0 0 6px;
}

.uc-empty-desc {
    font-size: 13.5px;
    color: var(--uc-ink-3);
    line-height: 1.5;
    margin: 0;
}

/* ── Roster Filter Bar ───────────────────────────── */
.uc-filter-shell {
    padding: 16px var(--uc-pad-x);
    border-bottom: 1px solid var(--uc-divider);
    background: #fbfcfd;
}

.uc-search-filters {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.uc-filter-primary {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.uc-filter-field-search {
    flex: 1 1 auto;
    min-width: 0;
}

.uc-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.uc-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

/* Same shape as .uc-password-field: micro-label above its control. */
.uc-filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    margin: 0;
}

.uc-filter-field .uc-row-label {
    margin: 0;
    padding: 0;
}

#unicep-supervisor-wrapper .uc-select,
#unicep-supervisor-wrapper .uc-search-wrap .uc-search-input {
    width: 100% !important;
    height: var(--uc-control-h) !important;
    font-family: var(--uc-font) !important;
    font-size: 13.5px !important;
    color: var(--uc-ink) !important;
    background-color: var(--uc-surface) !important;
    border: 1px solid var(--uc-border-2) !important;
    border-radius: var(--uc-radius) !important;
    box-shadow: none !important;
    outline: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transition: border-color var(--uc-t), box-shadow var(--uc-t);
}

#unicep-supervisor-wrapper .uc-select {
    padding: 0 30px 0 12px !important;
    font-weight: 600 !important;
    cursor: pointer;
    text-overflow: ellipsis;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 11px center !important;
}

.uc-search-wrap {
    position: relative;
    display: block;
}

.uc-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--uc-ink-4);
    pointer-events: none;
}

#unicep-supervisor-wrapper .uc-search-wrap .uc-search-input {
    padding: 0 12px 0 36px !important;
}

#unicep-supervisor-wrapper .uc-select:focus,
#unicep-supervisor-wrapper .uc-search-wrap .uc-search-input:focus {
    border-color: var(--uc-green) !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .1) !important;
}

.uc-filter-field.is-active .uc-row-label {
    color: var(--uc-green);
}

#unicep-supervisor-wrapper .uc-filter-field.is-active .uc-select {
    border-color: var(--uc-green) !important;
    background-color: var(--uc-green-light) !important;
    color: var(--uc-green-dark) !important;
}

/* Buttons stand exactly as tall as the field beside them. */
#unicep-supervisor-wrapper .uc-filter-btn {
    height: var(--uc-control-h);
    padding: 0 18px !important;
}

.uc-filter-summary {
    margin: 14px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--uc-ink-3);
}

#unicep-supervisor-wrapper .uc-grid-table .uc-td-student,
#unicep-supervisor-wrapper .uc-grid-table .uc-student-cell,
#unicep-supervisor-wrapper .uc-grid-table .uc-student-details {
    min-width: 0;
}

#unicep-supervisor-wrapper .uc-grid-table .uc-td-student {
    overflow: hidden;
}

#unicep-supervisor-wrapper .uc-grid-table .uc-student-name,
#unicep-supervisor-wrapper .uc-grid-table .uc-student-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Profile Grid ───────────────────────────────────────────── */
.uc-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.uc-profile-field {
    padding: 16px var(--uc-pad-x);
    border-top: 1px solid var(--uc-divider);
}

.uc-profile-field:nth-child(-n+2) {
    border-top: none;
}

.uc-profile-field:nth-child(odd) {
    border-right: 1px solid var(--uc-divider);
}

.uc-profile-field-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--uc-ink-4);
    line-height: 1.4;
    margin: 0 0 5px;
}

.uc-profile-field-value {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--uc-ink-2);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ============================================================
   GLOBAL ROUND INVITATION
   Shown in the student portal once a Qualification Round paper
   has been passed (see UniCEP_Passing) and no Global Round order
   exists yet.
   ============================================================ */
.uc-gr-invite {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 20px var(--uc-pad-x);
    background: linear-gradient(135deg, var(--uc-green-light) 0%, #ffffff 60%);
    border: 1px solid var(--uc-green-border);
}

.uc-gr-invite-icon {
    font-size: 34px;
    line-height: 1;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

.uc-gr-invite-body {
    flex: 1 1 320px;
    min-width: 260px;
}

.uc-gr-invite-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--uc-green-dark);
}

.uc-gr-invite-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--uc-ink-2);
}

.uc-gr-invite-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.uc-pass-pill {
    display: inline-block;
    background: var(--uc-surface);
    border: 1px solid var(--uc-green-border);
    color: #15803d;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.uc-gr-invite-note {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--uc-ink-3);
}

.uc-gr-invite-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ============================================================
   SCORE VERDICT PILL
   ============================================================ */
.uc-verdict-pass {
    background: var(--uc-green-light);
    border-color: var(--uc-green-border);
    color: #15803d;
}

.uc-verdict-fail {
    background: var(--uc-error-bg);
    border-color: var(--uc-error-bd);
    color: #b91c1c;
}

.uc-verdict-pending {
    background: #fffbeb;
    border-color: #fde68a;
    color: #b45309;
}

/* ============================================================
   CHANGE PASSWORD CARD
   Shared by the student and supervisor portals.
   ============================================================ */
.uc-password-intro {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--uc-ink-3);
}

.uc-password-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px 16px;
}

.uc-password-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* The label is the flex item, so its own margin would double the gap. */
    margin: 0;
}

.uc-password-field .uc-row-label {
    margin: 0;
    padding: 0;
}

.uc-password-hint {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--uc-ink-4);
}

/* ============================================================
   LOGIN FORM EXTRAS
   wp_login_form() renders no lost-password link of its own, so
   both portals add one here.
   ============================================================ */
.uc-login-links {
    margin: 14px 0 0;
    font-size: 13px;
    text-align: center;
}

.uc-login-links a {
    color: var(--uc-green);
    text-decoration: underline;
}

.uc-login-links a:hover {
    color: var(--uc-green-dark);
}

.uc-login-notice {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: var(--uc-radius);
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid transparent;
}

.uc-login-notice-success {
    background: var(--uc-green-light);
    border-color: var(--uc-green-border);
    color: #15803d;
}

@media (max-width: 600px) {

    /*
     * Tighten the shared inset rather than overriding padding rule by rule.
     * 22px inside a card plus 12px outside it spends a tenth of a 360px
     * screen on margin.
     */
    :root {
        --uc-pad-x: 16px;
    }

    #unicep-portal-wrapper,
    #unicep-supervisor-wrapper {
        padding: 0 12px;
        margin: 20px auto;
    }

    /* The supervisor portal hardcodes 22px in its own inline !important
       block, so this has to be named to follow the variable. */
    #unicep-supervisor-wrapper .uc-card .uc-table-header {
        padding-left: var(--uc-pad-x) !important;
        padding-right: var(--uc-pad-x) !important;
    }

    /* Search box over a full-width button, rather than a narrow button
       marooned on a line of its own. */
    .uc-filter-primary {
        flex-direction: column;
        align-items: stretch;
    }

    .uc-filter-actions {
        width: 100%;
    }

    #unicep-supervisor-wrapper .uc-filter-btn {
        flex: 1 1 auto;
    }

    .uc-filter-row {
        gap: 10px;
    }

    .uc-profile-header {
        flex-wrap: wrap;
        padding: 18px 16px;
    }

    .uc-profile-header-actions,
    .uc-sup-header-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-left: 0;
        margin-top: 10px;
    }

    .uc-round-pill {
        margin-left: 0;
    }

    .uc-info-row {
        grid-template-columns: 1fr auto;
    }

    .uc-row-label {
        font-size: 10px;
    }

    .uc-input-row {
        flex-direction: column;
    }

    /*
     * Wrap, do not stack. The base rule already wraps, so a header whose
     * title and control do not fit breaks by itself; forcing a column spent
     * a whole line on a count tag that had room beside its heading.
     */
    .uc-section-header {
        gap: 8px 10px;
    }

    .uc-sup-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 16px;
    }

    /*
     * Tabs scroll instead of squeezing. `flex: 1` in the portal's inline block
     * divides the strip between three tabs whatever the screen, which on a
     * phone crushed the labels and clipped the third one mid-word.
     */
    #unicep-supervisor-wrapper .uc-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    #unicep-supervisor-wrapper .uc-tabs::-webkit-scrollbar {
        display: none;
    }

    #unicep-supervisor-wrapper .uc-tabs button.uc-tab-btn {
        flex: 0 0 auto !important;
        padding: 9px 13px !important;
    }

    /* ── Roster tables become a list of cards ────────────────── */
    /*
     * Four grid columns cannot survive a phone: the header row alone was
     * "STUDENT GRADE COMPETITIONS EX..SC". Each row becomes a card, each cell
     * a labelled line inside it, with the label coming from the data-label
     * the markup carries for exactly this purpose.
     */
    #unicep-supervisor-wrapper .uc-grid-table .uc-grid-thead {
        display: none !important;
    }

    #unicep-supervisor-wrapper .uc-grid-table .uc-grid-tr {
        display: block !important;
        padding: 14px var(--uc-pad-x) !important;
    }

    #unicep-supervisor-wrapper .uc-grid-table .uc-grid-td {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 14px;
        padding: 6px 0 !important;
    }

    #unicep-supervisor-wrapper .uc-grid-table .uc-grid-td:not(.uc-td-student)::before {
        content: attr(data-label);
        flex: 0 0 auto;
        padding-top: 3px;
        font-size: 10.5px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--uc-ink-4);
    }

    /* Pills read better ranged right, against their label. */
    #unicep-supervisor-wrapper .uc-grid-table .uc-grid-td .uc-comp-pills {
        justify-content: flex-end !important;
    }

    /* The student cell needs no label - avatar, name and email say what it
       is - so it heads the card instead. */
    #unicep-supervisor-wrapper .uc-grid-table .uc-td-student {
        min-width: 0 !important;
        margin-bottom: 6px;
        padding-bottom: 10px !important;
        border-bottom: 1px dashed var(--uc-divider);
    }

    /* Stacked, the student cell has the full width to itself, so the address
       wraps rather than being cut off. */
    #unicep-supervisor-wrapper .uc-grid-table .uc-student-name,
    #unicep-supervisor-wrapper .uc-grid-table .uc-student-email {
        overflow: visible;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .uc-profile-grid {
        grid-template-columns: 1fr;
    }

    .uc-profile-field:nth-child(odd) {
        border-right: none;
    }

    /* Stacked, every field but the first opens a new row of its own. */
    .uc-profile-field:nth-child(2) {
        border-top: 1px solid var(--uc-divider);
    }

    .uc-gr-invite {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: flex-start;
        text-align: left;
    }

    /* `flex: 1 1 320px` is a width while the invitation is a row and becomes a
       320px minimum height the moment it stacks, which left a block of empty
       card between the note and the button. */
    .uc-gr-invite-body {
        flex: 0 1 auto;
        min-width: 0;
        width: 100%;
    }

    .uc-gr-invite-btn {
        width: 100%;
        justify-content: center;
    }

    .uc-password-grid {
        grid-template-columns: 1fr;
    }

    /* The score and its verdict drop below the paper they belong to. */
    .uc-result-verdict {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .uc-result-row {
        gap: 10px;
    }

    .uc-card-body {
        padding: 16px;
    }

    .uc-gr-invite {
        padding: 18px 16px;
    }
}