:root {
    --primary: #1666c4;
    --primary-dark: #0a3f86;
    --primary-deep: #062b63;
    --primary-soft: #eaf3fd;
    --accent: #38bdf8;
    --bg: #f3f7fc;
    --card: #ffffff;
    --text: #0f1d2e;
    --muted: #5b6b80;
    --border: #e4ecf5;
    --success: #0f9d58;
    --ring: rgba(22, 102, 196, 0.14);
    --radius: 16px;
    --grad: linear-gradient(135deg, #1666c4 0%, #0a3f86 55%, #062b63 100%);
    --grad-soft: linear-gradient(135deg, #eaf3fd 0%, #d8eafc 100%);
    --shadow-sm: 0 1px 2px rgba(15, 29, 46, 0.04), 0 1px 3px rgba(15, 29, 46, 0.06);
    --shadow-md: 0 6px 24px rgba(15, 29, 46, 0.07);
    --shadow-lg: 0 18px 50px rgba(10, 63, 134, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }

main { flex: 1 0 auto; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* ===== Header ===== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
.logo-circle {
    width: 46px; height: 46px; border-radius: 13px;
    background: var(--grad-soft); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 17px; flex-shrink: 0; overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--border);
}
.logo-circle img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.site-header h1 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.site-header p { font-size: 12.5px; color: var(--muted); margin-top: -2px; }
.header-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-link {
    font-size: 14px; font-weight: 600; color: var(--muted);
    padding: 9px 16px; border-radius: 10px; transition: all 0.2s ease;
}
.nav-link:hover { color: var(--primary); background: var(--primary-soft); }

/* ===== Burger (mobile) ===== */
.burger {
    display: none; margin-left: auto; width: 44px; height: 44px;
    border: 1px solid var(--border); border-radius: 11px; background: #fff;
    cursor: pointer; padding: 0; flex-direction: column; align-items: center;
    justify-content: center; gap: 5px; transition: all 0.2s ease;
}
.burger span {
    display: block; width: 20px; height: 2px; border-radius: 2px;
    background: var(--primary); transition: transform 0.25s ease, opacity 0.2s ease;
}
.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.header-admin-link {
    margin-left: auto; color: var(--primary); font-weight: 600; font-size: 14px;
    padding: 9px 18px; border-radius: 10px; border: 1px solid var(--border);
    background: #fff; transition: all 0.2s ease;
}
.header-admin-link:hover { border-color: var(--primary); background: var(--primary-soft); }

/* ===== Hero ===== */
.hero {
    position: relative; text-align: center; padding: 76px 20px 96px;
    color: #fff; overflow: hidden;
    background: var(--grad);
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(56, 189, 248, 0.35), transparent 42%),
        radial-gradient(circle at 85% 12%, rgba(255, 255, 255, 0.18), transparent 40%);
    pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
    display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em;
    color: #eaf3fd; background: rgba(255, 255, 255, 0.14);
    padding: 7px 16px; border-radius: 999px; margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
}
.hero h2 { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
.hero p { color: rgba(255, 255, 255, 0.88); max-width: 600px; margin: 14px auto 0; font-size: 16px; }

/* ===== Service Cards ===== */
.services {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 20px; padding: 0 0 20px; margin-top: -56px;
}
.service-card {
    position: relative; background: var(--card); border-radius: var(--radius);
    padding: 28px 26px; cursor: pointer; text-align: left;
    border: 1px solid var(--border); box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}
.service-card::after {
    content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 4px;
    background: var(--grad); opacity: 0; transition: opacity 0.25s ease;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(22, 102, 196, 0.3); }
.service-card:hover::after { opacity: 1; }
.service-card.active { border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring), var(--shadow-md); }
.service-card.active::after { opacity: 1; }
.service-icon {
    width: 56px; height: 56px; margin-bottom: 18px; border-radius: 14px;
    background: var(--grad); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 26px;
    box-shadow: 0 8px 18px rgba(10, 63, 134, 0.25);
}
.service-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; }
.service-card span { font-size: 13.5px; color: var(--muted); display: block; }
.service-cta {
    display: inline-block; margin-top: 18px; font-style: normal; font-size: 13.5px;
    font-weight: 600; color: var(--primary); transition: gap 0.2s;
}
.service-card:hover .service-cta { letter-spacing: 0.01em; }

/* ===== Search Panel ===== */
.search-panel {
    background: var(--card); border-radius: var(--radius); padding: 30px;
    box-shadow: var(--shadow-md); border: 1px solid var(--border);
    margin-bottom: 44px; display: none;
}
.search-panel.show { display: block; animation: rise 0.35s cubic-bezier(0.16,1,0.3,1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px);} to { opacity: 1; transform: none; } }
.search-panel h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.search-panel .hint { color: var(--muted); font-size: 14px; margin: 4px 0 20px; }
.search-form { display: flex; gap: 10px; flex-wrap: wrap; }
.search-form input[type=text] {
    flex: 1; min-width: 220px; padding: 14px 18px; border: 1px solid var(--border);
    border-radius: 12px; font-size: 15px; font-family: inherit; outline: none;
    background: #fbfcfe; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.search-form input[type=text]:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px var(--ring); }

.btn {
    padding: 14px 28px; border: none; border-radius: 12px; cursor: pointer;
    font-size: 15px; font-weight: 600; font-family: inherit; transition: all 0.2s ease;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(22, 102, 196, 0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(22, 102, 196, 0.36); }

/* ===== Results ===== */
.result-wrap { margin-top: 26px; }
.result-card {
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.result-card-head {
    background: var(--grad);
    color: #fff; padding: 18px 22px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.result-card-head .name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.result-card-head .badge {
    background: rgba(255, 255, 255, 0.18); color: #fff; padding: 5px 14px;
    border-radius: 999px; font-size: 12.5px; font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table tr { border-bottom: 1px solid var(--border); }
.detail-table tr:last-child { border-bottom: none; }
.detail-table tr:nth-child(even) { background: #fbfcfe; }
.detail-table th {
    text-align: left; padding: 14px 22px; width: 40%;
    color: var(--muted); font-weight: 500; font-size: 14px; vertical-align: top;
}
.detail-table td { padding: 14px 22px; font-size: 14.5px; font-weight: 500; }
.va-number { font-size: 18px; font-weight: 800; color: var(--primary); letter-spacing: 0.04em; }
.amount { font-size: 18px; font-weight: 800; color: var(--success); }

.card-action { padding: 16px 22px; border-top: 1px solid var(--border); text-align: right; background: #fbfcfe; }
.btn-pdf { display: inline-block; background: var(--success); box-shadow: 0 4px 14px rgba(15, 157, 88, 0.25); }
.btn-pdf:hover { background: #0c8049; box-shadow: 0 8px 20px rgba(15, 157, 88, 0.3); }

.alert {
    padding: 15px 18px; border-radius: 12px; font-size: 14.5px;
    background: #fef2f2; color: #b42318; border: 1px solid #fecdca;
}
.alert.info { background: var(--grad-soft); color: var(--primary-dark); border-color: rgba(22, 102, 196, 0.2); }

/* ===== VA Guide ===== */
.va-guide {
    margin-top: 26px; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px; background: var(--card); box-shadow: var(--shadow-sm);
}
.va-guide-title {
    font-size: 19px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 20px;
    padding-bottom: 14px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.va-guide-title::before { content: ""; width: 5px; height: 22px; border-radius: 3px; background: var(--grad); }
.va-guide-block { margin-bottom: 22px; }
.va-guide-block:last-child { margin-bottom: 0; }
.va-guide-block h4 {
    font-size: 14.5px; font-weight: 600; color: var(--primary-dark); margin-bottom: 12px;
    background: var(--grad-soft); padding: 11px 16px; border-radius: 10px;
}
.va-guide-block ol { margin: 0; padding-left: 24px; }
.va-guide-block li { font-size: 14px; margin-bottom: 7px; color: var(--text); padding-left: 4px; }

/* ===== Help band ===== */
.help-band {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px 26px; box-shadow: var(--shadow-sm); margin: 8px 0 48px;
}
.help-icon {
    width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
    background: var(--grad-soft); color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.help-text { display: flex; flex-direction: column; }
.help-text strong { font-size: 16px; font-weight: 700; }
.help-text span { font-size: 14px; color: var(--muted); }
.help-band .btn { margin-left: auto; }

/* ===== Floating Bottom Nav (mobile) ===== */
.bottom-nav {
    display: none;
    position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 60;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border: 1px solid var(--border); border-radius: 20px;
    box-shadow: 0 12px 34px rgba(10, 63, 134, 0.22);
    padding: 8px 6px;
    justify-content: space-around; align-items: stretch; gap: 4px;
}
.bottom-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 8px 4px; border-radius: 14px; text-align: center;
    color: var(--muted); transition: all 0.2s ease;
}
.bottom-nav-item .bn-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 19px;
    background: var(--primary-soft); transition: all 0.2s ease;
}
.bottom-nav-item .bn-label { font-size: 11px; font-weight: 600; line-height: 1.2; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active .bn-icon {
    background: var(--grad); color: #fff;
    box-shadow: 0 6px 14px rgba(10, 63, 134, 0.3); transform: translateY(-2px);
}

/* ===== Footer ===== */
.site-footer {
    background: linear-gradient(135deg, #0a3f86 0%, #062b63 100%);
    color: #b6cbe6; padding: 0; font-size: 14px; margin-top: 56px;
}
.footer-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px;
    padding: 40px 22px 26px;
}
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 10px; letter-spacing: 0.02em; }
.footer-col p { margin: 0; line-height: 1.8; }
.footer-col a { color: #7cc4ff; font-weight: 600; }
.footer-col a:hover { color: #aed8ff; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1); text-align: center;
    padding: 16px; color: #87a3c4; font-size: 13px;
    display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.footer-admin-link {
    color: #7cc4ff; font-weight: 600;
    padding: 6px 16px; border-radius: 8px; border: 1px solid rgba(124, 196, 255, 0.35);
    transition: all 0.2s ease;
}
.footer-admin-link:hover { background: rgba(124, 196, 255, 0.12); color: #aed8ff; }

/* ===== Responsive ===== */
@media (max-width: 820px) {
    .services { grid-template-columns: 1fr; margin-top: 28px; }
    .hero { padding: 54px 20px 40px; }
    .hero h2 { font-size: 30px; }
    .footer-grid { grid-template-columns: 1fr; }
    .detail-table th { width: 44%; }

    .burger { display: flex; }
    .header-nav {
        position: absolute; top: 100%; left: 0; right: 0; margin-left: 0;
        flex-direction: column; align-items: stretch; gap: 4px;
        background: #fff; border-bottom: 1px solid var(--border);
        padding: 10px 22px 16px; box-shadow: var(--shadow-md);
        max-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0;
        opacity: 0; pointer-events: none;
        transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
    }
    .header-nav.open {
        max-height: 280px; opacity: 1; pointer-events: auto;
        padding-top: 10px; padding-bottom: 16px;
    }
    .nav-link { padding: 13px 16px; }
    .site-header .container { position: relative; }

    .bottom-nav { display: flex; }
    .site-footer { margin-bottom: 86px; }
}
@media (max-width: 480px) {
    .site-header p { display: none; }
    .hero h2 { font-size: 26px; }
    .search-panel { padding: 22px; }
    .btn-primary { width: 100%; }
    .help-band { flex-direction: column; align-items: flex-start; text-align: left; }
    .help-band .btn { margin-left: 0; width: 100%; text-align: center; }
}
