@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --neon-purple: #8b5cf6;
    --neon-violet: #6d28d9;
    --neon-magenta: #d946ef;
    --neon-cyan: #22d3ee;
    --neon-rgb: 139, 92, 246;
    --cyan-rgb: 139, 92, 246;
    --bg-deep: #050212;
    --bg-mid: #0d0524;
    --bg-card: rgba(19, 10, 40, 0.78);
    --bg-card-strong: rgba(12, 6, 28, 0.92);
    --text: #f4efff;
    --text-muted: #b8aadf;
    --border: rgba(var(--neon-rgb), 0.46);
    --shadow: 0 18px 40px rgba(4, 2, 18, 0.52);
    --glow-soft: 0 0 36px rgba(var(--neon-rgb), 0.45);
    --gradient-page: radial-gradient(1200px 700px at 15% -15%, rgba(139, 92, 246, 0.35), transparent 60%),
                     radial-gradient(1000px 700px at 110% 10%, rgba(34, 211, 238, 0.16), transparent 62%),
                     linear-gradient(160deg, #060212 0%, #0d0524 45%, #11082d 100%);
    --gradient-sidebar: linear-gradient(180deg, rgba(31, 14, 74, 0.9), rgba(16, 8, 40, 0.96));
    --surface: linear-gradient(145deg, rgba(56, 29, 124, 0.36), rgba(30, 16, 68, 0.52));
    --surface-strong: linear-gradient(145deg, rgba(66, 36, 138, 0.42), rgba(34, 17, 76, 0.62));
    --forest-bg-image: url('../images/forest-bg.png?v=4');
    --forest-veil-gradient: linear-gradient(rgba(255, 255, 255, 0.58), rgba(241, 248, 252, 0.64));
    --forest-veil-filter: contrast(1.06) saturate(1.08);
    --chpk-surface: rgba(246, 249, 252, 0.62);
    --chpk-surface-soft: rgba(238, 244, 250, 0.55);
}

html.portfolio-themed.theme-green {
    --neon-purple: #22c55e;
    --neon-violet: #15803d;
    --neon-magenta: #16a34a;
    --neon-cyan: #2dd4bf;
    --neon-rgb: 34, 197, 94;
    --cyan-rgb: 34, 197, 94;
    --gradient-sidebar: linear-gradient(180deg, rgba(8, 70, 45, 0.9), rgba(5, 47, 30, 0.96));
    --surface: linear-gradient(145deg, rgba(22, 163, 74, 0.08), rgba(7, 74, 46, 0.16));
    --surface-strong: linear-gradient(145deg, rgba(34, 197, 94, 0.12), rgba(8, 92, 56, 0.22));
}
html.portfolio-themed.theme-blue {
    --neon-purple: #3b82f6;
    --neon-violet: #1d4ed8;
    --neon-magenta: #2563eb;
    --neon-cyan: #22d3ee;
    --neon-rgb: 59, 130, 246;
    --cyan-rgb: 59, 130, 246;
    --gradient-sidebar: linear-gradient(180deg, rgba(18, 52, 116, 0.9), rgba(12, 34, 78, 0.96));
    --surface: linear-gradient(145deg, rgba(37, 99, 235, 0.08), rgba(22, 58, 130, 0.16));
    --surface-strong: linear-gradient(145deg, rgba(59, 130, 246, 0.12), rgba(30, 64, 175, 0.22));
}
html.portfolio-themed.theme-orange {
    --neon-purple: #f97316;
    --neon-violet: #c2410c;
    --neon-magenta: #fb923c;
    --neon-cyan: #f59e0b;
    --neon-rgb: 249, 115, 22;
    --cyan-rgb: 249, 115, 22;
    --gradient-sidebar: linear-gradient(180deg, rgba(120, 53, 15, 0.9), rgba(94, 39, 9, 0.96));
    --surface: linear-gradient(145deg, rgba(249, 115, 22, 0.08), rgba(154, 52, 18, 0.16));
    --surface-strong: linear-gradient(145deg, rgba(251, 146, 60, 0.12), rgba(194, 65, 12, 0.22));
}
html.portfolio-themed.theme-black {
    --neon-purple: #6b7280;
    --neon-violet: #1f2937;
    --neon-magenta: #4b5563;
    --neon-cyan: #9ca3af;
    --neon-rgb: 107, 114, 128;
    --cyan-rgb: 107, 114, 128;
    --gradient-sidebar: linear-gradient(180deg, rgba(39, 39, 42, 0.9), rgba(24, 24, 27, 0.96));
    --surface: linear-gradient(145deg, rgba(82, 82, 91, 0.08), rgba(39, 39, 42, 0.16));
    --surface-strong: linear-gradient(145deg, rgba(113, 113, 122, 0.1), rgba(63, 63, 70, 0.2));
}
html.portfolio-themed.theme-white {
    --neon-purple: #e5e7eb;
    --neon-violet: #9ca3af;
    --neon-magenta: #f3f4f6;
    --neon-cyan: #ffffff;
    --neon-rgb: 229, 231, 235;
    --cyan-rgb: 229, 231, 235;
    --gradient-sidebar: linear-gradient(180deg, rgba(72, 75, 86, 0.78), rgba(44, 46, 54, 0.86));
    --surface: linear-gradient(145deg, rgba(185, 191, 205, 0.14), rgba(117, 124, 142, 0.26));
    --surface-strong: linear-gradient(145deg, rgba(208, 214, 226, 0.22), rgba(132, 139, 158, 0.32));
}
html.portfolio-themed.theme-sky {
    --neon-purple: #0ea5e9;
    --neon-violet: #0284c7;
    --neon-magenta: #38bdf8;
    --neon-cyan: #67e8f9;
    --neon-rgb: 14, 165, 233;
    --cyan-rgb: 14, 165, 233;
    --gradient-sidebar: linear-gradient(180deg, rgba(7, 89, 133, 0.9), rgba(8, 47, 73, 0.96));
    --surface: linear-gradient(145deg, rgba(14, 165, 233, 0.08), rgba(2, 84, 131, 0.16));
    --surface-strong: linear-gradient(145deg, rgba(56, 189, 248, 0.12), rgba(3, 105, 161, 0.22));
}
html.portfolio-themed.theme-burgundy {
    --neon-purple: #be123c;
    --neon-violet: #881337;
    --neon-magenta: #e11d48;
    --neon-cyan: #fb7185;
    --neon-rgb: 190, 18, 60;
    --cyan-rgb: 190, 18, 60;
    --gradient-sidebar: linear-gradient(180deg, rgba(127, 29, 29, 0.9), rgba(76, 5, 25, 0.96));
    --surface: linear-gradient(145deg, rgba(190, 18, 60, 0.08), rgba(103, 6, 32, 0.16));
    --surface-strong: linear-gradient(145deg, rgba(225, 29, 72, 0.12), rgba(136, 19, 55, 0.22));
}
html.portfolio-themed.theme-pink {
    --neon-purple: #db2777;
    --neon-violet: #9d174d;
    --neon-magenta: #f472b6;
    --neon-cyan: #f9a8d4;
    --neon-rgb: 219, 39, 119;
    --cyan-rgb: 219, 39, 119;
    --gradient-sidebar: linear-gradient(180deg, rgba(157, 23, 77, 0.9), rgba(111, 27, 85, 0.96));
    --surface: linear-gradient(145deg, rgba(219, 39, 119, 0.08), rgba(131, 24, 67, 0.16));
    --surface-strong: linear-gradient(145deg, rgba(244, 114, 182, 0.12), rgba(157, 23, 77, 0.22));
}
/* Колледж белого — светлая тема как на главной (#234998 / #009ACE, без тёмно-синего фона) */
html.portfolio-themed.theme-chpk {
    --neon-purple: #234998;
    --neon-violet: #1a3774;
    --neon-magenta: #009ACE;
    --neon-cyan: #009ACE;
    --neon-rgb: 35, 73, 152;
    --cyan-rgb: 0, 154, 206;
    --text: #102a4c;
    --text-muted: #35567f;
    --border: rgba(35, 73, 152, 0.45);
    --shadow: 0 2px 12px rgba(35, 73, 152, 0.08);
    --glow-soft: 0 0 18px rgba(0, 154, 206, 0.2);
    --gradient-page: linear-gradient(165deg, #e9eef6 0%, #dfe9f4 45%, #e8eef7 100%);
    --gradient-sidebar: linear-gradient(180deg, rgba(246, 249, 252, 0.68), rgba(238, 244, 250, 0.6));
    --surface: var(--chpk-surface);
    --surface-strong: var(--chpk-surface-soft);
    --chpk-card-border: 1px solid rgba(35, 73, 152, 0.45);
    --chpk-card-shadow: 0 2px 14px rgba(35, 73, 152, 0.1);
    --chpk-glass-blur: blur(10px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text);
    background: linear-gradient(rgba(8, 4, 20, 0.28), rgba(8, 4, 20, 0.28)), var(--gradient-page);
    min-height: 100vh;
}

/* Главная: палитра ЧПК (#234998 / #009ACE), белые блоки — без фиолетового :root */
body.page-landing {
    --neon-purple: #234998;
    --neon-violet: #1a3774;
    --neon-magenta: #009ACE;
    --neon-cyan: #009ACE;
    --neon-rgb: 35, 73, 152;
    --cyan-rgb: 0, 154, 206;
    --border: rgba(35, 73, 152, 0.45);
    --text: #102a4c;
    --text-muted: #35567f;
    --surface: var(--chpk-surface);
    --surface-strong: var(--chpk-surface-soft);
    --gradient-page: linear-gradient(165deg, #e9eef6 0%, #dfe9f4 45%, #e8eef7 100%);
    --chpk-card-border: 1px solid rgba(35, 73, 152, 0.55);
    --chpk-card-shadow: 0 2px 12px rgba(35, 73, 152, 0.07);
    background: transparent !important;
    color: var(--text);
}

/* Статичный фон леса (тёмные темы) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(rgba(6, 2, 20, 0.34), rgba(6, 2, 20, 0.34)),
        var(--forest-bg-image) center/cover no-repeat;
    opacity: 1;
}

/* Единая светлая вуаль: главная, вход, регистрация, тема «Колледж белого» */
body.page-landing::before,
body.page-auth::before,
html.portfolio-themed.theme-chpk body::before {
    background: var(--forest-veil-gradient), var(--forest-bg-image) center/cover no-repeat !important;
    filter: var(--forest-veil-filter);
    opacity: 1 !important;
}

html.portfolio-themed.theme-chpk body {
    background: transparent !important;
    color: var(--text);
}

html.portfolio-has-custom-bg body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(6, 2, 20, 0.38), rgba(6, 2, 20, 0.38)),
        var(--portfolio-custom-bg) center/cover no-repeat;
    opacity: 1;
}

