:root {
    --primary: #0F4685;
    --primary-dark: #0a3260;
    --primary-light: #e8f2fc;
    --light-bg: #E7F4FD;
    --accent: #0C9495;
    --accent-dark: #0D6A6E;
    --accent-light: #e6f7f7;
    --gray-bg: #eef2f6;
    --white: #ffffff;
    --text: #1a2332;
    --text-muted: #5c6b7f;
    --border: #d4dde8;
    --border-focus: #0C9495;
    --shadow: 0 2px 12px rgba(15, 70, 133, 0.08);
    --shadow-lg: 0 8px 32px rgba(15, 70, 133, 0.12);
    --radius: 8px;
    --radius-lg: 10px;

    /* Bootstrap sync */
    --bs-body-color: var(--text);
    --bs-body-bg: var(--gray-bg);
    --bs-primary: var(--primary);
    --bs-primary-rgb: 15, 70, 133;
    --bs-link-color: var(--primary);
    --bs-link-hover-color: var(--accent-dark);
    --bs-border-color: var(--border);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--gray-bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 700;
    line-height: 1.3;
}

p { color: var(--text); margin-bottom: 0.5rem; }
strong { color: var(--text); font-weight: 600; }

.text-muted { color: var(--text-muted) !important; }

/* ── Header ── */
.site-header {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 16px rgba(15, 70, 133, 0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 4px solid rgba(255, 255, 255, 0.3);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 24px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    text-decoration: none;
    min-width: 0;
    flex-shrink: 0;
}

.logo-block:hover { color: #fff; opacity: 0.92; }

.logo-img {
    height: 64px;
    width: 64px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.logo-sub { display: none; }

.header-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
}

.nav-link {
    color: rgba(255,255,255,0.92);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 7px 12px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.nav-link:hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-admin { background: rgba(255,255,255,0.14); }
.nav-admin:hover { background: rgba(255,255,255,0.22); }

/* ── Main layout ── */
.site-main {
    flex: 1;
    padding: 28px 0 48px;
    color: var(--text);
}

.container-narrow {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 6px;
}

.page-header .page-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ── Buttons ── */
.btn {
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.15s;
}

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-accent:hover, .btn-accent:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-outline-light {
    color: #fff;
    border-color: rgba(255,255,255,0.6);
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: #fff;
}

.btn-outline-secondary {
    color: var(--text-muted);
    border-color: var(--border);
}

.btn-outline-secondary:hover {
    background: var(--gray-bg);
    color: var(--text);
    border-color: var(--text-muted);
}

/* ── Forms ── */
.form-control, .form-select,
.filter-group input, .filter-group select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus, .form-select:focus,
.filter-group input:focus, .filter-group select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(12, 148, 149, 0.15);
    outline: none;
    color: var(--text);
}

.form-control::placeholder,
.filter-group input::placeholder {
    color: #9aa8b8;
}

.form-label, .filter-group > label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
    letter-spacing: 0.01em;
}

/* ── Hero (legacy, used in admin) ── */
.hero-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: center;
}

.hero-section h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 14px;
}

.hero-section p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
    font-size: 1rem;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 28px;
}

.stat-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.1;
}

.stat-lbl {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.hero-emoji-box {
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    padding: 40px;
    font-size: 3.5rem;
    text-align: center;
}

/* ── Catalog layout ── */
.catalog-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.filters-panel {
    width: 290px;
    flex-shrink: 0;
    background: var(--white);
    padding: 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: sticky;
    top: 90px;
}

.filters-panel h3 {
    color: var(--primary);
    margin-bottom: 18px;
    font-size: 1rem;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

.filters-panel h3 > i {
    margin-right: 0.4em;
    opacity: 0.9;
}

.filter-group { margin-bottom: 16px; }

.filter-group input, .filter-group select { width: 100%; }

.filter-search-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.filter-search-row input {
    flex: 1;
    min-width: 0;
}

.filter-search-btn {
    flex: 0 0 auto;
    min-width: 42px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.type-checkboxes > label:first-child { margin-bottom: 8px; }

.type-checkboxes label.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: 0.88rem;
    color: var(--text);
    margin-bottom: 6px;
    cursor: pointer;
    padding: 4px 0;
}

.type-checkboxes label.checkbox-item:hover { color: var(--primary); }

.type-checkboxes input[type="checkbox"] {
    width: auto;
    accent-color: var(--accent);
}

.catalog-content { flex: 1; min-width: 0; }

.catalog-search {
    margin-bottom: 16px;
}

.catalog-search-inner {
    display: flex;
    gap: 10px;
    align-items: stretch;
    background: var(--white);
    padding: 10px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.catalog-search-input {
    flex: 1;
    min-width: 0;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--white);
}

.catalog-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(12, 148, 149, 0.12);
}

.catalog-search-btn {
    flex-shrink: 0;
    padding-left: 24px;
    padding-right: 24px;
    white-space: nowrap;
}

.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.catalog-toolbar .result-count {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.catalog-toolbar .result-count strong {
    color: var(--primary);
    font-size: 1.05rem;
}

.guest-notice {
    font-size: 0.82rem;
    background: #fff8e6;
    color: #7a5c00;
    border: 1px solid #f0d060;
    padding: 6px 12px;
    border-radius: 8px;
}

.guest-notice a { color: var(--primary); font-weight: 600; }

/* ── Work cards ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.cards-grid--9,
.cards-grid--15,
.cards-grid--18,
.cards-grid--24 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

@media (min-width: 1200px) {
    .cards-grid--9 { grid-template-columns: repeat(3, 1fr); }
    .cards-grid--15 { grid-template-columns: repeat(3, 1fr); }
    .cards-grid--18 { grid-template-columns: repeat(3, 1fr); }
    .cards-grid--24 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Universal work card ── */
.work-card {
    background: linear-gradient(160deg, #1e2a3a 0%, #151f2e 100%);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: 0 4px 20px rgba(15, 30, 60, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: #e8edf4;
}

.work-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(15, 30, 60, 0.28);
    border-color: rgba(12, 148, 149, 0.45);
}

.work-card--popular {
    border-color: rgba(12, 148, 149, 0.55);
    box-shadow: 0 6px 24px rgba(12, 148, 149, 0.15);
}

.work-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.work-card-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    line-height: 1.3;
}

.work-card-badge--type {
    background: rgba(15, 70, 133, 0.55);
    color: #9ec5f0;
    border: 1px solid rgba(100, 160, 230, 0.25);
}

.work-card-badge--originality {
    color: #6dd4a0;
}

.work-card-badge--grade {
    color: #f0c060;
}

.work-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    margin: 0;
}

.work-card-title-link {
    color: #ffffff;
    text-decoration: none;
}

.work-card-title-link:hover {
    color: #7eeaff;
}

.work-card-subject {
    font-size: 0.82rem;
    color: #8a9bb0;
    margin: -4px 0 0;
    line-height: 1.45;
}

.work-card-specialty-code {
    cursor: help;
    border-bottom: 1px dotted rgba(138, 155, 176, 0.7);
}

.work-card-files {
    background: rgba(0, 0, 0, 0.18);
    border-radius: var(--radius);
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.work-card-files-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #c8d4e0;
    margin-bottom: 8px;
}

.work-card-file-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.work-card-file-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.work-card-file-flag.is-yes {
    background: rgba(12, 148, 149, 0.18);
    color: #8de8d0;
}

.work-card-file-flag.is-no {
    background: rgba(255, 255, 255, 0.04);
    color: #6f8196;
}

.work-card-file-abbr {
    font-weight: 700;
}

.work-card-file-val {
    font-family: 'Courier New', Consolas, monospace;
}

.work-card-stats {
    display: flex;
    gap: 14px;
    align-items: center;
}

