/* ===== БАЗА ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --navy: #0a2d52;
    --navy-dark: #06203d;
    --gold: #c9a227;
    --gold-light: #e6c352;
    --bg: #f5f7fa;
    --card: #ffffff;
    --text: #1f2933;
    --muted: #5b6b7b;
    --line: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(10, 45, 82, 0.06);
    --shadow-md: 0 6px 18px rgba(10, 45, 82, 0.10);
    --shadow-lg: 0 18px 40px rgba(10, 45, 82, 0.16);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.container { width: 92%; max-width: 1180px; margin: 0 auto; }

/* ===== ШАПКА ===== */
.header {
    position: sticky; top: 0; z-index: 50;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff;
    border-bottom: 3px solid var(--gold);
    box-shadow: var(--shadow-md);
}
.header-content {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem; padding: 1rem 0; flex-wrap: wrap;
}
.symbols-area { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.symbol-img {
    height: 58px; width: auto; object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
    transition: transform 0.25s ease;
}
.symbol-img:hover { transform: translateY(-2px); }
.flag-img { height: 48px; }
.emblem-img { height: 62px; }
.logo-area { flex: 1; min-width: 240px; }
.logo-text h1 {
    font-size: 1.45rem; font-weight: 800; letter-spacing: 0.2px;
    line-height: 1.2; margin-bottom: 0.25rem;
}
.logo-text span {
    font-size: 0.85rem; font-weight: 400; letter-spacing: 2.5px;
    text-transform: uppercase; opacity: 0.8;
}
.main-nav ul { list-style: none; display: flex; gap: 0.4rem; align-items: center; }
.main-nav a {
    position: relative; display: inline-block; color: #e8eef6;
    text-decoration: none; font-weight: 500; font-size: 0.95rem;
    padding: 0.55rem 0.9rem; border-radius: 6px;
    transition: color 0.25s, background 0.25s;
}
.main-nav a::after {
    content: ""; position: absolute; left: 50%; bottom: 4px;
    width: 0; height: 2px; background: var(--gold-light);
    transition: width 0.25s ease, left 0.25s ease;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.main-nav a:hover::after { width: 60%; left: 20%; }
.nav-admin { border: 1px solid rgba(255, 255, 255, 0.25); }

/* ===== СЕКЦИИ ===== */
.section { padding: 4rem 0; }
.section h2 {
    position: relative; font-size: 2rem; font-weight: 800;
    color: var(--navy); margin-bottom: 2.2rem; padding-left: 1.2rem; letter-spacing: 0.2px;
}
.section h2::before {
    content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
    width: 6px; border-radius: 3px;
    background: linear-gradient(180deg, var(--gold), var(--gold-light));
}
.section-subtitle { color: var(--muted); font-size: 1.02rem; margin-bottom: 2.2rem; max-width: 780px; }

.section-about { background: #fff; }
.about-content { max-width: 900px; font-size: 1.08rem; color: #2c3a48; }
.about-content p { margin-bottom: 1.1rem; text-align: justify; }

.appeal-cta { margin-top: 2rem; }

.section-tasks {
    background: linear-gradient(180deg, rgba(10, 45, 82, 0.04), transparent 60%), var(--bg);
}
.tasks-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem;
}
.task-card {
    position: relative; background: var(--card); padding: 1.7rem 1.6rem;
    border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    overflow: hidden;
}
.task-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
}
.task-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfd9e4; }
.task-card h3 { color: var(--navy); font-size: 1.15rem; font-weight: 700; margin-bottom: 0.7rem; }
.task-card p { color: #3c4a58; font-size: 0.98rem; }

.section-staff { background: #fff; }
.staff-list { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.staff-card {
    background: linear-gradient(180deg, #ffffff, #fbfcfe);
    border: 1px solid var(--line); border-left: 5px solid var(--navy);
    border-radius: 12px; padding: 1.6rem 1.8rem; box-shadow: var(--shadow-sm);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.staff-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.staff-info { display: flex; flex-direction: column; }
.staff-info h3 { color: var(--navy); font-size: 1.25rem; font-weight: 800; margin-bottom: 0.25rem; }
.staff-position {
    display: inline-block; align-self: flex-start; font-weight: 600; font-size: 0.82rem;
    text-transform: uppercase; letter-spacing: 0.8px; color: var(--navy);
    background: rgba(201, 162, 39, 0.14); border: 1px solid rgba(201, 162, 39, 0.35);
    padding: 0.28rem 0.7rem; border-radius: 999px; margin-bottom: 0.9rem;
}
.staff-bio { color: #3c4a58; font-size: 0.98rem; text-align: justify; }
.staff-bio strong { color: var(--navy); }
.staff-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }

/* ===== КНОПКИ ===== */
.btn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.55rem 1.1rem; font-size: 0.9rem; font-weight: 600;
    border-radius: 8px; text-decoration: none; border: 1px solid transparent;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
.btn-icon { font-size: 1rem; line-height: 1; }
.btn-more {
    background: var(--navy); color: #fff; box-shadow: 0 2px 6px rgba(10, 45, 82, 0.3);
}
.btn-more:hover {
    background: var(--gold); color: #fff; transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(201, 162, 39, 0.45);
}
.btn-arrow { transition: transform 0.2s ease; }
.btn-more:hover .btn-arrow { transform: translateX(3px); }
.btn-telegram {
    background: #229ED9; color: #fff; box-shadow: 0 2px 6px rgba(34, 158, 217, 0.35);
}
.btn-telegram:hover {
    background: #1b87ba; transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(34, 158, 217, 0.45);
}
.btn-appeal {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--navy-dark); font-size: 1.05rem; padding: 0.85rem 1.8rem;
    box-shadow: 0 6px 18px rgba(201, 162, 39, 0.45);
}
.btn-appeal:hover {
    transform: translateY(-2px); box-shadow: 0 10px 26px rgba(201, 162, 39, 0.6);
}
.btn-cancel {
    background: transparent; color: var(--navy); border-color: #c4cfdb;
}
.btn-cancel:hover { background: #eef2f7; border-color: var(--navy); }
.btn-appeal-submit {
    background: var(--navy); color: #fff; box-shadow: 0 2px 6px rgba(10, 45, 82, 0.3);
}
.btn-appeal-submit:hover {
    background: var(--gold); transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(201, 162, 39, 0.45);
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(6, 32, 61, 0.65);
    display: none; align-items: center; justify-content: center;
    padding: 1.5rem; overflow-y: auto;
    backdrop-filter: blur(2px);
}
.modal-overlay.is-open { display: flex; }
.modal {
    position: relative; background: #fff; border-radius: 16px;
    width: 100%; max-width: 640px; padding: 2.2rem 2rem;
    box-shadow: var(--shadow-lg); animation: modalIn 0.25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal h2 {
    color: var(--navy); font-size: 1.5rem; font-weight: 800;
    margin-bottom: 0.4rem; padding-right: 2rem;
}
.modal-subtitle { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.4rem; }
.modal-close {
    position: absolute; top: 0.7rem; right: 0.9rem;
    background: transparent; border: none; font-size: 1.8rem; line-height: 1;
    color: var(--muted); cursor: pointer; border-radius: 6px; padding: 0.1rem 0.5rem;
    transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: #eef2f7; color: var(--navy); }

.appeal-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: flex; flex-direction: column; gap: 0.35rem; }
.form-row label { font-weight: 600; font-size: 0.88rem; color: var(--navy); }
.form-row .req { color: #c0392b; }
.form-row input, .form-row select, .form-row textarea {
    font-family: inherit; font-size: 0.95rem; color: var(--text);
    padding: 0.65rem 0.8rem; border: 1px solid var(--line); border-radius: 8px;
    background: #fbfcfe; transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    border-color: var(--navy); box-shadow: 0 0 0 3px rgba(10, 45, 82, 0.12);
}
.form-row textarea { resize: vertical; min-height: 100px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-2 > div { display: flex; flex-direction: column; gap: 0.35rem; }
.form-row-2 label { font-weight: 600; font-size: 0.88rem; color: var(--navy); }

.form-error { color: #c0392b; font-size: 0.88rem; min-height: 1.1rem; margin: 0; }
.form-actions {
    display: flex; justify-content: flex-end; gap: 0.7rem; margin-top: 0.5rem;
    flex-wrap: wrap;
}
.appeal-success { text-align: center; padding: 1.5rem 0.5rem; }
.success-title { font-size: 1.3rem; font-weight: 800; color: var(--navy); margin-bottom: 0.6rem; }
.appeal-success p { color: #3c4a58; margin-bottom: 1.2rem; }

/* ===== НОМЕР ОБРАЩЕНИЯ В ОКНЕ УСПЕХА ===== */
.success-number {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--navy);
    background: rgba(201, 162, 39, 0.15);
    border: 1px dashed var(--gold);
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    letter-spacing: 1px;
    margin: 0.2rem 0 1.2rem;
}

/* ===== СТРАНИЦЫ БИОГРАФИЙ ===== */
.bio-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff; padding: 3.5rem 0; border-bottom: 3px solid var(--gold);
}
.bio-hero-content { display: flex; align-items: center; gap: 2.2rem; flex-wrap: wrap; }
.bio-eyebrow {
    text-transform: uppercase; letter-spacing: 2.5px; font-size: 0.78rem;
    opacity: 0.8; margin-bottom: 0.5rem;
}
.bio-hero-info h1 { font-size: 2rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.4rem; }
.bio-role { font-size: 1.05rem; opacity: 0.9; margin-bottom: 1.2rem; }
.bio-hero .btn-telegram { background: #229ED9; }
.bio-section { padding: 3.5rem 0; background: #fff; }
.bio-section-alt { background: var(--bg); }
.bio-section h2 {
    position: relative; font-size: 1.7rem; font-weight: 800; color: var(--navy);
    margin-bottom: 2rem; padding-left: 1.2rem;
}
.bio-section h2::before {
    content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 6px;
    border-radius: 3px; background: linear-gradient(180deg, var(--gold), var(--gold-light));
}
.bio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.bio-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.bio-card h3 { color: var(--navy); font-size: 1.08rem; font-weight: 700; margin-bottom: 0.7rem; }
.bio-card p { color: #3c4a58; font-size: 0.96rem; margin-bottom: 0.35rem; }
.bio-list { list-style: none; padding: 0; }
.bio-list li {
    position: relative; padding-left: 1.2rem; margin-bottom: 0.4rem;
    color: #3c4a58; font-size: 0.96rem;
}
.bio-list li::before { content: "▸"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.bio-timeline { position: relative; padding-left: 1.8rem; }
.bio-timeline::before {
    content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
    width: 3px; background: linear-gradient(180deg, var(--gold), var(--navy)); border-radius: 2px;
}
.bio-timeline-item { position: relative; margin-bottom: 2rem; }
.bio-timeline-marker {
    position: absolute; left: -1.8rem; top: 6px; width: 17px; height: 17px;
    border-radius: 50%; background: var(--gold); border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--navy);
}
.bio-timeline-body {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: 1.4rem 1.6rem; box-shadow: var(--shadow-sm);
}
.bio-period {
    font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--gold); margin-bottom: 0.4rem;
}
.bio-timeline-body h3 { color: var(--navy); font-size: 1.12rem; font-weight: 700; margin-bottom: 0.25rem; }
.bio-job { font-weight: 600; color: var(--navy); margin-bottom: 0.8rem; }
.bio-timeline-body ul { list-style: none; padding: 0; }
.bio-timeline-body li {
    position: relative; padding-left: 1.2rem; margin-bottom: 0.35rem;
    color: #3c4a58; font-size: 0.96rem;
}
.bio-timeline-body li::before { content: "▸"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.bio-document {
    background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--navy);
    border-radius: 12px; padding: 2rem 2.2rem; box-shadow: var(--shadow-sm); max-width: 900px;
}
.bio-document-lead {
    font-size: 1.05rem; color: var(--navy); font-weight: 600; margin-bottom: 1.4rem;
    padding-bottom: 1.2rem; border-bottom: 1px solid var(--line);
}
.bio-document p { margin-bottom: 1rem; text-align: justify; color: #3c4a58; }
.bio-document p strong { color: var(--navy); }
.bio-conclusion {
    margin-top: 1.4rem; padding: 1rem 1.2rem;
    background: rgba(201, 162, 39, 0.10); border-left: 4px solid var(--gold);
    border-radius: 6px; color: var(--navy) !important;
}
.bio-signature {
    margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); text-align: right;
}
.bio-signature p { margin-bottom: 0.3rem; }
.bio-signature-name { font-size: 1.1rem; font-weight: 800; color: var(--navy); letter-spacing: 0.5px; }
.bio-signature-meta { font-size: 0.82rem; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.bio-back { padding: 2.5rem 0; background: #fff; text-align: center; }

/* ===== СТРАНИЦА a.html ===== */
.admin-login { padding: 4rem 0; background: #fff; min-height: 60vh; }
.login-card {
    max-width: 420px; margin: 0 auto; background: var(--card);
    border: 1px solid var(--line); border-radius: 16px;
    padding: 2.2rem 2rem; box-shadow: var(--shadow-md);
}
.login-card h2 { color: var(--navy); font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.login-subtitle { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; }
.login-form { display: flex; flex-direction: column; gap: 0.8rem; }
.login-form label { font-weight: 600; font-size: 0.88rem; color: var(--navy); }
.login-form input {
    font-family: inherit; font-size: 1rem; padding: 0.7rem 0.9rem;
    border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.login-form input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(10, 45, 82, 0.12); }

.admin-panel { padding: 3rem 0; background: var(--bg); min-height: 60vh; }
.admin-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem;
}
.admin-head h2 {
    position: relative; font-size: 1.7rem; font-weight: 800; color: var(--navy);
    padding-left: 1.2rem;
}
.admin-head h2::before {
    content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 6px;
    border-radius: 3px; background: linear-gradient(180deg, var(--gold), var(--gold-light));
}
.admin-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.admin-counter { color: var(--muted); margin-bottom: 1.2rem; }
.admin-counter strong { color: var(--navy); font-size: 1.1rem; }
.admin-empty {
    background: #fff; border: 1px dashed var(--line); border-radius: 12px;
    padding: 2rem; text-align: center; color: var(--muted);
}
.admin-table-wrap {
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow-sm); overflow-x: auto;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 900px; }
.admin-table th {
    background: var(--navy); color: #fff; text-align: left;
    padding: 0.75rem 0.9rem; font-weight: 700; font-size: 0.82rem;
    text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
}
.admin-table td {
    padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line);
    color: #3c4a58; vertical-align: top;
}
.admin-table tbody tr:hover { background: #f5f9ff; }
.admin-table .cell-message { max-width: 320px; white-space: pre-wrap; word-break: break-word; }
.admin-table td:first-child { white-space: nowrap; }
.btn-row-del {
    background: transparent; border: 1px solid #f0c4c4; color: #c0392b;
    border-radius: 6px; padding: 0.25rem 0.6rem; cursor: pointer;
    font-weight: 700; transition: background 0.2s;
}
.btn-row-del:hover { background: #fdeaea; }

/* ===== ПОДВАЛ ===== */
.footer {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    color: #cfd9e4; text-align: center; padding: 2.4rem 0;
    border-top: 3px solid var(--gold); font-size: 0.9rem; line-height: 1.8;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 992px) {
    .header-content { flex-direction: column; text-align: center; gap: 0.8rem; }
    .logo-area { min-width: auto; }
    .symbols-area { justify-content: center; width: 100%; }
    .main-nav ul { flex-wrap: wrap; justify-content: center; }
    .main-nav a { padding: 0.45rem 0.75rem; }
    .bio-hero-content { flex-direction: column; text-align: center; }
    .bio-hero-info h1 { font-size: 1.6rem; }
}

@media (max-width: 768px) {
    .symbol-img { height: 44px; }
    .flag-img { height: 36px; }
    .emblem-img { height: 47px; }

    .section { padding: 2.6rem 0; }
    .section h2 { font-size: 1.55rem; }

    .staff-card {
        padding: 1.4rem 1.3rem; text-align: center; border-left-width: 4px;
    }
    .staff-position { align-self: center; }
    .staff-bio { text-align: left; }
    .staff-actions { justify-content: center; }
    .btn { flex: 1 1 100%; justify-content: center; }

    .bio-section { padding: 2.4rem 0; }
    .bio-section h2 { font-size: 1.4rem; }
    .bio-document { padding: 1.4rem 1.2rem; }
    .bio-timeline { padding-left: 1.4rem; }
    .bio-timeline-marker { left: -1.4rem; }
    .bio-signature { text-align: left; }

    .modal { padding: 1.6rem 1.2rem; }
    .form-row-2 { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
    .admin-head { flex-direction: column; align-items: flex-start; }
    .admin-actions { width: 100%; }
    .admin-actions .btn { flex: 1 1 auto; }
}