.app-container { min-height: 100vh; }

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 272px;
    height: 100vh;
    z-index: 25;
    background: linear-gradient(180deg, rgba(4, 5, 10, 0.62), rgba(4, 5, 10, 0.5));
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 1.15rem 1rem;
    overflow-y: auto;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.05rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2), 0 0 30px rgba(var(--neon-rgb), 0.75);
}
.logo-link {
    color: inherit;
    text-decoration: none;
}
.logo-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.sidebar-nav ul { margin: 0; padding: 0; list-style: none; }
.sidebar-nav li { margin-bottom: 0.72rem; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.56rem;
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(var(--cyan-rgb), 0.5);
    border-radius: 999px;
    padding: 0.9rem 1.06rem;
    font-size: 1.02rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(4, 6, 13, 0.92), rgba(6, 10, 20, 0.8));
    box-shadow: 0 0 6px rgba(var(--cyan-rgb), 0.14);
    transition: 0.2s ease;
}

body.page-auth .sidebar-nav a {
    color: #1a3774;
    border: 1px solid rgba(0, 154, 206, 0.72);
    background: var(--chpk-surface);
    box-shadow: 0 1px 8px rgba(35, 73, 152, 0.12), 0 0 12px rgba(0, 154, 206, 0.16);
    font-size: 1.02rem;
    padding: 0.82rem 1rem;
}
body.page-auth .sidebar-nav a:hover {
    background: rgba(0, 154, 206, 0.12);
    border-color: rgba(0, 154, 206, 0.95);
    color: #0d3d73;
    box-shadow: 0 0 14px rgba(0, 154, 206, 0.28);
}
body.page-auth .sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(0, 154, 206, 0.18), rgba(255, 255, 255, 0.92));
    border-color: rgba(0, 154, 206, 0.95);
    color: #123b69;
    box-shadow: 0 0 16px rgba(0, 154, 206, 0.35), 0 0 22px rgba(35, 73, 152, 0.18);
}

.sidebar-nav a:hover {
    border-color: rgba(var(--cyan-rgb), 0.74);
    background: linear-gradient(135deg, rgba(7, 10, 20, 0.96), rgba(10, 16, 32, 0.88));
    box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.28);
    transform: translateY(-1px);
}

.sidebar-nav a.active {
    border-color: rgba(var(--cyan-rgb), 0.95);
    background: linear-gradient(135deg, rgba(var(--neon-rgb), 0.24), rgba(8, 14, 30, 0.9));
    box-shadow: 0 0 16px rgba(var(--cyan-rgb), 0.42), 0 0 24px rgba(var(--neon-rgb), 0.2);
}

.sidebar-nav a.is-locked-link {
    opacity: 0.68;
}

.sidebar-nav a.is-locked-link:hover {
    opacity: 0.9;
}

.nav-lock {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.72rem;
}

.nav-lock.is-open {
    color: #86efac;
    border-color: rgba(74, 222, 128, 0.8);
    background: rgba(22, 163, 74, 0.22);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.36);
}

.nav-lock.is-closed {
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.8);
    background: rgba(220, 38, 38, 0.2);
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
}

.nav-lock-text {
    margin-left: 0.35rem;
    font-size: 0.66rem;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.9;
}

.nav-lock-text.is-closed {
    color: #fda4af;
}

body.page-auth .sidebar-nav li {
    margin-bottom: 1.1rem;
}

.main-content {
    margin-left: 272px;
    width: calc(100% - 272px);
    padding: 1.4rem;
}
body.page-landing .main-content {
    margin-left: 0;
    width: 100%;
    padding: 0;
}

h1, h2, h3, h4, h5 {
    font-family: 'Outfit', sans-serif;
    margin-top: 0;
}

.profile-header,
.settings-container,
.form-container,
.profile-info,
.statistics-container,
.project-detail,
.chart-panel,
.folders-list,
.projects {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 0 22px rgba(var(--neon-rgb), 0.28), var(--shadow);
    backdrop-filter: blur(8px);
}
.profile-header,
.settings-container,
.form-container,
.profile-info,
.statistics-container,
.project-detail { padding: 1.15rem; margin-bottom: 1rem; }

.dashboard {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1rem;
}
.chart-panel, .folders-list, .projects { padding: 1rem; }
.projects { grid-column: 1 / -1; }

/* Список папок в личном кабинете */
.folders-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}
.folders-panel-head h3 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}
.folders-panel-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #234998, #009ace);
    box-shadow: 0 2px 8px rgba(35, 73, 152, 0.35);
}
.folder-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(35, 73, 152, 0.45) transparent;
}
.folder-card-item {
    display: grid;
    grid-template-columns: 5px 1fr auto;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(35, 73, 152, 0.35);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.folder-card-item:hover {
    border-color: rgba(0, 154, 206, 0.75);
    box-shadow: 0 4px 14px rgba(35, 73, 152, 0.22);
    transform: translateY(-1px);
}
.folder-card-accent {
    display: block;
    width: 5px;
    min-height: 100%;
}
.folder-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.62rem 0.75rem;
    min-width: 0;
}
.folder-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
    color: var(--text);
    word-break: break-word;
}
.folder-card-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.folder-card-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.55rem 0 0;
}
.folder-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(35, 73, 152, 0.32);
    color: #1a3774;
    background: #ffffff;
    box-shadow: 0 1px 5px rgba(35, 73, 152, 0.14);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.folder-card-btn:hover {
    background: #ffffff;
    border-color: rgba(35, 73, 152, 0.5);
    color: #102a4c;
    box-shadow: 0 2px 8px rgba(35, 73, 152, 0.2);
}
.folder-card-btn-danger {
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.35);
}
.folder-card-btn-danger:hover {
    background: #ffffff;
    border-color: rgba(220, 38, 38, 0.55);
    color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.18);
}
.folder-card-item-view {
    grid-template-columns: 5px 1fr;
}
.folders-panel-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.folders-panel-empty a {
    color: #009ace;
    font-weight: 600;
}

.chart-ring-wrap { position: relative; height: 290px; }
.chart-ring-wrap canvas {
    position: relative;
    z-index: 1;
}
.chart-ring-center {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    pointer-events: none;
    padding: 0 28%;
}
.chart-ring-center .num {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.1;
    max-width: 5.5rem;
}
.chart-ring-center .lbl {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.2;
    margin-top: 0.15rem;
}

.btn, .btn-small {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    border: 1px solid rgba(var(--cyan-rgb), 0.9);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    border-radius: 999px;
    transition: 0.2s ease;
    font-weight: 700;
    background: linear-gradient(120deg, rgba(var(--neon-rgb), 0.7), rgba(var(--cyan-rgb), 0.72));
    box-shadow: 0 0 14px rgba(var(--cyan-rgb), 0.65), 0 0 26px rgba(var(--neon-rgb), 0.4);
}
.btn { padding: 0.58rem 1.12rem; font-size: 0.95rem; }
.btn-small { padding: 0.45rem 0.82rem; font-size: 0.84rem; }
.btn:hover, .btn-small:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-danger {
    background: linear-gradient(120deg, #b91c1c, #ef4444);
    box-shadow: 0 0 22px rgba(239, 68, 68, 0.35);
}
.btn-outline {
    background: rgba(8, 10, 30, 0.5);
    border-color: rgba(var(--cyan-rgb), 0.95);
    color: #eef9ff;
    box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.55);
}
.btn-outline:hover {
    background: rgba(var(--cyan-rgb), 0.2);
    box-shadow: 0 0 18px rgba(var(--cyan-rgb), 0.8), var(--glow-soft);
}

.error, .success, .warning-banner, .info-banner {
    border-radius: 12px;
    padding: 0.72rem 0.9rem;
    margin: 0.72rem 0;
}
.error { background: rgba(220, 38, 38, 0.22); border: 1px solid rgba(220, 38, 38, 0.45); }
.success { background: rgba(34, 197, 94, 0.2); border: 1px solid rgba(34, 197, 94, 0.4); }
.warning-banner { background: rgba(245, 158, 11, 0.18); border: 1px solid rgba(245, 158, 11, 0.4); }
.info-banner { background: rgba(59, 130, 246, 0.18); border: 1px solid rgba(59, 130, 246, 0.4); }

.form-group { margin-bottom: 0.9rem; }
label { display: block; color: var(--text-muted); margin-bottom: 0.36rem; font-weight: 600; }
input[type='text'], input[type='email'], input[type='password'], input[type='date'], select, textarea, input[type='file'] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(4, 7, 16, 0.84), rgba(10, 16, 33, 0.66));
    color: var(--text);
    padding: 0.72rem 0.82rem;
    min-height: 58px;
    font-size: 1.03rem;
}

select {
    color: #f3f6ff;
}

select option {
    background: #0d1324;
    color: #f3f6ff;
}