.work-card-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: #7a8da3;
}

.work-card-stat-icon {
    font-size: 0.85rem;
    line-height: 1;
}

.work-card-desc {
    font-size: 0.84rem;
    color: #9aabbc;
    line-height: 1.55;
    margin: 0;
}

.work-card-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    background: rgba(0, 0, 0, 0.22);
    border-radius: var(--radius);
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.work-card-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.work-card-info-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #c8d4e0;
}

.work-card-info-value {
    font-size: 0.8rem;
    color: #8a9bb0;
    word-break: break-word;
}

.work-card-info-value .rating-stars {
    color: #f0c060;
    font-size: 0.78rem;
}

.work-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.work-card-downloads {
    font-size: 0.78rem;
    color: #7a8da3;
}

.catalog-per-page-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-per-page-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
}

.catalog-per-page-form .form-select {
    width: auto;
    min-width: 72px;
}

.work-detail-subject {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: -8px 0 16px;
}

.work-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 12px;
}

.work-detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.work-detail-stats .work-card-stat {
    color: var(--text-muted);
}

.work-description-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 20px;
}

.work-description-box h4 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 12px;
}

.work-description-text {
    color: var(--text);
    line-height: 1.65;
    white-space: pre-wrap;
}

.work-public-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.work-public-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.work-public-meta-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.work-public-meta-value {
    font-size: 0.92rem;
    color: var(--text);
    word-break: break-word;
}

.work-screenshot-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.work-screenshot-box h4 {
    color: var(--primary);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.work-screenshots-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.work-screenshot-item {
    margin: 0;
}

.work-screenshot-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f8fafc;
    cursor: zoom-in;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.work-screenshot-thumb:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(26, 67, 129, 0.12);
}

.work-screenshot-caption {
    margin-top: 8px;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--text-muted);
    text-align: center;
}

.work-screenshot-preview {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 180px;
    height: auto;
    object-fit: contain;
    background: #f8fafc;
}

.work-screenshot-modal-img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.work-screenshots-editor {
    display: grid;
    gap: 16px;
}

.work-screenshot-slot {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f8fafc;
}

.work-screenshot-admin-preview .work-screenshot-preview {
    max-width: 240px;
    max-height: 160px;
}

.work-card-screenshot {
    margin: 8px 0 10px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.work-card-screenshot img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    object-position: top center;
}

.work-card-excerpt {
    font-size: 0.82rem;
    color: #9aabbc;
    line-height: 1.55;
    margin: 0 0 10px;
}

.work-card-public-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.18);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.work-card-public-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.work-card-public-meta-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #8a9bb0;
}

.work-card-public-meta-value {
    font-size: 0.78rem;
    color: #d5e0ea;
    word-break: break-word;
}

.work-card-action {
    font-size: 0.82rem;
    font-weight: 600;
    color: #4dd4e8;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
}

.work-card-action:hover {
    color: #7eeaff;
}

/* Stat cards (admin) — отдельно от карточек работ */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}

.stat-card .stat-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-card .stat-lbl {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.rating-stars { color: #e6a020; font-weight: 600; }

/* ── Work detail ── */
.work-detail {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.work-detail h1 {
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 1.55rem;
}

.annotation-box {
    background: var(--primary-light);
    border: 1px solid rgba(15, 70, 133, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 20px 0;
}

.annotation-title {
    text-align: center;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.annotation-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}

.annotation-title-row .annotation-title {
    margin-bottom: 0;
    text-align: left;
}

.annotation-header-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 20px;
    margin-bottom: 12px;
}

.annotation-header-grid .annotation-line {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: baseline;
}

.annotation-header-grid .annotation-line--wide {
    grid-column: 1 / -1;
}

.annotation-line-value {
    color: var(--text);
    word-break: break-word;
}

.annotation-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    margin: 14px 0 8px;
}

.annotation-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(15, 70, 133, 0.1);
    border-radius: 10px;
}

.annotation-meta-item .annotation-label {
    min-width: 0;
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--primary);
    opacity: 0.9;
}

.annotation-meta-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
    line-height: 1.35;
}

.annotation-line { margin: 8px 0; line-height: 1.55; color: var(--text); }
.annotation-line--block {
    margin-top: 14px;
}
.annotation-line--block .annotation-label {
    display: block;
    margin-bottom: 4px;
    min-width: 0;
}
.annotation-value {
    color: var(--text);
    white-space: pre-wrap;
}

@media (max-width: 700px) {
    .annotation-header-grid,
    .annotation-meta-grid {
        grid-template-columns: 1fr;
    }
}
.annotation-section-title {
    margin: 16px 0 8px;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}
.annotation-files {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}
.annotation-file-link {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s;
}
.annotation-file-link:hover:not(.is-disabled) {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--primary);
}
.annotation-file-link.is-disabled {
    opacity: 0.55;
}
.annotation-files-note {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Work download cards ── */
.work-download-section {
    margin: 28px 0 20px;
}

.work-download-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.work-download-card {
    flex: 1 1 180px;
    max-width: 100%;
    background: #f0f9ff;
    border: 1.5px solid #cfe3ed;
    border-radius: var(--radius);
    padding: 16px 18px;
    text-align: center;
    text-decoration: none;
    color: #1e5a6e;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s, background 0.18s;
}

.work-download-card:hover {
    transform: translateY(-2px);
    border-color: #9ec5e8;
    box-shadow: 0 8px 24px rgba(15, 70, 133, 0.12);
    color: #1e5a6e;
}

.work-download-card.is-disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background: #f1f5f9;
    pointer-events: none;
}

