
/* Maker: Arreojn Lloyd G. Manzano - Candon City Information Technology National High School - 09168556960 */

/* ============================================
   FOOTER
============================================ */
.site-footer {
    text-align: center;
    padding: 20px;
    margin-left: var(--sidebar-width);
    color: var(--text-muted);
    font-size: 14px;
}

.site-footer a {
    color: var(--emerald-light);
    transition: color var(--transition-fast);
}

.site-footer a:hover {
    color: var(--gold);
}

/* Login/Register page footer */
.login-page .site-footer {
    margin-left: 0;
    position: relative;
    padding: 30px 20px;
    text-align: center;
    margin-top: 30px;
}

/* Floating Theme Toggle for Login/Register */
.theme-toggle-float {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all var(--transition-fast);
}

.theme-toggle-float:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.theme-toggle-float svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

/* ============================================
   SETTINGS PAGE
============================================ */
.settings-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 24px;
}

.settings-nav {
    list-style: none;
}

.settings-nav-item {
    margin-bottom: 8px;
}

.settings-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--text-secondary);
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.settings-nav-link:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.settings-nav-link.active {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.settings-nav-link svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.settings-nav-link.active svg,
.settings-nav-link:hover svg {
    opacity: 1;
}

.settings-section {
    margin-bottom: 32px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.settings-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-label-title {
    font-weight: 500;
    color: var(--text-primary);
}

.settings-label-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 26px;
    transition: all var(--transition-fast);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    border-color: var(--emerald);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
    background: white;
}

/* Settings Select Dropdown */
.settings-select {
    padding: 10px 16px;
    background: rgba(19, 36, 25, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.settings-select:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.15);
}

.settings-select option {
    background: rgba(19, 36, 25, 0.98);
    color: var(--text-primary);
    padding: 10px;
}

[data-theme="light"] .settings-select {
    background-color: rgba(245, 245, 240, 0.95);
}

[data-theme="light"] .settings-select option {
    background: rgba(245, 245, 240, 0.98);
    color: #1a1a1a;
}

/* Profile Header */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 36px;
    position: relative;
}

.profile-avatar-edit {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-avatar-edit:hover {
    background: var(--glass-hover);
    border-color: var(--emerald-light);
}

.profile-avatar-edit svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.profile-info h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-info p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Settings Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-settings.full-width {
    grid-column: span 2;
}

.form-group-settings label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group-settings input,
.form-group-settings textarea {
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-group-settings input:focus,
.form-group-settings textarea:focus {
    outline: none;
    border-color: var(--emerald-light);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.15);
}

.form-group-settings textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Settings Tab Content */
.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
    animation: settingsFadeIn 0.3s ease;
}

@keyframes settingsFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bottom-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .table-card {
        grid-column: span 1;
    }
}