body.page-auth .form-container {
    max-width: 760px;
    margin: 0 auto 1rem;
    background: var(--chpk-surface) !important;
    border: var(--chpk-card-border) !important;
    border-radius: 18px;
    box-shadow: var(--chpk-card-shadow) !important;
    backdrop-filter: blur(8px);
}
body.page-auth .form-container h2 {
    font-size: 2rem;
    color: #123b69;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.42), 0 0 14px rgba(0, 154, 206, 0.22);
}
body.page-auth .form-container .form-group label {
    font-size: 1.12rem;
    margin-bottom: 0.5rem;
}
body.page-auth .form-container form {
    max-width: 620px;
    margin: 0 auto;
}
body.page-auth .form-container input[type='text'],
body.page-auth .form-container input[type='email'],
body.page-auth .form-container input[type='password'] {
    max-width: 620px;
    min-height: 56px;
    font-size: 1.08rem;
    padding: 0.72rem 0.88rem;
}
body.page-auth {
    --text: #102a4c;
    --text-muted: #35567f;
    --border: rgba(35, 73, 152, 0.45);
    --surface: var(--chpk-surface);
    --surface-strong: var(--chpk-surface-soft);
    --gradient-page: linear-gradient(165deg, #e9eef6 0%, #dfe9f4 45%, #e8eef7 100%);
    background: transparent !important;
}
body.page-auth .sidebar {
    background: linear-gradient(180deg, rgba(246, 249, 252, 0.96), rgba(238, 244, 250, 0.92));
    border-right: 2px solid rgba(0, 154, 206, 0.55);
    box-shadow: 0 0 14px rgba(0, 154, 206, 0.2), 4px 0 24px rgba(35, 73, 152, 0.08);
    backdrop-filter: blur(8px);
}
body.page-auth .sidebar .logo {
    color: #234998;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 14px rgba(0, 154, 206, 0.22);
}
body.page-auth input[type='text'],
body.page-auth input[type='email'],
body.page-auth input[type='password'] {
    background: var(--chpk-surface) !important;
    color: #102a4c;
    border-color: rgba(35, 73, 152, 0.45) !important;
}
textarea { min-height: 96px; resize: vertical; }
input[type='radio'], input[type='checkbox'] { accent-color: var(--neon-purple); }

input[type='file']::file-selector-button,
input[type='file']::-webkit-file-upload-button {
    border: 1px solid rgba(var(--cyan-rgb), 0.85);
    background: linear-gradient(120deg, rgba(var(--neon-rgb), 0.92), rgba(var(--cyan-rgb), 0.78));
    color: #fff;
    border-radius: 12px;
    padding: 0.5rem 0.9rem;
    margin-right: 0.62rem;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 0 14px rgba(var(--neon-rgb), 0.42);
}

input[type='file'] {
    border: 1px solid rgba(var(--neon-rgb), 0.34);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(6, 10, 20, 0.9), rgba(10, 18, 36, 0.72));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 20px rgba(var(--neon-rgb), 0.18);
    padding: 0.62rem 0.72rem;
}

.settings-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    padding-bottom: 0.55rem;
}

.profile-main-layout {
    display: grid;
    grid-template-columns: minmax(460px, 1.22fr) minmax(360px, 0.98fr);
    gap: 1.1rem;
    align-items: start;
}

.profile-left-stack {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.profile-inline-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(130px, 1fr));
    gap: 0.72rem;
}

.profile-stat-tile {
    background: linear-gradient(145deg, rgba(8, 14, 29, 0.84), rgba(6, 11, 22, 0.92));
    border: 1px solid rgba(var(--neon-rgb), 0.56);
    border-radius: 14px;
    box-shadow: 0 0 16px rgba(var(--neon-rgb), 0.22);
    padding: 0.72rem 0.8rem;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.62rem;
    font-weight: 800;
    line-height: 1;
}

.profile-stat-label {
    margin-top: 0.3rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.profile-edit-section--compact form {
    max-width: 760px;
}

.profile-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.profile-avatar-info {
    flex: 1 1 420px;
    min-width: 260px;
}

.profile-avatar-large {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(var(--neon-rgb), 0.5);
    box-shadow: 0 0 24px rgba(var(--neon-rgb), 0.26);
}

.profile-avatar-placeholder {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.profile-achievements-section {
    background: var(--surface-strong);
    border: 1px solid rgba(var(--neon-rgb), 0.45);
    border-radius: 16px;
    padding: 0.95rem;
    box-shadow: 0 0 18px rgba(var(--neon-rgb), 0.2);
}

.achievements-hint,
.achievements-empty {
    color: var(--text-muted);
    margin-top: 0;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-top: 0.8rem;
    max-height: 560px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.achievement-toolbar {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 0.65rem;
}

.achievement-card {
    background: linear-gradient(145deg, rgba(9, 16, 33, 0.82), rgba(6, 10, 22, 0.88));
    border: 1px solid rgba(var(--neon-rgb), 0.36);
    border-radius: 14px;
    padding: 0.58rem;
}

.achievement-frame {
    border: 2px solid rgba(var(--neon-rgb), 0.72);
    border-radius: 14px;
    padding: 0.3rem;
    background: rgba(var(--neon-rgb), 0.12);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 20px rgba(var(--neon-rgb), 0.34);
    min-height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-preview-btn {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: zoom-in;
}

.achievement-preview-btn img {
    width: 100%;
    height: 145px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.achievement-pdf-link {
    color: #eef7ff;
    text-decoration: none;
    border: 1px solid rgba(var(--cyan-rgb), 0.8);
    border-radius: 10px;
    padding: 0.48rem 0.7rem;
    box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.28);
}

.achievement-meta {
    margin-top: 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.achievement-meta strong {
    color: #f0f6ff;
    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: 700;
}

.settings-avatar-actions form + form {
    margin-top: 0.92rem;
}

.statistics-title {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.95rem;
    border-radius: 12px;
    border: 2px solid rgba(var(--neon-rgb), 0.7);
    box-shadow: 0 0 20px rgba(var(--neon-rgb), 0.3);
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    margin-bottom: 1rem;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: linear-gradient(145deg, rgba(8, 14, 29, 0.84), rgba(6, 11, 22, 0.92));
    border: 1px solid rgba(var(--neon-rgb), 0.56);
    border-radius: 14px;
    box-shadow: 0 0 16px rgba(var(--neon-rgb), 0.22);
    padding: 0.75rem 0.85rem;
}

.stat-card .stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.stat-card .stat-label {
    margin-top: 0.28rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.statistics-chart-wrap {
    max-width: 540px;
    margin: 1.2rem auto;
    min-height: 280px;
}

.statistics-subtitle {
    margin: 0.2rem 0 0.7rem;
    font-size: 1.35rem;
}

.achievement-badge {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    border: 1px solid rgba(var(--neon-rgb), 0.62);
    background: rgba(var(--neon-rgb), 0.18);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.14rem 0.5rem;
}

.achievement-badge--certificate {
    border-color: rgba(56, 189, 248, 0.72);
    background: rgba(56, 189, 248, 0.18);
}

.achievement-badge--diploma {
    border-color: rgba(251, 191, 36, 0.8);
    background: rgba(251, 191, 36, 0.2);
}

.achievement-badge--gratitude {
    border-color: rgba(74, 222, 128, 0.78);
    background: rgba(74, 222, 128, 0.2);
}

.achievement-badge--award {
    border-color: rgba(244, 114, 182, 0.78);
    background: rgba(244, 114, 182, 0.2);
}

.achievement-badge--other {
    border-color: rgba(156, 163, 175, 0.72);
    background: rgba(156, 163, 175, 0.2);
}

.achievement-meta span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Грамоты: светлые карточки в теме «Колледж» */
html.portfolio-themed.theme-chpk .profile-achievements-section {
    background: var(--chpk-surface) !important;
    border: var(--chpk-card-border) !important;
    box-shadow: var(--chpk-card-shadow) !important;
}
html.portfolio-themed.theme-chpk .achievement-card {
    background: var(--chpk-surface-soft) !important;
    border: var(--chpk-card-border) !important;
    box-shadow: var(--chpk-card-shadow) !important;
}
html.portfolio-themed.theme-chpk .achievement-frame {
    background: rgba(0, 154, 206, 0.1) !important;
    border-color: rgba(35, 73, 152, 0.45) !important;
    box-shadow: none !important;
}
html.portfolio-themed.theme-chpk .achievement-meta strong {
    color: #102a4c !important;
}
html.portfolio-themed.theme-chpk .achievement-meta span {
    color: #35567f !important;
}
html.portfolio-themed.theme-chpk .achievement-badge {
    color: #102a4c !important;
}
html.portfolio-themed.theme-chpk .achievement-pdf-link {
    color: #0d3d73 !important;
    background: rgba(255, 255, 255, 0.85);
}

/* Страница оценок — читаемый текст во всех темах */
.grades-page h3,
.statistics-container.grades-page h3 {
    color: var(--text);
    margin-top: 0;
}
html.portfolio-themed.theme-chpk .grades-page h2,
html.portfolio-themed.theme-chpk .grades-page h3,
html.portfolio-themed.theme-chpk .statistics-container.grades-page h2,
html.portfolio-themed.theme-chpk .statistics-container.grades-page h3 {
    color: #234998 !important;
}
html.portfolio-themed.theme-chpk .grades-page .grades-hint {
    color: #35567f !important;
}

/* Кнопки на страницах входа и восстановления пароля */
/* Вход / регистрация / восстановление пароля — кнопки в стиле «Колледж» */
body.page-auth .btn {
    background: linear-gradient(135deg, #234998, #009ace);
    border: 1px solid rgba(35, 73, 152, 0.55);
    color: #f6f9fc;
    box-shadow: 0 2px 10px rgba(35, 73, 152, 0.22);
    font-weight: 700;
    text-decoration: none;
}
body.page-auth .btn:hover {
    filter: brightness(1.06);
    box-shadow: 0 4px 14px rgba(35, 73, 152, 0.28);
}
body.page-auth .btn-outline,
body.page-auth .btn-secondary {
    background: rgba(255, 255, 255, 0.72);
    color: #1a3774;
    border: 1px solid rgba(35, 73, 152, 0.4);
    box-shadow: 0 1px 5px rgba(35, 73, 152, 0.1);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.48rem 1rem;
}
body.page-auth .btn-outline:hover,
body.page-auth .btn-secondary:hover {
    background: rgba(0, 154, 206, 0.12);
    border-color: rgba(0, 154, 206, 0.65);
    color: #0d3d73;
}
body.page-auth .auth-hint,
body.page-auth .form-container .grades-hint {
    color: #35567f;
    font-size: 0.92rem;
    line-height: 1.45;
    text-align: center;
    max-width: 520px;
    margin: 0 auto 1rem;
}
body.page-auth .auth-form-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.35rem;
}
body.page-auth .auth-form-actions .btn,
body.page-auth form > .btn[type='submit'] {
    min-width: 10.5rem;
    padding: 0.55rem 1.35rem;
    justify-content: center;
}
body.page-auth form > .btn[type='submit'] {
    display: inline-flex;
    margin: 0.25rem auto 0;
}
body.page-auth .auth-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(35, 73, 152, 0.18);
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}
body.page-auth .auth-actions .btn {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    white-space: nowrap;
    justify-content: center;
}
body.page-auth .auth-actions--footer {
    margin-top: 0.85rem;
    padding-top: 0;
    border-top: none;
}
body.page-auth .auth-actions--solo {
    border-top: none;
    padding-top: 0.35rem;
}

/* Компактные ссылки входа / регистрации / восстановления (дубль auth-pages.css) */
body.page-auth .form-container > .auth-nav,
body.page-auth .form-container > .auth-actions,
body.page-auth .form-container nav.auth-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.55rem !important;
    max-width: 520px;
    margin-left: auto !important;
    margin-right: auto !important;
}
body.page-auth .form-container .auth-nav a,
body.page-auth .form-container .auth-actions > a,
body.page-auth a.auth-chip {
    display: inline-block !important;
    width: auto !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    align-self: center !important;
    padding: 0.48rem 1rem !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.82) !important;
    color: #1a3774 !important;
    border: 1px solid rgba(35, 73, 152, 0.42) !important;
    border-radius: 999px !important;
    box-shadow: 0 1px 5px rgba(35, 73, 152, 0.1) !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
}
body.page-auth .form-container .auth-nav a:hover,
body.page-auth .form-container .auth-actions > a:hover,
body.page-auth a.auth-chip:hover {
    background: rgba(0, 154, 206, 0.14) !important;
    border-color: rgba(0, 154, 206, 0.65) !important;
    color: #0d3d73 !important;
}
body.page-auth a.auth-chip.auth-btn-primary,
body.page-auth .form-container .auth-actions > a.auth-btn-primary {
    background: linear-gradient(135deg, #234998, #009ace) !important;
    border-color: rgba(35, 73, 152, 0.55) !important;
    color: #f6f9fc !important;
}
body.page-auth .auth-inline-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(35, 73, 152, 0.22);
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
body.page-auth .auth-inline-row--footer {
    border-top: none;
    padding-top: 0.35rem;
    margin-top: 0.5rem;
}
body.page-auth .auth-inline-row .btn[type='submit'] {
    display: inline-block !important;
    width: auto !important;
    min-width: 10rem;
    margin: 0 !important;
}
body.page-auth .auth-form-actions .btn[type='submit'],
body.page-auth form > .btn[type='submit'] {
    display: inline-block !important;
    width: auto !important;
    min-width: 11rem;
    max-width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}

.achievement-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.settings-avatar-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.settings-avatar-preview {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(var(--neon-rgb), 0.54);
}

.settings-avatar-placeholder {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.28);
}

.settings-avatar-actions {
    flex: 1 1 340px;
    min-width: 260px;
}

.theme-picker-group--full {
    width: 100%;
    max-width: 100%;
}
.theme-picker-group--full .theme-picker-save {
    margin-top: 0.75rem;
}
.theme-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.4rem;
    width: 100%;
    max-width: 100%;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(8, 14, 30, 0.55);
}
.theme-picker-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    min-width: 0;
}
.theme-picker-option:hover {
    background: rgba(var(--cyan-rgb), 0.12);
}
.theme-picker-option input[type='radio'] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}
.theme-picker-option:has(input:checked) {
    background: rgba(var(--cyan-rgb), 0.2);
    box-shadow: inset 0 0 0 1px rgba(var(--cyan-rgb), 0.45);
}
.theme-picker-swatch {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}
.theme-picker-label {
    flex: 1;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
    min-width: 0;
}
html.portfolio-themed.theme-chpk .theme-picker {
    background: var(--chpk-surface-soft);
    border-color: rgba(35, 73, 152, 0.4);
}
html.portfolio-themed.theme-chpk .theme-picker-option:has(input:checked) {
    background: rgba(0, 154, 206, 0.14);
    box-shadow: inset 0 0 0 1px rgba(35, 73, 152, 0.45);
}
html.portfolio-themed.theme-chpk .theme-picker-label {
    color: #102a4c;
}

.visibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.56rem;
    margin-bottom: 0.9rem;
}

.visibility-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(var(--neon-rgb), 0.3);
    border-radius: 10px;
    padding: 0.5rem 0.62rem;
    background: rgba(8, 14, 30, 0.45);
}

.access-denied-card {
    max-width: 720px;
    margin: 2rem auto;
    padding: 1.2rem;
    border-radius: 16px;
    border: 2px solid rgba(var(--neon-rgb), 0.72);
    background: linear-gradient(145deg, rgba(10, 16, 30, 0.78), rgba(6, 10, 22, 0.88));
    box-shadow: 0 0 24px rgba(var(--neon-rgb), 0.3), var(--shadow);
    text-align: center;
}

.settings-help-card {
    margin-top: 1rem;
    border: 1px solid rgba(var(--neon-rgb), 0.42);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(9, 16, 33, 0.72), rgba(6, 10, 22, 0.82));
    box-shadow: 0 0 14px rgba(var(--neon-rgb), 0.2);
    padding: 0.9rem 1rem;
}

.settings-help-card h3 {
    margin-bottom: 0.55rem;
}

.settings-help-card p {
    margin: 0 0 0.5rem;
    color: var(--text-muted);
}

.access-denied-card h2 {
    margin-bottom: 0.4rem;
}

.access-denied-card p {
    color: var(--text-muted);
}

.access-denied-actions {
    margin-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.bg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.72rem;
    margin-bottom: 0.95rem;
}

.bg-gallery-card {
    border: 1px solid rgba(var(--neon-rgb), 0.42);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(9, 16, 33, 0.78), rgba(6, 10, 22, 0.86));
    padding: 0.5rem;
    box-shadow: 0 0 14px rgba(var(--neon-rgb), 0.2);
    position: relative;
    overflow: hidden;
}

.bg-gallery-card.is-current {
    border-color: rgba(var(--neon-rgb), 0.85);
    box-shadow: 0 0 20px rgba(var(--neon-rgb), 0.36);
}

.bg-gallery-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.bg-type-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.16rem 0.45rem;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    border: 1px solid transparent;
    backdrop-filter: blur(5px);
}

.bg-type-badge--default {
    color: #dbeafe;
    border-color: rgba(96, 165, 250, 0.85);
    background: rgba(30, 64, 175, 0.38);
}

.bg-type-badge--custom {
    color: #dcfce7;
    border-color: rgba(74, 222, 128, 0.85);
    background: rgba(22, 101, 52, 0.4);
}

.bg-quick-activate-form {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    height: 120px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(6, 10, 20, 0.04), rgba(6, 10, 20, 0.66));
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
    pointer-events: none;
}

.bg-gallery-card:hover .bg-quick-activate-form {
    opacity: 1;
}

.bg-quick-activate-btn {
    box-shadow: 0 0 16px rgba(var(--neon-rgb), 0.45);
    pointer-events: auto;
}

.bg-gallery-meta {
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.tab-btn {
    color: var(--text);
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid transparent;
    padding: 0.5rem 0.78rem;
}
.tab-btn.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(157, 115, 255, 0.5);
}

.projects-filter-bar {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 0.8rem;
    margin: 0.7rem 0 1rem;
    align-items: end;
}
.projects-filter-actions { display: flex; gap: 0.5rem; }

.folder-block { margin-bottom: 1rem; }
.folder-block h4 { margin-bottom: 0.7rem; }
.project-cards { display: flex; flex-direction: column; gap: 0.8rem; }
.project-card {
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.9rem;
}
.project-card-wide .project-card-layout {
    display: grid;
    grid-template-columns: minmax(340px, 0.9fr) minmax(440px, 1.1fr);
    gap: 0.9rem;
}
.project-type-label {
    display: inline-block;
    margin-bottom: 0.54rem;
    border: 1px solid rgba(var(--neon-rgb), 0.7);
    background: rgba(var(--neon-rgb), 0.22);
    border-radius: 999px;
    padding: 0.2rem 0.58rem;
    font-size: 0.8rem;
}
.project-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.68rem; }

.project-card-events {
    border-left: 1px solid rgba(var(--neon-rgb), 0.32);
    padding-left: 0.75rem;
    min-width: 0;
}
.project-card-events-title {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 0.46rem;
}
.project-card-events-scroll {
    display: flex;
    gap: 0.64rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
}
.event-photo-frame {
    min-width: clamp(205px, 24vw, 320px);
    max-width: clamp(205px, 24vw, 320px);
    border: 2px solid rgba(var(--neon-rgb), 0.76);
    border-radius: 14px;
    padding: 0.34rem;
    background: rgba(var(--neon-rgb), 0.15);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 22px rgba(var(--neon-rgb), 0.4);
}
.event-photo-frame img {
    width: 100%;
    height: clamp(145px, 17vw, 220px);
    object-fit: cover;
    border-radius: 10px;
    display: block;
}
.project-card-events-empty { color: var(--text-muted); }

