body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f3f6fb;
    color: #222;
}

.navbar {
    background: #1d3557;
    color: #fff;
    padding: 1rem 0;
}

.nav-container {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1050px; margin: 0 auto; padding: 0 2rem;
}

.logo {
    font-size: 1.2rem; font-weight: bold; color: #fff; text-decoration: none;
}

.nav-menu {
    display: flex; gap: 1.5rem; list-style: none;
}
.nav-menu a {
    color: #fff; text-decoration: none; padding: 0.5rem 1rem; border-radius: 4px; transition: background 0.2s;
}
.nav-menu a:hover { background: #457b9d; }

.container { max-width: 900px; margin: 2.5rem auto; padding: 0 1.5rem; }

.intro-section {
    padding: 3.5rem 0 2rem 0;
    text-align: center;
}
.intro-content h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.intro-content .lead {
    font-size: 1.2rem;
    color: #406080;
    margin-bottom: 2rem;
}
.btn-main {
    background: linear-gradient(90deg, #457b9d, #1d3557);
    color: #fff; border: none; border-radius: 8px; padding: 0.9rem 2.5rem; font-size: 1rem;
    font-weight: 600; text-decoration: none; cursor: pointer; transition: box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 6px 16px rgba(40, 70, 120, 0.11);
}
.btn-main:hover { box-shadow: 0 8px 22px rgba(36, 60, 110, 0.16); transform: translateY(-1px); }

.how-section { background: #fff; border-radius: 12px; max-width: 670px; margin: 3rem auto; padding: 2rem; box-shadow: 0 2px 16px rgba(52,109,208,0.06);}
.how-section h2 { font-size: 1.3rem; margin-bottom: 1.1rem; }
.steps-list { display: flex; flex-wrap: wrap; gap: 2rem;}
.step-item { display:flex; align-items:center; gap:1.2rem;}
.step-number {
    width: 32px; height: 32px; min-width:32px;
    border-radius: 50%;
    background: #a8dadc;
    color: #1d3557;
    font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.step-description strong { display: block; margin-bottom: 2px;}
.step-description span { color: #406080; font-size: 0.93rem;}

.page-footer { background: #1d3557; color: #fff; padding: 2rem 0; margin-top: 2rem; }
.footer-content { text-align: center; font-size: 0.98rem; display: flex; gap:2.5rem; justify-content: center; }

@media (max-width:650px) {
    .nav-container { flex-direction: column; gap:1rem; }
    .steps-list { flex-direction: column; gap: 1.2rem; }
    .how-section { padding: 1.2rem;}
}

.sign-hero {
    text-align: center; background: #fff; border-radius: 12px; padding: 2.2rem 1rem 1.2rem 1rem;
    margin-bottom: 1.5rem; box-shadow: 0 2px 16px rgba(52,109,208,0.06);
}
.sign-hero h1 { font-size: 2rem; margin-bottom:0.5rem;}
.sign-hero .lead { color: #406080; margin-bottom:1rem; }
.progress { display: flex; align-items: center; justify-content:center; gap: 0.5rem;}
.dot { width: 13px; height:13px; border-radius: 50%; background: #a8dadc; display:inline-block;}
.bar { width:38px; height:3px; border-radius:2px; background: #f5f6f8; }
.dot.active { background: #457b9d;}
.sign-main { background: #fff; border-radius: 12px; box-shadow: 0 2px 16px rgba(52,109,208,0.06); padding: 2rem 1rem; max-width: 520px; margin: 0 auto 2.5rem; }

.sign-step { display:block; margin-bottom: 1.2rem;}
.sign-step[style*="none"] { display:none!important; }
.sign-step h2 { font-size: 1.15rem; margin-bottom: 1rem;}

.upload-block, .cert-block, .sign-block { display: flex; flex-direction: column; gap: 1.2rem; align-items: stretch;}

input[type="file"] { display:none; }
#file-list, .file-list-container { font-size:0.98em; margin-top:0.2rem; color:#1d3557;}
#file-list .file-item { padding: 0.6rem 0.7rem; border-radius: 6px; background: #f3f6fb; margin-bottom: 0.4rem; border-left:4px solid #a8dadc;}
.btn-next { background:#457b9d; color:#fff; border:none; border-radius:6px; font-weight:600; padding:0.7rem 1.7rem; cursor:pointer; font-size:1rem;}
.btn-next[disabled] { background:#bababa; color:#fff; cursor:not-allowed; }
.btn-back { background: #95a5a6; color: #fff; border:none; border-radius:6px; padding:0.7rem 1.5rem; font-weight:500; cursor:pointer; }
.block-actions { display:flex; gap:0.7rem; margin-top: 1.1rem;}
.cert-select { width:100%; padding:0.7rem 0.7rem; border:1px solid #e0e0e0; border-radius:6px; font-size:1rem; }
.cert-info-display { font-size:0.96em; background:#f3f6fb; border-radius:6px; padding:0.8rem; margin-top:0.2rem;}

.result-container { margin-top:2.2rem;}
.plugin-status-container { margin-top:1rem; }

@media (max-width:500px) {
    .sign-main { padding: 1rem 0.4rem;}
    .sign-hero { padding:1.2rem 0.4rem;}
}

.page-footer {
    background: #1d3557;
    color: #fff;
    padding: 2rem 0 1.2rem 0;
    margin-top: 2rem;
    border-top: 1px solid #42587b;
}

.footer-content {
    text-align: center;
    font-size: 0.98rem;
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.footer-dev {
    text-align: center;
    font-size: 0.96em;
    color: #c7d5ec;
    margin: 10px 0 0 0;
    line-height: 1.4;
}

.page-footer a {
    color: #ffe082;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 224, 130, 0.6);
    transition: color 0.18s;
}
.page-footer a:hover {
    color: #fff3cd;
    border-bottom: 1px solid #ffe082;
}

/* Сноска на шаге загрузки файлов */
.file-removal-note {
    font-size: 0.95em;
    color: #bcd0ee;
    margin-top: 6px;
}

/* Мобильная адаптивность футера */
@media (max-width:650px) {
    .footer-content {
        flex-direction: column;
        gap: 0.8rem;
    }
    .footer-dev {
        font-size: 0.93em;
        margin-top: 0.7em;
    }
}

/* Информационный баннер */
.info-banner {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
    border: 2px solid #06b6d4;
    border-radius: 12px;
    cursor: help;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(6, 182, 212, 0.1);
}

.info-banner:hover {
    background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
    border-color: #0891b2;
    box-shadow: 0 10px 15px -3px rgba(6, 182, 212, 0.2);
    transform: translateY(-2px);
}

.info-banner .info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #0891b2;
    flex-shrink: 0;
}

.info-banner .info-icon svg {
    width: 24px;
    height: 24px;
}

.info-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0c4a6e;
    user-select: none;
}

/* Tooltip стили */
.tooltip-content {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #06b6d4;
    border-radius: 16px;
    padding: 24px;
    width: 480px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    pointer-events: none;
}

.tooltip-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #06b6d4;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 9px solid #ffffff;
}

.info-banner:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(4px);
    pointer-events: auto;
}

.tooltip-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0891b2;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0f2fe;
}

.tooltip-content p {
    font-size: 0.98rem;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 12px;
    text-align: left;
}

.tooltip-content p:last-of-type {
    margin-bottom: 14px;
}

.tooltip-content strong {
    color: #0f172a;
    font-weight: 600;
}

.tooltip-highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 14px 18px;
    border-radius: 10px;
    margin-top: 14px;
}

.tooltip-highlight strong {
    color: #92400e;
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}

/* Анимация пульсации */
@keyframes infoPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

.info-banner:hover .info-icon {
    animation: infoPulse 0.6s ease-in-out;
}

/* Адаптация для планшетов */
@media (max-width: 992px) {
    .tooltip-content {
        width: 420px;
    }
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .info-banner {
        padding: 12px 16px;
        gap: 8px;
    }

    .info-text {
        font-size: 0.95rem;
    }

    .tooltip-content {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 50%;
        width: auto;
        transform: translateX(0) translateY(-50%);
        padding: 20px;
    }

    .info-banner:hover .tooltip-content {
        transform: translateX(0) translateY(-50%);
    }

    .tooltip-content::before,
    .tooltip-content::after {
        display: none;
    }

    .tooltip-title {
        font-size: 1.05rem;
    }

    .tooltip-content p {
        font-size: 0.92rem;
    }
}

@media (max-width: 480px) {
    .info-banner {
        flex-direction: row;
        padding: 10px 14px;
    }

    .info-text {
        font-size: 0.9rem;
    }

    .info-banner .info-icon {
        width: 20px;
        height: 20px;
    }

    .info-banner .info-icon svg {
        width: 20px;
        height: 20px;
    }
}
.intro-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-menu a[target="_blank"]::after {
    content: " ↗";
    font-size: 0.85em;
    opacity: 0.7;
    margin-left: 0.2em;
}
