:root {
    --blue-900: #1a3a5c;
    --blue-800: #24507a;
    --blue-700: #2e6aa0;
    --blue-600: #3b82c4;
    --blue-500: #4a9ad4;
    --blue-400: #6bb3e0;
    --blue-300: #9ecfee;
    --blue-100: #e3f2fb;
    --blue-50: #f4f9fd;
    --white: #ffffff;
    --gray-100: #fafbfc;
    --gray-200: #eef1f4;
    --gray-300: #e0e5ea;
    --gray-500: #7a8490;
    --gray-700: #4a5560;
    --gray-900: #2c3540;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --shadow: 0 4px 18px rgba(30, 80, 140, 0.08);
    --shadow-lg: 0 8px 32px rgba(30, 80, 140, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(165deg, #f7fbfe 0%, #eef6fc 35%, #ffffff 100%);
    color: var(--gray-900);
    min-height: 100vh;
    line-height: 1.6;
}

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(74, 154, 212, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(59, 130, 196, 0.05) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    background: var(--white);
    color: var(--blue-900);
    padding: 14px 0;
    box-shadow: 0 2px 12px rgba(30, 80, 140, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--blue-100);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    font-size: 32px;
    background: var(--blue-50);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.3px;
}

.logo-subtitle {
    font-size: 13px;
    opacity: 0.85;
    font-weight: 400;
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-btn {
    background: transparent;
    border: 2px solid transparent;
    color: var(--blue-700);
    padding: 10px 18px;
    border-radius: 30px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.nav-btn:hover {
    background: var(--blue-50);
    color: var(--blue-800);
}

.nav-btn.active {
    background: var(--blue-500);
    color: white;
    border-color: var(--blue-500);
}

.admin-btn {
    opacity: 0.35;
    font-size: 16px;
    padding: 8px 12px;
    min-width: 40px;
}

.admin-btn:hover {
    opacity: 0.7;
}

/* Main */
.main {
    padding: 32px 0 80px;
    min-height: calc(100vh - 200px);
}

.section {
    display: none;
    animation: fadeIn 0.35s ease;
}

.section.active {
    display: block;
}

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

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    color: var(--blue-900);
    margin-bottom: 10px;
}

.section-desc {
    color: var(--gray-500);
    font-size: 16px;
}

/* Candidates Grid */
.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.candidate-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 1px solid var(--blue-100);
}

.candidate-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.candidate-photo-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
    overflow: hidden;
}

.candidate-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidate-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: var(--blue-300);
}

.annulled-overlay {
    position: absolute;
    inset: 0;
    background: rgba(231, 76, 60, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.annulled-text {
    color: white;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 3px;
    text-transform: uppercase;
    transform: rotate(-15deg);
    border: 4px solid white;
    padding: 8px 20px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.candidate-info {
    padding: 22px;
    text-align: center;
}

.candidate-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--blue-900);
    margin-bottom: 6px;
}

.candidate-class {
    display: inline-block;
    background: var(--blue-50);
    color: var(--blue-700);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.candidate-votes {
    font-size: 14px;
    color: var(--gray-500);
}

.candidate-votes strong {
    color: var(--blue-600);
    font-size: 18px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.hidden {
    display: none !important;
}

/* Vote section */
.vote-card {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    max-width: 640px;
    margin: 0 auto;
    box-shadow: var(--shadow);
    border: 2px solid var(--blue-100);
}

.vote-card h2 {
    text-align: center;
    color: var(--blue-900);
    margin-bottom: 28px;
    font-size: 24px;
    position: relative;
}

.vote-card h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--blue-500), var(--blue-300));
    margin: 12px auto 0;
    border-radius: 2px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--blue-800);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="file"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.2s;
    background: var(--gray-100);
}

.form-group input:focus {
    outline: none;
    border-color: var(--blue-500);
    background: white;
}

.vote-candidates-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.vote-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--gray-100);
}

.vote-option:hover {
    border-color: var(--blue-300);
    background: var(--blue-50);
}

.vote-option.selected {
    border-color: var(--blue-500);
    background: var(--blue-50);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.vote-option input {
    display: none;
}

.vote-option-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--blue-100);
    flex-shrink: 0;
}

.vote-option-info {
    flex: 1;
}

.vote-option-name {
    font-weight: 600;
    color: var(--blue-900);
}

.vote-option-class {
    font-size: 13px;
    color: var(--gray-500);
}

.vote-option.annulled {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.vote-option.annulled::after {
    content: 'АННУЛИРОВАН';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.45);
}

.btn-success {
    background: linear-gradient(135deg, #219653, var(--success));
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #c0392b, var(--danger));
    color: white;
}

.btn-secondary {
    background: var(--blue-100);
    color: var(--blue-800);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--blue-500);
    color: var(--blue-600);
}