.screenshots-gallery { display: flex; gap: 0.72rem; flex-wrap: wrap; }
.screenshots-gallery img {
    width: 220px;
    height: 140px;
    object-fit: cover;
    border-radius: 11px;
    border: 1px solid rgba(var(--neon-rgb), 0.6);
    cursor: pointer;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.82);
    z-index: 1000;
}
.lightbox-overlay.is-open { display: flex; }
.lightbox-overlay img { max-width: min(92vw, 1300px); max-height: 88vh; border-radius: 12px; }
.lightbox-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.grades-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 0.8rem;
}
.grades-full { grid-column: 1 / -1; }
.grades-hint {
    color: var(--text-muted);
    margin: 0 0 1rem;
    font-size: 0.92rem;
}
.chart-card {
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.9rem;
}
.chart-wrap-stats,
.chart-wrap-attestate,
.chart-ring-wrap,
.statistics-chart-wrap {
    position: relative;
    background: var(--chpk-surface, rgba(246, 249, 252, 0.78));
    border-radius: 12px;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(35, 73, 152, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.chart-wrap-stats { height: 280px; }
.chart-wrap-attestate { min-height: 300px; height: auto; }
html.portfolio-themed.theme-chpk .chart-wrap-stats,
html.portfolio-themed.theme-chpk .chart-wrap-attestate,
html.portfolio-themed.theme-chpk .chart-ring-wrap,
html.portfolio-themed.theme-chpk .statistics-chart-wrap {
    background: var(--chpk-surface) !important;
    border: 1px solid rgba(35, 73, 152, 0.35) !important;
}
.attestate-charts-block {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}
.attestate-chart-card h3,
.attestate-chart-card h4 {
    margin: 0 0 0.65rem;
    color: var(--text);
}
.chart-empty-hint {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.grades-charts-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 1rem 0 0.65rem;
}
.grades-charts-block {
    display: grid;
    gap: 1rem;
    margin-top: 0.5rem;
}
.grades-charts-block--public .grades-chart-panel--public h4 {
    margin: 0 0 0.65rem;
}
.grades-page-public .grades-hint {
    margin: 0 0 1.1rem;
}
.grades-chart-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}
.grades-chart-panel__head h4 {
    margin: 0;
    flex: 1 1 auto;
}
.grades-chart-toggle {
    border: 1px solid rgba(35, 73, 152, 0.45);
    background: rgba(255, 255, 255, 0.75);
    color: #234998;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.grades-chart-toggle:hover {
    background: rgba(0, 154, 206, 0.12);
}
.grades-chart-panel.is-collapsed .grades-chart-panel__body {
    display: none;
}
.grades-export-block {
    margin-top: 2rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(35, 73, 152, 0.28);
    background: var(--chpk-surface-soft, rgba(246, 249, 252, 0.9));
}
.grades-export-block h3 {
    margin: 0 0 0.45rem;
}
.grades-export-block p {
    margin: 0 0 0.85rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.table-container { overflow-x: auto; margin-top: 0.8rem; }
.grade-edit-row td {
    background: rgba(35, 73, 152, 0.08);
    border-top: 0;
}
.grade-edit-form {
    padding: 0.55rem 0.2rem 0.35rem;
}
.grade-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 0.7rem;
    align-items: end;
}
.grade-edit-grid-full {
    grid-column: 1 / -1;
}
.grade-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.grade-edit-toggle {
    min-width: 110px;
}
.grade-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}
.grade-inline-form {
    display: inline-flex;
    margin: 0;
}
.grades-list-panel {
    margin-top: 1rem;
    border: 1px solid rgba(35, 73, 152, 0.28);
    border-radius: 14px;
    background: var(--chpk-surface-soft, rgba(246, 249, 252, 0.9));
    overflow: hidden;
}
.grades-list-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.75rem 0.95rem;
    border-bottom: 1px solid rgba(35, 73, 152, 0.18);
}
.grades-list-panel__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}
.grades-list-toggle {
    border: 1px solid rgba(35, 73, 152, 0.45);
    background: rgba(255, 255, 255, 0.82);
    color: #234998;
    border-radius: 999px;
    padding: 0.42rem 0.95rem;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s ease;
}
.grades-list-toggle:hover {
    background: rgba(0, 154, 206, 0.12);
    box-shadow: 0 0 12px rgba(0, 154, 206, 0.2);
}
.grades-list-panel.is-collapsed .grades-list-panel__body {
    display: none;
}
.grades-list-panel__body {
    padding: 0.65rem 0.85rem 0.85rem;
}
.grades-list-panel .table-container {
    margin-top: 0;
}
.grade-row-actions .btn-small {
    white-space: nowrap;
}
.grade-row-actions .btn-danger {
    border-color: rgba(239, 68, 68, 0.85);
}
@media (max-width: 980px) {
    .grade-edit-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}
@media (max-width: 620px) {
    .grade-edit-grid {
        grid-template-columns: 1fr;
    }
    .grade-edit-actions .btn,
    .grade-edit-actions .btn-small {
        width: 100%;
    }
}
table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
th, td {
    border-bottom: 1px solid rgba(var(--neon-rgb), 0.28);
    padding: 0.55rem 0.66rem;
    text-align: left;
}
th { background: rgba(var(--neon-rgb), 0.24); }

.comment-item {
    background: rgba(13, 7, 26, 0.74);
    border: 1px solid rgba(var(--neon-rgb), 0.4);
    border-radius: 12px;
    padding: 0.7rem;
    margin-bottom: 0.62rem;
}
.comment-header { display: flex; gap: 0.56rem; align-items: center; flex-wrap: wrap; }
.owner-badge {
    background: rgba(var(--neon-rgb), 0.3);
    border: 1px solid rgba(var(--neon-rgb), 0.6);
    border-radius: 999px;
    padding: 0.1rem 0.42rem;
    font-size: 0.72rem;
}
.comment-date { color: var(--text-muted); font-size: 0.82rem; }

/* Главная: верхняя навигация */
.landing-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10.6rem 1.3rem 2.4rem;
}
.landing-shell > * + * {
    margin-top: 1.6rem;
}
.landing-top-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.72rem;
    position: fixed !important;
    top: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(1280px, calc(100% - 2.6rem));
    z-index: 35;
    background: rgba(11, 5, 24, 0.92);
    border: 2px solid rgba(var(--cyan-rgb), 0.62);
    border-radius: 16px;
    padding: 0.95rem 1.25rem;
    box-shadow: 0 0 18px rgba(var(--cyan-rgb), 0.46), 0 0 24px rgba(var(--neon-rgb), 0.4), var(--shadow);
    backdrop-filter: blur(8px);
}
.landing-top-bar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}
.landing-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 2.55rem;
    color: #fff;
    letter-spacing: 0.2px;
    text-shadow: 0 0 18px rgba(var(--neon-rgb), 0.7), 0 0 28px rgba(var(--neon-rgb), 0.5);
}
.landing-nav {
    display: flex;
    gap: 0.28rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
    overflow: visible;
}
.landing-nav a {
    color: #e9faff;
    text-decoration: none;
    padding: 0.5rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--cyan-rgb), 0.88);
    background: rgba(7, 14, 36, 0.42);
    box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.45);
    font-weight: 700;
    font-size: 0.84rem;
    line-height: 1.1;
    flex: 0 1 auto;
}
.landing-shell section[id] {
    scroll-margin-top: 130px;
}
.landing-nav a:hover {
    border-color: rgba(var(--cyan-rgb), 0.76);
    background: rgba(var(--cyan-rgb), 0.18);
    box-shadow: 0 0 14px rgba(var(--cyan-rgb), 0.52);
}

body.page-landing .landing-top-bar {
    background: var(--chpk-surface);
    border: var(--chpk-card-border);
    border-radius: 12px;
    box-shadow: var(--chpk-card-shadow);
    backdrop-filter: none;
}
body.page-landing .landing-brand {
    color: #234998;
    text-shadow: none;
}
body.page-landing .landing-nav a {
    color: #1a3774;
    background: var(--chpk-surface);
    border: 1px solid rgba(35, 73, 152, 0.55);
    box-shadow: none;
    padding: 0.6rem 0.92rem;
    font-size: 0.92rem;
}
body.page-landing .landing-nav a:hover {
    background: rgba(35, 73, 152, 0.06);
    border-color: #234998;
    color: #0d3d73;
}

.landing-top-bar-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1 1 auto;
    min-width: 0;
}
.landing-brand-block {
    min-width: 0;
}
.landing-hero {
    margin-top: 0.7rem;
}
.college-logo-slot {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 0;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}
.college-logo-slot--bar {
    width: 72px;
    height: 72px;
}
.college-logo-slot--swap {
    padding: 0;
    position: relative;
    overflow: hidden;
}
/* Внутренний блок обязан занять весь слот: иначе абсолютные img не дают высоты родителю и логотипы «ломаются» в столбик */
.college-logo-slot--swap .college-logo-swap-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.college-logo-layer {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.85s ease-in-out;
    pointer-events: none;
    z-index: 1;
}
.college-logo-layer.is-active {
    opacity: 1;
    z-index: 2;
}
.college-logo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.college-org-line {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    line-height: 1.38;
    font-weight: 600;
    color: rgba(220, 232, 248, 0.92);
    max-width: 36rem;
}
.college-org-line--landing {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.55rem 0.2rem 0;
    border-top: 1px solid rgba(35, 73, 152, 0.28);
    color: #234998;
    font-size: clamp(0.88rem, 2.1vw, 1.12rem);
    line-height: 1.38;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
}
.sidebar-brand-block {
    margin-bottom: 0.85rem;
}
.sidebar-brand-block .logo {
    margin-bottom: 0.45rem;
    text-align: center;
}
.sidebar-brand-block .college-logo-slot--sidebar {
    margin: 0 auto 0.6rem;
}
body.page-auth .sidebar-brand-block .college-org-line {
    text-align: center;
    max-width: none;
    font-size: 0.68rem;
    font-weight: 600;
    color: #234998;
}

