@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0066cc;
    --primary-dark: #004d99;
    --primary-light: #e8f0fe;
    --accent: #0099dd;
    --text: #1a1a2e;
    --text-secondary: #5a5a7a;
    --text-muted: #8e8ea0;
    --bg: #ffffff;
    --bg-light: #f5f7fa;
    --bg-section: #fafbfd;
    --border: #e0e4ea;
    --border-light: #eef1f5;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --max-width: 1200px;
    --header-max-width: 1440px;
    --transition: 0.25s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    background: var(--primary-dark);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    z-index: 200;
    transition: top var(--transition);
}

.skip-link:focus {
    top: 16px;
    color: #fff;
}

/* ── Header ── */
.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow var(--transition), background-color var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--header-max-width);
    margin: 0 auto;
    padding: 0 16px;
    min-height: 64px;
    height: auto;
    flex-wrap: nowrap;
    gap: 12px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    line-height: 1.15;
    flex: 0 0 220px;
    min-width: 0;
}

.logo-title {
    display: block;
    max-width: 170px;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
}

.nav a {
    padding: 8px 11px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: all var(--transition);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-hotline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}

.btn-hotline:hover {
    background: var(--primary-dark);
    color: #fff;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.burger span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, #0a1628 0%, #0d2847 40%, #0f3060 100%);
    color: #fff;
    padding: 80px 24px 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary {
    background: #fff;
    color: var(--primary-dark);
}

.btn-primary:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    backdrop-filter: blur(4px);
}

/* ── Section Filter Tabs ── */
.filter-bar {
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    padding: 16px 24px;
}