.btn-outline:hover {
    background: var(--blue-50);
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 17px;
    margin-top: 10px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-weight: 500;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.alert-warning {
    background: #fef5e7;
    color: #9a7b0a;
    border: 1px solid #f9e79f;
}

.alert-info {
    background: #e8f6f3;
    color: #0e6655;
    border: 1px solid #a3e4d7;
}

/* Results */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: white;
    padding: 24px 36px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 140px;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--blue-700);
}

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-item {
    background: white;
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.result-rank {
    width: 36px;
    height: 36px;
    background: var(--blue-100);
    color: var(--blue-700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.result-rank.gold { background: #f7dc6f; color: #7d6608; }
.result-rank.silver { background: #d5dbdb; color: #566573; }
.result-rank.bronze { background: #edbb99; color: #6e2c00; }

.result-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--blue-100);
    flex-shrink: 0;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-name {
    font-weight: 600;
    color: var(--blue-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-class {
    font-size: 13px;
    color: var(--gray-500);
}

.result-bar-wrap {
    flex: 1.5;
    height: 12px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    margin: 0 12px;
}

.result-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
    border-radius: 6px;
    transition: width 0.6s ease;
}

.result-votes {
    font-weight: 700;
    color: var(--blue-700);
    min-width: 50px;
    text-align: right;
}

/* Admin */
.admin-login {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.login-card {
    background: white;
    padding: 48px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 420px;
    width: 100%;
    border: 1px solid var(--blue-100);
}

.login-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.login-card h2 {
    color: var(--blue-900);
    margin-bottom: 8px;
}

.login-card p {
    color: var(--gray-500);
    margin-bottom: 24px;
    font-size: 14px;
}

.login-hint {
    margin-top: 16px;
    font-size: 13px;
    color: var(--gray-500);
}

.login-hint code {
    background: var(--blue-50);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--blue-700);
    font-weight: 600;
}

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

.admin-card h3 {
    color: var(--blue-900);
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-desc {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 16px;
    margin-top: -12px;
}

.election-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.status-badge {
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    background: var(--gray-200);
    color: var(--gray-700);
}

.status-badge.active {
    background: #d5f5e3;
    color: #1e8449;
}

.status-badge.finished {
    background: #fadbd8;
    color: #922b21;
}

.control-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-row .form-group {
    flex: 1;
    min-width: 180px;
}

.photo-upload {
    position: relative;
}

.photo-preview {
    position: relative;
    width: 120px;
    height: 120px;
    margin-top: 12px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--blue-200);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-candidates-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-candidate-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
}

.admin-candidate-item.annulled {
    opacity: 0.7;
    background: #fdf2f2;
}

.admin-cand-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--blue-100);
}

.admin-cand-info {
    flex: 1;
}

.admin-cand-name {
    font-weight: 600;
    color: var(--blue-900);
}

.admin-cand-meta {
    font-size: 13px;
    color: var(--gray-500);
}

.admin-cand-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 20px;
}

.employees-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.employee-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--blue-50);
    border-radius: var(--radius-sm);
}

.employee-info {
    display: flex;
    flex-direction: column;
}

.employee-name {
    font-weight: 600;
    color: var(--blue-900);
}

.employee-pos {
    font-size: 13px;
    color: var(--gray-500);
}

.danger-zone {
    border-color: #f5b7b1;
    background: #fdf2f2;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--blue-900);
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Footer */
.footer {
    background: var(--blue-50);
    color: var(--blue-800);
    text-align: center;
    padding: 28px 0;
    font-size: 14px;
    border-top: 1px solid var(--blue-100);
}

.footer-note {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav {
        width: 100%;
        overflow-x: auto;
    }
    
    .section-header h1 {
        font-size: 26px;
    }
    
    .vote-card {
        padding: 24px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .stats-bar {
        gap: 16px;
    }
    
    .stat-item {
        padding: 16px 24px;
        min-width: 110px;
    }
    
    .result-item {
        flex-wrap: wrap;
    }
    
    .result-bar-wrap {
        order: 10;
        width: 100%;
        margin: 8px 0 0;
    }
}

/* ========== HERO TEXT (separate from images) ========== */
.hero-text-block {
    background: linear-gradient(135deg, #e8f4fc 0%, #f4f9fd 100%);
    padding: 36px 0 28px;
    text-align: center;
    border-bottom: 1px solid var(--blue-100);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: var(--blue-900);
    line-height: 1.3;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--blue-700);
    font-weight: 500;
}

/* ========== IMAGE SLIDER 16:9 (одинаково на ПК и телефоне) ========== */
.hero-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    max-height: 480px;
    overflow: hidden;
    background: var(--blue-100);
    border-radius: 0;
    box-shadow: none;
}

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s ease;
}

.slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.85);
    color: var(--blue-800);
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    transition: background 0.2s;
}

.slider-btn:hover {
    background: white;
}

.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }

.slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.slider-dot.active {
    background: white;
}

.slider-admin-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.slider-admin-item {
    position: relative;
    width: 140px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--blue-100);
}