.landing-hero {
    border-radius: 22px;
    border: 2px solid rgba(var(--cyan-rgb), 0.62);
    box-shadow: var(--shadow);
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.7), rgba(239, 248, 255, 0.66)),
        url('https://images.unsplash.com/photo-1460317442991-0ec209397118?auto=format&fit=crop&w=2100&q=80') center/cover no-repeat;
    box-shadow: 0 0 24px rgba(var(--cyan-rgb), 0.42), 0 0 34px rgba(var(--neon-rgb), 0.34), var(--shadow);
}
.landing-hero-content {
    padding: 4.4rem 2.1rem;
    max-width: 760px;
    text-align: center;
    margin: 0 auto;
}
.landing-hero h1 {
    font-size: clamp(3.15rem, 6.3vw, 5.1rem);
    line-height: 1.05;
    margin-bottom: 0.75rem;
    color: #0f2d57;
    text-shadow: none;
}
.landing-hero h1 span {
    color: #234998;
    text-shadow: none;
}
.landing-hero p {
    color: #12345d;
    font-size: 1.24rem;
    max-width: 620px;
    margin: 0 auto;
    text-shadow: none;
}
body.page-landing .landing-hero h1,
body.page-landing .landing-hero h1 span,
body.page-landing .landing-hero p {
    text-shadow: none;
}
.landing-hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.1rem; justify-content: center; }

.landing-hero .btn,
.guest-view .btn {
    padding: 0.78rem 1.34rem;
    font-size: 1.02rem;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 1rem;
}
.landing-feature-card {
    background: var(--surface);
    border: 2px solid rgba(var(--cyan-rgb), 0.62);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 0 18px rgba(var(--cyan-rgb), 0.36), var(--shadow);
}
.landing-feature-card h3 { margin-bottom: 0.4rem; }
.landing-feature-card p { color: var(--text-muted); margin: 0; }

body.page-landing .landing-hero {
    background: var(--chpk-surface) !important;
    background-image: none !important;
    border: 1px solid rgba(35, 73, 152, 0.55) !important;
    border-radius: 12px !important;
    box-shadow: var(--chpk-card-shadow) !important;
}
body.page-landing .guest-view,
body.page-landing .landing-feature-card,
body.page-landing .landing-stat-card,
body.page-landing .landing-video-block,
body.page-landing .landing-how,
body.page-landing .landing-updates,
body.page-landing .landing-testimonials,
body.page-landing .landing-faq,
body.page-landing .landing-cta,
body.page-landing .landing-feedback,
body.page-landing .students-slide-card,
body.page-landing .students-slider-block,
body.page-landing .landing-how-card,
body.page-landing .testimonial {
    background: var(--chpk-surface) !important;
    border: 1px solid rgba(35, 73, 152, 0.55) !important;
    border-radius: 12px !important;
    box-shadow: var(--chpk-card-shadow) !important;
}

body.page-landing .video-placeholder,
body.page-landing .students-slide-image {
    background: var(--chpk-surface) !important;
    border: 1px dashed rgba(35, 73, 152, 0.45) !important;
    color: #143a67 !important;
    box-shadow: none !important;
}

body.page-landing .step,
body.page-landing .owner-badge {
    background: rgba(0, 154, 206, 0.14) !important;
    color: #123764 !important;
}

body.page-landing h1,
body.page-landing h2,
body.page-landing h3,
body.page-landing h4,
body.page-landing p,
body.page-landing summary,
body.page-landing label,
body.page-auth h1,
body.page-auth h2,
body.page-auth h3,
body.page-auth p,
body.page-auth label {
    color: var(--text);
}

body.page-landing input[type='text'],
body.page-landing input[type='email'],
body.page-landing input[type='password'],
body.page-landing textarea,
body.page-landing select {
    background: var(--chpk-surface-soft) !important;
    color: #102a4c;
    border: 1px solid rgba(35, 73, 152, 0.5) !important;
}
body.page-auth textarea,
body.page-auth select {
    background: var(--chpk-surface-soft) !important;
    color: #102a4c;
    border-color: rgba(35, 73, 152, 0.28);
}
body.page-landing input::placeholder,
body.page-landing textarea::placeholder,
body.page-auth input::placeholder,
body.page-auth textarea::placeholder {
    color: rgba(16, 42, 76, 0.64);
}
body.page-auth select option {
    background: var(--chpk-surface);
    color: #102a4c;
}
body.page-landing details {
    background: var(--chpk-surface);
    border: 1px solid rgba(35, 73, 152, 0.5);
    border-radius: 12px;
    padding: 0.65rem 0.78rem;
}
body.page-landing details + details {
    margin-top: 0.55rem;
}
body.page-landing details summary {
    cursor: pointer;
    font-weight: 700;
    color: #133861;
}
body.page-landing details p {
    color: #214772;
}

body.page-landing .guest-view h2 {
    color: #234998;
    text-shadow: none;
}

body.page-landing .btn,
body.page-landing .btn-small {
    background: linear-gradient(180deg, #2c5ab0, #234998);
    border: 1px solid #1a3d78;
    color: #fff;
    box-shadow: 0 2px 8px rgba(35, 73, 152, 0.2);
}
body.page-landing .btn:hover,
body.page-landing .btn-small:hover {
    filter: brightness(1.05);
    box-shadow: 0 2px 12px rgba(35, 73, 152, 0.28);
}
body.page-landing .btn-outline {
    background: var(--chpk-surface) !important;
    border: 1px solid rgba(35, 73, 152, 0.55) !important;
    color: #234998 !important;
    box-shadow: none !important;
}
body.page-landing .btn-outline:hover {
    background: rgba(35, 73, 152, 0.07) !important;
    color: #1a3774 !important;
    box-shadow: none !important;
}

body.page-landing .back-to-top {
    background: var(--chpk-surface);
    color: #234998;
    border: 1px solid rgba(35, 73, 152, 0.55);
    box-shadow: var(--chpk-card-shadow);
}
body.page-landing .back-to-top:hover {
    background: rgba(35, 73, 152, 0.06);
}

body.page-landing .students-slider-btn {
    background: var(--chpk-surface);
    color: #234998;
    border: 1px solid rgba(35, 73, 152, 0.55);
    box-shadow: var(--chpk-card-shadow);
}
body.page-landing .students-slider-btn:hover {
    background: rgba(35, 73, 152, 0.07);
}

body.page-landing .students-slider-block h2 {
    text-shadow: none;
    color: #234998;
}

.guest-view {
    background: var(--surface);
    border: 2px solid rgba(var(--cyan-rgb), 0.62);
    border-radius: 16px;
    box-shadow: 0 0 18px rgba(var(--cyan-rgb), 0.36), var(--shadow);
    padding: 1.05rem;
}
.guest-view form {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}
.guest-view h2 { font-size: 2rem; }
.guest-view h2 {
    color: #123560;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4), 0 0 14px rgba(0, 154, 206, 0.24);
}
.guest-view input {
    flex: 1 1 320px;
    min-height: 52px;
    font-size: 1rem;
}
.guest-view-actions { margin-bottom: 0.7rem; }

.landing-stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 1rem;
}
.landing-stat-card {
    background: rgba(16, 8, 36, 0.44);
    border: 2px solid rgba(var(--cyan-rgb), 0.62);
    border-radius: 14px;
    box-shadow: 0 0 18px rgba(var(--cyan-rgb), 0.36), var(--shadow);
    padding: 0.85rem 1rem;
}
.landing-stat-card h4 {
    margin: 0 0 0.35rem 0;
    color: var(--text-muted);
}
.landing-stat-card p {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
}

.landing-video-block {
    background: rgba(16, 8, 36, 0.44);
    border: 2px solid rgba(var(--cyan-rgb), 0.62);
    border-radius: 16px;
    box-shadow: 0 0 18px rgba(var(--cyan-rgb), 0.36), var(--shadow);
    padding: 1rem;
}
.video-placeholder {
    min-height: 200px;
    border: 1px dashed rgba(var(--neon-rgb), 0.8);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    background: rgba(var(--neon-rgb), 0.09);
}
.landing-video-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.landing-video-player {
    width: 100%;
    max-width: 920px;
    border-radius: 12px;
    border: 2px solid rgba(var(--cyan-rgb), 0.65);
    background: #0a1428;
    box-shadow: 0 8px 28px rgba(7, 20, 48, 0.35);
}
.landing-video-caption {
    margin: 0;
    text-align: center;
    color: #d8ecff;
    font-size: 0.95rem;
    max-width: 720px;
}
body.page-landing .landing-video-block h2 {
    margin-bottom: 0.9rem;
}

.landing-how,
.landing-updates,
.landing-testimonials,
.landing-faq,
.landing-cta {
    background: rgba(16, 8, 36, 0.44);
    border: 2px solid rgba(var(--cyan-rgb), 0.62);
    border-radius: 16px;
    box-shadow: 0 0 18px rgba(var(--cyan-rgb), 0.36), var(--shadow);
    padding: 1.2rem;
}

.landing-how h2,
.landing-updates h2,
.landing-testimonials h2,
.landing-faq h2,
.landing-cta h2 {
    margin-bottom: 0.8rem;
    font-size: 2rem;
}

.landing-feedback {
    background: var(--surface-strong);
    border: 2px solid rgba(var(--cyan-rgb), 0.62);
    border-radius: 16px;
    box-shadow: 0 0 18px rgba(var(--cyan-rgb), 0.36), var(--shadow);
    padding: 0.9rem 1rem;
}
.landing-feedback p {
    margin-top: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.landing-feedback-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}
