/* Общие стили входа, установки и панели; подключаются из app/views/head.php.
   Ниже: палитра, формы, страницы, таблицы и адаптация. Более поздние правила уточняют ранние. */
/* Общая палитра и размеры. Без внешних шрифтов, CSS-фреймворков и сборки. */
:root {
    --ink: #0c2038;
    --muted: #637387;
    --navy: #0c2038;
    --navy-hover: #183650;
    --coral: #ff795f;
    --paper: #f4f6f9;
    --line: #dce3eb;
    --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
a { color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
/* Сохраняем hidden для кнопок, даже когда их базовый стиль задаёт display. */
button[hidden] { display: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 3px solid #bb4935; outline-offset: 4px; }
h1, h2, p { margin: 0; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 21px; font-weight: 700; letter-spacing: -.8px; white-space: nowrap; }
.brand-mark { display: block; flex-shrink: 0; }
.brand-light { font-weight: 600; }
.header-note { color: var(--muted); font-size: 12px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #637387; font-size: 10px; font-weight: 650; letter-spacing: 1.7px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #e5664e; flex-shrink: 0; }
h1 { font-size: clamp(32px, 3.05vw, 48px); line-height: 1.15; letter-spacing: -1.9px; font-weight: 550; }
.accent { color: #df6048; }
.accent-word { color: #335f87; }
.intro { color: var(--muted); font-size: 14px; line-height: 1.8; }
.field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.field label { color: #263d55; font-size: 13px; font-weight: 550; }
.field input { width: 100%; height: 51px; padding: 0 15px; color: var(--ink); border: 1px solid #d5dee8; border-radius: 8px; background: #ffffff; outline: none; transition: border-color .18s, box-shadow .18s; }
.field input::placeholder { color: #637387; font-size: 13px; }
.field input:focus { border-color: #c54d36; box-shadow: 0 0 0 3px #c54d361c; }
.field input:user-invalid { border-color: #b46556; }
.password-field { position: relative; }
.password-field input { padding-right: 51px; }
.password-toggle { position: absolute; right: 4px; top: 4px; height: 43px; width: 43px; border: 0; border-radius: 6px; color: #637387; background: transparent; display: grid; place-items: center; }
.password-toggle:hover, .password-toggle[aria-pressed="true"] { color: var(--navy); background: #eaf0f6; }
.button { min-height: 51px; border-radius: 8px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-decoration: none; font-size: 13px; font-weight: 550; border: 1px solid transparent; transition: background .18s, transform .18s; }
.button-primary { color: #ffffff; background: var(--navy); }
.button-primary:hover { background: var(--navy-hover); }
.button-primary:active { transform: translateY(1px); }
.button-arrow { font-size: 21px; font-weight: 400; }
.notice { border: 1px solid; border-radius: 8px; padding: 13px 15px; font-size: 13px; line-height: 1.6; margin-bottom: 22px; }
.notice-error { color: #8c493b; border-color: #edd5cd; background: #faf0eb; }
.notice-success { color: #426146; border-color: #d4e2cb; background: #edf4e7; }
.notice ul { margin: 0; padding-left: 18px; }
.notice li + li { margin-top: 6px; }

/* Вход: слева форма, справа самостоятельная графическая композиция. */
.auth-layout { min-height: 100svh; padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-side { display: flex; flex-direction: column; padding: 23px 39px 15px 31px; }
.auth-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.login-content { width: 100%; max-width: 358px; margin: auto; padding: 70px 0 80px; }
.login-content h1 { margin: 20px 0 15px; font-size: clamp(30px, 2.8vw, 43px); letter-spacing: -1.8px; white-space: nowrap; }
.login-content .intro { margin-bottom: 32px; }
.auth-form { display: grid; gap: 22px; }
.auth-form .button { margin-top: 7px; }
.private-note { display: flex; align-items: center; justify-content: center; gap: 7px; color: #637387; font-size: 11px; margin-top: 23px; }
.auth-footer { display: flex; align-items: center; justify-content: space-between; color: #6b7a8d; font-size: 10px; gap: 14px; }
.version { white-space: nowrap; }
/* История PeusPanel: контрастная фирменная композиция без внешних изображений. */
.story-side {
    min-height: 700px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: var(--navy);
    color: #ffffff;
    padding: 32px 38px 30px;
}
.story-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}
.story-label, .story-number {
    font-size: 10px;
    letter-spacing: 1.7px;
    font-weight: 600;
}
.story-label { color: var(--coral); }
.story-number { color: #a8b8ca; }
.story-copy { margin-top: 36px; }
.story-copy h2 {
    font-size: clamp(54px, 5vw, 80px);
    line-height: 1.03;
    font-weight: 600;
    letter-spacing: -3px;
}
.story-copy h2 span { color: var(--coral); }
.story-copy p {
    max-width: 405px;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.85;
    color: #c2cedc;
}
.brand-art {
    position: relative;
    display: grid;
    place-items: center;
    width: 240px;
    height: 200px;
    margin: 12px auto;
    flex-shrink: 0;
}
.brand-art img { position: relative; width: 200px; height: 200px; }
.brand-art-ring {
    position: absolute;
    width: 220px;
    height: 220px;
    border: 1px solid #ffffff12;
    border-radius: 50%;
}
.story-bottom {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: auto;
    padding-top: 22px;
}
.story-bottom p { color: #a8b8ca; font-size: 12px; line-height: 1.7; }
.story-rule { width: 32px; height: 2px; background: var(--coral); flex-shrink: 0; }
/* Установщик и защищённая стартовая страница. */
.setup-header, .workspace-header { max-width: 1200px; margin: auto; padding: 30px 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.setup-content { max-width: 650px; margin: 42px auto 0; padding: 0 25px; }
.setup-content h1 { margin-top: 17px; }
.setup-content > .intro { margin-top: 19px; margin-bottom: 30px; }
.setup-form fieldset { border: 0; border-top: 1px solid var(--line); padding: 25px 0 29px; margin: 0; min-width: 0; }
.setup-form legend { padding: 0 13px 0 0; font-weight: 600; font-size: 15px; }
.step-number { font-size: 10px; color: #637387; font-weight: 500; letter-spacing: 1px; margin-right: 10px; }
.section-note { color: var(--muted); font-size: 12px; line-height: 1.7; margin: -6px 0 22px; }
.setup-form .field + .field, .setup-form .field-grid + .field, .setup-form .field + .field-grid { margin-top: 18px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-grid .field + .field { margin-top: 0; }
.host-grid { grid-template-columns: 1fr 120px; }
.field-hint { color: #637387; font-size: 11px; line-height: 1.6; }
.setup-form fieldset > .field-hint { display: block; margin-top: 10px; }
.setup-form > .button { width: 100%; }
.setup-footnote { margin-top: 15px; color: #637387; font-size: 11px; line-height: 1.7; text-align: center; }
.setup-footer { text-align: center; padding: 45px 20px 30px; font-size: 10px; color: #637387; }
.account { display: flex; align-items: center; gap: 24px; font-size: 12px; }
.account > span { color: var(--muted); }
.button-text { background: transparent; padding: 8px 0; color: var(--navy); font-size: 12px; border: 0; }
.button-text:hover { text-decoration: underline; }
.button-text span { margin-left: 8px; }
.welcome-content { max-width: 700px; margin: 7vh auto 0; padding: 0 30px; }
.welcome-symbol { width: 68px; height: 68px; display: grid; place-items: center; color: #335f87; background: #e6edf5; border-radius: 20px; font-size: 48px; margin-bottom: 35px; }
.welcome-content h1 { margin: 20px 0; }
.next-step { display: flex; align-items: center; gap: 14px; margin-top: 42px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.next-step h2 { font-size: 15px; font-weight: 550; }
.next-step p { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.next-step-arrow { margin-left: auto; color: #335f87; font-size: 24px; }
.workspace-status { display: block; margin-top: 16px; font-size: 11px; color: #637387; }
.error-content { max-width: 530px; margin: 10vh auto; padding: 0 25px; }
.error-content h1 { margin: 20px 0; }
.error-content .button { margin-top: 30px; max-width: 300px; }

/* Рабочая панель: синие поверхности, коралловые акценты и системный шрифт. */
.panel-content { max-width: 1440px; margin: 0 auto; padding: 0 36px; }
.panel-nav { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.panel-nav a { text-decoration: none; font-size: 14px; padding: 12px 18px; border-radius: 8px; color: var(--muted); }
.panel-nav a[aria-current], .panel-nav a:hover { background: #e8eef5; color: var(--navy); }
.page-heading { padding: 34px 0 28px; }
.page-heading h1 { margin-top: 14px; font-size: clamp(30px, 3vw, 42px); }
.panel-card { border: 1px solid var(--line); border-radius: 14px; padding: 26px; margin-bottom: 22px; background: #ffffff; }
.panel-card h2 { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.8; }
p.muted { margin: 12px 0; }
.narrow-card { max-width: 800px; }
.panel-form { display: grid; gap: 18px; margin: 24px 0 16px; }
.panel-form .button { justify-self: start; }
.button-secondary { color: var(--navy); border-color: var(--line); background: #edf2f7; }
.button-secondary:hover { background: #e8eef5; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0; }
.search-form { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: start; }
.field textarea, .field select { width: 100%; font: inherit; font-size: 14px; border: 1px solid #d5dee8; border-radius: 8px; background: #ffffff; padding: 14px; color: var(--ink); }
.field textarea { resize: vertical; min-height: 125px; }
.field select { min-height: 51px; }
.field .button { margin-top: 6px; }
.section-heading { display: flex; align-items: baseline; gap: 16px; justify-content: space-between; }
.table-scroll { overflow-x: auto; margin: 20px -6px; }
.community-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1040px; }
.community-table th { text-align: left; font-weight: 550; background: #edf2f7; white-space: nowrap; }
.community-table th, .community-table td { padding: 16px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.community-table th a { text-decoration: none; }
.metric-help { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; margin-left: 5px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: help; color: var(--navy); font: inherit; }
.metric-tooltip { position: fixed; z-index: 1000; box-sizing: border-box; width: 340px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow-y: auto; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #ffffff; color: var(--ink); box-shadow: 0 10px 32px #0c203824; white-space: normal; text-align: left; font-size: 12px; font-weight: 400; line-height: 1.6; }
.metric-tooltip[hidden] { display: none; }
.metric-tooltip p + p { margin-top: 10px; }
.community-table td small, .community-table th small, .source-row small, .post-heading small { display: block; color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 6px; }
.community-table input { accent-color: var(--navy); width: 17px; height: 17px; }
.community-name { font-weight: 600; text-decoration: none; display: block; min-width: 170px; max-width: 260px; overflow-wrap: anywhere; }
.analysis-period { min-width: 200px; }
.empty-state { padding: 40px 0; font-size: 14px; line-height: 1.8; color: var(--muted); }
.token-help { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; font-size: 13px; line-height: 1.9; }
.token-help summary { cursor: pointer; font-weight: 600; }
.token-help li { margin: 12px 0; }
.token-help ol { padding-left: 22px; }
.token-helper { max-width: 340px; margin-top: 12px; }
.token-auth-link { width: fit-content; margin-top: 12px; }
.token-auth-link[hidden] { display: none; }
.token-help > details { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.connection-results div { margin: 16px 0; }
.connection-results dt { font-size: 13px; font-weight: 600; }
.connection-results dd { margin: 6px 0 0; font-size: 13px; }
.job-card { background: #eaf0f7; }
.job-card > p { margin: 10px 0; font-size: 13px; }
.error-list, .error-text, .community-table .error-text, .source-row .error-text { color: #8c493b; font-size: 12px; line-height: 1.8; }
.source-row { display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.source-row a { text-decoration: none; font-size: 14px; font-weight: 550; }
.period-form { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 18px; margin-top: 26px; }
.period-form > .actions { grid-column: 1 / -1; margin: 0; }
.sort-links, .pagination { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin: 18px 0 25px; font-size: 12px; }
.sort-links a, .sort-links button, .pagination a { border: 1px solid var(--line); padding: 9px 12px; border-radius: 7px; text-decoration: none; }
.sort-links form { margin: 0; }
.sort-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; }
.sort-mode select { max-width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); }
.source-row { flex-wrap: wrap; }
.source-actions { display: flex; align-items: flex-start; gap: 16px; width: 100%; }
.source-statistics summary, .monitor-help summary { cursor: pointer; color: var(--navy); font-size: 12px; padding: 8px 0; }
.source-statistics-content { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; font-size: 12px; padding: 12px 0; overflow-wrap: anywhere; }
.source-statistics { min-width: 0; flex: 1; }
@media (max-width: 640px) { .source-statistics-content { grid-template-columns: 1fr; } }
.sort-links button { background: transparent; color: inherit; font: inherit; cursor: pointer; }
.sort-links [aria-current], .pagination [aria-current] { background: #e8eef5; border-color: #a9bed2; }
.post-list { display: grid; gap: 20px; }
.post-card { border: 1px solid var(--line); border-radius: 10px; padding: 23px; }
.post-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 13px; }
.post-heading a { text-decoration: none; }
.post-heading > div > a { font-weight: 600; font-size: 15px; }
.post-content { display: flex; flex-wrap: wrap; gap: 20px; margin: 20px 0; align-items: start; }
.post-image { width: 200px; max-height: 250px; object-fit: contain; border-radius: 7px; background: #eaf0f6; }
.no-preview { font-size: 11px; color: var(--muted); width: 160px; line-height: 1.8; }
.post-text { white-space: pre-wrap; overflow-wrap: anywhere; flex: 1; min-width: 180px; font-size: 14px; line-height: 1.8; max-height: 380px; overflow-y: auto; }
.post-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; }
.post-metrics > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; }
.post-metrics > div > span:first-child { width: 100%; font-size: 11px; color: var(--muted); }
.post-metrics strong { font-size: 17px; font-weight: 600; }
.metric-ratio { color: var(--muted); font-size: 12px; padding: 3px 6px; border-radius: 5px; }
.ratio-up { background: #f0f4e5; color: #5b7041; }
.ratio-high { background: #e0eacb; color: #3b5d2f; }
.post-updated { margin-top: 16px; font-size: 10px; color: var(--muted); line-height: 1.8; }
.post-reaction { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.post-reaction small { width: 100%; color: var(--muted); font-size: 11px; }
@media (max-width: 760px) {
    .panel-content { padding: 0 18px; }
    .panel-card { padding: 18px; }
    .panel-nav { gap: 3px; }
    .panel-nav a { font-size: 12px; padding: 10px; }
    .search-form, .period-form { grid-template-columns: 1fr; }
    .post-card { padding: 16px; }
    .post-metrics { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .post-image { width: 100%; max-height: 280px; }
    .section-heading { flex-wrap: wrap; gap: 0; }
}

@media (min-width: 1500px) {
    .auth-layout { max-width: 1800px; margin: auto; }
    .story-side { padding: 40px 60px 32px; }
    .story-copy { margin-top: 64px; }

}
@media (max-width: 1100px) {
    .auth-side { padding: 23px 20px 15px; }
    .auth-header .header-note { display: none; }
    .story-side { padding: 28px; }

    .story-copy h2 { font-size: 62px; }
    .story-bottom { font-size: 8px; }
}
@media (max-width: 760px) {
    .auth-layout { grid-template-columns: 1fr; padding: 0; min-height: 100svh; }
    .auth-side { padding: 28px 26px 22px; min-height: 100svh; }
    .auth-header .header-note { display: block; font-size: 10px; }
    .login-content { padding: 60px 0; max-width: 380px; }
    .login-content h1 { font-size: 39px; }
    .story-side { display: flex; min-height: 0; border-radius: 18px 18px 0 0; padding: 32px 26px; }
    .story-copy { margin-top: 32px; }
    .story-copy h2 { font-size: 58px; }
    .story-copy p { font-size: 14px; }
    .brand-art { width: 240px; height: 220px; }
    .brand-art img { width: 200px; height: 200px; }
    .brand-art-ring { width: 220px; height: 220px; }
    .auth-footer { font-size: 9px; }
    .setup-header, .workspace-header { padding: 26px 25px; }
    .setup-content { margin-top: 30px; }
    .setup-content h1, .welcome-content h1 { font-size: 38px; }
    .welcome-content { margin-top: 5vh; padding: 0 25px; }
    .next-step { gap: 8px; }
    .next-step .step-number { display: none; }
}
@media (max-width: 420px) {
    .login-content h1 { font-size: clamp(28px, 8vw, 34px); white-space: normal; }
    .login-content h1 { font-size: 34px; }
    .header-note { display: none !important; }
    .field-grid { grid-template-columns: 1fr; gap: 18px; }
    .host-grid { grid-template-columns: 1fr 90px; gap: 12px; }
    .setup-content h1, .welcome-content h1 { font-size: 33px; }
    .account { gap: 15px; }
    .auth-footer { font-size: 8px; }
}
/* Учитываем системное предпочтение уменьшенного движения для всех страниц. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
.journal-json { max-height: 520px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f2f5f9; font-size: 12px; line-height: 1.6; }
.journal-request { margin: 12px 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.journal-request summary { cursor: pointer; font-size: 13px; line-height: 1.7; padding: 16px 18px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 18px; background: #edf2f7; }
.journal-request summary::before { content: '›'; font-size: 18px; line-height: 1; color: var(--muted); }
.journal-request[open] summary::before { transform: rotate(90deg); }

/* Ровные таблицы, формы подключений и подробности журнала. */
.panel-content-settings { max-width: 1440px; }
.panel-content-settings .narrow-card { max-width: none; }
.panel-content-settings .panel-form { max-width: 680px; }
.panel-content-settings .panel-card > p, .panel-content-journal .panel-card > p { font-size: 13px; line-height: 1.8; margin: 12px 0; }
.panel-content-settings .panel-card > p.muted, .panel-content-journal .panel-card > p.muted { font-size: 12px; }
.panel-content-settings .token-help p { margin: 12px 0; }
.panel-content-settings .token-help h3 { margin: 18px 0 12px; font-size: 15px; }
.panel-content-settings .token-help ul { padding-left: 20px; }
.panel-content-settings .connection-results { margin: 18px 0; }
.panel-content-settings .connection-results > div { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: 16px; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--line); }
.panel-content-settings .connection-results dd { margin: 0; }
.panel-content-settings .panel-card > form + form { margin-top: 16px; }
.panel-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; line-height: 1.6; }
.panel-table th { font-size: 11px; font-weight: 600; color: var(--muted); background: #edf2f7; }
.panel-table th, .panel-table td { padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.panel-table tbody tr:last-child td { border-bottom: 0; }
.panel-table tbody tr:hover { background: #f4f7fa; }
.panel-table .numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.usage-table th:nth-child(n+2), .journal-table th:nth-child(n+5) { text-align: right; }
.settings-methods { min-width: 660px; table-layout: fixed; }
.settings-methods th:first-child { width: 34%; }
.settings-methods th:nth-child(2) { width: 38%; }
.settings-methods code { white-space: nowrap; font-size: 12px; }
.panel-content-settings .table-scroll, .panel-content-journal .table-scroll { margin: 20px 0; border: 1px solid var(--line); border-radius: 9px; }
.usage-table { min-width: 520px; }
.journal-table { min-width: 830px; }
.journal-table td:nth-child(3) { min-width: 185px; }
.date-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.journal-status { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; background: #edf2f7; color: var(--muted); font-size: 11px; line-height: 1.5; white-space: nowrap; }
.status-done { background: #e8efdd; color: #496437; }
.status-failed, .status-partial { background: #f6ebe3; color: #8c493b; }
.status-running { background: #eeeeda; color: #766c35; }
.journal-detail-heading { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.journal-detail-heading h2 { margin-bottom: 0; }
.journal-facts { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 20px; padding: 20px 0; margin: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.journal-facts dt { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.journal-facts dd { margin: 0; font-size: 15px; font-weight: 550; font-variant-numeric: tabular-nums; }
.journal-outcome { margin-bottom: 28px; }
.journal-outcome summary { cursor: pointer; font-size: 13px; color: var(--navy); }
.panel-content-journal h3 { font-size: 15px; font-weight: 600; margin: 24px 0 16px; }
.request-method { font-family: monospace; font-weight: 600; color: var(--navy); }
.request-key { color: var(--muted); font-size: 12px; }
.request-numbers { display: flex; flex-wrap: wrap; gap: 14px; margin-left: auto; font-variant-numeric: tabular-nums; font-size: 12px; }
.request-numbers > span { white-space: nowrap; }
.journal-request > p { margin: 16px 18px; }
.journal-payloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 0 18px 18px; }
.journal-payloads h4 { font-size: 12px; font-weight: 600; margin-bottom: 10px; }
.journal-json { margin: 12px 0 0; min-width: 0; tab-size: 2; }
.journal-payloads .journal-json { margin: 0; }
.workspace-header { max-width: 1440px; }
.panel-content .table-scroll { margin: 20px 0; border: 1px solid var(--line); border-radius: 9px; }
.panel-content { min-width: 0; }
.panel-card { min-width: 0; }
.panel-card h2 { overflow-wrap: anywhere; }
.action-badge { display: inline-grid; place-items: center; width: 19px; height: 19px; margin-left: 7px; border-radius: 50%; background: #f0dfce; color: #864933; font-size: 12px; font-weight: 700; }
.connect-action { margin: 14px 0 0; }
.request-estimate { padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: #edf2f7; }
.request-help { margin: 12px 0 18px; }
.request-help summary { cursor: pointer; color: var(--navy); }
.request-help p { margin: 10px 0; }
.back-link { margin: 0 0 24px; font-size: 13px; }
.search-lists { min-width: 650px; }
.search-lists small { display: block; color: var(--muted); margin-top: 5px; }
.journal-clear { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.journal-clear label { font-size: 12px; line-height: 1.8; }
.journal-clear input { accent-color: var(--navy); margin-right: 8px; }
.mini-content { max-width: 680px; margin: 40px auto; padding: 0 20px; }
.mini-content h1 { font-size: 28px; margin-bottom: 20px; }
.mini-content p { line-height: 1.8; font-size: 14px; }
.panel-content-journal .pagination:empty { display: none; }
@media (max-width: 760px) {
    .workspace-header { padding: 26px 18px; }
    .usage-table { min-width: 0; table-layout: fixed; font-size: 12px; }
    .usage-table th:first-child { width: 46%; }
    .usage-table th, .usage-table td { padding: 12px 8px; overflow-wrap: anywhere; }
    .journal-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
    .journal-facts dd { font-size: 13px; }
    .journal-payloads { grid-template-columns: 1fr; }
    .request-numbers { margin-left: 26px; width: 100%; }
    .request-key { font-size: 11px; }
    .panel-table th, .panel-table td { padding: 12px 14px; }
    .panel-content-settings .connection-results > div { grid-template-columns: 1fr; gap: 5px; }
}

/* Коралловый акцент не используется светлым текстом: на кнопке сохраняется тёмный контраст. */
.auth-form .button-primary {
    background: var(--coral);
    color: var(--navy);
    font-weight: 650;
}
.auth-form .button-primary:hover { background: #ff927d; }
.panel-nav a[aria-current] {
    background: #fff0eb;
    color: var(--navy);
    box-shadow: inset 0 -2px var(--coral);
}
.field textarea:focus, .field select:focus {
    outline: 2px solid #bb4935;
    outline-offset: 2px;
}
@media (max-width: 420px) {
    .workspace-header { gap: 12px; padding: 22px 18px; }
    .workspace-header .brand { font-size: 18px; gap: 7px; }
    .workspace-header .brand-mark { width: 32px; height: 32px; }
    .account { gap: 10px; }
    .account > span { max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
}

/* Основные вкладки выровнены с шапкой и содержимым; отступ отделяет их от меню модуля. */
.module-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 1440px;
    margin: 12px auto 20px;
    padding: 0 36px;
}
.module-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 8px;
    color: var(--navy);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
}
.module-nav a[aria-current="page"] { color: #fff; background: var(--navy); }
.module-nav a:hover { box-shadow: inset 0 0 0 1px var(--navy); }
@media (max-width: 760px) {
    /* Тот же порог и отступ, что у .panel-content и .workspace-header. */
    .module-nav { margin-top: 8px; margin-bottom: 16px; padding: 0 18px; }
    .module-nav a { font-size: 14px; padding: 10px 16px; }
}