.filter-bar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-tab {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.quick-tools {
    padding: 28px 0 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.quick-tools-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 24px;
    align-items: center;
}

.quick-tools-copy h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.quick-tools-copy p {
    color: var(--text-secondary);
    max-width: 680px;
}

.quick-tools-controls {
    padding: 20px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.search-field {
    display: grid;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.section-search {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.section-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.08);
}

.search-status {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ── Page Title ── */
.page-title {
    text-align: center;
    padding: 48px 24px 0;
    max-width: var(--max-width);
    margin: 0 auto;
}

.page-title h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
}

.page-title p {
    color: var(--text-secondary);
    margin-top: 8px;
    font-size: 16px;
}

/* ── Sections ── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 48px 0 64px;
}

.section-card {
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: all var(--transition);
    position: relative;
    contain: layout paint;
}

.section-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
    transform: translateY(-2px);
}

.section-card.featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%);
}

.section-card.featured::before {
    content: '★ Ключевой раздел';
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(0, 102, 204, 0.1);
    padding: 3px 10px;
    border-radius: 10px;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 18px;
    background: var(--primary-light);
    color: var(--primary);
}

.section-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.35;
    color: var(--text);
}

.section-card h3 a {
    color: inherit;
}

.section-card h3 a:hover {
    color: var(--primary);
}

.section-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-links a {
    font-size: 13px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-links a::before {
    content: '→';
    font-size: 12px;
}

.card-links a:hover {
    color: var(--primary-dark);
}

/* ── Stats ── */
.stats-section {
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 48px 24px;
    content-visibility: auto;
    contain-intrinsic-size: 1px 280px;
}

.stats-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-item h3 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.stat-item p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ── News / Latest ── */
.latest-section {
    padding: 64px 24px;
    content-visibility: auto;
    contain-intrinsic-size: 1px 620px;
}

.latest-section .container {
    max-width: var(--max-width);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-header h2 {
    font-size: 26px;
    font-weight: 700;
}

.section-header a {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    contain: layout paint;
}

.news-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.news-card-img {
    height: 180px;
    background: linear-gradient(135deg, var(--primary-light), #dbe9f9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--primary);
}

.news-card-body {
    padding: 20px;
}

.news-card-body .date {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.news-card-body h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-card-body p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── CTA Banner ── */
.cta-banner {
    background: linear-gradient(135deg, #0a1628, #0d2847);
    color: #fff;
    padding: 64px 24px;
    text-align: center;
    content-visibility: auto;
    contain-intrinsic-size: 1px 280px;
}

.cta-banner h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
    font-size: 16px;
}

.cta-banner .btn {
    background: #fff;
    color: var(--primary-dark);
}

.cta-banner .btn:hover {
    background: var(--primary-light);
}

/* ── Share ── */
.share-bar {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    content-visibility: auto;
    contain-intrinsic-size: 1px 100px;
}

.share-bar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.share-bar span {
    font-size: 14px;
    color: var(--text-muted);
}

.share-icons {
    display: flex;
    gap: 10px;
}

.share-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    transition: transform var(--transition);
    text-decoration: none;
}

.share-icon:hover {
    transform: scale(1.1);
    color: #fff;
}

.share-icon.vk { background: #4c75a3; }
.share-icon.ok { background: #ee8208; }
.share-icon.tg { background: #27a7e7; }

/* ── Footer ── */
.footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
    padding: 40px 24px 24px;
    content-visibility: auto;
    contain-intrinsic-size: 1px 260px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.footer-col a {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary);
}

.to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 90;
}

.to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.to-top:hover {
    background: var(--primary-dark);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ── Page Content (inner pages) ── */
.page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.page-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.page-content p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.breadcrumb {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    margin: 0 6px;
    color: var(--border);
}

/* ── Items list (for price-list, docs, etc.) ── */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.item-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.item-row:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
}

.item-row .item-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

.item-row .item-body h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.item-row .item-body p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0;
}

.item-row .item-meta {
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

.item-row .item-meta .price {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.item-row .item-meta .avail {
    font-size: 12px;
    color: #27ae60;
}

/* ── Q&A / Forum styles ── */
.qa-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qa-item {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
}

.qa-question {
    padding: 18px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    transition: background var(--transition);
}

.qa-question:hover {
    background: var(--bg-light);
}

.qa-question::after {
    content: '▾';
    font-size: 14px;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.qa-item.open .qa-question::after {
    transform: rotate(180deg);
}

.qa-answer {
    display: none;
    padding: 0 24px 18px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    border-top: 1px solid var(--border-light);
    padding-top: 16px;
}

.qa-item.open .qa-answer {
    display: block;
}

/* ── Responsive ── */
@media (max-width: 1400px) {
    .nav {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 24px;
        right: 24px;
        background: var(--bg);
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 14px;
        box-shadow: var(--shadow-lg);
        gap: 4px;
    }
    .nav.open {
        display: flex;
    }
    .nav a {
        padding: 10px 12px;
        font-size: 14px;
    }
    .burger {
        display: flex;
    }
    .header-top {
        min-height: 68px;
    }
    .quick-tools-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .sections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top {
        min-height: 56px;
        height: auto;
        padding: 0 16px;
    }
    .logo {
        font-size: 15px;
        flex-basis: auto;
    }
    .logo-title {
        max-width: 160px;
    }
    .hero {
        padding: 48px 20px 56px;
    }
    .hero h1 {
        font-size: 26px;
    }
    .hero p {
        font-size: 15px;
    }
    .sections-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .footer-top {
        flex-direction: column;
        gap: 24px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .filter-bar-inner {
        justify-content: flex-start;
    }
    .quick-tools {
        padding-top: 22px;
    }
    .quick-tools-controls {
        padding: 16px;
    }
    .btn-hotline span.label {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .hero-badge {
        width: 100%;
    }
    .to-top {
        right: 16px;
        bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ── Exchange dynamic UI ── */
.filter-controls {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 24px;
    display: flex;
    justify-content: center;
}

.filter-search {
    width: 100%;
    max-width: 520px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.filter-search:focus {
    outline: none;
    border-color: var(--primary);
}

.empty-state {
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    padding: 20px;
}

/* ── Admin ── */
.admin-layout {
    display: grid;
    gap: 24px;
}

.admin-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    background: var(--bg);
}

.admin-form {
    display: grid;
    gap: 10px;
}

.admin-form label {
    font-size: 13px;
    font-weight: 600;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.admin-form textarea {
    resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: var(--primary);
}

.admin-btn {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    justify-content: center;
}

.admin-btn.secondary {
    background: #fff;
    color: var(--text);
    border-color: var(--border);
}

.admin-form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-status {
    font-size: 13px;
    color: #2e7d32;
}

.auth-status.error {
    color: #c62828;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}

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

.actions-cell button {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

.actions-cell button.danger {
    color: #c62828;
    border-color: #f1b8b8;
}

/* ── Hotline chat ── */
.hotline-chat {
    margin: 24px auto 0;
    max-width: 720px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.hotline-chat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.hotline-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.chat-bubble {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 12px;
    max-width: 85%;
    border: 1px solid var(--border-light);
}

.chat-bubble.user {
    align-self: flex-end;
    background: #fff;
}

.chat-bubble.expert {
    align-self: flex-start;
    background: var(--primary-light);
}

.chat-bubble-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.chat-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: start;
}

.chat-actions textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    min-height: 44px;
    resize: vertical;
}

.chat-actions textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ── Status badges (admin hotline) ── */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.status-badge.new      { background: #fde8e8; color: #c62828; border: 1px solid #f1b8b8; }
.status-badge.in_progress { background: #f0f0f0; color: #555; border: 1px solid #ddd; }
.status-badge.answered { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }

/* ── Admin wizard ── */
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-section-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 12px;
}
.wizard-section-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
}
.wizard-section-card:hover, .wizard-section-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
}
.wizard-section-card .wsc-icon { font-size: 28px; margin-bottom: 8px; }
.wizard-section-card .wsc-label { font-size: 14px; font-weight: 600; }
.wizard-nav {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

/* ── Records section filter ── */
.records-section-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 20px;
}
.modal-box {
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    padding: 2px 6px;
}
.modal-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
}
.modal-body p { font-size: 15px; color: var(--text-secondary); line-height: 1.7; white-space: pre-wrap; }
.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ── Service order modal ── */
.order-form-group { margin-bottom: 16px; }
.order-form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.order-form-group input,
.order-form-group textarea,
.order-form-group select {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 14px; font-family: inherit;
    transition: border-color var(--transition);
}
.order-form-group input:focus,
.order-form-group textarea:focus,
.order-form-group select:focus { outline: none; border-color: var(--primary); }
.order-form-group textarea { resize: vertical; min-height: 100px; }
.btn-order {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 20px; background: var(--primary); color: #fff;
    font-size: 13px; font-weight: 600; border-radius: 6px; border: none;
    cursor: pointer; transition: background var(--transition); white-space: nowrap;
}
.btn-order:hover { background: var(--primary-dark); }
.item-row .item-actions { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* ── Clickable hotline row ── */
.hotline-row-clickable { cursor: pointer; }
.hotline-row-clickable:hover { background: var(--bg-light); }