.landing-feedback-form .form-group:last-of-type {
    grid-column: 1 / -1;
}
.landing-feedback-form textarea {
    min-height: 120px;
}

.landing-how-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 0.9rem;
}
.landing-how-card {
    background: var(--surface-strong);
    border: 1px solid rgba(var(--neon-rgb), 0.55);
    border-radius: 12px;
    padding: 0.9rem;
}
.landing-how-card .step {
    display: inline-flex;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 1px solid rgba(var(--cyan-rgb), 0.9);
    background: rgba(var(--cyan-rgb), 0.18);
    margin-bottom: 0.5rem;
}

.landing-updates ul {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.45rem;
}

.landing-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 0.9rem;
}
.testimonial-card {
    background: var(--surface-strong);
    border: 1px solid rgba(var(--neon-rgb), 0.55);
    border-radius: 12px;
    padding: 0.9rem;
}
.testimonial-card p {
    margin-top: 0;
    font-size: 1.03rem;
}
.testimonial-card span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.landing-faq details {
    border: 1px solid rgba(var(--neon-rgb), 0.45);
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    margin-bottom: 0.55rem;
    background: var(--surface-strong);
}
.landing-faq summary {
    cursor: pointer;
    font-weight: 700;
}
.landing-faq p {
    margin: 0.55rem 0 0;
}

.landing-cta {
    text-align: center;
}
.landing-cta p {
    font-size: 1.1rem;
    margin-top: 0.1rem;
}
.landing-cta-actions {
    margin-top: 0.85rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    border: 1px solid rgba(var(--cyan-rgb), 0.95);
    background: rgba(7, 14, 36, 0.75);
    color: #e9faff;
    box-shadow: 0 0 18px rgba(var(--cyan-rgb), 0.65);
    font-size: 1.35rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
    z-index: 80;
}
.back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.students-slider-block {
    background: rgba(16, 8, 36, 0.44);
    border: 2px solid rgba(var(--cyan-rgb), 0.62);
    border-radius: 16px;
    box-shadow: 0 0 18px rgba(var(--cyan-rgb), 0.36), var(--shadow);
    padding: 1.2rem;
}
.students-slider-block h2 {
    font-size: 2rem;
    color: #123b69;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.42), 0 0 14px rgba(0, 154, 206, 0.25);
}
.students-slider {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.6rem;
    align-items: center;
}
.students-slider-btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(var(--cyan-rgb), 0.9);
    color: #e9faff;
    background: rgba(7, 14, 36, 0.52);
    box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.5);
    cursor: pointer;
}
.students-slider-track {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 0.4rem;
}
.students-slide-card {
    min-width: 380px;
    max-width: 420px;
    flex: 0 0 auto;
    background: var(--surface-strong);
    border: 2px solid rgba(var(--neon-rgb), 0.58);
    border-radius: 14px;
    padding: 0.9rem;
    box-shadow: 0 0 15px rgba(var(--neon-rgb), 0.32);
}
.students-slide-image {
    height: 220px;
    border-radius: 10px;
    overflow: hidden;
    display: block;
    background: #f4f8fc;
    border: 1px solid rgba(var(--cyan-rgb), 0.45);
    margin-bottom: 0.55rem;
}
.students-slide-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: top center;
}

.students-slide-card h4 {
    font-size: 1.25rem;
    margin: 0.35rem 0 0.45rem;
}
.students-slide-card p {
    font-size: 1rem;
    margin: 0;
}

footer {
    margin-left: 272px;
    width: calc(100% - 272px);
    padding: 1rem 1.4rem 1.2rem;
    color: var(--text-muted);
}
body.page-landing footer {
    margin-left: 0;
    width: 100%;
}
body.page-landing footer p {
    color: #133c69;
    text-shadow: none;
}
body.page-auth footer p {
    color: #133c69;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.38), 0 0 14px rgba(0, 154, 206, 0.2);
}