@media (max-width: 992px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .bottom-grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        margin-left: 0;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-nav-card {
        display: none;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-wrap: wrap;
    }
    
    .search-box {
        order: 3;
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .donut-container {
        flex-direction: column;
    }

    .login-card {
        padding: 36px 24px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group-settings.full-width {
        grid-column: span 1;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 15px;
    }
    
    .glass-card {
        padding: 18px;
    }
    
    .stat-value {
        font-size: 26px;
    }
    
    .data-table {
        font-size: 13px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }

    .social-login {
        flex-direction: column;
    }
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.stats-grid .glass-card:nth-child(1) { animation-delay: 0.1s; }
.stats-grid .glass-card:nth-child(2) { animation-delay: 0.2s; }
.stats-grid .glass-card:nth-child(3) { animation-delay: 0.3s; }
.stats-grid .glass-card:nth-child(4) { animation-delay: 0.4s; }

.content-grid .glass-card:nth-child(1) { animation-delay: 0.5s; }
.content-grid .glass-card:nth-child(2) { animation-delay: 0.6s; }
.content-grid .glass-card:nth-child(3) { animation-delay: 0.7s; }

.bottom-grid .glass-card:nth-child(1) { animation-delay: 0.8s; }

@font-face {
    font-family: 'Space Mono';
    src: url('../fonts/SpaceMono-Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Space Mono';
    src: url('../fonts/SpaceMono-Bold.ttf') format('truetype');
    font-weight: 700;
}


.login-logo{
    width: 90px;
    height: auto;
    margin-bottom: 10px;
}

/* FIX DROPDOWN READABILITY */

select.form-input{
    background-color: var(--glass-bg);
    color: var(--text-primary);
}

select.form-input option{
    background-color: #111;
    color: #ffffff;
}

select.form-input option:hover{
    background-color: #444;
}

[data-theme="light"] select.form-input option{
    background-color: #ffffff;
    color: #1a1a1a;
}

form .form-input{
    width: 100%;
    margin-bottom: 10px;
}

/* Limit form width ONLY on login pages */
.login-page form{
    max-width: 400px;
}

/* Allow full-width forms inside dashboards */
.dashboard form{
    max-width: none;
}

/* ===== TABLE CENTERING ===== */

table{
    border-collapse: collapse;
}

table th,
table td{
    text-align: center;
    padding: 10px;
}

/* ===== ACTION BUTTONS ===== */

.action-btn{
    padding: 6px 12px;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    margin: 0 3px;
    display: inline-block;
}

.btn-edit{
    background: #0d6efd;   /* Blue */
}

.btn-delete{
    background: #dc3545;   /* Red */
}

.btn-edit:hover{
    background: #0b5ed7;
}

.btn-delete:hover{
    background: #bb2d3b;
}

/* ===== WIDE TABLE CARDS ===== */

.glass-card{
    width: 100%;
    overflow-x: auto;
}

table{
    min-width: 900px;
}

.main-content{
    width: 100%;
}

/* Center values inside scoring inputs */
.scoring-page input.form-input{
    text-align: center;
}

/* ===== RESULTS PAGE SPACING ===== */

.glass-card{
    margin-bottom: 30px;   /* space between charts */
}

h2{
    margin-top: 40px;
    margin-bottom: 20px;
}

h3{
    margin-bottom: 15px;
}

.sidebar {
    width: 260px;
    transition: width 0.3s;
}
.sidebar.collapsed {
    width: 70px;
}
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-section-title span,
.sidebar.collapsed .user-info {
    display: none;
}

.toggle-btn {
    background:none;
    border:none;
    color:var(--text-primary);
    font-size:20px;
    cursor:pointer;
}

.theme-toggle-btn{
    width: 100%;
    border: 1px solid var(--cms-border);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.28);
    color: var(--cms-text);
    cursor: pointer;
    font-size: 0.9rem;
}

.theme-toggle-btn:hover{
    border-color: color-mix(in srgb, var(--cms-accent) 52%, #ffffff 48%);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(20, 184, 166, 0.22));
}

.nav-section-title {
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:8px;
}

.nav-link {
    display:block;
    padding:8px 14px;
    border-radius:6px;
}
.nav-link.active {
    background: rgba(255,255,255,0.18);
    font-weight:600;
}

.theme-nav-btn{
    width:100%;
    border:none;
    background:transparent;
    text-align:left;
    font:inherit;
    color:inherit;
    cursor:pointer;
}

.nav-submenu {
    display: none;
    margin-left: 8px;
}

.nav-submenu.open {
    display: block;
}

.judge-sidebar{
    display:flex;
    flex-direction:column;
}

.judge-sidebar .nav-menu{
    flex:1;
}

.judge-assistance-dock{
    margin-top:auto;
    border-top:1px solid var(--glass-border);
    padding-top:12px;
}

.assistance-toggle-btn{
    width:100%;
    border:1px solid transparent;
    border-radius:10px;
    padding:10px 12px;
    font:inherit;
    color:#fff;
    font-weight:600;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    cursor:pointer;
    transition:all var(--transition-fast);
}

.assistance-toggle-btn:disabled{
    opacity:0.65;
    cursor:not-allowed;
}

.assistance-toggle-icon{
    font-size:15px;
    line-height:1;
}

.assistance-call-btn{
    background:#16a34a;
    border-color:#15803d;
}

.assistance-call-btn:hover{
    background:#15803d;
}

.assistance-cancel-btn{
    background:#dc2626;
    border-color:#b91c1c;
}

.assistance-cancel-btn:hover{
    background:#b91c1c;
}

.assistance-status{
    min-height:18px;
    padding:6px 2px 0;
    font-size:12px;
    color:var(--text-muted);
    text-align:center;
}

.assistance-status.error{
    color:#fca5a5;
}

.assistance-list-title{
    font-size:11px;
    letter-spacing:0.4px;
    color:var(--text-muted);
    text-transform:uppercase;
    padding:8px 2px 4px;
    text-align:center;
}

.assistance-list{
    list-style:none;
    margin:0;
    padding:0 0 2px;
    max-height:120px;
    overflow-y:auto;
}

.assistance-list li{
    margin-bottom:6px;
    padding:7px 10px;
    border-radius:8px;
    background:rgba(255,255,255,0.05);
    color:var(--text-secondary);
    font-size:13px;
    line-height:1.3;
}

.assistance-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
}

.assistance-name{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.assistance-remove-btn{
    border:1px solid rgba(220, 38, 38, 0.5);
    background:rgba(220, 38, 38, 0.2);
    color:#fecaca;
    border-radius:6px;
    padding:4px 8px;
    font-size:11px;
    line-height:1.2;
    cursor:pointer;
    flex-shrink:0;
    transition:all var(--transition-fast);
}

.assistance-remove-btn:hover{
    background:rgba(220, 38, 38, 0.35);
}

.assistance-remove-btn:disabled{
    opacity:0.6;
    cursor:not-allowed;
}

.assistance-list li.assistance-self{
    color:var(--text-primary);
    border:1px solid rgba(14, 165, 233, 0.5);
}

.assistance-list li.assistance-empty{
    text-align:center;
    color:var(--text-muted);
    border:1px dashed var(--glass-border);
    background:transparent;
}

.assistance-alert-light{
    display:none;
    width:10px;
    height:10px;
    border-radius:50%;
    margin-left:auto;
    background:#ef4444;
    box-shadow:0 0 0 rgba(239, 68, 68, 0.8);
}

.assistance-alert-light.active{
    display:inline-block;
    animation:assistanceAlertPulse 1s infinite;
}

@keyframes assistanceAlertPulse{
    0%{
        opacity:1;
        box-shadow:0 0 0 0 rgba(239, 68, 68, 0.8);
    }
    50%{
        opacity:0.35;
        box-shadow:0 0 0 8px rgba(239, 68, 68, 0);
    }
    100%{
        opacity:1;
        box-shadow:0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.sidebar.collapsed .judge-assistance-dock{
    padding-top:8px;
}

.sidebar.collapsed .nav-section-title .assistance-alert-light.active{
    display:inline-block;
}

.sidebar.collapsed .assistance-status,
.sidebar.collapsed .assistance-list-title,
.sidebar.collapsed .assistance-list,
.sidebar.collapsed #assistanceToggleText{
    display:none;
}

.sidebar.collapsed .assistance-toggle-btn{
    padding:10px 0;
    justify-content:center;
}

[data-theme="light"] .assistance-status.error{
    color:#b91c1c;
}

/* TOOLTIP */
.score-tooltip {
    position: absolute;
    background: #dc2626;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 9999;
    pointer-events: none;
    transform: translateY(-100%);
    margin-top: -6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

.score-invalid {
    border: 2px solid #dc2626 !important;
    background: rgba(220,38,38,.08);
}

/* ============================================
   CMS COMPATIBILITY LAYER (Current PHP Markup)
============================================ */
:root {
    --cms-bg-1: #0f172a;
    --cms-bg-2: #1e293b;
    --cms-bg-3: #0b1120;
    --cms-surface: rgba(15, 23, 42, 0.72);
    --cms-surface-strong: rgba(30, 41, 59, 0.92);
    --cms-border: rgba(148, 163, 184, 0.32);
    --cms-text: #e2e8f0;
    --cms-muted: #94a3b8;
    --cms-accent: #38bdf8;
    --cms-accent-2: #14b8a6;
    --cms-danger: #ef4444;
    --cms-danger-border: #b91c1c;
    --cms-success: #22c55e;
    --cms-glass-base: rgba(15, 23, 42, 0.52);
    --cms-glass-strong: rgba(15, 23, 42, 0.68);
    --cms-glass-border: rgba(226, 232, 240, 0.24);
    --cms-glass-highlight: rgba(255, 255, 255, 0.18);
    --cms-glass-shadow: 0 20px 42px rgba(2, 8, 23, 0.36);
    --cms-glass-blur: 18px;
    --cms-glass-saturate: 140%;
}

body.auth-page {
    background:
        radial-gradient(1200px 500px at 10% 0%, rgba(56, 189, 248, 0.18), transparent 60%),
        radial-gradient(900px 500px at 90% 0%, rgba(20, 184, 166, 0.18), transparent 60%),
        linear-gradient(160deg, var(--cms-bg-3), var(--cms-bg-1) 45%, var(--cms-bg-2));
    color: var(--cms-text);
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(980px, 100%);
    background: color-mix(in srgb, var(--cms-surface) 90%, transparent);
    border: 1px solid var(--cms-border);
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(2, 8, 23, 0.45);
    padding: 24px;
}

.auth-header {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.auth-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.auth-title {
    margin: 0;
    font-size: 1.7rem;
    color: #f8fafc;
}

.auth-subtitle {
    margin: 2px 0 0;
    color: var(--cms-muted);
}

.auth-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.auth-switch-btn {
    border: 1px solid var(--cms-border);
    background: rgba(15, 23, 42, 0.45);
    color: var(--cms-text);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
}

.auth-switch-btn.active {
    border-color: color-mix(in srgb, var(--cms-accent) 55%, #fff 45%);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(20, 184, 166, 0.22));
}

.auth-alert {
    margin-bottom: 10px;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.auth-form {
    border: 1px solid var(--cms-border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.45);
    padding: 14px;
}

.auth-form h2 {
    margin: 0 0 6px;
}

.auth-note {
    margin: 0 0 10px;
    color: var(--cms-muted);
    font-size: 0.92rem;
}

.auth-form label {
    display: block;
    margin: 0 0 4px;
}

.auth-form input {
    width: 100%;
    border: 1px solid var(--cms-border);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.7);
    color: var(--cms-text);
    padding: 10px 11px;
    margin-bottom: 10px;
}

.auth-form button {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--cms-accent) 50%, #ffffff 50%);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(20, 184, 166, 0.18));
    color: #f8fafc;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
}

.auth-status {
    margin-top: 12px;
    color: var(--cms-muted);
}

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.94rem;
}

.alert.error {
    border: 1px solid rgba(239, 68, 68, 0.6);
    background: rgba(127, 29, 29, 0.35);
}

.alert.success {
    border: 1px solid rgba(34, 197, 94, 0.55);
    background: rgba(20, 83, 45, 0.35);
}

body.dashboard-page {
    background:
        radial-gradient(900px 420px at 0% 0%, rgba(56, 189, 248, 0.16), transparent 60%),
        radial-gradient(700px 360px at 100% 0%, rgba(20, 184, 166, 0.14), transparent 60%),
        linear-gradient(160deg, var(--cms-bg-3), var(--cms-bg-1), var(--cms-bg-2));
    color: var(--cms-text);
    min-height: 100vh;
}

body.dashboard-page.theme-light {
    --cms-bg-1: #e2e8f0;
    --cms-bg-2: #f1f5f9;
    --cms-bg-3: #cbd5e1;
    --cms-surface: rgba(248, 250, 252, 0.82);
    --cms-surface-strong: rgba(255, 255, 255, 0.95);
    --cms-border: rgba(71, 85, 105, 0.28);
    --cms-text: #0f172a;
    --cms-muted: #475569;
    --cms-glass-base: rgba(255, 255, 255, 0.64);
    --cms-glass-strong: rgba(255, 255, 255, 0.78);
    --cms-glass-border: rgba(71, 85, 105, 0.24);
    --cms-glass-highlight: rgba(255, 255, 255, 0.58);
    --cms-glass-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

body.dashboard-page.theme-dark,
body.dashboard-page.theme-default {
    color-scheme: dark;
}

/* Glassmorphism enforcement layer */
.glass,
.auth-card,
.dashboard-sidebar,
.dashboard-topbar,
.dashboard-content,
.settings-card,
.chart-card,
.contest-card,
.print-preview,
.assistance-panel,
.assist-item,
.auth-form {
    background:
        linear-gradient(145deg, var(--cms-glass-highlight), transparent 38%),
        var(--cms-glass-base) !important;
    border: 1px solid var(--cms-glass-border) !important;
    box-shadow: var(--cms-glass-shadow);
    backdrop-filter: blur(var(--cms-glass-blur)) saturate(var(--cms-glass-saturate));
    -webkit-backdrop-filter: blur(var(--cms-glass-blur)) saturate(var(--cms-glass-saturate));
}

.dashboard-nav a,
.dashboard-logout,
.subtab,
.settings-tabs a,
.stack-form button,
.inline-create button,
.inline-edit button,
.inline-criterion button,
.row-actions button,
.action-inline button,
.score-form-wrap > button,
.link-btn,
.assist-form button,
.assist-delete-form button,
.sidebar-toggle,
.auth-switch-btn,
.auth-form button {
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--cms-glass-highlight) 92%, transparent), transparent 50%),
        color-mix(in srgb, var(--cms-glass-base) 88%, transparent);
    border: 1px solid var(--cms-glass-border);
    backdrop-filter: blur(14px) saturate(var(--cms-glass-saturate));
    -webkit-backdrop-filter: blur(14px) saturate(var(--cms-glass-saturate));
}

.stack-form input,
.stack-form textarea,
.stack-form select,
.inline-create input,
.inline-create select,
.inline-edit input,
.inline-criterion input,
.crud-table input,
.crud-table select,
.crud-table textarea,
.assist-form input,
.auth-form input {
    background: color-mix(in srgb, var(--cms-glass-strong) 92%, transparent) !important;
    border: 1px solid var(--cms-glass-border) !important;
    backdrop-filter: blur(10px) saturate(var(--cms-glass-saturate));
    -webkit-backdrop-filter: blur(10px) saturate(var(--cms-glass-saturate));
}

.crud-table th,
.crud-table td {
    background: color-mix(in srgb, var(--cms-glass-base) 72%, transparent);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
    min-height: 100vh;
    padding: 16px;
}

.dashboard-sidebar {
    position: sticky;
    top: 16px;
    align-self: start;
    height: calc(100vh - 32px);
    overflow-y: auto;
    background: color-mix(in srgb, var(--cms-surface) 86%, transparent);
    border: 1px solid var(--cms-border);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.dashboard-brand h1 {
    margin: 0;
    font-size: 1.05rem;
}

.dashboard-brand p {
    margin: 2px 0 0;
    color: var(--cms-muted);
    font-size: 0.86rem;
}

.dashboard-nav-title {
    margin: 2px 0 0;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cms-muted);
}

.dashboard-nav {
    display: grid;
    gap: 8px;
}

.dashboard-nav a {
    border: 1px solid var(--cms-border);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--cms-text);
    background: rgba(15, 23, 42, 0.28);
    transition: all 0.2s ease;
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
    border-color: color-mix(in srgb, var(--cms-accent) 52%, #ffffff 48%);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(20, 184, 166, 0.22));
}

.dashboard-logout {
    margin-top: auto;
    border: 1px solid var(--cms-danger-border);
    background: rgba(127, 29, 29, 0.32);
    color: #fecaca;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
}

.sidebar-footer-actions {
    display: grid;
    gap: 8px;
    margin-top: auto;
}

.sidebar-footer-actions .dashboard-logout {
    margin-top: 0;
}

.dashboard-main {
    min-width: 0;
}

.dashboard-topbar,
.dashboard-content,
.settings-card,
.chart-card,
.contest-card,
.print-preview {
    background: color-mix(in srgb, var(--cms-surface) 88%, transparent);
    border: 1px solid var(--cms-border);
    border-radius: 14px;
}

.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
}

.dashboard-user {
    color: var(--cms-muted);
}

.dashboard-user strong {
    color: var(--cms-text);
}

.dashboard-content {
    margin-top: 12px;
    padding: 16px;
}

.dashboard-content h2 {
    margin: 0 0 6px;
}

.dashboard-content p {
    margin: 0;
    color: var(--cms-muted);
}

.dashboard-content a {
    color: var(--cms-accent);
}

.back-link {
    display: inline-block;
    margin-bottom: 10px;
}

.dash-alert {
    margin: 8px 0;
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid var(--cms-border);
}

.dash-alert.error {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(127, 29, 29, 0.3);
    color: #fecaca;
}

.dash-alert.success {
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(20, 83, 45, 0.32);
    color: #dcfce7;
}
body.dashboard-page.theme-light .dashboard-logout {
    background: rgba(220, 38, 38, 0.1);
    color: #991b1b;
    border-color: rgba(220, 38, 38, 0.4);
}
body.dashboard-page.theme-light .dash-alert.error {
    background: rgba(239, 68, 68, 0.1);
        color: #991b1b;
}
body.dashboard-page.theme-light .dash-alert.success {
    background: rgba(34, 197, 94, 0.1);
        color: #050505;
}

.subtabs,
.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.subtab,
.settings-tabs a {
    border: 1px solid var(--cms-border);
    border-radius: 9px;
    padding: 8px 12px;
    color: var(--cms-text);
    background: rgba(248, 246, 246, 0.3);
}

.subtab.active,
.settings-tabs a.active {
    border-color: color-mix(in srgb, var(--cms-accent) 52%, #fff 48%);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(20, 184, 166, 0.22));
}

.settings-section {
    margin-top: 14px;
}

.settings-grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.settings-card {
    padding: 14px;
    margin-top: 12px;
}

.settings-card h4,
.settings-card h5 {
    margin: 0 0 8px;
}

.stack-form label {
    display: block;
    margin-bottom: 6px;
}

.stack-form input,
.stack-form textarea,
.stack-form select,
.inline-create input,
.inline-create select,
.inline-edit input,
.inline-criterion input,
.crud-table input,
.crud-table select,
.crud-table textarea {
    width: 100%;
    border: 1px solid var(--cms-border);
    border-radius: 9px;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.52);
    color: var(--cms-text);
    margin-bottom: 10px;
}

.stack-form select option,
.inline-create select option,
.crud-table select option {
    background: #0f172a;
    color: #e2e8f0;
}

body.dashboard-page.theme-light .stack-form select option,
body.dashboard-page.theme-light .inline-create select option,
body.dashboard-page.theme-light .crud-table select option {
    background: #f8fafc;
    color: #0f172a;
}

.stack-form select[multiple],
.contest-crud-table select[multiple] {
    min-height: 120px;
}

.stack-form button,
.inline-create button,
.inline-edit button,
.inline-criterion button,
.row-actions button,
.action-inline button,
.score-form-wrap > button,
.link-btn {
    border: 1px solid var(--cms-border);
    border-radius: 9px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.38);
    color: var(--cms-text);
    cursor: pointer;
}

.danger,
.danger.contrast {
    border-color: var(--cms-danger-border) !important;
    background: rgba(127, 29, 29, 0.35) !important;
    color: #fecaca !important;
}

.danger,
.danger.contrast {
    border-color: var(--cms-danger-border) !important;
    background: rgba(127, 29, 29, 0.35) !important;
    color: #fecaca !important;
}
body.dashboard-page.theme-light .danger,
body.dashboard-page.theme-light .danger.contrast {
    background: rgba(220, 38, 38, 0.1) !important;
    color: #991b1b !important;
}

.danger.contrast:hover {
    background: rgba(127, 29, 29, 0.55) !important;
}
body.dashboard-page.theme-light .danger.contrast:hover {
    background: rgba(220, 38, 38, 0.2) !important;
}
.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.checkbox-line input {
    width: auto;
    margin-bottom: 0;
}

.table-wrap {
    overflow-x: auto;
}

.crud-table {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
}

.crud-table th,
.crud-table td {
    border: 1px solid var(--cms-border);
    padding: 8px;
    vertical-align: top;
}

.contest-crud-table {
    min-width: 1000px;
}

.contest-crud-table .action-inline {
    flex-wrap: wrap;
}

.table-note {
    margin-top: 6px;
    color: var(--cms-muted);
    font-size: 0.84rem;
}

.inline-create {
    display: grid;
    grid-template-columns: 1fr 150px auto;
    gap: 8px;
}

.participant-create-form {
    grid-template-columns: 110px 1fr 1fr auto;
}

.inline-edit {
    display: flex;
    gap: 8px;
}

.inline-edit input {
    margin-bottom: 0;
}

.inline-criterion {
    display: grid;
    grid-template-columns: 1fr 120px auto;
    gap: 8px;
}

.inline-criterion input {
    margin-bottom: 0;
}

.action-inline,
.contest-actions,
.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.participants-table {
    min-width: 760px;
}

.score-matrix-table {
    min-width: 920px;
}

.chart-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.chart-card {
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.chart-card h4 {
    margin-bottom: 8px;
}

.print-rows {
    display: grid;
    gap: 8px;
}

.print-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
}

.print-preview {
    margin-top: 12px;
    padding: 12px;
}

.contest-list {
    margin-top: 12px;
    display: grid;
    gap: 12px;
}

.contest-card {
    padding: 14px;
}

.contest-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.status-pill {
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.8rem;
    border: 1px solid var(--cms-border);
}

.status-pill.on {
    background: rgba(22, 101, 52, 0.36);
    border-color: rgba(74, 222, 128, 0.6);
}

.status-pill.off {
    background: rgba(127, 29, 29, 0.34);
    border-color: rgba(248, 113, 113, 0.6);
}

.contest-meta {
    margin-top: 6px !important;
    font-size: 0.9rem;
}

.sidebar-toggle {
    display: none;
    border: 1px solid var(--cms-border);
    border-radius: 8px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.35);
    color: var(--cms-text);
}

@media (max-width: 920px) {
    .auth-grid,
    .settings-grid.two {
        grid-template-columns: 1fr;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .dashboard-sidebar {
        display: none;
        position: static;
        height: auto;
    }

    .dashboard-layout.sidebar-open .dashboard-sidebar {
        display: flex;
    }

    body.dashboard-page .dashboard-layout {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    body.dashboard-page .dashboard-sidebar {
        display: none;
        position: static;
        height: auto;
    }

    body.dashboard-page .dashboard-layout.sidebar-open .dashboard-sidebar {
        display: flex;
    }

    .sidebar-toggle {
        display: inline-block;
    }

    .inline-create,
    .participant-create-form,
    .inline-criterion,
    .print-row {
        grid-template-columns: 1fr;
    }

    .inline-edit,
    .action-inline {
        flex-direction: column;
    }
}

.chart-grid .chart-card.is-hidden {
    display: none;
}

.chart-category-group {
    margin-top: 16px;
}

.chart-category-group > h4 {
    margin-bottom: 8px;
}

.chart-controls {
    margin-top: 10px;
}

.chart-card canvas {
    max-height: 250px;
}

.assistance-panel {
    margin-top: 8px;
    border: 1px solid var(--cms-border);
    border-radius: 10px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.28);
}

.assist-badge {
    display: inline-block;
    min-width: 20px;
    padding: 1px 6px;
    margin-left: 6px;
    border-radius: 999px;
    font-size: 0.74rem;
    text-align: center;
    border: 1px solid var(--cms-border);
    background: rgba(56, 189, 248, 0.25);
    color: var(--cms-text);
}

.assist-empty {
    color: var(--cms-muted);
    font-size: 0.86rem;
    margin: 0;
}

.assist-list {
    display: grid;
    gap: 8px;
    max-height: 180px;
    overflow: auto;
}

.assist-item {
    border: 1px solid var(--cms-border);
    border-radius: 8px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.42);
}

.assist-message {
    margin: 0;
    font-size: 0.85rem;
    color: var(--cms-text);
}

.assist-meta {
    margin: 4px 0 0;
    font-size: 0.75rem;
    color: var(--cms-muted);
}

.assistance-panel .dash-alert {
    margin: 6px 0 0;
    padding: 6px 8px;
    font-size: 0.76rem;
}

.assist-delete-form {
    margin-top: 8px;
}

.assist-delete-form button {
    width: 100%;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 0.74rem;
}

.assist-form input {
    width: 100%;
    border: 1px solid var(--cms-border);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.48);
    color: var(--cms-text);
    margin-bottom: 8px;
}

