/* Judge portal — teal accent, distinct from admin */
:root {
    --j-ink: #0c1222;
    --j-primary: #0d9488;
    --j-primary-dark: #0f766e;
    --j-bg: #f0f4f3;
    --j-surface: #ffffff;
    --j-border: rgba(12, 18, 34, 0.08);
    --j-text-muted: #5c6370;
    --j-sidebar: #0f172a;
}

body.judge-body {
    margin: 0;
    font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
    background: var(--j-bg);
    color: var(--j-ink);
    min-height: 100vh;
}

.judge-shell {
    display: flex;
    min-height: 100vh;
}

.judge-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--j-sidebar);
    color: rgba(255, 255, 255, 0.85);
    padding: 1.25rem 0;
}

.judge-sidebar-brand {
    padding: 0 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1rem;
}

.judge-logo-img {
    height: 32px;
    width: auto;
    display: block;
    margin-bottom: 0.75rem;
}

.judge-sidebar-brand .title {
    font-weight: 600;
    font-size: 1rem;
}

.judge-sidebar-brand small {
    display: block;
    opacity: 0.6;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.judge-nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
}

.judge-nav-link:hover,
.judge-nav-link.active {
    color: #fff;
    background: rgba(13, 148, 136, 0.2);
}

.judge-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.judge-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    background: var(--j-surface);
    border-bottom: 1px solid var(--j-border);
}

.judge-topbar h1 {
    font-size: 1.125rem;
    margin: 0;
    font-weight: 600;
}

.judge-topbar-meta {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--j-text-muted);
    text-align: right;
}

.judge-content {
    padding: 1.5rem;
    flex: 1;
}

.judge-card {
    background: var(--j-surface);
    border: 1px solid var(--j-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(12, 18, 34, 0.04);
}

.judge-card-header {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--j-border);
    font-weight: 600;
    font-size: 0.9375rem;
}

.judge-card-body {
    padding: 1.25rem;
}

.judge-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.judge-stat {
    background: var(--j-surface);
    border: 1px solid var(--j-border);
    border-radius: 12px;
    padding: 1.25rem;
}

.judge-stat .label {
    font-size: 0.75rem;
    color: var(--j-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.judge-stat .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--j-primary-dark);
    margin-top: 0.35rem;
}

.judge-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(13, 148, 136, 0.12);
    color: var(--j-primary-dark);
}

.judge-table {
    width: 100%;
    font-size: 0.875rem;
}

.judge-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--j-text-muted);
    border-bottom: 1px solid var(--j-border);
    padding: 0.65rem 1rem;
}

.judge-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--j-border);
    vertical-align: middle;
}

.judge-btn-primary {
    background: var(--j-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.judge-btn-primary:hover {
    background: var(--j-primary-dark);
    color: #fff;
}

.judge-btn-outline {
    border: 1px solid var(--j-border);
    background: transparent;
    color: var(--j-ink);
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
    text-decoration: none;
}

.judge-kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.judge-kv-item .label {
    font-size: 0.75rem;
    color: var(--j-text-muted);
    margin-bottom: 0.25rem;
}

.judge-kv-item .value {
    font-weight: 500;
}

.judge-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #134e4a 100%);
    padding: 1.5rem;
}

.judge-login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}

.judge-invite-page {
    min-height: 100vh;
    background: var(--j-bg);
    padding: 2rem 1rem;
}

.judge-invite-card {
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--j-border);
    box-shadow: 0 8px 32px rgba(12, 18, 34, 0.06);
}

.judge-btn-outline:hover {
    border-color: var(--j-primary);
    color: var(--j-primary-dark);
}

.judge-scoring-tabs .nav-link {
    color: var(--j-text-muted);
}

.judge-scoring-tabs .nav-link.active {
    color: var(--j-primary-dark);
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .judge-shell {
        flex-direction: column;
    }

    .judge-sidebar {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0;
        padding: 0.75rem;
    }

    .judge-sidebar-brand {
        width: 100%;
        border: none;
        margin: 0;
        padding: 0 0.5rem 0.5rem;
    }

    .judge-nav-link {
        padding: 0.5rem 0.85rem;
        border-radius: 8px;
    }
}
