:root {
    --primary: #0d6efd;
    --primary-light: #e8f1ff;
    --text: #0f172a;
    --muted: #64748b;
    --bg: #f8fafc;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 0;
    z-index: 10;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.nav-brand:hover {
    color: #0a58ca;
    text-decoration: none;
    transform: translateY(-1px);
}

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

.nav-links a {
    color: var(--text);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.nav-links a:hover {
    background: var(--primary-light);
}

.faq-search-box {
    position: relative;
    margin: 26px 0 36px;
    max-width: 680px;
}

.faq-search-strip {
    background: #f8fbff;
    border-bottom: 1px solid #e6edf7;
    padding: 18px 0;
}

.faq-search-strip .faq-search-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

.faq-search-wrapper {
    position: relative;
}


.faq-search-wrapper input[type="search"],
#faq-search {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #d0d7e2;
    background: #ffffff;
    font-size: 15px;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(26, 60, 115, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, outline 0.2s ease;
}

.faq-search-wrapper input[type="search"]:focus {
    outline: 2px solid rgba(13, 110, 253, 0.18);
    outline-offset: 2px;
    border-color: #8ab6ff;
    box-shadow: 0 8px 22px rgba(12, 37, 86, 0.12);
}

.faq-results-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #dfe6f2;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    max-height: 300px;
    overflow-y: auto;
    z-index: 30;
}

.faq-results-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 4px;
    gap: 2px;
}

.faq-result-item {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: #0f172a;
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.faq-result-item h4 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #0f2c54;
}

.faq-result-item p {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.4;
}

.faq-result-item:hover {
    background: #f5f8ff;
    box-shadow: inset 0 0 0 1px #d7e5ff;
    transform: translateY(-1px);
}

.faq-results-empty {
    margin: 0;
    padding: 12px 14px;
    color: #475569;
    font-size: 14px;
}

.faq-search-hint {
    color: #60708a;
    margin-top: 10px;
    font-size: 14px;
}

.hero {
    padding: 60px 0;
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: center;
}

.hero-card {
    background: var(--white);
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.08);
}

.hero h1 {
    font-size: clamp(28px, 4vw, 40px);
    margin: 0 0 12px;
}

.hero p {
    color: var(--muted);
    margin: 0 0 20px;
}

.btn {
    display: inline-block;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.25);
}

.btn-secondary {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(13, 110, 253, 0.2);
}

.btn-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

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

.card {
    background: var(--white);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
}

.section-title {
    margin: 48px 0 20px;
    font-size: 1.6rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

input[type="text"],
input[type="password"],
textarea {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #d3e0f6;
    font-size: 1rem;
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 12px;
    text-align: left;
}

.cell-actions {
    white-space: nowrap;
    font-size: 14px;
    color: #475569;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.admin-table th {
    background: var(--primary-light);
    color: var(--primary);
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.alert-success {
    background: #e8f9f0;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecdd3;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.settings-grid label {
    display: grid;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
}

.settings-grid input,
.settings-grid select {
    padding: 10px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}

.settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: end;
}

.admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: start;
}

.admin-sidebar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    position: sticky;
    top: 12px;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.admin-menu a {
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.admin-menu a:hover {
    border-color: #e2e8f0;
    background: #f1f5f9;
}

.admin-menu a.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: rgba(13, 110, 253, 0.2);
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.14);
}

.admin-logout {
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
}

.admin-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.settings-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.richtext p {
    margin: 0 0 8px;
    color: var(--muted);
}

.richtext ul,
.richtext ol {
    margin: 0 0 12px 18px;
    color: var(--muted);
    padding-left: 16px;
}

.richtext h3,
.richtext h4,
.richtext h5 {
    margin: 10px 0 6px;
}

@media (max-width: 720px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }
}

.tab-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tab-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--primary-light);
    padding: 6px;
    border-radius: 12px;
}

.tab-button {
    border: none;
    background: transparent;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tab-button:hover {
    background: rgba(13, 110, 253, 0.08);
}

.tab-button.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.18);
}

.tab-panel {
    display: none;
    padding-top: 4px;
}

.tab-panel.active {
    display: block;
}

.helper-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    margin-top: 10px;
}

.helper-list {
    margin: 0 0 10px 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.full-width {
    display: grid;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
}

.note {
    font-size: 13px;
    color: #5f6c7b;
    margin-top: 10px;
}

.muted {
    color: var(--muted);
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.pill {
    border: 1px solid #cde1ff;
    background: #f4f8ff;
    color: #1b4b94;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill:hover {
    background: #e7f1ff;
    border-color: #9fc2ff;
}

.pill-muted {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

.stacked-form textarea {
    width: 100%;
}

.faq-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-list li {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
}

.faq-list-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.faq-category-block {
    margin-bottom: 24px;
}

.faq-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

@media (max-width: 700px) {
    .faq-category-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

footer {
    background: var(--white);
    padding: 28px 0;
    margin-top: 40px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: var(--muted);
}

.faq-link {
    color: #0f3d9d;
    text-decoration: none;
}

.faq-link:hover {
    text-decoration: underline;
}

.breadcrumb {
    color: var(--muted);
    margin: 12px 0 18px;
    font-size: 14px;
}

.breadcrumb a {
    color: #0f3d9d;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.related-questions {
    margin-top: 16px;
}

.related-questions h2 {
    margin: 0 0 10px;
}

.related-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-list li a {
    display: inline-block;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: var(--text);
}

.related-list li a:hover {
    border-color: #9fc2ff;
    background: #eef4ff;
}

.interaction-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.share-note {
    color: #047857;
    font-size: 14px;
}

@media (max-width: 640px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
    }

    .faq-search {
        width: 100%;
    }
}