.admin-sidebar {
    padding: 10px;
    gap: 10px;
}

.admin-sidebar .dashboard-brand {
    gap: 8px;
}

.admin-sidebar .dashboard-brand h1 {
    font-size: 0.94rem;
}

.admin-sidebar .dashboard-brand p,
.admin-sidebar .dashboard-nav-title {
    font-size: 0.72rem;
}

.admin-sidebar .dashboard-nav {
    gap: 5px;
}

.admin-sidebar .dashboard-nav a,
.admin-sidebar .dashboard-logout {
    border-radius: 8px;
    padding: 3px 4px;
    font-size: 0.72rem;
}

.admin-sidebar .assistance-panel {
    padding: 9px;
}

.admin-assistance-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.admin-assistance-heading .dashboard-nav-title {
    min-width: 0;
}

.admin-assistance-heading form {
    margin: 0;
}

.admin-assistance-clear {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #dc2626;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
}

.admin-assistance-clear:hover {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.admin-sidebar .assist-list {
    max-height: 300px;
    gap: 6px;
}

.admin-sidebar .assist-item {
    padding: 6px;
}

.admin-sidebar .assist-message {
    font-size: 0.78rem;
}

.admin-sidebar .assist-meta {
    margin-top: 2px;
    font-size: 0.68rem;
}

.admin-sidebar .assist-delete-form {
    margin-top: 5px;
}

.admin-sidebar .assist-delete-form button {
    padding: 4px 6px;
    font-size: 0.68rem;
}

/* Login page refresh */
body.auth-page {
    --auth-ink: #172033;
    --auth-ink-soft: #536176;
    --auth-paper: #fffdf8;
    --auth-line: #e5e8ee;
    --auth-coral: #e7654f;
    --auth-coral-dark: #c94f3d;
    --auth-mint: #dcefe7;
    background-color: #f4f1eb;
    background-image:
        linear-gradient(rgba(23, 32, 51, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 32, 51, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 12% 8%, rgba(231, 101, 79, 0.22), transparent 28%),
        radial-gradient(circle at 92% 90%, rgba(82, 160, 133, 0.2), transparent 30%);
    background-size: 34px 34px, 34px 34px, auto, auto;
    color: var(--auth-ink);
}

body.auth-page .bg-shapes {
    opacity: 0.28;
}

body.auth-page .auth-shell {
    padding: 32px 20px;
}

body.auth-page .auth-card {
    width: min(520px, 100%);
    padding: 38px;
    background: rgba(255, 253, 248, 0.96) !important;
    border: 1px solid rgba(23, 32, 51, 0.09) !important;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(23, 32, 51, 0.14), 0 3px 10px rgba(23, 32, 51, 0.05) !important;
    animation: auth-card-enter 0.55s ease both;
}

body.auth-page .auth-header {
    gap: 16px;
    margin-bottom: 30px;
}

body.auth-page .auth-logo {
    width: 58px;
    height: 58px;
    padding: 9px;
    background: var(--auth-mint);
    border-radius: 17px;
}

body.auth-page .auth-title {
    color: var(--auth-ink);
    font-size: clamp(1.35rem, 3vw, 1.7rem);
    letter-spacing: -0.02em;
    line-height: 1.12;
}

body.auth-page .auth-subtitle,
body.auth-page .auth-note {
    color: var(--auth-ink-soft);
}

body.auth-page .auth-subtitle {
    margin-top: 7px;
    font-size: 0.9rem;
}

body.auth-page .auth-switch {
    gap: 4px;
    padding: 4px;
    margin-bottom: 22px;
    background: #eef0f3;
    border-radius: 12px;
}

body.auth-page .auth-switch-btn {
    border: 0;
    background: transparent;
    color: var(--auth-ink-soft);
    border-radius: 9px;
    padding: 11px 12px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.auth-page .auth-switch-btn:hover {
    color: var(--auth-ink);
}

body.auth-page .auth-switch-btn.active {
    color: var(--auth-ink);
    background: var(--auth-paper);
    box-shadow: 0 2px 7px rgba(23, 32, 51, 0.1);
}

body.auth-page .auth-grid {
    display: block;
}

body.auth-page .auth-form {
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.auth-page .auth-form h2 {
    color: var(--auth-ink);
    font-size: 1.2rem;
    margin-bottom: 6px;
}

body.auth-page .auth-note {
    margin-bottom: 22px;
}

body.auth-page .auth-form label {
    color: var(--auth-ink);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}

body.auth-page .auth-form input {
    box-sizing: border-box;
    margin-bottom: 18px;
    padding: 13px 14px;
    border: 1px solid var(--auth-line) !important;
    border-radius: 10px;
    background: #ffffff !important;
    color: var(--auth-ink);
    box-shadow: inset 0 1px 2px rgba(23, 32, 51, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.auth-page .auth-form input:focus {
    outline: none;
    border-color: var(--auth-coral) !important;
    box-shadow: 0 0 0 4px rgba(231, 101, 79, 0.13);
}

body.auth-page .auth-form button {
    border: 0;
    border-radius: 10px;
    padding: 13px 16px;
    background: var(--auth-coral);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(231, 101, 79, 0.22);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.auth-page .auth-form button:hover {
    background: var(--auth-coral-dark);
    box-shadow: 0 10px 22px rgba(201, 79, 61, 0.28);
    transform: translateY(-1px);
}

body.auth-page .auth-form button:focus-visible,
body.auth-page .auth-switch-btn:focus-visible {
    outline: 3px solid rgba(231, 101, 79, 0.3);
    outline-offset: 2px;
}

body.auth-page .auth-alert {
    margin-bottom: 18px;
    color: #8f3025;
    border-color: rgba(231, 101, 79, 0.35);
    background: #fff0ed;
}

body.auth-page .auth-status {
    color: var(--auth-ink-soft);
    border-top: 1px solid var(--auth-line);
    padding-top: 16px;
}

@keyframes auth-card-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
    body.auth-page .auth-shell {
        padding: 18px 14px;
    }

    body.auth-page .auth-card {
        padding: 26px 20px;
        border-radius: 18px;
    }

    body.auth-page .auth-header {
        align-items: flex-start;
        margin-bottom: 24px;
    }

    body.auth-page .auth-logo {
        width: 48px;
        height: 48px;
        padding: 7px;
    }

    body.dashboard-page .dashboard-layout {
        padding: 8px;
        gap: 10px;
    }

    body.dashboard-page .dashboard-topbar {
        padding: 8px 10px;
        min-height: 44px;
    }

    body.dashboard-page .dashboard-content {
        margin-top: 10px;
        padding: 14px 12px;
    }

    body.dashboard-page .dashboard-user {
        font-size: 0.72rem;
    }

    body.dashboard-page .dashboard-content .settings-card,
    body.about-page .dashboard-content,
    body.about-page .about-programmer,
    body.about-page .about-feature-card {
        border-radius: 12px;
    }
}

/* Dashboard workspace refresh */
body.dashboard-page {
    background-color: #0d1722;
    background-image:
        radial-gradient(circle at 88% 8%, rgba(231, 101, 79, 0.16), transparent 24%),
        radial-gradient(circle at 5% 92%, rgba(49, 179, 157, 0.14), transparent 28%),
        linear-gradient(145deg, #0d1722 0%, #142536 52%, #10202c 100%);
}

body.dashboard-page.theme-light {
    background-color: #edf1f2;
    background-image:
        linear-gradient(rgba(23, 32, 51, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 32, 51, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 88% 8%, rgba(231, 101, 79, 0.14), transparent 25%),
        linear-gradient(145deg, #edf1f2 0%, #f8f7f3 100%);
    background-size: 32px 32px, 32px 32px, auto, auto;
}

body.dashboard-page .dashboard-layout {
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
}

body.dashboard-page .dashboard-sidebar {
    top: 20px;
    height: calc(100vh - 40px);
    padding: 18px;
    border-radius: 18px;
    background: rgba(12, 26, 39, 0.78) !important;
    border-color: rgba(155, 184, 199, 0.17) !important;
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.2) !important;
}

body.dashboard-page.theme-light .dashboard-sidebar {
    background: rgba(255, 253, 248, 0.9) !important;
    border-color: rgba(23, 32, 51, 0.1) !important;
    box-shadow: 0 20px 42px rgba(23, 32, 51, 0.1) !important;
}

body.dashboard-page .dashboard-brand {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(155, 184, 199, 0.16);
}

body.dashboard-page .dashboard-logo {
    width: 44px;
    height: 44px;
    padding: 5px;
    background: rgba(220, 239, 231, 0.95);
    border-radius: 13px;
}

body.dashboard-page .dashboard-nav {
    gap: 3px;
}

body.dashboard-page .dashboard-nav a {
    border-color: transparent;
    border-radius: 9px;
    padding: 8px 12px;
    color: #b9c8d2;
}

body.dashboard-page .dashboard-nav a:hover,
body.dashboard-page .dashboard-nav a.active {
    border-color: rgba(49, 179, 157, 0.28);
    background: rgba(49, 179, 157, 0.14);
    color: #f4fbf8;
}

body.dashboard-page.theme-light .dashboard-nav a {
    color: #536176;
}

body.dashboard-page.theme-light .dashboard-nav a:hover,
body.dashboard-page.theme-light .dashboard-nav a.active {
    color: #172033;
    background: #dcefe7;
    border-color: rgba(49, 142, 119, 0.2);
}

body.dashboard-page .dashboard-topbar,
body.dashboard-page .dashboard-content {
    border-radius: 18px;
    border-color: rgba(155, 184, 199, 0.17);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.16);
}

body.dashboard-page .dashboard-topbar {
    min-height: 48px;
    padding: 10px 16px;
    background: rgba(15, 34, 49, 0.72);
}

body.dashboard-page.theme-light .dashboard-topbar,
body.dashboard-page.theme-light .dashboard-content {
    background: rgba(255, 253, 248, 0.9);
    border-color: rgba(23, 32, 51, 0.1);
    box-shadow: 0 18px 40px rgba(23, 32, 51, 0.09);
}

body.dashboard-page .dashboard-user {
    font-size: 0.86rem;
}

body.dashboard-page .dashboard-content {
    margin-top: 16px;
    padding: 24px;
}

body.dashboard-page .dashboard-content h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.025em;
}

body.dashboard-page .dashboard-content > p {
    margin-bottom: 24px;
}

body.dashboard-page .dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

body.dashboard-page .stat-card {
    position: relative;
    min-height: 106px;
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgba(155, 184, 199, 0.17);
    border-radius: 14px;
    background: rgba(18, 42, 57, 0.72) !important;
    box-shadow: none !important;
}

body.dashboard-page .stat-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #31b39d;
}

body.dashboard-page .stat-card:nth-child(2)::before {
    background: #79b7e8;
}

body.dashboard-page .stat-card:nth-child(3)::before {
    background: #d9b45f;
}

body.dashboard-page .stat-card:nth-child(4)::before {
    background: #e7654f;
}

body.dashboard-page.theme-light .stat-card {
    background: #ffffff !important;
    border-color: rgba(23, 32, 51, 0.09);
    box-shadow: 0 8px 18px rgba(23, 32, 51, 0.05) !important;
}

body.dashboard-page .stat-value {
    margin-bottom: 9px;
    color: #ffffff;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

body.dashboard-page.theme-light .stat-value {
    color: #0f172a;
}

body.dashboard-page .stat-label {
    color: #e2edf2;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.3;
    text-transform: uppercase;
}

body.dashboard-page.theme-light .stat-label {
    color: #334155;
}

body.dashboard-page .dashboard-content .settings-card {
    margin-top: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(18, 42, 57, 0.58) !important;
    border-color: rgba(155, 184, 199, 0.17) !important;
    box-shadow: none !important;
}

body.dashboard-page.theme-light .dashboard-content .settings-card {
    background: #ffffff !important;
    border-color: rgba(23, 32, 51, 0.09) !important;
}

body.dashboard-page .dashboard-content .settings-card {
    border-left: 4px solid #31b39d !important;
}

body.dashboard-page .contest-list .contest-card {
    border-left: 4px solid #31b39d !important;
}

body.dashboard-page .contest-list .contest-card.contest-inactive {
    border-left-color: #e7654f !important;
}

body.dashboard-page .dashboard-content .settings-card h4 {
    margin: 0;
    padding: 18px 18px 14px;
    color: #f7fbfd;
    font-size: 1rem;
}

body.dashboard-page.theme-light .dashboard-content .settings-card h4 {
    color: #172033;
}

body.dashboard-page .dashboard-content .table-wrap {
    border-top: 1px solid rgba(155, 184, 199, 0.14);
}

body.dashboard-page .dashboard-content .crud-table {
    min-width: 680px;
}

body.dashboard-page .dashboard-content .crud-table th {
    padding: 11px 18px;
    color: #9eb2be;
    background: rgba(8, 24, 37, 0.46);
    border: 0;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.dashboard-page.theme-light .dashboard-content .crud-table th {
    color: #536176;
    background: #f3f6f5;
}

body.dashboard-page .dashboard-content .crud-table td {
    padding: 14px 18px;
    color: #d9e4e9;
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(155, 184, 199, 0.11);
}

body.dashboard-page.theme-light .dashboard-content .crud-table td {
    color: #344257;
    border-top-color: rgba(23, 32, 51, 0.08);
}

body.dashboard-page .dashboard-content .crud-table tbody tr:hover td {
    background: rgba(49, 179, 157, 0.08);
}

body.dashboard-page .dashboard-content .link-btn {
    display: inline-block;
    border: 0;
    border-radius: 7px;
    padding: 7px 11px;
    background: #31b39d;
    color: #062b27;
    font-size: 0.78rem;
    font-weight: 800;
}

body.dashboard-page .dashboard-content .link-btn:hover {
    background: #62ccb9;
}

@media (max-width: 920px) {
    body.dashboard-page .dashboard-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    body.dashboard-page .dashboard-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    body.dashboard-page .dashboard-layout {
        padding: 8px;
        gap: 10px;
    }

    body.dashboard-page .dashboard-topbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 10px;
        min-height: 44px;
    }

    body.dashboard-page .dashboard-user {
        max-width: 100%;
        margin-left: auto;
        overflow-wrap: anywhere;
        font-size: 0.72rem;
    }

    body.dashboard-page .dashboard-content {
        padding: 14px 12px;
        margin-top: 10px;
    }

    body.dashboard-page .dashboard-stats-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    body.dashboard-page .stat-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 76px;
        padding: 14px;
    }

    body.dashboard-page .stat-value {
        margin: 0;
        font-size: 1.65rem;
    }

    body.dashboard-page .stat-label {
        max-width: 58%;
        font-size: 0.68rem;
        line-height: 1.35;
        text-align: right;
        overflow-wrap: anywhere;
    }

    body.about-page .dashboard-content {
        padding: 12px 10px;
    }

    body.about-page .about-intro {
        gap: 12px;
        padding-bottom: 18px;
    }

    body.about-page .about-intro h2 {
        font-size: 1.62rem;
    }

    body.about-page .about-version {
        padding: 10px 12px;
        border-radius: 10px;
    }

    body.about-page .about-feature-grid {
        margin: 18px 0;
    }

    body.about-page .about-programmer {
        gap: 12px;
        padding: 12px;
    }

    body.about-page .about-programmer-details {
        padding: 0;
    }

    body.about-page .about-programmer-details h3 {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    body.about-page .developer-role-list {
        gap: 6px 12px;
    }
}

.assist-form button {
    width: 100%;
    border: 1px solid var(--cms-border);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.4);
    color: var(--cms-text);
    cursor: pointer;
}

.sidebar-contest-list {
    display: grid;
    gap: 6px;
    max-height: 180px;
    overflow: auto;
}

.sidebar-contest-link {
    border: 1px solid var(--cms-border);
    border-radius: 8px;
    padding: 7px 9px;
    color: var(--cms-text);
    background: rgba(15, 23, 42, 0.35);
    font-size: 0.85rem;
}

.sidebar-contest-link.active,
.sidebar-contest-link:hover {
    border-color: color-mix(in srgb, var(--cms-accent) 52%, #ffffff 48%);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(20, 184, 166, 0.2));
}

body.contest-page .subpanel {
    margin-top: 18px;
    padding: 0 20px 20px;
    border: 1px solid var(--cms-border);
    border-left: 4px solid #31b39d;
    border-radius: 14px;
    background: color-mix(in srgb, var(--cms-surface) 88%, transparent);
    overflow: hidden;
}

body.contest-page .subpanel > h3 {
    margin: 0 -20px 18px;
    padding: 20px;
    border-bottom: 1px solid var(--cms-border);
    color: var(--cms-text);
    font-size: 1.08rem;
}

body.contest-page .subpanel > p {
    margin-top: 0;
}

body.contest-page .settings-card {
    border-left: 4px solid #31b39d !important;
}

body.contest-page.theme-light .subpanel {
    background: rgba(255, 255, 255, 0.72);
}

body.contest-page .inline-create input:not([type="hidden"]),
body.contest-page .inline-create select,
body.contest-page .inline-criterion input:not([type="hidden"]),
body.contest-page .stack-form input:not([type="hidden"]),
body.contest-page .stack-form select,
body.contest-page .crud-table input:not([type="hidden"]),
body.contest-page .crud-table select {
    box-sizing: border-box;
    min-height: 42px;
    font: inherit;
    line-height: 1.35;
    border: 1px solid rgba(155, 184, 199, 0.3) !important;
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(7, 24, 37, 0.62) !important;
    color: var(--cms-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 14px rgba(4, 12, 20, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.contest-page .inline-create select,
body.contest-page .stack-form select,
body.contest-page .crud-table select {
    appearance: none;
    padding-right: 38px;
    background-image: linear-gradient(45deg, transparent 50%, #79b7e8 50%), linear-gradient(135deg, #79b7e8 50%, transparent 50%), linear-gradient(to right, rgba(121, 183, 232, 0.22), rgba(121, 183, 232, 0.22));
    background-position: calc(100% - 17px) 17px, calc(100% - 11px) 17px, calc(100% - 31px) 8px;
    background-size: 6px 6px, 6px 6px, 1px 24px;
    background-repeat: no-repeat;
}

body.contest-page .inline-create input::placeholder,
body.contest-page .inline-criterion input::placeholder,
body.contest-page .stack-form input::placeholder {
    color: rgba(185, 200, 210, 0.72);
}

body.contest-page .inline-create input[type="file"] {
    padding: 5px;
}

body.contest-page .inline-create input[type="file"]::file-selector-button {
    margin-right: 8px;
    border: 0;
    border-radius: 7px;
    padding: 6px 9px;
    background: rgba(49, 179, 157, 0.18);
    color: #bfeee5;
    cursor: pointer;
}

body.contest-page .inline-create input:not([type="hidden"]):focus,
body.contest-page .inline-create select:focus,
body.contest-page .inline-criterion input:not([type="hidden"]):focus,
body.contest-page .stack-form input:not([type="hidden"]):focus,
body.contest-page .stack-form select:focus,
body.contest-page .crud-table input:not([type="hidden"]):focus,
body.contest-page .crud-table select:focus {
    outline: none;
    border-color: #31b39d !important;
    background-color: rgba(7, 30, 42, 0.78) !important;
    box-shadow: 0 0 0 3px rgba(49, 179, 157, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.contest-page.theme-light .inline-create input:not([type="hidden"]),
body.contest-page.theme-light .inline-create select,
body.contest-page.theme-light .inline-criterion input:not([type="hidden"]),
body.contest-page.theme-light .stack-form input:not([type="hidden"]),
body.contest-page.theme-light .stack-form select,
body.contest-page.theme-light .crud-table input:not([type="hidden"]),
body.contest-page.theme-light .crud-table select {
    border-color: rgba(23, 32, 51, 0.16) !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #172033;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 14px rgba(23, 32, 51, 0.06);
}

body.contest-page.theme-light .inline-create input::placeholder,
body.contest-page.theme-light .inline-criterion input::placeholder,
body.contest-page.theme-light .stack-form input::placeholder {
    color: rgba(83, 97, 118, 0.76);
}

body.contest-page.theme-light .inline-create input[type="file"]::file-selector-button {
    background: rgba(49, 179, 157, 0.12);
    color: #176c61;
}

@media (max-width: 560px) {
    body.contest-page .table-wrap:has(> .participants-table),
    body.contest-page .participants-table {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100%;
        overflow: hidden;
    }

    body.contest-page .participants-table {
        min-width: 0;
        table-layout: fixed;
    }

    body.contest-page .participants-table thead {
        display: none;
    }

    body.contest-page .participants-table,
    body.contest-page .participants-table tbody,
    body.contest-page .participants-table tr,
    body.contest-page .participants-table td {
        box-sizing: border-box;
        display: block;
        min-width: 0 !important;
        width: 100%;
    }

    body.contest-page .participants-table tr {
        overflow: hidden;
        margin: 0 0 12px;
        padding: 10px 12px;
        border: 1px solid rgba(155, 184, 199, 0.18);
        border-radius: 10px;
        background: rgba(7, 24, 37, 0.2);
    }

    body.contest-page.theme-light .participants-table tr {
        border-color: rgba(23, 32, 51, 0.1);
        background: rgba(255, 255, 255, 0.55);
    }

    body.contest-page .participants-table td {
        display: grid;
        grid-template-columns: 66px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        max-width: 100%;
        padding: 7px 0;
        border: 0;
    }

    body.contest-page .participants-table td::before {
        color: #79b7e8;
        content: '';
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    body.contest-page .participants-table td:nth-child(1)::before {
        content: 'Number';
    }

    body.contest-page .participants-table td:nth-child(2)::before {
        content: 'Name';
    }

    body.contest-page .participants-table td:nth-child(3)::before {
        content: 'Image';
    }

    body.contest-page .participants-table td:nth-child(4)::before {
        content: 'Category';
    }

    body.contest-page .participants-table td:nth-child(5)::before {
        content: 'Actions';
    }

    body.contest-page .participants-table td > input,
    body.contest-page .participants-table td > select,
    body.contest-page .participants-table td > .action-inline {
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }

    body.contest-page .participants-table td > input:not([type="checkbox"]),
    body.contest-page .participants-table td > select {
        margin: 0;
    }

    body.contest-page .participants-table td:nth-child(3) input[type="file"] {
        max-width: 100% !important;
        padding: 4px;
    }

    body.contest-page .participants-table td:nth-child(5).action-inline {
        display: block;
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        padding-top: 12px;
    }

    body.contest-page .participants-table td:nth-child(5).action-inline::before {
        display: block;
        margin-bottom: 8px;
        text-align: left;
    }

    body.contest-page .participants-table td:nth-child(5).action-inline form {
        display: block;
        box-sizing: border-box;
        flex: none;
        min-width: 0;
        max-width: 100%;
        width: 100%;
        overflow: hidden;
    }

    body.contest-page .participants-table td:nth-child(5).action-inline form + form {
        margin-top: 8px;
    }

    body.contest-page .participants-table td:nth-child(5).action-inline button {
        display: block;
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
        width: 100% !important;
        margin: 0;
        overflow: hidden;
        padding-left: 8px;
        padding-right: 8px;
        text-align: center !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.judge-score-input.score-saving {
    border-color: #f59e0b !important;
}

.judge-score-input.score-saved {
    border-color: #22c55e !important;
}
.score-matrix-table {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
}

.score-matrix-table th:first-child,
.score-matrix-table td:first-child {
    width: 220px;
    word-break: break-word;
}

.score-matrix-table th:not(:first-child),
.score-matrix-table td:not(:first-child) {
    width: 110px;
}

.judge-score-input {
    width: 100%;
    -moz-appearance: textfield;
    text-align: center;
}
.crud-table.contest-crud-table {
    table-layout: fixed;
    min-width: 800px;
}

.crud-table.contest-crud-table th:nth-child(1),
.crud-table.contest-crud-table td:nth-child(1) {
    width: 45%; /* Criterion Name */
}

.crud-table.contest-crud-table th:nth-child(2),
.crud-table.contest-crud-table td:nth-child(2) {
    width: 15%; /* Weight */
}

.crud-table.contest-crud-table th:nth-child(3),
.crud-table.contest-crud-table td:nth-child(3) {
    width: 15%; /* Visible to Judge */
}



.judge-score-input.score-error {
    border-color: #ef4444 !important;
    background: rgba(127, 29, 29, 0.35) !important;
}

.score-status-error {
    color: #fca5a5 !important;
}
.image-popup {
    visibility: hidden;
    opacity: 0;
    position: fixed; /* Ensure it's relative to the viewport */
    z-index: 99999; /* Even higher z-index to be absolutely sure */
    width: 350px;
    height: 350px;
    background-color: rgba(0, 0, 0, 0.7);
    background-size: cover;
    background-position: center;
    border: 2px solid var(--cms-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Contest setup workspace */
body.contest-setup-page,
body.contest-setup-page * {
    font-family: 'Outfit', sans-serif;
}

body.contest-setup-page .dashboard-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 18px;
}

body.contest-setup-page .dashboard-content > h2,
body.contest-setup-page .dashboard-content > p,
body.contest-setup-page .dashboard-content > .dash-alert {
    grid-column: 1 / -1;
}

body.contest-setup-page .dashboard-content > h2 {
    margin-bottom: -10px;
}

body.contest-setup-page .dashboard-content > .settings-card:nth-of-type(1),
body.contest-setup-page .dashboard-content > .settings-card:nth-of-type(2) {
    grid-column: span 1;
    min-width: 0;
    margin-top: 0;
}

body.contest-setup-page .dashboard-content > .settings-card:nth-of-type(3) {
    grid-column: 1 / -1;
    min-width: 0;
    margin-top: 0;
}

body.contest-setup-page .dashboard-content > p {
    max-width: 620px;
}

body.contest-setup-page .dashboard-content > .settings-card {
    position: relative;
    margin-top: 18px;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
}

body.contest-setup-page .dashboard-content > .settings-card > h4 {
    margin: 0;
    padding: 18px 20px 15px;
    border-bottom: 1px solid rgba(155, 184, 199, 0.14);
    font-size: 1.02rem;
    letter-spacing: -0.01em;
}

body.contest-setup-page.theme-light .dashboard-content > .settings-card > h4 {
    border-bottom-color: rgba(23, 32, 51, 0.08);
}

body.contest-setup-page .dashboard-content > .settings-card > p {
    padding: 0 20px;
}

body.contest-setup-page .dashboard-content > .settings-card > h4 + p {
    margin-top: 14px;
}

body.contest-setup-page .inline-create {
    grid-template-columns: minmax(220px, 440px) auto;
    gap: 10px;
    padding: 18px 20px;
    background: rgba(49, 179, 157, 0.06);
    border-bottom: 1px solid rgba(155, 184, 199, 0.12);
}

body.contest-setup-page .inline-create input,
body.contest-setup-page .stack-form input,
body.contest-setup-page .stack-form textarea,
body.contest-setup-page .stack-form select {
    box-sizing: border-box;
    margin-bottom: 0;
    border-radius: 9px;
    border-color: rgba(155, 184, 199, 0.24) !important;
    background: rgba(7, 24, 37, 0.5) !important;
}

body.contest-setup-page.theme-light .inline-create input,
body.contest-setup-page.theme-light .stack-form input,
body.contest-setup-page.theme-light .stack-form textarea,
body.contest-setup-page.theme-light .stack-form select {
    border-color: rgba(23, 32, 51, 0.14) !important;
    background: #ffffff !important;
}

body.contest-setup-page .inline-create input:focus,
body.contest-setup-page .stack-form input:focus,
body.contest-setup-page .stack-form textarea:focus,
body.contest-setup-page .stack-form select:focus,
body.contest-setup-page .crud-table input:focus,
body.contest-setup-page .crud-table textarea:focus,
body.contest-setup-page .crud-table select:focus {
    outline: none;
    border-color: #31b39d !important;
    box-shadow: 0 0 0 3px rgba(49, 179, 157, 0.15);
}

body.contest-setup-page .stack-form {
    display: grid;
    gap: 9px;
    max-width: 760px;
    padding: 20px;
}

body.contest-setup-page .stack-form input[name="contest_name"] {
    max-width: 560px;
}

body.contest-setup-page .inline-edit input[name="category_name"] {
    flex: 0 1 260px;
}

body.contest-setup-page .stack-form label {
    margin: 4px 0 0;
    color: #b9c8d2;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

body.contest-setup-page.theme-light .stack-form label {
    color: #536176;
}

body.contest-setup-page .stack-form select[multiple] {
    min-height: 132px;
    padding: 8px;
}

body.contest-setup-page .stack-form textarea {
    resize: vertical;
}

body.contest-setup-page .checkbox-line {
    width: fit-content;
    padding: 6px 0;
    color: #d9e4e9;
    text-transform: none;
}

body.contest-setup-page.theme-light .checkbox-line {
    color: #344257;
}

body.contest-setup-page .checkbox-line input {
    accent-color: #31b39d;
}

body.contest-setup-page .stack-form button,
body.contest-setup-page .inline-create button {
    border: 0;
    border-radius: 9px;
    padding: 10px 16px;
    background: #31b39d;
    color: #062b27;
    font-weight: 800;
    box-shadow: 0 7px 15px rgba(49, 179, 157, 0.18);
    transition: background 0.2s ease, transform 0.2s ease;
}

body.contest-setup-page .stack-form button:hover,
body.contest-setup-page .inline-create button:hover {
    background: #62ccb9;
    transform: translateY(-1px);
}

body.contest-setup-page .table-wrap {
    border-top: 0;
}

body.contest-setup-page .crud-table {
    margin: 0;
}

body.contest-setup-page .dashboard-content > .settings-card:first-of-type .crud-table {
    min-width: 0;
    table-layout: fixed;
}

body.contest-setup-page .dashboard-content > .settings-card:first-of-type .crud-table th:first-child,
body.contest-setup-page .dashboard-content > .settings-card:first-of-type .crud-table td:first-child {
    width: auto;
}

body.contest-setup-page .dashboard-content > .settings-card:first-of-type .crud-table th:last-child,
body.contest-setup-page .dashboard-content > .settings-card:first-of-type .crud-table td:last-child {
    width: 112px;
}

body.contest-setup-page .dashboard-content > .settings-card:first-of-type .crud-table td:last-child.action-inline {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
}

body.contest-setup-page .dashboard-content > .settings-card:first-of-type .crud-table td:last-child.action-inline form,
body.contest-setup-page .dashboard-content > .settings-card:first-of-type .crud-table td:last-child.action-inline button {
    width: 100%;
}

body.scoring-page,
body.scoring-page * {
    font-family: 'Outfit', sans-serif;
}

body.special-awards-page,
body.special-awards-page * {
    font-family: 'Outfit', sans-serif;
}

body.special-awards-page .dashboard-content {
    display: block;
}

.special-awards-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.special-awards-page-heading h2 {
    margin: 0;
}

@media (max-width: 560px) {
    .special-awards-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

.special-awards-category-list {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}

body.judge-page.special-awards-page .special-awards-category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 18px;
}

.special-award-category-section {
    min-width: 0;
}

.special-award-category-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(155, 184, 199, 0.18);
}

.theme-light .special-award-category-heading {
    border-bottom-color: rgba(23, 32, 51, 0.1);
}

.special-award-category-heading h3 {
    margin: 2px 0 0;
}

.special-award-kicker {
    color: #31b39d;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.special-award-count {
    color: var(--cms-muted);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.special-award-group-description {
    margin: -2px 0 12px;
    color: var(--cms-muted);
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.special-award-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.special-award-card {
    position: relative;
    min-width: 0;
    margin-top: 0 !important;
}

.special-award-card p {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.admin-special-awards-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    margin-top: 22px;
}

.admin-special-awards-create {
    margin-top: 0 !important;
}

.admin-special-awards-create .stack-form {
    max-width: 100%;
}

.admin-special-awards-created {
    min-width: 0;
}

.admin-special-awards-created .special-awards-category-list {
    margin-top: 0;
}

@media (max-width: 900px) {
    .admin-special-awards-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body.judge-page.special-awards-page .special-awards-category-list {
        grid-template-columns: 1fr;
    }
}

.special-award-remove-form {
    position: absolute;
    top: 12px;
    right: 12px;
    margin: 0;
}

.special-award-remove-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 5px 9px !important;
    border: 1px solid rgba(220, 38, 38, 0.45) !important;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.08) !important;
    color: #b91c1c !important;
    font-size: 0.7rem !important;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
}

.special-award-remove-button span:first-child {
    font-size: 0.95rem;
    line-height: 0.7;
}

.special-award-remove-button:hover {
    border-color: #dc2626 !important;
    background: #dc2626 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.special-award-remove-button:focus-visible {
    outline: 3px solid rgba(220, 38, 38, 0.22);
    outline-offset: 2px;
}

body.scoring-page .dashboard-content {
    display: flex;
    flex-direction: column;
}

body.scoring-page .dashboard-content > h2 {
    margin-bottom: 8px;
    font-size: clamp(1.65rem, 3vw, 2.15rem);
}

body.scoring-page .dashboard-content > p {
    margin: 0 0 6px;
    color: #9eb2be;
}

body.scoring-page .dashboard-content > p:first-of-type {
    margin-top: 4px;
    color: #f7fbfd;
    font-size: 1.05rem;
}

body.scoring-page .dashboard-content > p:first-of-type strong {
    font-weight: 800;
}

body.scoring-page.theme-light .dashboard-content > p {
    color: #536176;
}

body.scoring-page.theme-light .dashboard-content > p:first-of-type {
    color: #172033;
}

body.scoring-page .dashboard-content > .settings-card {
    margin-top: 18px;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(18, 42, 57, 0.58) !important;
    border-color: rgba(155, 184, 199, 0.17) !important;
    box-shadow: none !important;
}

body.scoring-page.theme-light .dashboard-content > .settings-card {
    background: #ffffff !important;
    border-color: rgba(23, 32, 51, 0.09) !important;
}

body.scoring-page .scoring-finalization-card {
    order: 20;
    position: relative;
    padding: 20px 22px !important;
    border-left: 4px solid #31b39d !important;
}

body.scoring-page .scoring-finalization-card h4,
body.scoring-page .score-entry-card h4,
body.scoring-page .score-category-card h4 {
    margin: 0;
    color: #f7fbfd;
    font-size: 1.05rem;
}

body.scoring-page.theme-light .scoring-finalization-card h4,
body.scoring-page.theme-light .score-entry-card h4,
body.scoring-page.theme-light .score-category-card h4 {
    color: #172033;
}

body.scoring-page .scoring-finalization-card p {
    margin: 7px 0 0;
    color: #b6c6ce;
}

body.scoring-page.theme-light .scoring-finalization-card p {
    color: #536176;
}

body.scoring-page .scoring-finalization-card form {
    margin-top: 16px;
}

body.scoring-page .primary-action,
body.scoring-page .secondary-action {
    border: 0;
    border-radius: 9px;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

body.scoring-page .primary-action {
    background: #31b39d;
    color: #062b27;
    box-shadow: 0 7px 15px rgba(49, 179, 157, 0.18);
}

body.scoring-page .secondary-action {
    background: #e5f0f8;
    color: #245a80;
}

body.scoring-page .primary-action:hover,
body.scoring-page .secondary-action:hover {
    transform: translateY(-1px);
}

body.scoring-page .primary-action:hover {
    background: #62ccb9;
}

body.scoring-page .score-entry-card {
    padding: 18px 22px !important;
    border-top: 1px solid rgba(49, 179, 157, 0.36) !important;
}

body.scoring-page .score-entry-card .table-note {
    margin: 6px 0 0;
    color: #9eb2be;
}

body.scoring-page.theme-light .score-entry-card .table-note {
    color: #536176;
}

body.scoring-page .score-category-card {
    margin-top: 14px !important;
}

body.scoring-page .score-category-card h4 {
    padding: 17px 20px 14px;
    border-bottom: 1px solid rgba(155, 184, 199, 0.14);
}

body.scoring-page.theme-light .score-category-card h4 {
    border-bottom-color: rgba(23, 32, 51, 0.08);
}

body.scoring-page .score-category-card .table-wrap {
    border-top: 0;
    overflow-x: auto;
}

body.scoring-page .score-matrix-table {
    width: 100%;
    min-width: 760px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

body.scoring-page .score-matrix-table th {
    padding: 12px 10px;
    border: 0;
    border-bottom: 1px solid rgba(155, 184, 199, 0.14);
    background: #102a3a;
    color: #aebfc9;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
}

body.scoring-page.theme-light .score-matrix-table th {
    background: #f3f6f5;
    border-bottom-color: rgba(23, 32, 51, 0.08);
    color: #536176;
}

body.scoring-page .score-matrix-table th:first-child,
body.scoring-page .score-matrix-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 250px;
    text-align: left;
}

body.scoring-page .score-matrix-table th:first-child {
    z-index: 4;
}

body.scoring-page .score-matrix-table th:not(:first-child),
body.scoring-page .score-matrix-table td:not(:first-child) {
    width: 112px;
}

body.scoring-page .score-matrix-table td {
    padding: 10px;
    border: 0;
    border-bottom: 1px solid rgba(155, 184, 199, 0.1);
    background: rgba(18, 42, 57, 0.34);
    color: #d9e4e9;
    text-align: center;
    vertical-align: middle;
}

body.scoring-page .score-matrix-table td:first-child {
    background: #16384a;
    box-shadow: 8px 0 14px rgba(7, 24, 37, 0.14);
}

body.scoring-page.theme-light .score-matrix-table td {
    background: #ffffff;
    border-bottom-color: rgba(23, 32, 51, 0.08);
    color: #344257;
}

body.scoring-page.theme-light .score-matrix-table td:first-child {
    background: #f8fbfa;
    box-shadow: 8px 0 14px rgba(23, 32, 51, 0.06);
}

body.scoring-page .score-matrix-table tbody tr:hover td {
    background: rgba(49, 179, 157, 0.1);
}

body.scoring-page .score-matrix-table tbody tr:hover td:first-child {
    background: #1c4658;
}

body.scoring-page.theme-light .score-matrix-table tbody tr:hover td,
body.scoring-page.theme-light .score-matrix-table tbody tr:hover td:first-child {
    background: #eef8f4;
}

body.scoring-page .participant-info span {
    display: block;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.scoring-page .judge-score-input {
    box-sizing: border-box;
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 8px 6px;
    border: 1px solid rgba(155, 184, 199, 0.25) !important;
    border-radius: 8px;
    background: rgba(7, 24, 37, 0.56) !important;
    color: #f7fbfd;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.scoring-page.theme-light .judge-score-input {
    border-color: rgba(23, 32, 51, 0.14) !important;
    background: #ffffff !important;
    color: #172033;
}

body.scoring-page .judge-score-input:focus {
    outline: none;
    border-color: #31b39d !important;
    box-shadow: 0 0 0 3px rgba(49, 179, 157, 0.18);
}

body.scoring-page .judge-score-input::placeholder {
    color: #8098a5;
    font-size: 0.68rem;
}

body.scoring-page .participant-total-score {
    color: #62ccb9 !important;
    font-size: 1rem;
    font-weight: 800;
}

body.scoring-page.theme-light .participant-total-score {
    color: #167b68 !important;
}

body.scoring-page .judge-score-input.score-saving {
    border-color: #d9b45f !important;
    background: rgba(217, 180, 95, 0.12) !important;
}

body.scoring-page .judge-score-input.score-saved {
    border-color: #31b39d !important;
    background: rgba(49, 179, 157, 0.12) !important;
}

body.scoring-page .judge-score-input.score-error {
    border-color: #e7654f !important;
    background: rgba(231, 101, 79, 0.12) !important;
}

body.scoring-page .score-status-error {
    color: #e7654f !important;
}

body.judges-page,
body.judges-page * {
    font-family: 'Outfit', sans-serif;
}

body.judges-page .dashboard-content {
    display: block;
}

body.judges-page .dashboard-content > h2 {
    margin-bottom: 7px;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
}

body.judges-page .dashboard-content > p {
    margin-bottom: 22px;
    color: #9eb2be;
}

body.judges-page.theme-light .dashboard-content > p {
    color: #536176;
}

body.judges-page .dashboard-content > .settings-card {
    margin-top: 16px;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(18, 42, 57, 0.58) !important;
    border-color: rgba(155, 184, 199, 0.17) !important;
    box-shadow: none !important;
}

body.judges-page.theme-light .dashboard-content > .settings-card {
    background: #ffffff !important;
    border-color: rgba(23, 32, 51, 0.09) !important;
}

body.judges-page .dashboard-content > .settings-card > h4 {
    margin: 0;
    padding: 17px 20px 14px;
    border-bottom: 1px solid rgba(155, 184, 199, 0.14);
    color: #f7fbfd;
    font-size: 1.02rem;
}

body.judges-page.theme-light .dashboard-content > .settings-card > h4 {
    border-bottom-color: rgba(23, 32, 51, 0.08);
    color: #172033;
}

body.judges-page .dashboard-content > .settings-card:first-of-type {
    border-top: 3px solid #31b39d !important;
}

body.judges-page .dashboard-content > .settings-card:first-of-type .inline-create {
    grid-template-columns: minmax(220px, 460px) auto;
    gap: 10px;
    padding: 18px 20px;
    background: rgba(49, 179, 157, 0.06);
}

body.judges-page .inline-create input,
body.judges-page .inline-edit input {
    box-sizing: border-box;
    margin-bottom: 0;
    border-color: rgba(155, 184, 199, 0.24) !important;
    background: rgba(7, 24, 37, 0.5) !important;
}

body.judges-page.theme-light .inline-create input,
body.judges-page.theme-light .inline-edit input {
    border-color: rgba(23, 32, 51, 0.14) !important;
    background: #ffffff !important;
}

body.judges-page .inline-create input:focus,
body.judges-page .inline-edit input:focus {
    outline: none;
    border-color: #31b39d !important;
    box-shadow: 0 0 0 3px rgba(49, 179, 157, 0.16);
}

body.judges-page .inline-create button,
body.judges-page .inline-edit button {
    border: 0;
    border-radius: 8px;
    padding: 9px 14px;
    background: #31b39d;
    color: #062b27;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

body.judges-page .inline-create button:hover,
body.judges-page .inline-edit button:hover {
    background: #62ccb9;
    transform: translateY(-1px);
}

body.judges-page .dashboard-content .crud-table {
    min-width: 620px;
    margin: 0;
}

body.judges-page .dashboard-content .crud-table th {
    padding: 11px 16px;
    border: 0;
    background: rgba(8, 24, 37, 0.46);
    color: #9eb2be;
    font-size: 0.71rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.judges-page.theme-light .dashboard-content .crud-table th {
    background: #f3f6f5;
    color: #536176;
}

body.judges-page .dashboard-content .crud-table td {
    padding: 13px 16px;
    border: 0;
    border-top: 1px solid rgba(155, 184, 199, 0.1);
    background: transparent;
    color: #d9e4e9;
    vertical-align: middle;
}

body.judges-page.theme-light .dashboard-content .crud-table td {
    border-top-color: rgba(23, 32, 51, 0.08);
    color: #344257;
}

body.judges-page .dashboard-content .crud-table tbody tr:hover td {
    background: rgba(49, 179, 157, 0.07);
}

body.judges-page .dashboard-content .crud-table th:first-child,
body.judges-page .dashboard-content .crud-table td:first-child {
    min-width: 300px;
}

body.judges-page .inline-edit {
    align-items: center;
    gap: 8px;
}

body.judges-page .inline-edit input[name="full_name"] {
    min-width: 0;
    flex: 1 1 auto;
}

body.judges-page .dashboard-content .crud-table td:nth-child(2) {
    width: 150px;
    color: #62ccb9;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

body.judges-page .dashboard-content .crud-table td:nth-child(2) .chairperson-form {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
}

body.judges-page .dashboard-content .crud-table td:nth-child(2) .chairperson-form button {
    border: 0;
    border-radius: 7px;
    padding: 7px 10px;
    background: rgba(49, 179, 157, 0.18);
    color: #d9faf4;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

body.judges-page .dashboard-content .crud-table td:nth-child(2) .chairperson-form button:hover {
    background: rgba(49, 179, 157, 0.28);
    transform: translateY(-1px);
}

body.judges-page.theme-light .dashboard-content .crud-table td:nth-child(2) {
    color: #167b68;
}

body.judges-page.theme-light .dashboard-content .crud-table td:nth-child(2) .chairperson-form button {
    background: rgba(49, 179, 157, 0.12);
    color: #0d544a;
}

body.judges-page .dashboard-content .crud-table td:nth-child(3) {
    width: 100px;
}

body.judges-page .dashboard-content .crud-table td:nth-child(3).action-inline {
    display: table-cell;
    vertical-align: middle;
}

body.judges-page .dashboard-content .crud-table td:nth-child(3).action-inline form {
    display: block;
    margin: 0;
}

body.judges-page .dashboard-content .crud-table td:nth-child(3).action-inline form + form {
    margin-top: 7px;
}

body.judges-page .dashboard-content .crud-table td:nth-child(3).action-inline form,
body.judges-page .dashboard-content .crud-table td:nth-child(3).action-inline button {
    width: 100%;
}

body.judges-page .dashboard-content .crud-table td:nth-child(3).action-inline button {
    box-sizing: border-box;
    min-height: 34px;
    padding: 7px 10px;
}

body.judges-page .dashboard-content .crud-table td:nth-child(3) .action-inline {
    justify-content: flex-start;
}

body.judges-page .dashboard-content .danger.contrast {
    border: 0 !important;
    border-radius: 7px;
    padding: 7px 10px;
    background: rgba(231, 101, 79, 0.16) !important;
    color: #ffb4a8 !important;
    font-weight: 700;
}

body.judges-page.theme-light .dashboard-content .danger.contrast {
    background: #fff0ed !important;
    color: #a63d30 !important;
}

body.judges-page .dashboard-content > .settings-card:last-of-type .row-actions {
    display: flex;
    justify-content: flex-end;
    padding: 14px 20px 16px;
    border-top: 1px solid rgba(155, 184, 199, 0.1);
}

body.judges-page .dashboard-content > .settings-card:last-of-type .row-actions button {
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    background: rgba(121, 183, 232, 0.16);
    color: #bfe0f7;
    font-size: 0.78rem;
    font-weight: 700;
}

body.settings-page,
body.settings-page * {
    font-family: 'Outfit', sans-serif;
}

body.settings-page .dashboard-content {
    display: block;
}

body.settings-page .dashboard-content > h2 {
    margin-bottom: 7px;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
}

body.settings-page .dashboard-content > p {
    margin-bottom: 22px;
    color: #9eb2be;
}

body.settings-page.theme-light .dashboard-content > p {
    color: #536176;
}

body.settings-page .settings-tabs {
    display: inline-flex;
    gap: 4px;
    margin: 0 0 22px;
    padding: 4px;
    border: 1px solid rgba(155, 184, 199, 0.16);
    border-radius: 11px;
    background: rgba(7, 24, 37, 0.3);
}

body.settings-page.theme-light .settings-tabs {
    border-color: rgba(23, 32, 51, 0.08);
    background: #eef2f1;
}

body.settings-page .settings-tabs a {
    border: 0;
    border-radius: 8px;
    padding: 9px 18px;
    color: #aebfc9;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

body.settings-page .settings-tabs a:hover {
    color: #f7fbfd;
}

body.settings-page .settings-tabs a.active {
    background: #31b39d;
    color: #062b27;
    box-shadow: 0 4px 10px rgba(49, 179, 157, 0.18);
}

body.settings-page.theme-light .settings-tabs a {
    color: #536176;
}

body.settings-page.theme-light .settings-tabs a:hover {
    color: #172033;
}

body.settings-page.theme-light .settings-tabs a.active {
    background: #dcefe7;
    color: #167b68;
}

body.settings-page .settings-section {
    margin-top: 0;
}

body.settings-page .settings-section > h3 {
    margin: 0 0 10px;
    color: #f7fbfd;
    font-size: 1.08rem;
}

body.settings-page.theme-light .settings-section > h3 {
    color: #172033;
}

body.settings-page .settings-grid.two {
    align-items: stretch;
    gap: 16px;
}

body.settings-page .settings-card {
    margin-top: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(18, 42, 57, 0.58) !important;
    border-color: rgba(155, 184, 199, 0.17) !important;
    box-shadow: none !important;
}

body.settings-page.theme-light .settings-card {
    background: #ffffff !important;
    border-color: rgba(23, 32, 51, 0.09) !important;
}

body.settings-page .settings-card h4 {
    margin: 0;
    padding: 17px 20px 14px;
    border-bottom: 1px solid rgba(155, 184, 199, 0.14);
    color: #f7fbfd;
    font-size: 1.02rem;
}

body.settings-page.theme-light .settings-card h4 {
    border-bottom-color: rgba(23, 32, 51, 0.08);
    color: #172033;
}

body.settings-page .settings-card > p {
    margin: 0;
    padding: 0 20px;
    color: #b6c6ce;
    line-height: 1.55;
}

body.settings-page.theme-light .settings-card > p {
    color: #536176;
}

body.settings-page .settings-card > p:first-of-type {
    margin-top: 16px;
}

body.settings-page .settings-card > p:last-of-type {
    margin-bottom: 20px;
}

body.settings-page .settings-card > p a {
    color: #62ccb9;
    font-weight: 700;
}

body.settings-page.theme-light .settings-card > p a {
    color: #167b68;
}

body.settings-page .stack-form {
    display: grid;
    gap: 8px;
    max-width: 520px;
    padding: 20px;
}

body.settings-page .stack-form label {
    margin: 4px 0 0;
    color: #b9c8d2;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.settings-page.theme-light .stack-form label {
    color: #536176;
}

body.settings-page .stack-form input,
body.settings-page .stack-form select {
    box-sizing: border-box;
    margin-bottom: 0;
    border-color: rgba(155, 184, 199, 0.24) !important;
    background: rgba(7, 24, 37, 0.5) !important;
}

body.settings-page.theme-light .stack-form input,
body.settings-page.theme-light .stack-form select {
    border-color: rgba(23, 32, 51, 0.14) !important;
    background: #ffffff !important;
}

body.settings-page .stack-form input:focus,
body.settings-page .stack-form select:focus {
    outline: none;
    border-color: #31b39d !important;
    box-shadow: 0 0 0 3px rgba(49, 179, 157, 0.16);
}

body.settings-page .stack-form button {
    width: fit-content;
    margin-top: 6px;
    border: 0;
    border-radius: 8px;
    padding: 10px 15px;
    background: #31b39d;
    color: #062b27;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

body.settings-page .stack-form button:hover {
    background: #62ccb9;
    transform: translateY(-1px);
}

body.settings-page #theme .settings-card {
    max-width: 620px;
    border-top: 3px solid #d9b45f !important;
}

body.settings-page #account .settings-card:first-child {
    border-top: 3px solid #31b39d !important;
}

body.settings-page #account .settings-card:last-child {
    border-top: 3px solid #79b7e8 !important;
}

@media (max-width: 560px) {
    body.settings-page .dashboard-content {
        padding: 18px;
    }

    body.settings-page .settings-tabs a {
        padding: 8px 14px;
    }

    body.settings-page .settings-grid.two {
        grid-template-columns: 1fr;
    }

    body.settings-page .stack-form {
        padding: 16px;
    }

    body.settings-page .stack-form button {
        width: 100%;
    }
}

body.judges-page.theme-light .dashboard-content > .settings-card:last-of-type .row-actions {
    border-top-color: rgba(23, 32, 51, 0.08);
}

body.judges-page.theme-light .dashboard-content > .settings-card:last-of-type .row-actions button {
    background: #e5f0f8;
    color: #245a80;
}

@media (max-width: 560px) {
    body.judges-page .dashboard-content {
        padding: 18px;
    }

    body.judges-page .dashboard-content > .settings-card:first-of-type .inline-create {
        grid-template-columns: 1fr;
    }

    body.judges-page .dashboard-content > .settings-card:first-of-type .inline-create button {
        width: 100%;
    }

    body.judges-page .dashboard-content .crud-table {
        min-width: 0;
        table-layout: fixed;
    }

    body.judges-page .dashboard-content .crud-table th:first-child,
    body.judges-page .dashboard-content .crud-table td:first-child {
        width: 54%;
        min-width: 0;
    }

    body.judges-page .dashboard-content .crud-table th:nth-child(2),
    body.judges-page .dashboard-content .crud-table td:nth-child(2) {
        width: 22%;
    }

    body.judges-page .dashboard-content .crud-table th:nth-child(3),
    body.judges-page .dashboard-content .crud-table td:nth-child(3) {
        width: 104px;
        min-width: 104px;
    }

    body.judges-page .dashboard-content .crud-table .inline-edit button {
        padding: 6px 7px;
    }

    body.judges-page .dashboard-content .crud-table td:nth-child(3).action-inline button {
        display: block;
        min-width: 0;
    }
}

body.judge-page,
body.judge-page * {
    font-family: 'Outfit', sans-serif;
}

body.judge-page .dashboard-layout {
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
}

body.judge-page .dashboard-sidebar {
    display: flex;
    position: sticky;
    top: 16px;
    height: calc(100vh - 32px);
    min-height: 0;
    overflow: hidden;
    padding: 12px;
    gap: 9px;
    border-left: 3px solid #31b39d;
    border-radius: 16px;
    background: rgba(12, 26, 39, 0.82) !important;
    border-color: rgba(155, 184, 199, 0.17);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.2) !important;
}

body.judge-page.theme-light .dashboard-sidebar {
    background: rgba(255, 253, 248, 0.94) !important;
    border-color: rgba(23, 32, 51, 0.1);
    box-shadow: 0 20px 42px rgba(23, 32, 51, 0.1) !important;
}

body.judge-page .dashboard-brand {
    min-height: 43px;
    gap: 9px;
    padding: 2px 2px 11px;
    border-bottom: 1px solid rgba(155, 184, 199, 0.16);
}

body.judge-page .dashboard-logo {
    width: 36px;
    height: 36px;
    padding: 4px;
    border-radius: 11px;
}

body.judge-page .dashboard-brand h1 {
    font-size: 0.95rem;
}

body.judge-page .dashboard-brand p {
    margin-top: 1px;
    font-size: 0.72rem;
}

body.judge-page .dashboard-nav-title {
    margin: 0;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.09em;
}

body.judge-page .dashboard-nav {
    gap: 4px;
}

body.judge-page .dashboard-nav a {
    min-height: 35px;
    padding: 8px 10px;
    border-radius: 8px;
    border-color: transparent;
    font-size: 0.84rem;
}

body.judge-page .assistance-panel {
    margin-top: 0;
    padding: 8px;
    border-radius: 10px;
    background: rgba(7, 24, 37, 0.28);
}

body.judge-page.theme-light .assistance-panel {
    background: #f3f6f5;
    border-color: rgba(23, 32, 51, 0.08);
}

body.judge-page .sidebar-contest-list {
    gap: 4px;
    max-height: 112px;
    padding-right: 2px;
}

body.judge-page .sidebar-contest-link {
    display: block;
    overflow: hidden;
    padding: 7px 8px;
    border-radius: 7px;
    border-color: transparent;
    font-size: 0.78rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.judge-page .sidebar-contest-link.active {
    border-color: rgba(49, 179, 157, 0.3);
    background: rgba(49, 179, 157, 0.16);
    color: #f4fbf8;
}

body.judge-page.theme-light .sidebar-contest-link {
    color: #536176;
}

body.judge-page.theme-light .sidebar-contest-link.active {
    background: #dcefe7;
    color: #172033;
}

body.judge-page .assist-badge {
    min-width: 17px;
    padding: 1px 5px;
    font-size: 0.65rem;
}

body.judge-page .theme-toggle-btn,
body.judge-page .assist-form input,
body.judge-page .assist-form button {
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.76rem;
}

body.judge-page .theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.15rem;
    line-height: 1;
}

body.judge-page .dashboard-brand {
    justify-content: space-between;
}

body.judge-page .assist-form input {
    margin-bottom: 6px;
    padding: 7px 8px;
    border-radius: 7px;
}

body.judge-page .assist-form button {
    padding: 7px 8px;
    border-radius: 7px;
    line-height: 1.2;
}

body.judge-page .dashboard-logout {
    margin-top: 0;
}

body.judge-page .sidebar-footer-actions {
    display: grid;
    gap: 8px;
    margin-top: auto;
}

body.judge-page .sidebar-footer-actions .dashboard-nav {
    gap: 4px;
}

body.judge-page .sidebar-footer-actions .dashboard-nav a,
body.judge-page .sidebar-footer-actions .dashboard-logout {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
}

@media (max-width: 920px) {
    body.judge-page .dashboard-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    body.judge-page .dashboard-sidebar {
        display: flex !important;
        position: static;
        height: auto !important;
    }
}

@media (max-width: 920px) {
    body.scoring-page .score-matrix-table {
        min-width: 720px;
    }

    body.scoring-page .score-matrix-table th:first-child,
    body.scoring-page .score-matrix-table td:first-child {
        width: 210px;
    }
}

@media (max-width: 560px) {
    body.scoring-page .dashboard-content {
        padding: 18px;
    }

    body.scoring-page .scoring-finalization-card,
    body.scoring-page .score-entry-card {
        padding: 16px !important;
    }

    body.scoring-page .score-category-card h4 {
        padding: 15px 16px 13px;
    }

    body.scoring-page .score-matrix-table th:first-child,
    body.scoring-page .score-matrix-table td:first-child {
        width: 180px;
    }

    body.scoring-page .participant-info span {
        font-size: 0.82rem;
    }
}

body.contest-setup-page .crud-table th {
    padding: 11px 16px;
    border: 0;
    background: rgba(8, 24, 37, 0.46);
    color: #9eb2be;
    font-size: 0.71rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.contest-setup-page.theme-light .crud-table th {
    background: #f3f6f5;
    color: #536176;
}

body.contest-setup-page .crud-table td {
    padding: 13px 16px;
    border: 0;
    border-top: 1px solid rgba(155, 184, 199, 0.1);
}

body.contest-setup-page.theme-light .crud-table td {
    border-top-color: rgba(23, 32, 51, 0.08);
}

body.contest-setup-page .crud-table tbody tr:hover td {
    background: rgba(49, 179, 157, 0.07);
}

body.contest-setup-page .inline-edit {
    align-items: center;
    margin: 0;
}

body.contest-setup-page .inline-edit button,
body.contest-setup-page .action-inline button {
    box-sizing: border-box;
    min-height: 42px;
    border: 0;
    border-radius: 7px;
    padding: 7px 11px;
    background: rgba(121, 183, 232, 0.18);
    color: #bfe0f7;
    font-weight: 700;
}

body.contest-setup-page.theme-light .inline-edit button,
body.contest-setup-page.theme-light .action-inline button {
    background: #e5f0f8;
    color: #245a80;
}

body.contest-setup-page .crud-table input,
body.contest-setup-page .crud-table textarea,
body.contest-setup-page .crud-table select {
    box-sizing: border-box;
    margin-bottom: 0;
    border-color: rgba(155, 184, 199, 0.2) !important;
    background: rgba(7, 24, 37, 0.42) !important;
}

body.contest-setup-page .dashboard-content > .settings-card:first-of-type .action-inline form {
    display: block;
    margin: 0;
}

body.contest-setup-page.theme-light .crud-table input,
body.contest-setup-page.theme-light .crud-table textarea,
body.contest-setup-page.theme-light .crud-table select {
    border-color: rgba(23, 32, 51, 0.12) !important;
    background: #ffffff !important;
}

body.contest-setup-page .contest-crud-table {
    min-width: 1060px;
    table-layout: auto;
}

body.contest-setup-page .contest-crud-table td:nth-child(1) {
    min-width: 190px;
}

body.contest-setup-page .contest-crud-table td:nth-child(2) {
    min-width: 190px;
}

body.contest-setup-page .contest-crud-table td:nth-child(3) {
    min-width: 230px;
}

body.contest-setup-page .contest-crud-table textarea {
    min-width: 210px;
}

body.contest-setup-page .contest-crud-table th:last-child,
body.contest-setup-page .contest-crud-table td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    min-width: 116px;
    background: #102a3a;
    box-shadow: -8px 0 14px rgba(7, 24, 37, 0.16);
}

body.contest-setup-page .contest-crud-table th:last-child {
    z-index: 3;
    background: #081825;
}

body.contest-setup-page.theme-light .contest-crud-table th:last-child,
body.contest-setup-page.theme-light .contest-crud-table td:last-child {
    background: #ffffff;
    box-shadow: -8px 0 14px rgba(23, 32, 51, 0.08);
}

body.contest-setup-page.theme-light .contest-crud-table th:last-child {
    background: #f3f6f5;
}

body.contest-setup-page .contest-crud-table td:last-child.action-inline {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
}

body.contest-setup-page .contest-crud-table td:last-child.action-inline form,
body.contest-setup-page .contest-crud-table td:last-child.action-inline button {
    width: 100%;
}

body.contest-setup-page .table-checkbox {
    white-space: nowrap;
}

body.contest-setup-page .danger.contrast {
    background: rgba(231, 101, 79, 0.16) !important;
    border-color: rgba(231, 101, 79, 0.35) !important;
    color: #ffb4a8 !important;
}

body.contest-setup-page.theme-light .danger.contrast {
    background: #fff0ed !important;
    border-color: rgba(231, 101, 79, 0.3) !important;
    color: #a63d30 !important;
}

@media (max-width: 920px) {
    body.contest-setup-page .dashboard-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    body.contest-setup-page .dashboard-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    body.contest-setup-page .dashboard-content {
        display: block;
    }

    body.contest-setup-page .dashboard-content > .settings-card:nth-of-type(1),
    body.contest-setup-page .dashboard-content > .settings-card:nth-of-type(2),
    body.contest-setup-page .dashboard-content > .settings-card:nth-of-type(3) {
        margin-top: 18px;
    }

    body.contest-setup-page .inline-create {
        grid-template-columns: 1fr;
    }

    body.contest-setup-page .inline-create button {
        width: 100%;
    }

    body.contest-setup-page .stack-form button {
        width: 100%;
    }

    body.contest-setup-page .dashboard-content > .settings-card > h4 {
        padding: 16px;
    }

    body.contest-setup-page .stack-form {
        padding: 16px;
    }

    body.contest-setup-page .crud-table th,
    body.contest-setup-page .crud-table td {
        padding-left: 12px;
        padding-right: 12px;
    }

    body.contest-setup-page .dashboard-content > .settings-card:first-of-type .crud-table {
        min-width: 0;
        table-layout: fixed;
    }

    body.contest-setup-page .dashboard-content > .settings-card:first-of-type .crud-table th:first-child,
    body.contest-setup-page .dashboard-content > .settings-card:first-of-type .crud-table td:first-child {
        width: 68%;
    }

    body.contest-setup-page .dashboard-content > .settings-card:first-of-type .inline-edit {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    body.contest-setup-page .dashboard-content > .settings-card:first-of-type .inline-edit input[name="category_name"] {
        min-width: 0;
        flex: 1 1 auto;
    }

    body.contest-setup-page .dashboard-content > .settings-card:first-of-type .inline-edit button {
        flex: 0 0 auto;
        padding: 6px 8px;
    }

    body.contest-setup-page .dashboard-content > .settings-card:first-of-type .action-inline {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    body.contest-setup-page .dashboard-content > .settings-card:first-of-type .action-inline form,
    body.contest-setup-page .dashboard-content > .settings-card:first-of-type .action-inline button {
        width: 100%;
    }

    body.contest-setup-page .dashboard-content > .settings-card:first-of-type .action-inline button {
        padding: 6px 8px;
    }
}

body.criteria-view,
body.criteria-view * {
    font-family: 'Outfit', sans-serif;
}

body.criteria-view .dashboard-content {
    display: block;
}

body.criteria-view .subpanel > h3 {
    margin: 0 0 12px;
    color: #f7fbfd;
    font-size: 1.12rem;
}

body.criteria-view.theme-light .subpanel > h3 {
    color: #172033;
}

body.criteria-view .subpanel > .table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(155, 184, 199, 0.16);
    border-radius: 14px;
    background: rgba(18, 42, 57, 0.42);
}

body.criteria-view.theme-light .subpanel > .table-wrap {
    border-color: rgba(23, 32, 51, 0.09);
    background: #ffffff;
}

body.criteria-view .subpanel > .table-wrap .contest-crud-table {
    width: 100%;
    min-width: 720px;
    table-layout: fixed;
    margin: 0;
}

body.criteria-view .contest-crud-table th {
    padding: 12px 14px;
    border: 0;
    background: #102a3a;
    color: #aebfc9;
    font-size: 0.71rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.criteria-view.theme-light .contest-crud-table th {
    background: #f3f6f5;
    color: #536176;
}

body.criteria-view .contest-crud-table th:nth-child(1),
body.criteria-view .contest-crud-table td:nth-child(1) { width: 42%; }

body.criteria-view .contest-crud-table th:nth-child(2),
body.criteria-view .contest-crud-table td:nth-child(2) { width: 16%; }

body.criteria-view .contest-crud-table th:nth-child(3),
body.criteria-view .contest-crud-table td:nth-child(3) { width: 18%; }

body.criteria-view .contest-crud-table th:nth-child(4),
body.criteria-view .contest-crud-table td:nth-child(4) { width: 24%; }

body.criteria-view .contest-crud-table td {
    padding: 12px 14px;
    border: 0;
    border-top: 1px solid rgba(155, 184, 199, 0.1);
    background: transparent;
    color: #d9e4e9;
    vertical-align: middle;
}

body.criteria-view.theme-light .contest-crud-table td {
    border-top-color: rgba(23, 32, 51, 0.08);
    color: #344257;
}

body.criteria-view .contest-crud-table tbody tr:hover td {
    background: rgba(49, 179, 157, 0.07);
}

body.criteria-view .contest-crud-table input[type="text"],
body.criteria-view .contest-crud-table input[type="number"] {
    box-sizing: border-box;
    width: 100%;
    height: 36px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid rgba(155, 184, 199, 0.22) !important;
    border-radius: 8px;
    background: rgba(7, 24, 37, 0.5) !important;
    color: #f7fbfd;
    font-family: inherit;
    font-size: 0.86rem;
}

body.criteria-view.theme-light .contest-crud-table input[type="text"],
body.criteria-view.theme-light .contest-crud-table input[type="number"] {
    border-color: rgba(23, 32, 51, 0.14) !important;
    background: #ffffff !important;
    color: #172033;
}

body.criteria-view .contest-crud-table input:focus {
    outline: none;
    border-color: #31b39d !important;
    box-shadow: 0 0 0 3px rgba(49, 179, 157, 0.16);
}

body.criteria-view .contest-crud-table .checkbox-line {
    justify-content: center;
    margin: 0;
}

body.criteria-view .contest-crud-table .checkbox-line input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #31b39d;
}

body.criteria-view .contest-crud-table .action-inline {
    align-items: center;
    gap: 6px;
}

body.criteria-view .contest-crud-table .action-inline button {
    border: 0;
    border-radius: 7px;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 800;
}

body.criteria-view .contest-crud-table .action-inline button:not(.danger) {
    background: #31b39d;
    color: #062b27;
}

body.criteria-view .contest-crud-table .action-inline .danger {
    background: rgba(231, 101, 79, 0.16) !important;
    border-color: transparent !important;
    color: #ffb4a8 !important;
}

body.criteria-view.theme-light .contest-crud-table .action-inline .danger {
    background: #fff0ed !important;
    color: #a63d30 !important;
}

body.criteria-view .inline-criterion {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 130px auto auto;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid rgba(49, 179, 157, 0.2);
    border-radius: 14px;
    background: rgba(49, 179, 157, 0.06);
}

body.criteria-view .inline-criterion input {
    box-sizing: border-box;
    height: 38px;
    margin: 0;
}

body.criteria-view .inline-criterion .checkbox-line {
    margin: 0;
    white-space: nowrap;
    color: #b9c8d2;
    font-size: 0.78rem;
    font-weight: 700;
}

body.criteria-view.theme-light .inline-criterion .checkbox-line {
    color: #536176;
}

body.criteria-view .inline-criterion button {
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background: #31b39d;
    color: #062b27;
    font-weight: 800;
}

@media (max-width: 700px) {
    body.criteria-view .inline-criterion {
        grid-template-columns: 1fr 110px;
    }

    body.criteria-view .inline-criterion .checkbox-line {
        grid-column: 1 / -1;
    }

    body.criteria-view .inline-criterion button {
        width: 100%;
    }
}

/* About page */
body.about-page .dashboard-content {
    max-width: 1180px;
}

body.about-page .about-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 8px 0 28px;
    border-bottom: 1px solid rgba(49, 179, 157, 0.24);
}

body.about-page .about-intro > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
}

body.about-page .about-intro h2 {
    margin: 4px 0 10px;
}

body.about-page .about-intro > div:first-child > p:last-child {
    max-width: 680px;
    margin: 0;
}

body.about-page .about-kicker {
    margin: 0 !important;
    color: #31b39d;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

body.about-page .about-version {
    flex: 0 0 auto;
    padding: 13px 16px;
    border-left: 3px solid #d9b45f;
    color: #d9b45f;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: right;
    text-transform: uppercase;
}

body.about-page .about-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0;
}

body.about-page .about-feature-card {
    min-height: 170px;
    padding: 20px;
    margin: 0;
    border-top: 3px solid #31b39d;
}

body.about-page .about-feature-card:nth-child(2) {
    border-top-color: #79b7e8;
}

body.about-page .about-feature-card:nth-child(3) {
    border-top-color: #d9b45f;
}

body.about-page .about-feature-number {
    display: block;
    margin-bottom: 18px;
    color: #31b39d !important;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

body.about-page .about-feature-card h4 {
    margin-bottom: 9px;
}

body.about-page .about-feature-card p {
    margin-bottom: 0;
}

body.about-page .system-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
}

body.about-page .system-info-table td {
    padding: 11px 12px;
    border-top: 1px solid rgba(121, 183, 232, 0.2);
    vertical-align: top;
}

body.about-page .system-info-table td:first-child {
    width: 30%;
    color: #d9b45f;
    white-space: nowrap;
}

body.about-page .about-programmer {
    display: grid;
    grid-template-columns: 214px minmax(0, 1fr);
    align-items: start;
    gap: 0;
    margin: 24px 0 0;
    padding: 0;
    overflow: hidden;
    border-top: 3px solid #d9b45f;
}

body.about-page .about-programmer-photo {
    display: block;
    width: 100%;
    max-width: 214px;
    aspect-ratio: 1 / 1;
    height: auto;
    padding: 5px;
    border: 1px solid rgba(217, 180, 95, 0.75);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(217, 180, 95, 0.12));
    box-shadow: 0 12px 24px rgba(7, 24, 37, 0.2), 0 0 0 4px rgba(217, 180, 95, 0.08);
    object-fit: cover;
    object-position: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.about-page .about-programmer-photo:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(7, 24, 37, 0.24), 0 0 0 5px rgba(217, 180, 95, 0.12);
}

body.about-page .about-programmer-details {
    min-width: 0;
    padding: 24px 28px 22px 32px;
}

body.about-page .developer-role {
    margin: 14px 0;
}

body.about-page .developer-role-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 24px;
    margin: 8px 0 0;
    padding-left: 20px;
}

body.about-page .developer-role-list li {
    padding-right: 8px;
}

body.about-page .about-programmer-details h3 {
    margin: 7px 0 8px;
    color: var(--text-primary, #f4f8fb);
    font-size: 1.7rem;
}

body.about-page .about-programmer-details > p:not(.about-kicker) {
    margin: 0 0 8px;
}

body.about-page .about-programmer-details .about-contact {
    color: #79b7e8;
}

body.about-page.theme-light .about-programmer-details h3 {
    color: #172033;
}

body.about-page.theme-light .about-programmer-photo {
    background: linear-gradient(145deg, #ffffff, #fff8e7);
    box-shadow: 0 12px 24px rgba(23, 32, 51, 0.12), 0 0 0 4px rgba(217, 180, 95, 0.1);
}

@media (max-width: 700px) {
    body.about-page .dashboard-content {
        padding: 16px 14px;
    }

    body.about-page .about-intro {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        padding-bottom: 22px;
    }

    body.about-page .about-intro > div:first-child > p:last-child {
        max-width: 100%;
        font-size: 0.96rem;
    }

    body.about-page .about-intro h2 {
        font-size: 1.8rem;
    }

    body.about-page .about-version {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px 18px;
        justify-content: space-between;
        padding: 12px 14px;
        border-left: none;
        border-top: 3px solid #d9b45f;
        text-align: left;
    }

    body.about-page .about-version strong,
    body.about-page .about-version br {
        display: none;
    }

    body.about-page .about-version > * {
        flex: 1 1 30%;
        min-width: 110px;
    }

    body.about-page .about-feature-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    body.about-page .about-feature-card {
        min-height: 0;
        padding: 18px 16px 16px;
    }

    body.about-page .about-feature-card h4 {
        font-size: 1.15rem;
    }

    body.about-page .dashboard-content > .settings-card {
        padding: 16px;
    }

    body.about-page .about-programmer {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 16px;
    }

    body.about-page .about-programmer-photo {
        width: min(190px, 100%);
        max-width: 190px;
        justify-self: center;
    }

    body.about-page .about-programmer-details {
        padding: 0;
    }

    body.about-page .system-info-table,
    body.about-page .system-info-table tbody,
    body.about-page .system-info-table tr {
        display: block;
        width: 100%;
        min-width: 0 !important;
    }

    body.about-page .system-info-table {
        table-layout: fixed;
    }

    body.about-page .system-info-table td {
        display: block;
        width: 100% !important;
        padding: 10px 0;
        border-top: 1px solid rgba(121, 183, 232, 0.2);
        overflow-wrap: anywhere;
        text-align: left;
        white-space: normal;
    }

    body.about-page .system-info-table td:first-child {
        padding-bottom: 4px;
        border-top: 0;
    }

    body.about-page .system-info-table td + td {
        padding-top: 0;
    }

    body.about-page .about-programmer-details h3 {
        font-size: 1.4rem;
        overflow-wrap: anywhere;
    }

    body.about-page .developer-role-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body.about-page .dashboard-content {
        padding: 12px 10px;
    }

    body.about-page .about-kicker {
        letter-spacing: 0.08em;
        font-size: 0.66rem;
    }

    body.about-page .about-intro h2 {
        font-size: 1.55rem;
    }

    body.about-page .about-intro > div:first-child > p:last-child,
    body.about-page .about-feature-card p,
    body.about-page .about-programmer-details p,
    body.about-page .developer-role-list li {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    body.about-page .about-version {
        gap: 8px 12px;
        padding: 10px 12px;
        font-size: 0.72rem;
    }

    body.about-page .about-version > * {
        flex: 1 1 100%;
        min-width: 0;
    }

    body.about-page .about-feature-grid {
        gap: 12px;
    }

    body.about-page .about-feature-card {
        padding: 16px 14px;
    }

    body.about-page .about-feature-number {
        margin-bottom: 12px;
        font-size: 0.68rem;
    }

    body.about-page .system-info-table td {
        padding: 8px 0;
    }

    body.about-page .about-programmer {
        padding: 12px;
    }

    body.about-page .about-programmer-details h3 {
        font-size: 1.18rem;
    }

    body.about-page .developer-role {
        margin: 12px 0;
    }
}

body.about-page .dashboard-topbar,
body.about-page .dashboard-content,
body.about-page .settings-card,
body.about-page .about-programmer-photo,
body.about-page .about-version,
body.about-page .system-info-table,
body.about-page .system-info-table td {
    box-sizing: border-box;
}

body.about-page .dashboard-topbar {
    width: 100%;
}

body.about-page .dashboard-content > .settings-card {
    padding: 20px;
}

body.about-page .about-programmer {
    padding: 0;
}

body.about-page.theme-dark .dashboard-user,
body.about-page.theme-dark .dashboard-content p,
body.about-page.theme-dark .system-info-table td:not(:first-child),
body.about-page.theme-default .dashboard-user,
body.about-page.theme-default .dashboard-content p,
body.about-page.theme-default .system-info-table td:not(:first-child) {
    color: #c4d0d8;
}

body.about-page.theme-dark .dashboard-topbar,
body.about-page.theme-default .dashboard-topbar {
    background: rgba(15, 34, 49, 0.84);
}

body.about-page.theme-dark .dashboard-content,
body.about-page.theme-default .dashboard-content,
body.about-page.theme-dark .settings-card,
body.about-page.theme-default .settings-card {
    background: rgba(18, 42, 57, 0.72);
}

body.about-page.theme-dark .about-programmer-details h3,
body.about-page.theme-default .about-programmer-details h3 {
    color: #f7fbfd;
}

body.about-page .about-programmer-details h3,
body.about-page .about-programmer-details p,
body.about-page .developer-role-list {
    overflow-wrap: anywhere;
}

body.about-page .about-version,
body.about-page .about-version strong {
    color: #d9b45f !important;
}

body.about-page.theme-dark .about-feature-number,
body.about-page.theme-default .about-feature-number {
    color: #62ccb9 !important;
}

@media (max-width: 560px) {
    body.about-page .dashboard-layout,
    body.about-page .dashboard-main,
    body.about-page .dashboard-content {
        width: 100%;
        min-width: 0;
        min-height: 0;
        height: auto;
    }

    body.about-page .dashboard-content {
        overflow: visible;
        padding: 14px 12px;
    }

    body.about-page .dashboard-content > .settings-card,
    body.about-page .about-feature-card,
    body.about-page .about-programmer {
        overflow: visible;
    }

    body.about-page .dashboard-content > .settings-card {
        padding: 16px;
    }

    body.about-page .about-programmer {
        padding: 12px;
    }
}