.work-download-card-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.work-download-card-type {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.work-download-card-name {
    font-size: 0.82rem;
    color: var(--text);
    line-height: 1.35;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-download-card-size {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.work-download-card-icon {
    font-size: 2rem;
    color: #e67e22;
    line-height: 1;
}

.work-download-card-action {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e5a6e;
}

.work-download-note {
    margin: 12px 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.work-rating-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: var(--gray-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.work-rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.work-rating-stars {
    font-size: 1rem;
    letter-spacing: 1px;
}

.work-rating-value {
    font-weight: 700;
    color: var(--text);
}

.work-rating-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
}

.work-rating-form-label {
    font-size: 0.88rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.work-rating-stars-input {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.work-rating-star-option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.work-rating-star-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.work-rating-star-icon {
    display: inline-block;
    font-size: 1.15rem;
    color: #c5cdd8;
    transition: color 0.12s;
    line-height: 1;
}

.work-rating-star-option input:checked + .work-rating-star-icon,
.work-rating-star-option:hover .work-rating-star-icon {
    color: #e6a020;
}

.work-rating-submit {
    margin-left: 4px;
}

.annotation-export-btns {
    margin-top: 8px;
}
.annotation-label {
    font-weight: 600;
    color: var(--primary);
    display: inline-block;
    min-width: 200px;
}

.file-sidebar {
    background: var(--gray-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 20px;
    border: 1px solid var(--border);
}

.file-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 6px;
    margin-bottom: 8px;
    color: var(--text);
    transition: all 0.15s;
}

.file-link:hover:not(.disabled) {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--primary);
}

.file-link.disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

/* ── Auth ── */
.auth-wrapper {
    max-width: 420px;
    margin: 48px auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.auth-wrapper h1 {
    color: var(--primary);
    margin-bottom: 24px;
    text-align: center;
    font-size: 1.5rem;
}

/* ── Admin ── */
.admin-tabs .nav-link { color: var(--primary); font-weight: 500; }
.admin-tabs .nav-link.active { background: var(--primary); color: #fff; }

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.admin-nav-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.admin-nav-group-label {
    flex: 0 0 auto;
    min-width: 7.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.admin-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
}

.admin-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 6px;
    border: 1px solid rgba(15, 70, 133, 0.14);
    background: rgba(15, 70, 133, 0.04);
    color: var(--primary);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.admin-nav-link i {
    font-size: 0.78rem;
    opacity: 0.9;
}

.admin-nav-link:hover {
    background: rgba(12, 148, 149, 0.12);
    border-color: rgba(12, 148, 149, 0.35);
    color: var(--accent-dark, #0a6e6f);
}

.admin-nav-link.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(15, 70, 133, 0.25);
}

.admin-nav-link.is-active:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

@media (max-width: 700px) {
    .admin-nav-group {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-nav-group-label {
        min-width: 0;
    }
}

.admin-table {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.admin-table table { margin: 0; }
.admin-table th {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.admin-table td { color: var(--text); font-size: 0.88rem; }

/* Sortable tables */
.js-sortable-table th.is-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.js-sortable-table th.is-sortable:hover {
    background: rgba(12, 148, 149, 0.1);
}

.js-sortable-table .table-sort-indicator {
    display: inline-block;
    margin-left: 0.35em;
    font-size: 0.75em;
    opacity: 0.45;
    vertical-align: middle;
}

.js-sortable-table .table-sort-indicator::before {
    content: '↕';
}

.js-sortable-table th.is-sorted-asc .table-sort-indicator,
.js-sortable-table th.is-sorted-desc .table-sort-indicator {
    opacity: 1;
    color: var(--accent, #0c9495);
}

.js-sortable-table th.is-sorted-asc .table-sort-indicator::before {
    content: '↑';
}

.js-sortable-table th.is-sorted-desc .table-sort-indicator::before {
    content: '↓';
}

/* Table pager */
.table-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    background: rgba(15, 70, 133, 0.03);
}

.table-pager-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.table-pager-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.table-pager-size {
    width: auto;
    min-width: 4.5rem;
}

.table-pager-info {
    font-size: 0.82rem;
}

.table-pager-right {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.admin-form-card > .table-pager {
    margin: 0 -24px -24px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.admin-table > .table-pager {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.works-table-filters {
    padding: 16px 18px;
    margin-bottom: 16px;
}

.works-table-filters .form-label {
    font-size: 0.78rem;
    margin-bottom: 4px;
}

.works-table-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.works-table-filters-row + .works-table-filters-row {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.works-table-filters-row--search {
    align-items: flex-start;
    justify-content: space-between;
}

.works-table-search {
    flex: 1 1 280px;
    min-width: 0;
}

.works-table-search .form-text {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    line-height: 1.35;
}

.works-table-found {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 88px;
    padding: 8px 12px;
    margin-top: 1.4rem;
    border-radius: 8px;
    background: rgba(15, 70, 133, 0.06);
    border: 1px solid rgba(15, 70, 133, 0.12);
}

.works-table-found-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.works-table-found-value {
    font-size: 1.35rem;
    line-height: 1.1;
    color: var(--primary);
}

.works-table-filters-row--filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px 12px;
    align-items: end;
}

.works-table-filter {
    min-width: 0;
}

.works-table-filters-row--actions {
    gap: 8px;
}

@media (max-width: 992px) {
    .works-table-filters-row--filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .works-table-filters-row--search {
        flex-direction: column;
    }

    .works-table-found {
        align-self: stretch;
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 0;
        gap: 8px;
    }

    .works-table-filters-row--filters {
        grid-template-columns: 1fr 1fr;
    }
}

.works-registry-table {
    overflow: hidden;
}

.works-registry-table .table-responsive {
    max-height: none;
}

.works-registry-table .table > :not(caption) > * > * {
    border-right: 1px solid var(--border);
}

.works-registry-table .table > :not(caption) > * > *:last-child {
    border-right: none;
}

.works-registry-table thead th {
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.works-registry-table tbody td {
    vertical-align: middle;
}

.works-registry-title {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: inline-block;
    max-width: 320px;
}

.works-registry-title:hover {
    text-decoration: underline;
}

.works-registry-meta {
    font-size: 0.75rem;
    margin-top: 2px;
}

.works-registry-meta .status-badge {
    font-size: 0.7rem;
}

.works-registry-files {
    max-width: 180px;
}

.works-registry-shot {
    display: inline-block;
    width: 64px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f1f5f9;
}

.works-registry-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.annot-fill {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
}

.annot-fill--solo {
    min-width: 110px;
}

.annot-fill-mark {
    flex: 0 0 1.4rem;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    color: var(--text);
}

.annot-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    font-weight: 700;
    font-size: 1rem;
}

.annot-mark--high,
.annot-mark--good { color: #16a34a; }
.annot-mark--mid { color: #ca8a04; }
.annot-mark--low { color: #ea580c; }
.annot-mark--empty { color: var(--text-muted); }

.annot-fill-track {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: rgba(15, 70, 133, 0.1);
    overflow: hidden;
    min-width: 72px;
}

.annot-fill-bar {
    height: 100%;
    border-radius: inherit;
    transition: width 0.2s ease;
}

.annot-fill-bar--high { background: #16a34a; }
.annot-fill-bar--good { background: #22c55e; }
.annot-fill-bar--mid { background: #eab308; }
.annot-fill-bar--low { background: #f97316; }
.annot-fill-bar--empty { background: #94a3b8; width: 0 !important; }

.annot-fill-pct {
    flex: 0 0 2.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: right;
}

.works-registry-table .work-card-file-flag {
    border-color: var(--border);
}

.works-registry-table .work-card-file-flag.is-yes {
    background: rgba(12, 148, 149, 0.14);
    color: #0a6e6f;
}

.works-registry-table .work-card-file-flag.is-no {
    background: rgba(15, 70, 133, 0.04);
    color: #7a8a9c;
}

/* Moderation */
.moderation-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.moderation-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--white);
    transition: background 0.15s, color 0.15s;
}

.moderation-tab:hover {
    background: rgba(15, 70, 133, 0.06);
    color: var(--primary);
}

.moderation-tab.is-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.moderation-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(15, 70, 133, 0.12);
    color: inherit;
}

.moderation-tab.is-active .moderation-tab-count {
    background: rgba(255, 255, 255, 0.22);
}

.moderation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 280px;
}

.moderation-actions .btn {
    padding: 0.2rem 0.45rem;
}

.moderation-page .works-registry-table .table > :not(caption) > * > *:last-child {
    min-width: 220px;
}

[data-bs-theme="dark"] .moderation-tab {
    background: transparent;
    border-color: rgba(126, 168, 216, 0.45);
    color: #c5d8ef;
}

[data-bs-theme="dark"] .moderation-tab:hover {
    background: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .moderation-tab.is-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.admin-form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.admin-form-card h3 {
    color: var(--primary);
    font-size: 1.05rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ── Alerts ── */
.alert { border-radius: var(--radius); font-size: 0.9rem; }

/* ── Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 70, 133, 0.45);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    color: var(--text);
}

/* ── Header tools (search + actions) ── */
.site-top-bar {
    display: none;
}

.site-top-search {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 180px;
    max-width: none;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    overflow: hidden;
}

.site-top-search-input {
    flex: 1;
    border: none;
    border-radius: 4px 0 0 4px;
    padding: 7px 12px;
    font-size: 0.85rem;
    outline: none;
    background: var(--white);
    color: var(--text);
}

.site-top-search-input::placeholder {
    color: #9aa8b8;
}

.site-top-search-btn {
    border: none;
    background: transparent;
    color: #fff;
    padding: 7px 12px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.site-top-search-btn .bi {
    font-size: 0.95rem;
}

.site-top-search-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.site-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.site-top-feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}

.site-top-feedback-btn .bi {
    font-size: 0.95rem;
}

.site-top-feedback-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.site-top-theme {
    display: inline-flex;
}

.site-top-icon-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, box-shadow 0.15s;
}

.site-top-icon-btn .bi {
    font-size: 1rem;
    line-height: 1;
}

.site-top-icon-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.theme-toggle-btn.is-active {
    background: rgba(255, 255, 255, 0.24);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.site-top-auth-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 4px;
    background: #fff;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s, background 0.15s;
}

.site-top-auth-btn:hover {
    color: var(--primary);
    opacity: 0.92;
}

.site-top-auth-btn--outline {
    background: transparent;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.site-top-auth-btn--outline:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* ── Footer ── */
.site-footer {
    margin-top: auto;
    color: rgba(255, 255, 255, 0.9);
}

.footer-main {
    background: var(--primary-dark);
    padding: 36px 24px 28px;
}

.footer-main-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-columns {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(280px, 1.5fr) minmax(240px, 1.2fr);
    gap: 28px 24px;
}

.footer-col--partners {
    min-width: 0;
}

.footer-col-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 14px;
}

.footer-col-title--spaced {
    margin-top: 22px;
}

.footer-links,
.footer-contacts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contacts li {
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.82);
}

.footer-links a,
.footer-contacts a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
}

.footer-links a:hover,
.footer-contacts a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.footer-social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-decoration: none;
}

.footer-social-link:hover {
    background: var(--accent);
    color: #fff;
}

.footer-partners-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.footer-partner-card {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.footer-partner-card:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(126, 232, 216, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.footer-partner-logo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.footer-partner-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    border-radius: 0;
    background: transparent;
}

.footer-partner-name {
    display: block;
    margin-top: 0;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-partner-arrow {
    color: rgba(126, 232, 216, 0.85);
    font-size: 0.75rem;
    opacity: 0.85;
}

.footer-partner-card:hover .footer-partner-arrow {
    opacity: 1;
    color: #7ee8d8;
}

.footer-partners-empty {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

.footer-col-title > i {
    margin-right: 0.35em;
    opacity: 0.85;
}

/* legacy */
.footer-partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.88);
    transition: transform 0.15s, color 0.15s;
}

.footer-contact-form .footer-form-row {
    margin-bottom: 10px;
}

.footer-contact-form-wrap {
    display: block;
}

.footer-contact-form .form-control {
    background: rgba(255, 255, 255, 0.95);
    border-color: transparent;
}

.footer-contact-form--locked fieldset:disabled .form-control,
.footer-contact-form--locked fieldset:disabled .btn {
    opacity: 0.65;
    cursor: not-allowed;
}

.footer-feedback-notice {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
}

.footer-feedback-notice-link {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-feedback-notice-link:hover {
    color: #fff;
    opacity: 0.9;
}

.footer-author {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.footer-author-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.footer-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.footer-author strong {
    color: #fff;
    display: block;
    margin-bottom: 4px;
    font-size: 0.88rem;
}

.footer-author p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.45;
}

.footer-bottom {
    background: #082848;
    padding: 16px 24px;
    text-align: center;
}

.footer-bottom-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem;
}

.footer-bottom-sub {
    margin-top: 4px !important;
    font-size: 0.78rem !important;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 992px) {
    .footer-columns {
        grid-template-columns: 1fr 1fr;
    }

    .footer-col--partners {
        grid-column: 1 / -1;
    }
}

@media (max-width: 992px) {
    .header-top {
        flex-wrap: wrap;
    }

    .header-tools {
        flex: 1 1 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 700px) {
    .logo-img {
        width: 52px;
        height: 52px;
    }

    .logo-title {
        font-size: 1.25rem;
    }

    .header-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .site-top-search {
        width: 100%;
    }

    .site-top-actions {
        justify-content: center;
    }

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

    .footer-col--partners {
        grid-column: auto;
    }

    .footer-partners-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── Pagination ── */
.pagination-wrap { margin-top: 28px; }
.page-link { color: var(--primary); border-color: var(--border); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Reviews ── */
.review-block {
    background: var(--gray-bg);
    border-left: 4px solid var(--accent);
    padding: 16px;
    border-radius: 0 8px 8px 0;
    margin: 12px 0;
    color: var(--text);
}

/* ── Anketa2 print ── */
.anketa2-print {
    font-family: 'Times New Roman', serif;
    color: #000;
    background: #fff;
    border: 2px solid #000;
    padding: 30px;
}

.anketa2-print .section-title {
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 1px solid #000;
    margin: 16px 0 8px;
    padding-bottom: 4px;
}

/* ── Official upload form (Анкета-style) ── */
.upload-page-header {
    margin-bottom: 16px;
}

.upload-page .official-form-container {
    max-width: 1100px;
    margin: 0 auto 32px;
    background: #fff;
    border: 1px solid #000;
    overflow: hidden;
}

.official-appendix {
    padding: 0.45rem 1.25rem;
    border-bottom: 1px solid #000;
    font-size: 0.8rem;
    font-family: 'Times New Roman', Georgia, serif;
    color: #444;
}

.official-form-header {
    padding: 0.7rem 1.25rem;
    border-bottom: 2px solid #000;
    text-align: center;
    font-family: 'Times New Roman', Georgia, serif;
}

.official-form-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.04em;
}

.official-section {
    padding: 0.9rem 1.25rem 1rem;
    border-bottom: 1px solid #000;
}

.official-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.65rem;
    font-family: 'Times New Roman', Georgia, serif;
    letter-spacing: 0.03em;
}

.official-grid {
    display: grid;
    gap: 0.65rem 0.85rem;
}

.official-grid + .official-grid,
.official-grid + .official-field {
    margin-top: 0.75rem;
}

.official-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.official-grid--docs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-file-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 0.75rem;
}

.upload-file-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 0.75rem;
    border: 1px solid #000;
    background: #f3f5f7;
    color: #4a5563;
    font-family: 'Courier New', Consolas, monospace;
}

.upload-file-flag.is-required {
    background: rgba(12, 148, 149, 0.16);
    color: #0a6e6f;
    border-color: #0c9495;
    font-weight: 700;
}

.upload-file-abbr {
    font-weight: 700;
}

.upload-file-req {
    font-weight: 700;
}

.upload-doc-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.upload-doc-name {
    font-weight: 600;
}

.official-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.official-grid--author {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.official-grid--stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.official-field {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-width: 0;
    margin-bottom: 0;
}

.official-field--full {
    grid-column: 1 / -1;
}

.official-field--span2 {
    grid-column: span 2;
}

.official-field--block {
    margin-top: 0.75rem;
    width: 100%;
}

.official-label {
    padding-top: 0;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    color: #222;
}

.official-input {
    width: 100%;
    min-width: 0;
}

.official-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.official-row .official-field {
    flex: 1;
    min-width: 160px;
}

.official-form .form-control,
.official-form .form-select {
    border-radius: 0;
    border: 1px solid #000;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.85rem;
    padding: 0.35rem 0.55rem;
    min-height: 2.05rem;
    line-height: 1.3;
}

.official-form textarea.form-control {
    min-height: 0;
    line-height: 1.4;
}

.official-form .form-control:focus,
.official-form .form-select:focus {
    border-color: #000;
    box-shadow: none;
}

.official-hint {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: #555;
    font-style: italic;
    line-height: 1.3;
}

.official-hint--inline {
    margin: 0 0 0.55rem;
}

.official-submit {
    display: block;
    width: calc(100% - 2.5rem);
    margin: 1rem 1.25rem 1.25rem;
    padding: 0.6rem 1.25rem;
    background: #fff;
    border: 1px solid #000;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 0.95rem;
    cursor: pointer;
}

.official-submit:hover {
    background: #f0f0f0;
}

.upload-page .work-screenshots-editor {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.upload-page .work-screenshot-slot {
    padding: 0.55rem 0.65rem;
    border: 1px solid #000;
    border-radius: 0;
    background: #fafafa;
}

.upload-page .work-screenshot-slot .form-label {
    font-size: 0.78rem;
    margin-bottom: 0.3rem;
    font-family: 'Times New Roman', Georgia, serif;
}

.upload-page .work-screenshot-slot .form-control {
    font-size: 0.8rem;
    padding: 0.3rem 0.45rem;
}

.upload-page .work-screenshots-editor > .text-muted {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    margin-top: 0 !important;
}

@media (max-width: 900px) {
    .official-grid--3,
    .official-grid--author {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .official-grid--stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .official-field--span2 {
        grid-column: span 1;
    }
}

@media (max-width: 700px) {
    .official-section { padding: 0.85rem 1rem; }
    .official-appendix,
    .official-form-header { padding-left: 1rem; padding-right: 1rem; }

    .official-grid--2,
    .official-grid--3,
    .official-grid--author,
    .official-grid--stats,
    .official-grid--docs,
    .upload-page .work-screenshots-editor {
        grid-template-columns: 1fr;
    }

    .official-field--span2,
    .official-field--full {
        grid-column: 1 / -1;
    }

    .official-submit {
        width: calc(100% - 2rem);
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .catalog-layout { flex-direction: column; }
    .filters-panel { width: 100%; position: static; }
    .hero-section { padding: 28px 20px; }
    .header-inner { flex-direction: column; align-items: flex-start; }
    .hero-stats { gap: 20px; }
    .page-header h1 { font-size: 1.4rem; }
    .work-card-info { grid-template-columns: 1fr; }
    .work-card-footer { flex-direction: column; align-items: flex-start; }
}

@media print {
    .site-header, .site-footer, .no-print { display: none !important; }
    body { background: #fff; color: #000; }
    .anketa2-print { border: none; }
}

/* ══════════════════════════════════════
   HOME PAGE
   ══════════════════════════════════════ */

.home-page { overflow-x: hidden; }

.site-main:has(.home-page) {
    padding: 0 0 48px;
}

/* Hero */
.home-hero {
    background: var(--primary);
    color: #fff;
    padding: 36px 0 40px;
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    display: none;
}

.home-hero-inner {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(260px, 1fr);
    gap: 28px 36px;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.home-hero-content {
    min-width: 0;
}

@media (max-width: 900px) {
    .home-hero-inner {
        grid-template-columns: 1fr;
    }
}

.home-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    padding: 5px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
    color: rgba(255,255,255,0.95);
}

.home-badge-dot {
    width: 7px;
    height: 7px;
    background: #7ee8d8;
    border-radius: 50%;
    animation: homePulse 2s infinite;
}

@keyframes homePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

.home-hero h1 {
    font-size: clamp(1.75rem, 3.8vw, 2.55rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.home-hero h1 em {
    font-style: normal;
    color: #a8e6f0;
}

.home-hero-content > p {
    color: rgba(255,255,255,0.88);
    font-size: 0.98rem;
    line-height: 1.55;
    max-width: 560px;
    margin-bottom: 18px;
}

.home-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.home-stat-card {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 14px 22px;
    text-align: center;
    min-width: 110px;
}

.home-stat-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.home-stat-lbl {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.75);
    margin-top: 4px;
}

.home-hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.home-btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 24px rgba(12, 148, 149, 0.35);
}

.home-btn--primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(12, 148, 149, 0.45);
}

.home-btn--ghost {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.35);
}

.home-btn--ghost:hover {
    color: #fff;
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.home-btn--block { width: 100%; margin-bottom: 10px; }

.home-hero-visual {
    min-width: 0;
    width: 100%;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-hero-visual--has-photos {
    padding: 0;
    /* Горизонтальный кадр на всю ширину правой колонки — без пустоты справа */
    align-self: center;
}

.home-hero-photos {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--primary);
}

.home-hero-photo {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    line-height: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.home-hero-photo img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    display: block;
    object-fit: cover !important;
    object-position: center var(--hero-pos-y, 50%);
    opacity: var(--hero-opacity, 1);
    transform: scale(var(--hero-zoom, 1.6));
    transform-origin: center var(--hero-pos-y, 50%);
}

.home-hero-icon {
    font-size: 3.25rem;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.15));
}

.home-hero-caption {
    position: relative;
    z-index: 2;
    margin: 8px 0 0;
    padding: 0 4px;
    color: var(--hero-caption-color, rgba(255, 255, 255, 0.9));
    font-size: 0.9rem;
    line-height: 1.35;
    transform: translateY(var(--hero-caption-offset, 0px));
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.home-hero-visual--has-photos .home-hero-caption {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 12px;
    transform: translateY(var(--hero-caption-offset, 0px));
    text-align: center;
}

/* Sections */
.home-section {
    padding: 56px 0;
    background: var(--white);
}

.home-section-head {
    text-align: center;
    margin-bottom: 32px;
}

.home-tag {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent-dark);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.home-section-head h2,
.home-reviews h3,
.home-achievements h3,
.home-partners h3 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

.home-section-head h2 em,
.home-howto-steps h2 em,
.home-cta-card h3 em {
    font-style: normal;
    color: var(--accent);
}

.home-section-head p {
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
}

/* Search */
.home-search {
    max-width: 560px;
    margin: 0 auto 36px;
    position: relative;
}

.home-search input {
    width: 100%;
    padding: 14px 56px 14px 22px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--white);
    box-shadow: var(--shadow);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.home-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(12, 148, 149, 0.15);
}

.home-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 4px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.home-search button:hover { transform: translateY(-50%); opacity: 0.9; }

/* Statistics charts */
.home-stats-section {
    padding: 56px 0;
    background: linear-gradient(180deg, var(--gray-bg) 0%, var(--white) 100%);
}

.home-chart-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.home-chart-kpi {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.home-chart-kpi-value {
    display: block;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.home-chart-kpi-label {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.home-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.home-chart-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 18px 14px;
    box-shadow: var(--shadow);
}

.home-chart-card--wide {
    grid-column: span 2;
}

.home-chart-card-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.home-chart-card-head h3 .bi {
    color: var(--accent);
}

.home-chart-card-head p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.home-chart-card-head--row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 8px;
}

.home-chart-card-head--row > div:first-child {
    min-width: 200px;
    flex: 1 1 220px;
}

.home-chart-card-head--row p {
    margin-bottom: 0;
}

.home-chart-select-wrap {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.home-chart-select {
    appearance: none;
    min-width: 150px;
    max-width: 220px;
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235c6b7f' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--primary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.home-chart-select:focus {
    outline: 2px solid rgba(12, 148, 149, 0.35);
    outline-offset: 1px;
}

[data-bs-theme="dark"] .home-chart-select {
    background-color: #1a2430;
    color: #d6dee8;
    border-color: #2a3544;
}

.home-chart-period {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(15, 70, 133, 0.06);
    border: 1px solid var(--border);
}

.home-chart-period-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.home-chart-period-btn:hover {
    color: var(--primary);
    background: rgba(15, 70, 133, 0.08);
}

.home-chart-period-btn.is-active {
    background: var(--accent);
    color: #fff;
}

[data-bs-theme="dark"] .home-chart-period {
    background: rgba(255, 255, 255, 0.04);
}

[data-bs-theme="dark"] .home-chart-period-btn.is-active {
    background: var(--accent);
    color: #fff;
}

.home-chart-wrap {
    position: relative;
    height: 260px;
}

.home-chart-wrap--tall {
    height: 320px;
}

.home-chart-wrap--square {
    height: 280px;
    max-width: 320px;
    margin: 0 auto;
}

.home-chart-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    font-size: 0.88rem;
    color: var(--text-muted);
    background: var(--gray-bg);
    border-radius: var(--radius);
    margin: 0;
}

.home-chart-card--empty canvas {
    display: none;
}

.home-info-block--wide {
    grid-column: span 2;
}

.home-kpi-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.home-kpi-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
    color: var(--text-muted);
}

.home-kpi-list li:last-child {
    border-bottom: none;
}

.home-kpi-list strong {
    color: var(--primary);
    font-size: 1.05rem;
    margin-right: 6px;
}

@media (max-width: 992px) {
    .home-charts-grid,
    .home-chart-card--wide,
    .home-info-block--wide {
        grid-column: span 1;
    }

    .home-charts-grid {
        grid-template-columns: 1fr;
    }
}

[data-bs-theme="dark"] .home-stats-section {
    background: linear-gradient(180deg, #0f1419 0%, #141b24 100%);
}

[data-bs-theme="dark"] .home-chart-card,
[data-bs-theme="dark"] .home-chart-kpi {
    background: #141b24;
    border-color: var(--border);
}

[data-bs-theme="dark"] .home-chart-empty {
    background: rgba(255, 255, 255, 0.04);
}

.home-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    max-width: 1000px;
    margin: 0 auto;
}

.home-cat-card {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 22px;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.8);
    transition: transform 0.25s, box-shadow 0.25s;
    overflow: hidden;
}

.home-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.home-cat-card--wide { grid-column: span 2; }

.home-cat--blue { background: linear-gradient(135deg, var(--primary-light), #dce8f8); }
.home-cat--teal { background: linear-gradient(135deg, var(--accent-light), #c8ecec); }
.home-cat--sky { background: linear-gradient(135deg, #dce8f8, #c8d8ec); }
.home-cat--mint { background: linear-gradient(135deg, #d8ece4, #c0ddd0); }

.home-cat-icon {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.55;
    line-height: 1;
}

.home-cat-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.home-cat-card--wide .home-cat-name { font-size: 1.2rem; }

.home-cat-count { font-size: 0.8rem; color: var(--text-muted); }

.home-cat-arrow {
    position: absolute;
    bottom: 18px;
    right: 18px;
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s, transform 0.2s;
}

.home-cat-card:hover .home-cat-arrow {
    opacity: 1;
    transform: translateY(0);
}

/* Achievements */
.home-achievements {
    background: #fef8ee;
    padding: 44px 0;
    border-top: 1px solid #f0e0c8;
    border-bottom: 1px solid #f0e0c8;
}

.home-achievements h3 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 24px;
}

.home-carousel {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 16px;
    scrollbar-width: thin;
}

.home-carousel-item {
    min-width: 220px;
    flex: 1;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}

.home-carousel-emoji {
    font-size: 1.75rem;
    margin-bottom: 12px;
    color: var(--primary);
    line-height: 1;
}

.home-carousel-emoji > i {
    display: inline-block;
    color: inherit;
    font-style: normal;
}

.home-achievements h3 > i,
.home-reviews h3 > i,
.home-partners h3 > i,
.home-feature-card h3 > i {
    margin-right: 0.4em;
    opacity: 0.85;
}

.home-carousel-item strong {
    display: block;
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 6px;
}

.home-carousel-item span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Info grid */
.home-info {
    padding: 48px 0;
    background: var(--white);
}

.home-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}

.home-info-block h3 {
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 18px;
    padding-left: 14px;
    border-left: 4px solid var(--accent);
}

.home-dir-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gray-bg);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.home-dir-label { flex: 1; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.home-progress {
    width: 80px;
    height: 7px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.home-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 6px;
}

.home-dir-pct {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.8rem;
    min-width: 36px;
    text-align: right;
}

.home-news-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--text-muted);
}

.home-news-date {
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.home-links,
.home-contacts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.home-links li,
.home-contacts li {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.home-links a {
    color: var(--text);
    font-weight: 500;
}

.home-links a:hover { color: var(--accent-dark); }

/* How it works */
.home-howto {
    padding: 56px 0;
    background: var(--gray-bg);
}

.home-howto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.home-howto-steps h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.2;
}

.home-howto-desc {
    color: var(--text-muted);
    margin-bottom: 28px;
}

.home-steps { display: flex; flex-direction: column; gap: 12px; }

.home-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.home-step:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.home-step-num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.home-step:nth-child(2) .home-step-num { background: var(--accent); }
.home-step:nth-child(3) .home-step-num { background: #5a8fc4; }
.home-step:nth-child(4) .home-step-num { background: #7a9e8e; }

.home-step-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.home-step p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.55;
}

.home-cta-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    text-align: center;
}

.home-cta-emoji {
    font-size: 2.25rem;
    display: block;
    margin-bottom: 16px;
    color: var(--primary);
    line-height: 1;
}

.home-cta-card h3 {
    font-size: 1.5rem;
    color: var(--primary);
    line-height: 1.25;
    margin-bottom: 10px;
}

.home-cta-card > p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.home-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    text-align: left;
}

.home-perks li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
}

.home-perks li::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Reviews */
.home-reviews {
    padding: 48px 0;
    background: var(--primary-light);
}

.home-reviews h3 {
    text-align: center;
    margin-bottom: 28px;
}

.home-review-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.home-review-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 320px;
    flex: 1;
    min-width: 260px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.home-review-stars {
    color: #e6a020;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.home-review-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
    font-style: italic;
}

.home-review-author {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
}

/* Features row */
.home-features {
    padding: 48px 0;
    background: var(--white);
}

.home-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.home-feature-card {
    background: var(--gray-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border);
}

.home-feature-card h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.home-feature-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

/* Partners */
.home-partners {
    padding: 40px 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    text-align: center;
}

.home-partners h3 {
    margin-bottom: 20px;
}

.home-partner-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px 36px;
}

.home-partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.15s;
}

.home-partner-item:hover {
    color: var(--accent-dark);
    transform: translateY(-2px);
}

.home-partner-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--gray-bg);
    border: 1px solid var(--border);
    padding: 8px;
    box-shadow: var(--shadow);
}

@media (max-width: 900px) {
    .home-howto-grid { grid-template-columns: 1fr; }
    .home-cat-grid { grid-template-columns: repeat(2, 1fr); }
    .home-cat-card--wide { grid-column: span 1; }
}

@media (max-width: 580px) {
    .home-hero { padding: 28px 0 32px; }
    .home-cat-grid { grid-template-columns: 1fr; }
    .home-hero-stats { gap: 10px; }
    .home-stat-card { min-width: calc(50% - 8px); flex: 1; }
    .home-dir-item { flex-wrap: wrap; border-radius: var(--radius); }
    .home-progress { width: 100%; order: 3; }
    .home-hero-visual {
        max-width: none;
        min-height: 0;
    }
    .home-hero-photos {
        aspect-ratio: 16 / 10;
        width: 100%;
        height: auto;
        position: relative;
        inset: auto;
    }
}

/* ── Dark theme ── */
[data-bs-theme="dark"] {
    --primary-light: rgba(126, 184, 240, 0.16);
    --light-bg: #1a2332;
    --accent-light: rgba(12, 148, 149, 0.15);
    --gray-bg: #0f1419;
    --white: #1a2332;
    --text: #e8edf4;
    --text-muted: #9aabbc;
    --border: #2a3544;
    --border-focus: #3db8b9;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.45);
    --bs-body-color: var(--text);
    --bs-body-bg: var(--gray-bg);
    --bs-border-color: var(--border);
    --bs-secondary-bg: #141b24;
    --bs-tertiary-bg: #141b24;
    color-scheme: dark;
}

[data-bs-theme="dark"] body {
    background: var(--gray-bg);
    color: var(--text);
}

/* Не красим все заголовки/абзацы глобально — ломает hero и акцентные блоки */
[data-bs-theme="dark"] .page-header h1,
[data-bs-theme="dark"] .home-section-head h2,
[data-bs-theme="dark"] .home-chart-card-head h3,
[data-bs-theme="dark"] .home-cat-name,
[data-bs-theme="dark"] .home-achievements h3,
[data-bs-theme="dark"] .home-cta-card h3,
[data-bs-theme="dark"] .filters-panel h3,
[data-bs-theme="dark"] .profile-card-title,
[data-bs-theme="dark"] .profile-section-title {
    color: #7eb8f0;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .filter-group input,
[data-bs-theme="dark"] .filter-group select,
[data-bs-theme="dark"] .catalog-search-input {
    background: #141b24;
    border-color: var(--border);
    color: var(--text);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] .filter-group input:focus,
[data-bs-theme="dark"] .filter-group select:focus,
[data-bs-theme="dark"] .catalog-search-input:focus {
    background: #141b24;
    color: var(--text);
}

[data-bs-theme="dark"] .filters-panel,
[data-bs-theme="dark"] .hero-section,
[data-bs-theme="dark"] .work-detail,
[data-bs-theme="dark"] .catalog-search-inner,
[data-bs-theme="dark"] .catalog-toolbar,
[data-bs-theme="dark"] .admin-card,
[data-bs-theme="dark"] .admin-table-wrap,
[data-bs-theme="dark"] .upload-section,
[data-bs-theme="dark"] .profile-card {
    background: var(--white);
    border-color: var(--border);
}

[data-bs-theme="dark"] .admin-nav {
    background: var(--white);
    border-color: var(--border);
}

[data-bs-theme="dark"] .admin-nav-link {
    background: rgba(126, 184, 240, 0.08);
    border-color: rgba(126, 184, 240, 0.18);
    color: #7eb8f0;
}

[data-bs-theme="dark"] .admin-nav-link:hover {
    background: rgba(12, 148, 149, 0.18);
    border-color: var(--accent);
    color: #8de8d0;
}

[data-bs-theme="dark"] .admin-nav-link.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

[data-bs-theme="dark"] .annot-fill-track {
    background: rgba(126, 184, 240, 0.15);
}

[data-bs-theme="dark"] .works-registry-shot {
    background: #141b24;
    border-color: var(--border);
}

[data-bs-theme="dark"] .works-registry-table .work-card-file-flag.is-yes {
    color: #8de8d0;
}

[data-bs-theme="dark"] .works-registry-table .work-card-file-flag.is-no {
    color: #6f8196;
}

[data-bs-theme="dark"] .filters-panel h3 {
    border-bottom-color: var(--border);
}

[data-bs-theme="dark"] .catalog-toolbar {
    background: var(--white);
}

[data-bs-theme="dark"] .annotation-box {
    background: rgba(15, 70, 133, 0.18);
    border-color: rgba(126, 184, 240, 0.2);
}

[data-bs-theme="dark"] .annotation-meta-item {
    background: rgba(20, 27, 36, 0.55);
    border-color: rgba(126, 184, 240, 0.18);
}

[data-bs-theme="dark"] .annotation-title,
[data-bs-theme="dark"] .annotation-section-title,
[data-bs-theme="dark"] .annotation-label {
    color: #7eb8f0;
}

[data-bs-theme="dark"] .annotation-file-link {
    background: #141b24;
    border-color: var(--border);
    color: var(--text);
}

[data-bs-theme="dark"] .annotation-file-link:hover:not(.is-disabled) {
    background: rgba(12, 148, 149, 0.18);
    border-color: var(--accent);
    color: #8de8d0;
}

[data-bs-theme="dark"] .file-sidebar {
    background: #141b24;
}

[data-bs-theme="dark"] .work-download-card {
    background: rgba(15, 70, 133, 0.15);
    border-color: var(--border);
    color: #9ec5f0;
}

[data-bs-theme="dark"] .work-download-card:hover {
    background: rgba(15, 70, 133, 0.22);
    color: #b8dcff;
}

[data-bs-theme="dark"] .work-download-card.is-disabled {
    background: #141b24;
}

[data-bs-theme="dark"] .work-download-card-action {
    color: #9ec5f0;
}

[data-bs-theme="dark"] .work-rating-bar {
    background: #141b24;
    border-color: var(--border);
}

[data-bs-theme="dark"] .home-info,
[data-bs-theme="dark"] .home-howto,
[data-bs-theme="dark"] .home-categories,
[data-bs-theme="dark"] .home-partners {
    background: var(--gray-bg);
    border-color: var(--border);
}

[data-bs-theme="dark"] .home-hero {
    background: linear-gradient(135deg, #0a3260 0%, #0d4a4c 100%);
}

/* Стат-карточки в hero оставляем полупрозрачными */
[data-bs-theme="dark"] .home-stat-card {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
}

[data-bs-theme="dark"] .home-stat-num {
    color: #fff;
}

[data-bs-theme="dark"] .home-stat-lbl {
    color: rgba(255, 255, 255, 0.75);
}

[data-bs-theme="dark"] .home-hero h1,
[data-bs-theme="dark"] .home-hero-content > p {
    color: #fff;
}

[data-bs-theme="dark"] .home-hero h1 em {
    color: #a8e6f0;
}

[data-bs-theme="dark"] .home-cat-card,
[data-bs-theme="dark"] .home-howto-step,
[data-bs-theme="dark"] .home-info-block,
[data-bs-theme="dark"] .home-carousel-item,
[data-bs-theme="dark"] .home-cta-card {
    background: #141b24;
    border-color: var(--border);
}

[data-bs-theme="dark"] .home-cat-card h4,
[data-bs-theme="dark"] .home-info-block h3,
[data-bs-theme="dark"] .home-carousel-item strong {
    color: #7eb8f0;
}

[data-bs-theme="dark"] .home-achievements {
    background: #171b22;
    border-top-color: var(--border);
    border-bottom-color: var(--border);
}

[data-bs-theme="dark"] .home-carousel {
    background: transparent;
}

[data-bs-theme="dark"] .home-cat-arrow {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

[data-bs-theme="dark"] .guest-notice {
    background: rgba(240, 192, 96, 0.12);
    color: #f0d080;
    border-color: rgba(240, 192, 96, 0.35);
}

[data-bs-theme="dark"] .alert-success {
    background: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.35);
    color: #8de8b0;
}

[data-bs-theme="dark"] .alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.35);
    color: #f5a8b0;
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .site-header {
    background: #0f2d52;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .site-top-bar {
    background: transparent;
}

[data-bs-theme="dark"] .site-top-search-input {
    background: #141b24;
    color: var(--text);
}

[data-bs-theme="dark"] .site-top-auth-btn {
    background: #e8edf4;
    color: #0f2d52;
}

[data-bs-theme="dark"] .site-top-auth-btn--outline {
    background: transparent;
    color: #fff;
}

[data-bs-theme="dark"] .page-link {
    background: #141b24;
    border-color: var(--border);
    color: #7eb8f0;
}

[data-bs-theme="dark"] .page-link:hover {
    background: #1a2332;
    color: #fff;
}

[data-bs-theme="dark"] .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

[data-bs-theme="dark"] .page-item.disabled .page-link {
    background: #141b24;
    border-color: var(--border);
    color: #6a7a8c;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    color: var(--text-muted);
    border-color: var(--border);
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background: #141b24;
    color: var(--text);
    border-color: var(--text-muted);
}

[data-bs-theme="dark"] .review-block {
    background: #141b24;
}

[data-bs-theme="dark"] .type-checkboxes label.checkbox-item {
    color: var(--text);
}

[data-bs-theme="dark"] .modal-box {
    background: var(--white);
    border: 1px solid var(--border);
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] .filter-group input::placeholder,
[data-bs-theme="dark"] .catalog-search-input::placeholder {
    color: #7a8a9c;
}

[data-bs-theme="dark"] .official-form-container,
[data-bs-theme="dark"] .official-section {
    background: var(--white);
    border-color: var(--border);
}

[data-bs-theme="dark"] .official-label,
[data-bs-theme="dark"] .official-section-title {
    color: #7eb8f0;
}

[data-bs-theme="dark"] .official-submit {
    background: #141b24;
    border-color: var(--border);
    color: var(--text);
}

[data-bs-theme="dark"] .official-submit:hover {
    background: #1a2332;
}

[data-bs-theme="dark"] .official-appendix,
[data-bs-theme="dark"] .official-form-header,
[data-bs-theme="dark"] .official-section {
    border-color: var(--border);
}

[data-bs-theme="dark"] .official-appendix {
    color: var(--text-muted);
}

[data-bs-theme="dark"] .upload-page .work-screenshot-slot {
    background: #141b24;
    border-color: var(--border);
}

/* ── Profile cabinet ── */
.profile-cabinet {
    padding-top: 8px;
}

.profile-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.profile-card--settings {
    position: sticky;
    top: 88px;
}

.profile-card--compact {
    margin-bottom: 0;
}

.profile-card-head {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.profile-card-head--between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-card-title {
    margin: 0;
    font-size: 1.15rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-card-title i {
    font-size: 1.2rem;
    opacity: 0.9;
}

.profile-user-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.profile-avatar-wrap {
    flex-shrink: 0;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    background: var(--gray-bg);
}

.profile-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%);
}

.profile-user-meta {
    min-width: 0;
}

.profile-user-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.profile-user-handle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.profile-role-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
}

.profile-form {
    margin-bottom: 0;
}

.profile-form-group {
    margin-bottom: 16px;
}

.profile-form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.profile-form-hint {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.profile-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    color: var(--text-muted);
    cursor: pointer;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.profile-btn--full {
    width: 100%;
    justify-content: center;
    margin-bottom: 8px;
}

.profile-section {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.profile-section-title {
    margin: 0 0 16px;
    font-size: 0.98rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-extra-info {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
    font-size: 0.85rem;
    line-height: 1.7;
}

.profile-note-textarea {
    min-height: 180px;
    resize: vertical;
}

.profile-empty {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.profile-notes-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-note-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    background: var(--gray-bg);
}

.profile-note-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.82rem;
}

.profile-note-item-head time {
    color: var(--text-muted);
    font-weight: 500;
}

.profile-note-more {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.profile-note-preview {
    margin: 0;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.55;
}

.profile-note-meta {
    margin-bottom: 18px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.profile-note-body {
    color: var(--text);
    line-height: 1.7;
    font-size: 0.95rem;
    word-break: break-word;
}

.profile-note-body .profile-note-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 12px 0;
    border: 1px solid var(--border);
}

.profile-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-activity-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.profile-activity-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

[data-bs-theme="dark"] .profile-card,
[data-bs-theme="dark"] .profile-note-item {
    background: var(--white);
    border-color: var(--border);
}

[data-bs-theme="dark"] .profile-note-item {
    background: #141b24;
}

[data-bs-theme="dark"] .profile-card-title,
[data-bs-theme="dark"] .profile-section-title {
    color: #7eb8f0;
}

[data-bs-theme="dark"] .home-partner-logo {
    background: #141b24;
    border-color: var(--border);
}

[data-bs-theme="dark"] .footer-partner-logo-wrap {
    background: #fff;
}

[data-bs-theme="dark"] .profile-role-badge {
    background: rgba(15, 70, 133, 0.25);
    color: #9ec5f0;
}

@media (max-width: 991px) {
    .profile-card--settings {
        position: static;
    }
}

/* ── Admin users page ── */
.admin-users-page {
    padding-bottom: 24px;
}

.admin-users-create-head {
    margin-bottom: 20px;
}

.admin-users-create-title {
    margin: 0 0 8px;
    font-size: 1.2rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-users-create-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.admin-users-form .form-text {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.admin-users-submit {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-users-edit {
    border-color: rgba(12, 148, 149, 0.35);
}

.admin-users-edit-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-users-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    font-size: 0.9rem;
}

.admin-users-filters {
    background: var(--primary-light);
    border: 1px solid rgba(15, 70, 133, 0.12);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 18px;
}

.admin-users-filter-btn {
    width: 100%;
}

.admin-users-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.admin-users-toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-users-per-page label {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-users-count {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
}

.admin-users-table th {
    white-space: nowrap;
    font-size: 0.82rem;
}

.admin-users-sort-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.admin-users-sort-link:hover {
    color: var(--accent-dark);
}

.admin-users-sort-link.is-active {
    color: var(--accent-dark);
}

.admin-users-sort-icon {
    font-size: 0.72rem;
    opacity: 0.75;
}

.admin-users-actions-col {
    width: 110px;
    text-align: center;
}

.admin-users-actions {
    white-space: nowrap;
    text-align: center;
}

.admin-users-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
    margin: 0 1px;
}

.admin-users-action-btn:hover {
    transform: translateY(-1px);
}

.admin-users-action-btn--block {
    color: #c0392b;
    border-color: rgba(192, 57, 43, 0.25);
}

.admin-users-action-btn--block:hover {
    background: rgba(192, 57, 43, 0.08);
}

.admin-users-action-btn--edit {
    color: var(--primary);
}

.admin-users-action-btn--edit:hover {
    background: var(--primary-light);
}

.admin-users-action-btn--delete {
    color: #c0392b;
    border-color: rgba(192, 57, 43, 0.25);
}

.admin-users-action-btn--delete:hover {
    background: rgba(192, 57, 43, 0.08);
}

.admin-users-role {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--gray-bg);
    color: var(--text);
}

.admin-users-role--admin {
    background: rgba(15, 70, 133, 0.12);
    color: var(--primary);
}

.admin-users-role--moderator {
    background: rgba(12, 148, 149, 0.12);
    color: var(--accent-dark);
}

.admin-users-row--blocked {
    opacity: 0.72;
}

.admin-users-pagination {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

[data-bs-theme="dark"] .admin-users-filters {
    background: rgba(15, 70, 133, 0.18);
    border-color: var(--border);
}

[data-bs-theme="dark"] .admin-users-action-btn {
    background: #141b24;
    border-color: var(--border);
}

[data-bs-theme="dark"] .admin-users-role {
    background: #141b24;
}

@media (max-width: 768px) {
    .admin-users-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-users-table {
        overflow-x: auto;
    }
}

/* ── About page ── */
.about-page {
    max-width: 960px;
}

.about-header {
    margin-bottom: 28px;
}

.about-lead {
    font-size: 1.05rem;
    max-width: 720px;
}

.about-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.about-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.about-section h2 .bi {
    color: var(--accent);
    font-size: 1.2rem;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.about-feature {
    padding: 16px;
    background: var(--gray-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.about-feature h3 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.about-feature p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.about-steps {
    margin: 0;
    padding-left: 1.25rem;
}

.about-steps li {
    margin-bottom: 12px;
    line-height: 1.55;
}

.about-steps li:last-child {
    margin-bottom: 0;
}

.about-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.about-contact-card h3 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 14px;
}

.about-author {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.about-author-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.about-author p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 6px 0 0;
}

.about-contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

.about-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.92rem;
}

.about-contact-list .bi {
    color: var(--accent);
    margin-top: 2px;
    flex-shrink: 0;
}

.about-contact-list a {
    color: var(--primary);
}

.about-contact-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 24px;
}

[data-bs-theme="dark"] .about-section {
    background: #141b24;
    border-color: var(--border);
}

[data-bs-theme="dark"] .about-feature {
    background: rgba(255, 255, 255, 0.04);
}

