/**
 * Forward Points - Styles
 * Статическая шапка в стиле форума + таблицы/графики
 */

/* === Сброс === */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #141414; background: #f0f2f5; line-height: 1.5;
}

/* === Абзацы === */
.fp-content p { margin-bottom: 18px; }

/* === Подвал === */
.fp-forum-footer {
    background: #f5f5f5; color: #888; text-align: center;
    padding: 15px 20px; font-size: 12px; border-top: 1px solid #ddd;
}

/* === Обёртка контента === */
.fp-app-wrapper { max-width: 1200px; margin: 20px auto; padding: 0 20px; }

/* === Хлебные крошки === */
.fp-breadcrumb {
    margin-bottom: 15px; padding: 8px 12px; background: #fff;
    border-radius: 4px; font-size: 13px; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.fp-breadcrumb a { color: #185886; }
.fp-breadcrumb a:hover { text-decoration: underline; }
.fp-breadcrumb span { color: #666; }

/* === Переключатель языка === */
.fp-lang-switcher { float: right; margin-bottom: 10px; font-size: 13px; }
.fp-lang-switcher a {
    display: inline-block; padding: 3px 10px; margin-left: 4px;
    border: 1px solid #ccc; border-radius: 3px; color: #333;
    background: #fff; transition: all 0.15s;
}
.fp-lang-switcher a.active, .fp-lang-switcher a:hover {
    background: #185886; color: #fff; border-color: #185886;
}

/* === Заголовки === */
.fp-content h1 { font-size: 26px; margin-bottom: 20px; color: #222; border-bottom: 2px solid #185886; padding-bottom: 8px; }
.fp-content h2 { font-size: 19px; margin: 28px 0 12px; color: #444; }

/* === Таблицы === */
.fp-table-wrapper { overflow-x: auto; margin-bottom: 25px; }
.fp-data-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.fp-data-table thead { background: #185886; color: #fff; }
.fp-data-table th { padding: 10px 14px; text-align: left; font-weight: 600; white-space: nowrap; }
.fp-data-table td { padding: 8px 14px; border-bottom: 1px solid #eee; }
.fp-data-table tbody tr:hover { background: #f5f8fc; }
.fp-data-table a { color: #185886; }
.fp-data-table a:hover { text-decoration: underline; }

.fp-forward-value { font-weight: 600; text-align: right !important; font-variant-numeric: tabular-nums; }
.fp-forward-value.positive { color: #1a7a1a; }
.fp-forward-value.negative { color: #c62828; }

/* === Chart === */
.fp-chart-wrapper {
    margin: 25px 0; background: #fff; border-radius: 6px;
    padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.fp-chart-wrapper canvas { max-height: 400px; }

/* === Статистика === */
.fp-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 10px 0 25px; }
.fp-stat-item { background: #fff; border-radius: 6px; padding: 14px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.fp-stat-label { display: block; font-size: 11px; text-transform: uppercase; color: #888; margin-bottom: 4px; font-weight: 600; }
.fp-stat-value { display: block; font-size: 20px; font-weight: 700; color: #185886; }
.fp-stat-date { display: block; font-size: 11px; color: #aaa; margin-top: 2px; }

/* === Intro text === */
.fp-intro-text { margin: 15px 0 25px; padding: 15px 18px; background: #f0f7ff; border-left: 4px solid #185886; border-radius: 0 6px 6px 0; font-size: 14px; line-height: 1.7; color: #444; }

/* === Кнопки === */
.fp-links { margin: 20px 0; }
.fp-btn { display: inline-block; padding: 8px 20px; background: #185886; color: #fff !important; text-decoration: none; border-radius: 4px; font-size: 14px; transition: background 0.15s; }
.fp-btn:hover { background: #0e3d5e; }

/* === Годовой фильтр === */
.fp-year-filter { margin: 10px 0 20px; padding: 10px 14px; background: #fff; border-radius: 4px; font-size: 14px; }
.fp-year-filter a { color: #185886; padding: 2px 6px; }
.fp-year-filter a:hover { text-decoration: underline; }
.fp-year-filter strong { font-weight: 700; color: #222; padding: 2px 6px; }

/* === FAQ === */
.fp-faq { margin: 25px 0; }
.fp-faq-item { margin-bottom: 12px; border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden; background: #fff; }
.fp-faq-question { margin: 0; padding: 12px 16px; background: #f8f8f8; font-size: 15px; font-weight: 600; cursor: pointer; }
.fp-faq-answer { padding: 14px 16px; font-size: 14px; line-height: 1.7; color: #555; }

/* === Общие === */
.fp-empty { text-align: center; padding: 35px; color: #999; font-size: 15px; }
.fp-last-update { color: #777; font-size: 13px; margin-bottom: 12px; }
.fp-divider { border: none; border-top: 1px solid #e0e0e0; margin: 25px 0; }

/* === Карточки инструментов (главная) === */
.fp-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}
.fp-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.fp-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.fp-card-header {
    background: linear-gradient(135deg, #185886 0%, #1e6aa5 100%);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.fp-card-symbol { color: #fff; font-size: 18px; font-weight: 700; text-decoration: none; letter-spacing: -0.3px; }
.fp-card-symbol:hover { text-decoration: underline; }
.fp-card-name { color: rgba(255,255,255,0.85); font-size: 13px; }
.fp-card-table { width: 100%; border-collapse: collapse; }
.fp-card-table tr { border-bottom: 1px solid #f0f0f0; }
.fp-card-table tr:last-child { border-bottom: none; }
.fp-card-table td { padding: 8px 16px; font-size: 14px; }
.fp-card-contract a { color: #185886; font-weight: 500; }
.fp-card-footer {
    padding: 8px 16px 12px; text-align: center;
    border-top: 1px solid #f0f0f0;
}
.fp-card-footer a {
    color: #185886; font-size: 13px; font-weight: 500;
    text-decoration: none;
}
.fp-card-footer a:hover { text-decoration: underline; }

/* === Кнопка Forum в хлебных крошках === */
.fp-forum-btn {
    float: right;
    display: inline-block;
    padding: 4px 14px;
    background: #185886;
    color: #fff !important;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
}
.fp-forum-btn:hover {
    background: #0e3d5e;
    text-decoration: none !important;
}

/* === Анкорное меню (Table of Contents) === */
.fp-toc {
    background: #f8fafd;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 25px;
    font-size: 14px;
}
.fp-toc strong { display: block; margin-bottom: 10px; font-size: 15px; color: #333; }
.fp-toc ul { list-style: none; padding: 0; margin: 0; }
.fp-toc li { margin-bottom: 6px; }
.fp-toc a { color: #185886; text-decoration: none; }
.fp-toc a:hover { text-decoration: underline; }

/* === Пагинация === */
nav.fp-pagination { margin: 15px 0; }
nav.fp-pagination ul {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    list-style: none; padding: 0; margin: 0;
}
nav.fp-pagination li { display: block; }
nav.fp-pagination li a,
nav.fp-pagination li strong,
nav.fp-pagination li span {
    display: inline-block; padding: 6px 12px; border-radius: 4px;
    font-size: 14px; text-decoration: none; line-height: 1.4;
}
nav.fp-pagination li a { background: #fff; color: #185886; border: 1px solid #d0d7de; }
nav.fp-pagination li a:hover { background: #185886; color: #fff; border-color: #185886; }
nav.fp-pagination li strong { background: #185886; color: #fff; font-weight: 600; }
nav.fp-pagination li span { color: #999; }
.fp-pg-info { margin-left: auto; font-size: 13px; color: #888; }

/* === Адаптивность === */
@media (max-width: 768px) {
    .fp-app-wrapper { padding: 0 10px; }
    /* Карточки в 1 колонку */
    .fp-cards-grid { grid-template-columns: 1fr; gap: 12px; }
    .fp-card-header { padding: 12px 14px; }
    .fp-card-symbol { font-size: 16px; }
    .fp-card-table td { padding: 6px 12px; font-size: 13px; }
    .fp-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .fp-data-table { font-size: 12px; }
    .fp-data-table th, .fp-data-table td { padding: 6px 8px; }
    .fp-content h1 { font-size: 20px; }
    .fp-content h2 { font-size: 17px; margin: 20px 0 10px; }
    .fp-lang-switcher { float: none; text-align: right; margin-bottom: 12px; }
    .fp-forum-header { flex-direction: column; gap: 6px; padding: 10px 15px; }
    /* Forum кнопка не float на мобилке */
    .fp-forum-btn { float: none; display: block; text-align: center; margin-top: 8px; }
    /* Пагинация */
    nav.fp-pagination ul { justify-content: center; }
    .fp-pg-info { margin-left: 0; width: 100%; text-align: center; }
    /* Анкорное меню */
    .fp-toc { font-size: 13px; padding: 12px 14px; }
}
/* === Совсем маленькие экраны === */
@media (max-width: 480px) {
    .fp-card-header { flex-direction: column; align-items: flex-start; gap: 2px; }
    .fp-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .fp-stat-item { padding: 10px; }
    .fp-stat-value { font-size: 17px; }
    .fp-content h1 { font-size: 18px; }
}