.slider-admin-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-admin-item .remove-slide {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .hero-title { font-size: 22px; }
    .hero-subtitle { font-size: 14px; }
    .hero-text-block { padding: 24px 0 18px; }
    .hero-slider {
        margin: 0;
        border-radius: 0;
        max-width: 100%;
        width: 100%;
        max-height: 240px;
    }
}

/* Cloud banner */
.cloud-banner {
    background: #fff3cd;
    color: #856404;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    border-bottom: 1px solid #ffc107;
    position: relative;
    z-index: 90;
}
.cloud-banner.cloud-ok {
    background: #d4edda;
    color: #155724;
    border-bottom-color: #c3e6cb;
}
.cloud-banner code {
    background: rgba(0,0,0,0.06);
    padding: 1px 6px;
    border-radius: 4px;
}

/* QR Modal */
.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.qr-modal.hidden { display: none !important; }
.qr-modal-content {
    background: white;
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.qr-modal-content h2 {
    color: var(--blue-900);
    margin-bottom: 8px;
    font-size: 20px;
}
.qr-modal-content > p {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 16px;
}
.qr-reader {
    width: 100%;
    max-width: 320px;
    margin: 0 auto 12px;
    min-height: 200px;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
}
.qr-status {
    font-size: 13px;
    color: var(--blue-700);
    margin-bottom: 12px !important;
}
.qr-print-code {
    display: flex;
    justify-content: center;
    margin: 16px auto;
}
.qr-print-name {
    font-weight: 700;
    font-size: 18px;
    color: var(--blue-900);
    margin: 8px 0 4px !important;
}
.qr-print-pos {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 16px !important;
}
.qr-print-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

@media print {
    body * { visibility: hidden; }
    .qr-print-box, .qr-print-box * { visibility: visible; }
    .qr-print-box {
        position: absolute;
        left: 50%;
        top: 40%;
        transform: translate(-50%, -50%);
        box-shadow: none;
    }
    .qr-print-actions { display: none !important; }
}

/* Confirm code on print card */
.confirm-code-block {
    margin: 16px 0;
    padding: 14px;
    background: var(--blue-50);
    border: 2px dashed var(--blue-400);
    border-radius: 12px;
    text-align: center;
}
.confirm-code-label {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 6px;
}
.confirm-code-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--blue-900);
    font-family: monospace;
}

.qr-code-entry {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}
.qr-or {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 8px !important;
}
.qr-code-entry input {
    width: 100%;
    max-width: 200px;
    padding: 10px 12px;
    border: 2px solid var(--blue-300);
    border-radius: 10px;
    margin-bottom: 8px;
}
.qr-code-entry .btn {
    display: inline-block;
}

/* ===== Employee badge ALBUM 8.5cm × 5.3cm ===== */
.badge-hint {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.employee-badge {
    width: 8.5cm;
    height: 5.3cm;
    margin: 12px auto;
    border: 1.5px solid #1a3a5c;
    border-radius: 6px;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    page-break-inside: avoid;
}

.badge-left {
    width: 58%;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(90deg, #e8f4fc 0%, #ffffff 70%);
    border-right: 1px solid #c5daf0;
}

.badge-header {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2e6aa0;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: left;
}

.badge-position {
    font-size: 11px;
    color: #4a5560;
    text-align: left;
    margin-bottom: 6px;
    line-height: 1.25;
    word-break: break-word;
}

.badge-name {
    font-size: 14px;
    font-weight: 800;
    color: #1a3a5c;
    text-align: left;
    line-height: 1.25;
    word-break: break-word;
}

.badge-right {
    width: 42%;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.badge-qr {
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 0;
}

.badge-qr img,
.badge-qr canvas {
    width: 90px !important;
    height: 90px !important;
}

.badge-code-label {
    font-size: 9px;
    color: #7a8490;
    margin-top: 4px;
    text-transform: uppercase;
}

.badge-code {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #1a3a5c;
    font-family: monospace;
    margin-top: 2px;
}

/* Печать с основной страницы — только бейдж, 1 лист */
@media print {
    @page { size: A4 landscape; margin: 10mm; }
    html, body {
        background: #fff !important;
        height: auto !important;
        overflow: hidden !important;
    }
    body * { visibility: hidden !important; }
    .employee-badge, .employee-badge * { visibility: visible !important; }
    .employee-badge {
        position: absolute !important;
        left: 10mm !important;
        top: 10mm !important;
        width: 8.5cm !important;
        height: 5.3cm !important;
        box-shadow: none !important;
        margin: 0 !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .no-print,
    .header, .footer, .main, .hero-text-block, .hero-slider,
    .cloud-banner, #publish-banner, #toast, .bg-pattern {
        display: none !important;
    }
    .qr-modal {
        position: static !important;
        background: transparent !important;
        inset: auto !important;
        display: block !important;
        padding: 0 !important;
    }
    .qr-modal-content {
        box-shadow: none !important;
        padding: 0 !important;
        max-width: none !important;
        background: transparent !important;
    }
}