@media (max-width: 992px) {
    .dashboard { grid-template-columns: 1fr; }
    .projects-filter-bar { grid-template-columns: 1fr; }
    .project-card-wide .project-card-layout { grid-template-columns: 1fr; }
    .project-card-events {
        border-left: 0;
        border-top: 1px solid rgba(157, 115, 255, 0.22);
        padding-left: 0;
        padding-top: 0.72rem;
    }
    .landing-features { grid-template-columns: 1fr; }
    .landing-how-grid { grid-template-columns: 1fr; }
    .landing-testimonials-grid { grid-template-columns: 1fr; }
    .landing-stats-row { grid-template-columns: 1fr; }
    .profile-main-layout { grid-template-columns: 1fr; }
    .profile-edit-section--compact form { max-width: 100%; }
    .achievement-toolbar { grid-template-columns: 1fr; }
    .profile-inline-stats { grid-template-columns: 1fr; }
    .stats-cards { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
    .achievement-grid {
        grid-template-columns: 1fr;
        max-height: none;
        overflow-y: visible;
    }
}

/* Тема «Колледж белого» — личный кабинет как главная */
html.portfolio-themed.theme-chpk .sidebar {
    background: var(--gradient-sidebar);
    border-right: 2px solid rgba(0, 154, 206, 0.5);
    box-shadow: 0 0 12px rgba(0, 154, 206, 0.15), 4px 0 20px rgba(35, 73, 152, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
html.portfolio-themed.theme-chpk .logo {
    color: #234998;
    text-shadow: none;
}
html.portfolio-themed.theme-chpk .sidebar-nav a {
    color: #1a3774;
    border: 1px solid rgba(0, 154, 206, 0.55);
    background: var(--chpk-surface);
    box-shadow: 0 1px 6px rgba(35, 73, 152, 0.08);
}
html.portfolio-themed.theme-chpk .sidebar-nav a:hover,
html.portfolio-themed.theme-chpk .sidebar-nav a.active {
    background: rgba(0, 154, 206, 0.12);
    border-color: rgba(0, 154, 206, 0.85);
    color: #0d3d73;
}
html.portfolio-themed.theme-chpk .profile-header,
html.portfolio-themed.theme-chpk .settings-container,
html.portfolio-themed.theme-chpk .form-container,
html.portfolio-themed.theme-chpk .profile-info,
html.portfolio-themed.theme-chpk .statistics-container,
html.portfolio-themed.theme-chpk .project-detail,
html.portfolio-themed.theme-chpk .chart-panel,
html.portfolio-themed.theme-chpk .folders-list,
html.portfolio-themed.theme-chpk .projects,
html.portfolio-themed.theme-chpk .chart-card,
html.portfolio-themed.theme-chpk .project-card {
    background: var(--chpk-surface) !important;
    border: var(--chpk-card-border) !important;
    box-shadow: var(--chpk-card-shadow) !important;
    backdrop-filter: var(--chpk-glass-blur, blur(10px));
    -webkit-backdrop-filter: var(--chpk-glass-blur, blur(10px));
}
html.portfolio-themed.theme-chpk .btn,
html.portfolio-themed.theme-chpk .btn-small {
    background: linear-gradient(135deg, #234998, #009ace);
    border-color: rgba(35, 73, 152, 0.65);
    box-shadow: 0 2px 10px rgba(35, 73, 152, 0.2);
    color: #f6f9fc;
}
html.portfolio-themed.theme-chpk .btn-outline {
    background: var(--chpk-surface-soft);
    color: #234998;
    border-color: rgba(35, 73, 152, 0.55);
    box-shadow: none;
}
html.portfolio-themed.theme-chpk input[type='text'],
html.portfolio-themed.theme-chpk input[type='email'],
html.portfolio-themed.theme-chpk input[type='password'],
html.portfolio-themed.theme-chpk input[type='date'],
html.portfolio-themed.theme-chpk select,
html.portfolio-themed.theme-chpk textarea {
    background: var(--chpk-surface-soft) !important;
    color: #102a4c;
    border-color: rgba(35, 73, 152, 0.45) !important;
}
html.portfolio-themed.theme-chpk select option {
    background: var(--chpk-surface);
    color: #102a4c;
}
html.portfolio-themed.theme-chpk .folder-card-item {
    background: var(--chpk-surface-soft);
    border-color: rgba(35, 73, 152, 0.35);
}
html.portfolio-themed.theme-chpk .folder-card-name {
    color: #102a4c;
}
html.portfolio-themed.theme-chpk .folder-card-btn {
    background: rgba(255, 255, 255, 0.68);
    color: #1a3774;
    border-color: rgba(35, 73, 152, 0.35);
    box-shadow: 0 1px 6px rgba(35, 73, 152, 0.16);
    backdrop-filter: blur(6px);
}
html.portfolio-themed.theme-chpk .folder-card-btn-danger {
    color: #b91c1c;
}
html.portfolio-themed.theme-chpk th {
    background: rgba(0, 154, 206, 0.12);
    color: #102a4c;
}
html.portfolio-themed.theme-chpk td {
    color: #102a4c;
}

/* Колледж: светлые поля ввода, файлы, чекбоксы, статистика */
html.portfolio-themed.theme-chpk input[type='file'] {
    background: var(--chpk-surface-soft) !important;
    color: #35567f !important;
    border: 1px solid rgba(35, 73, 152, 0.45) !important;
    min-height: auto !important;
    padding: 0.42rem 0.55rem !important;
    font-size: 0.88rem;
    box-shadow: none !important;
    border-radius: 10px;
}
html.portfolio-themed.theme-chpk input[type='file']::file-selector-button,
html.portfolio-themed.theme-chpk input[type='file']::-webkit-file-upload-button {
    background: linear-gradient(135deg, #234998, #009ace) !important;
    border: 1px solid rgba(35, 73, 152, 0.5) !important;
    color: #f6f9fc !important;
    box-shadow: 0 1px 6px rgba(35, 73, 152, 0.2) !important;
    padding: 0.4rem 0.75rem;
    margin-right: 0.5rem;
    font-size: 0.85rem;
}
html.portfolio-themed.theme-chpk select {
    color: #102a4c !important;
}
html.portfolio-themed.theme-chpk .visibility-grid label {
    background: var(--chpk-surface-soft) !important;
    color: #102a4c !important;
    border-color: rgba(35, 73, 152, 0.35) !important;
    box-shadow: none;
}
html.portfolio-themed.theme-chpk .stat-card,
html.portfolio-themed.theme-chpk .profile-stat-tile {
    background: var(--chpk-surface-soft) !important;
    border: var(--chpk-card-border) !important;
    box-shadow: var(--chpk-card-shadow) !important;
    min-height: auto;
}
html.portfolio-themed.theme-chpk .stat-card .stat-value,
html.portfolio-themed.theme-chpk .profile-stat-value {
    color: #234998 !important;
}
html.portfolio-themed.theme-chpk .stat-card .stat-label,
html.portfolio-themed.theme-chpk .profile-stat-label {
    color: #35567f !important;
}
html.portfolio-themed.theme-chpk .settings-help-card {
    background: var(--chpk-surface-soft) !important;
    border: var(--chpk-card-border) !important;
    box-shadow: var(--chpk-card-shadow) !important;
}
html.portfolio-themed.theme-chpk .settings-help-card h3 {
    color: #234998;
}
html.portfolio-themed.theme-chpk .settings-help-card p {
    color: #35567f !important;
}
html.portfolio-themed.theme-chpk .settings-avatar-placeholder {
    background: var(--chpk-surface-soft);
    border-color: rgba(35, 73, 152, 0.4);
    color: #35567f;
}
html.portfolio-themed.theme-chpk label {
    color: #35567f;
}
html.portfolio-themed.theme-chpk .tab-btn {
    background: var(--chpk-surface-soft);
    color: #1a3774;
    border-color: rgba(35, 73, 152, 0.4);
}
html.portfolio-themed.theme-chpk .tab-btn.active {
    background: rgba(0, 154, 206, 0.14);
    border-color: rgba(0, 154, 206, 0.7);
    color: #0d3d73;
}
html.portfolio-themed.theme-chpk .theme-picker {
    background: var(--chpk-surface-soft) !important;
    border-color: rgba(35, 73, 152, 0.4) !important;
    backdrop-filter: var(--chpk-glass-blur, blur(10px));
    -webkit-backdrop-filter: var(--chpk-glass-blur, blur(10px));
}

/* Галерея фонов — светлые карточки */
html.portfolio-themed.theme-chpk .bg-gallery-card {
    background: var(--chpk-surface) !important;
    border: var(--chpk-card-border) !important;
    box-shadow: var(--chpk-card-shadow) !important;
    backdrop-filter: var(--chpk-glass-blur, blur(10px));
    -webkit-backdrop-filter: var(--chpk-glass-blur, blur(10px));
    padding: 0.5rem;
}
html.portfolio-themed.theme-chpk .bg-gallery-card.is-current {
    border-color: rgba(0, 154, 206, 0.75) !important;
    box-shadow: 0 0 0 2px rgba(0, 154, 206, 0.2), var(--chpk-card-shadow) !important;
}
html.portfolio-themed.theme-chpk .bg-gallery-meta {
    margin-top: 0.5rem;
    padding: 0.35rem 0.2rem 0.1rem;
}
html.portfolio-themed.theme-chpk .bg-gallery-meta > span {
    color: #102a4c;
    font-weight: 600;
    font-size: 0.88rem;
}
html.portfolio-themed.theme-chpk .bg-type-badge--default {
    color: #0d3d73;
    background: rgba(0, 154, 206, 0.2);
    border-color: rgba(0, 154, 206, 0.55);
}
html.portfolio-themed.theme-chpk .bg-type-badge--custom {
    color: #14532d;
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.45);
}
html.portfolio-themed.theme-chpk .bg-quick-activate-form {
    background: linear-gradient(rgba(246, 249, 252, 0.1), rgba(35, 73, 152, 0.35));
}

/* Кнопка меню и оверлей — только на телефонах (см. @media ниже) */
.mobile-nav-toggle,
.mobile-nav-overlay,
.landing-nav-toggle {
    display: none;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        position: fixed;
        top: 0.45rem;
        left: 0.45rem;
        z-index: 48;
        margin: 0;
        padding: 0.42rem 0.65rem;
        border-radius: 10px;
        border: 1px solid rgba(35, 73, 152, 0.45);
        background: var(--chpk-surface, rgba(246, 249, 252, 0.92));
        color: #234998;
        font-family: inherit;
        font-size: 0.82rem;
        font-weight: 700;
        box-shadow: 0 2px 10px rgba(35, 73, 152, 0.12);
        cursor: pointer;
    }

    .mobile-nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 44;
        background: rgba(6, 12, 28, 0.48);
    }

    body.sidebar-open .mobile-nav-overlay {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(288px, 86vw);
        height: 100vh;
        max-height: 100dvh;
        transform: translateX(-108%);
        transition: transform 0.22s ease;
        z-index: 46;
        border-right: 1px solid var(--border);
        border-bottom: none;
        padding: 0.75rem 0.65rem;
        overflow-y: auto;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main-content,
    footer {
        margin-left: 0;
        width: 100%;
    }

    body:not(.page-landing) .main-content {
        padding: 3.25rem 0.65rem 1rem;
    }

    .logo {
        font-size: 1.45rem;
        margin-bottom: 0.55rem;
    }

    .sidebar-nav li {
        margin-bottom: 0.38rem;
    }

    .sidebar-nav a {
        padding: 0.52rem 0.72rem;
        font-size: 0.84rem;
        font-weight: 600;
    }

    body.page-auth .sidebar-nav a {
        padding: 0.48rem 0.68rem;
        font-size: 0.82rem;
    }

    body.page-auth .sidebar-nav li {
        margin-bottom: 0.42rem;
    }

    .sidebar-brand-block {
        margin-bottom: 0.55rem;
    }

    .sidebar-brand-block .college-logo-slot--sidebar {
        width: 46px;
        height: 46px;
        margin-bottom: 0.4rem;
    }

    body.page-auth .sidebar-brand-block .logo {
        font-size: 1.25rem;
        margin-bottom: 0.3rem;
    }

    body.page-auth .sidebar-brand-block .college-org-line {
        font-size: 0.56rem;
        line-height: 1.28;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    h1 { font-size: 1.55rem; }
    h2 { font-size: 1.32rem; }
    h3 { font-size: 1.08rem; }

    .profile-header h2,
    .statistics-container h2,
    .form-container h2 {
        font-size: 1.28rem;
    }

    .profile-header,
    .statistics-container,
    .form-container,
    .settings-container,
    .project-detail,
    .guest-view,
    .landing-feature-card,
    .landing-stat-card,
    .chart-card,
    .project-card {
        padding: 0.85rem 0.75rem;
    }

    body.page-auth .form-container {
        padding: 0.9rem 0.75rem;
        margin-top: 0.25rem;
    }

    body.page-auth .form-container h2 {
        font-size: 1.28rem;
    }

    body.page-auth .form-container .form-group label {
        font-size: 0.88rem;
    }

    body.page-auth .form-container input[type='text'],
    body.page-auth .form-container input[type='email'],
    body.page-auth .form-container input[type='password'] {
        min-height: 44px;
        font-size: 0.9rem;
        padding: 0.55rem 0.7rem;
    }

    .btn,
    .btn-small {
        font-size: 0.84rem;
        padding: 0.48rem 0.85rem;
    }

    .landing-shell {
        padding: 3.75rem 0.55rem 1.5rem;
    }

    .landing-shell > * + * {
        margin-top: 1rem;
    }

    .landing-top-bar {
        width: calc(100% - 0.85rem);
        top: 0.35rem;
        padding: 0.38rem 0.45rem;
        gap: 0.3rem;
        border-radius: 10px;
    }

    .landing-top-bar-top {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        align-items: center;
        gap: 0.3rem 0.4rem;
    }

    .landing-top-bar-main {
        gap: 0.4rem;
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .landing-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        grid-column: 2;
        grid-row: 1;
        width: 2.35rem;
        height: 2.35rem;
        margin: 0;
        padding: 0;
        border-radius: 8px;
        border: 1px solid rgba(35, 73, 152, 0.45);
        background: var(--chpk-surface-soft, #eef4fa);
        color: #234998;
        font-size: 1rem;
        cursor: pointer;
    }

    body.page-landing .landing-nav {
        display: none;
        grid-column: 1 / -1;
        grid-row: 2;
        flex-direction: column;
        align-items: stretch;
        gap: 0.28rem;
        width: 100%;
        max-height: 50vh;
        overflow-y: auto;
        padding-top: 0.15rem;
    }

    body.page-landing.landing-nav-open .landing-nav {
        display: flex;
    }

    .landing-brand {
        font-size: 1.15rem;
    }

    .college-logo-slot--bar {
        width: 36px;
        height: 36px;
    }

    .college-org-line--landing {
        display: none;
    }

    body.page-landing .landing-nav a {
        font-size: 0.78rem;
        padding: 0.42rem 0.55rem;
        text-align: center;
        flex: 1 1 auto;
    }

    .landing-hero h1 {
        font-size: 1.55rem;
        line-height: 1.15;
    }

    .landing-hero p {
        font-size: 0.88rem;
    }

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

    .project-card-wide .project-card-actions {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .folder-card-item {
        padding: 0.55rem 0.6rem;
    }

    .chart-wrap-stats,
    .chart-wrap-attestate {
        min-height: 220px;
    }

    footer p {
        font-size: 0.78rem;
    }
}
