/* ============ ПРЕМИУМ-СТИЛИ: ГРАФИТ + ЗОЛОТО ============ */

:root {
    --gold: #D4AF37;
    --graphite-900: #131313;
    --graphite-800: #1A1A1A;
    --graphite-700: #242424;
    --graphite-600: #2E2E2E;
    --platinum: #E5E5E5;
}

html, body {
    background-color: var(--graphite-800);
    color: var(--platinum);
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    min-height: 100%;
}

#blazor-error-ui {
    background: #1A1A1A;
    color: #E5E5E5;
    border-bottom: 1px solid #D4AF37;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: none;
}

/* ---------- Шапка и логотип ---------- */
.appbar-graphite {
    background: var(--graphite-900) !important;
    color: var(--platinum) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

.appbar-logo {
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: 0.04em;
    font-weight: 600;
}

/* ---------- Hero-блок ---------- */
.graphite-hero {
    background: linear-gradient(135deg, var(--graphite-900) 0%, var(--graphite-800) 55%, #1f1f1f 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    padding: 4rem 0;
    margin: -2rem -1rem 2rem -1rem;
}

@media (min-width: 600px) {
    .graphite-hero {
        margin: -3rem -1.5rem 2.5rem -1.5rem;
    }
}

.hero-photo {
    width: 100%;
    max-width: 380px;
    height: auto;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* ---------- Фото на странице «О юристе» ---------- */
.about-photo-frame {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
    padding: 5px;
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(212, 175, 55, 0.9) 0%, rgba(212, 175, 55, 0.12) 50%, rgba(212, 175, 55, 0.6) 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.about-photo-frame::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.about-photo {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.grid-align-center {
    align-items: center;
}

/* ---------- Фото на странице «Контакты» ---------- */
.contact-photo {
    margin: 1.75rem 0 2.5rem;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.contact-photo-img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- Цвета и акценты ---------- */
.gold-accent {
    color: var(--gold) !important;
}

.gold-text {
    color: var(--gold) !important;
}

.gold-icon {
    color: var(--gold);
}

.muted-text {
    color: #A0A0A0 !important;
}

/* ---------- Карточки ---------- */
.premium-card {
    background: var(--graphite-700) !important;
    color: var(--platinum) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.premium-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.5) !important;
}

.graphite-card {
    background: var(--graphite-700) !important;
    color: var(--platinum) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
}

.hero-graphite {
    background: linear-gradient(135deg, var(--graphite-900), var(--graphite-700)) !important;
    color: var(--platinum) !important;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

/* ---------- Кнопки ---------- */
.mud-button-filled.mud-button-filled-primary {
    background-color: var(--gold) !important;
    color: #1A1A1A !important;
    font-weight: 600;
}

.mud-button-outlined.mud-button-outlined-primary {
    border-color: var(--gold) !important;
    color: var(--gold) !important;
}

/* ---------- Списки услуг ---------- */
.services-list {
    margin: 0;
    padding-left: 1.2rem;
}

.services-list li {
    color: var(--platinum);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ---------- Подвал ---------- */
.footer {
    background: var(--graphite-900) !important;
    color: #A0A0A0 !important;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    margin-top: 3rem;
}

.footer .mud-text {
    color: #A0A0A0;
}

.footer .gold-accent {
    color: var(--gold);
}

/* ---------- Контент статей ---------- */
.article-content {
    line-height: 1.9;
    white-space: pre-line;
}

/* ---------- Фото статей ---------- */
.article-card-photo {
    margin: -1px -1px 0 -1px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.article-card-photo-img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.article-detail-photo {
    margin-bottom: 1.75rem;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    background: var(--graphite-900);
}

.article-detail-photo img {
    display: block;
    max-width: 100%;
    max-height: 520px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ---------- Полоса показателей (stats) ---------- */
.stats-band {
    background: linear-gradient(135deg, var(--graphite-900) 0%, var(--graphite-800) 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.25);
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.stats-band-gap {
    margin-top: 2.5rem;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
}

/* ---------- Текст «О юристе» ---------- */
.about-text {
    white-space: pre-line;
    line-height: 1.9;
}

/* ---------- Таймлайн опыта ---------- */
.timeline {
    position: relative;
    padding-left: 1.25rem;
    border-left: 2px solid rgba(212, 175, 55, 0.4);
}

.timeline-item {
    position: relative;
    padding: 0 0 1.5rem 1rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.55rem;
    top: 0.35rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--graphite-900);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* ---------- Админ-панель ---------- */
.admin-header-actions {
    margin-left: auto;
    flex-shrink: 0;
}

.admin-top-btn {
    min-width: 0;
    padding: 6px 16px !important;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .admin-header-actions {
        padding-left: 4rem;
    }
}

.admin-tabs .mud-tabs-panels {
    background: transparent !important;
}

.admin-tabs .mud-tab {
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.admin-tabs .mud-tab-active {
    color: var(--gold) !important;
}

.admin-tabs .mud-tab-indicator {
    background-color: var(--gold) !important;
}

.admin-tab-label {
    display: inline-flex;
    align-items: center;
}

.admin-item {
    background: var(--graphite-700) !important;
    color: var(--platinum) !important;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.admin-item:hover {
    border-color: rgba(212, 175, 55, 0.35);
}

.admin-thumb {
    width: 88px;
    height: 64px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    background: var(--graphite-900);
}

.status-chip {
    font-weight: 600;
    text-transform: none;
}

.admin-photo-preview {
    position: relative;
    display: inline-block;
}

.admin-photo-preview img {
    display: block;
    width: 180px;
    height: 132px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.admin-photo-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--graphite-800) !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.admin-photo-empty {
    width: 180px;
    height: 132px;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    color: #A0A0A0;
    background: rgba(255, 255, 255, 0.02);
}

.reconnect-modal {
    z-index: 2000;
}

.reconnect-card {
    background: var(--graphite-700) !important;
    color: var(--platinum) !important;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 12px;
}

.reconnect-spin {
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============ МОБИЛЬНАЯ АДАПТАЦИЯ ============ */

/* Защита от горизонтального скролла */
html,
body {
    overflow-x: hidden;
}

/* Логотип в шапке: не переносится, обрезается многоточием */
.appbar-logo {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mud-appbar .appbar-logo {
    flex: 1 1 auto;
    margin-right: 0.5rem;
}

.mud-appbar .mud-button-root,
.mud-appbar .mud-icon-button-root {
    flex-shrink: 0;
}

/* Элементы, скрытые на телефонах (меньше 600px) */
.hide-sm-down {
    display: none !important;
}

@media (min-width: 600px) {
    .hide-sm-down {
        display: inline-flex !important;
    }
}

/* Компактные заголовки и отступы на телефонах */
@media (max-width: 599.98px) {
    .mud-typography-h1 {
        font-size: 2.4rem !important;
    }

    .mud-typography-h2 {
        font-size: 1.9rem !important;
    }

    .mud-typography-h3 {
        font-size: 1.55rem !important;
    }

    .mud-typography-h4 {
        font-size: 1.3rem !important;
    }

    .mud-typography-h5 {
        font-size: 1.15rem !important;
    }

    .graphite-hero {
        padding: 2.5rem 0;
        margin: -1.5rem -0.75rem 1.5rem -0.75rem;
    }

    .stats-band {
        padding: 1.5rem 0;
    }

    .appbar-logo {
        font-size: 1rem !important;
        letter-spacing: 0.02em;
    }

    .appbar-cta {
        padding: 4px 12px !important;
        font-size: 0.85rem !important;
        min-width: 0 !important;
        white-space: nowrap;
    }

    .footer {
        margin-top: 2rem;
    }
}

/* Кнопки в hero: на телефоне — в столбик на всю ширину */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 599.98px) {
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .mud-button-root {
        width: 100%;
    }
}

/* Панели с крупными внутренними отступами — компактнее на телефоне */
.responsive-pad {
    padding: 1.25rem !important;
}

@media (min-width: 600px) {
    .responsive-pad {
        padding: 2rem !important;
    }
}

/* Кнопка отправки формы на всю ширину на телефоне */
@media (max-width: 599.98px) {
    .contact-submit {
        width: 100%;
    }
}

/* Кнопки в деталях кейса: перенос на телефоне */
.action-row {
    flex-wrap: wrap;
}

/* Вкладки админ-панели: горизонтальная прокрутка, если не помещаются */
.admin-tabs .mud-tabs-toolbar {
    overflow-x: auto;
}

/* Подвал: центрирование на телефоне */
@media (max-width: 599.98px) {
    .footer .mud-container .d-flex {
        text-align: center;
        align-items: center;
    }
}

/* ============ SEO: заголовки, крошки, страницы услуг ============ */

.home-h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.6rem;
    line-height: 1.15;
    font-weight: 700;
    color: var(--platinum);
    margin: 0.5rem 0 0.75rem;
}

.page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: var(--platinum);
}

.article-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--platinum);
    margin: 0.5rem 0;
}

/* Страховка от видимой рамки фокуса вокруг заголовков (и для :focus, и для :focus-visible). */
h1:focus,
h1:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    color: var(--gold);
    margin: 2.5rem 0 1rem;
}

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
    margin: 1rem 0 0.25rem;
}

.breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.breadcrumbs-item {
    display: inline-flex;
    align-items: center;
    color: #a0a0a0;
}

.breadcrumbs-item + .breadcrumbs-item::before {
    content: "›";
    margin-right: 0.35rem;
    color: var(--gold);
}

.breadcrumbs-link {
    color: var(--gold);
    text-decoration: none;
}

.breadcrumbs-link:hover {
    text-decoration: underline;
}

.breadcrumbs-current {
    color: #c8c8c8;
}

/* ---------- Страницы услуг ---------- */
.service-hero {
    background: linear-gradient(135deg, var(--graphite-900) 0%, var(--graphite-800) 60%, #1f1f1f 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    padding: 3rem 1.5rem;
    margin: 0 -1rem 2rem -1rem;
}

.service-h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    line-height: 1.15;
    font-weight: 700;
    color: var(--platinum);
    margin: 0.5rem 0 0.75rem;
}

.service-slogan {
    font-size: 1.15rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
    max-width: 720px;
}

.service-intro {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--platinum);
    max-width: 900px;
}

.service-intro p {
    margin: 0 0 1rem;
}

.service-intro p:last-child {
    margin-bottom: 0;
}

/* ---------- Персональный блок «Обо мне» в начале страницы услуги ---------- */
.lawyer-intro {
    display: grid;
    /* Фото + текст: текстовая колонка minmax(0, 1fr), чтобы длинные слова не расширяли блок */
    grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
    margin-bottom: 1rem;
}

.lawyer-intro .section-title {
    margin-top: 0;
}

.lawyer-intro-text p {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--platinum);
}

.lawyer-intro-text p:last-child {
    margin-bottom: 0;
}

.lawyer-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.55rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--gold);
    margin-bottom: 0.3rem !important;
}

.lawyer-tagline {
    font-size: 0.95rem;
    line-height: 1.5;
    letter-spacing: 0.01em;
    color: var(--platinum);
    opacity: 0.85;
    margin-bottom: 1.25rem !important;
}

@media (max-width: 768px) {
    .lawyer-intro {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .lawyer-intro-photo {
        max-width: 260px;
        margin-inline: auto;
    }
}

.service-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.service-check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
}

.service-check-list .mud-icon-root {
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.service-stages {
    counter-reset: stage;
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.service-stages li {
    counter-increment: stage;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.5;
}

.service-stages li::before {
    content: counter(stage);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
}


.price-table {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    background: var(--graphite-700);
}

.price-row + .price-row {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.price-row .gold-accent {
    white-space: nowrap;
    font-weight: 600;
}

.timing-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    line-height: 1.5;
}

/* ---------- Ситуации и взыскания (расширенные страницы услуг) ---------- */
.situations-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
    /* min(100%, 460px) — колонка никогда не бывает шире контейнера,
       поэтому длинный текст не вылезает за карточку и не наезжает на иконку. */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
}

.situation-card {
    /* Сетка «иконка + текст»: иконка всегда слева от первой строки текста,
       текст переносится внутри своей колонки (minmax(0, 1fr) разрешает сжатие). */
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: 0.7rem;
    height: 100%;
    padding: 0.9rem 1.1rem;
    background: var(--graphite-700);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid rgba(212, 175, 55, 0.6);
    border-radius: 10px;
    line-height: 1.55;
}

.situation-card .situation-icon {
    margin-top: 0.2rem;
}

.situation-card .situation-text {
    min-width: 0;
    overflow-wrap: break-word;
}

.claim-table {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.claim-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.claim-table table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    table-layout: fixed;
}

.claim-table col.claim-col-title {
    width: 38%;
}

.claim-table th {
    padding: 0.9rem 1.25rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(212, 175, 55, 0.12);
    border-bottom: 1px solid rgba(212, 175, 55, 0.28);
    white-space: nowrap;
}

.claim-table td {
    padding: 0.95rem 1.25rem;
    background: var(--graphite-700);
    line-height: 1.55;
    vertical-align: top;
    overflow-wrap: break-word;
}

.claim-table tbody tr:nth-child(even) td {
    background: #1f1f1f;
}

.claim-table tbody tr + tr td {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.claim-table .claim-title {
    font-weight: 600;
    color: var(--platinum);
}

.cta-callout {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 2.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.14) 0%, rgba(212, 175, 55, 0.04) 60%, rgba(255, 255, 255, 0) 100%);
}

.cta-callout-icon {
    flex-shrink: 0;
}

.cta-callout-text {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.65;
    color: var(--platinum);
}

@media (max-width: 640px) {
    .cta-callout {
        flex-direction: column;
    }

    /* На узких экранах таблица прокручивается по горизонтали, а не сжимается. */
    .claim-table table {
        min-width: 480px;
    }
}

/* ---------- FAQ ---------- */
.faq-list {
    display: grid;
    gap: 0.75rem;
}

.faq-item {
    background: var(--graphite-700);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.9rem 1.25rem;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--platinum);
    list-style-position: outside;
}

.faq-item p {
    margin: 0.75rem 0 0;
    color: #c8c8c8;
    line-height: 1.6;
}

/* ---------- Блок «Почему я» ---------- */
.why-me {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 14px;
    padding: 1.5rem;
}

/* ---------- Кейсы ---------- */
.case-result-block {
    background: rgba(212, 175, 55, 0.1);
    border-left: 4px solid var(--gold);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.5;
}

.case-description {
    line-height: 1.7;
    color: #d8d8d8;
}

.case-service-link {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(212, 175, 55, 0.07);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    line-height: 1.6;
}

/* ---------- Контент статей ---------- */
.article-content {
    line-height: 1.75;
    color: #ddd;
}

.article-content h2 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--gold);
    font-size: 1.5rem;
    margin: 2rem 0 0.75rem;
}

.article-content h3 {
    color: var(--platinum);
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem;
}

.article-content h4 {
    color: var(--platinum);
    font-size: 1.05rem;
    margin: 1.25rem 0 0.5rem;
}

.article-content p {
    margin: 0.75rem 0;
}

.article-content ul,
.article-content ol {
    margin: 0.75rem 0 0.75rem 1.5rem;
    padding: 0;
}

.article-content li {
    margin: 0.35rem 0;
}

.article-content a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Шапка ---------- */
.appbar-brand {
    color: inherit;
    text-decoration: none;
}

.appbar-slogan {
    margin-left: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 999px;
    padding: 2px 10px;
    white-space: nowrap;
}

/* ---------- Подвал ---------- */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.35rem;
}

.footer-links a {
    color: #c8c8c8;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--gold);
    text-decoration: underline;
}

.contact-link {
    color: inherit;
    text-decoration: none;
}

.contact-link:hover {
    color: var(--gold);
}

/* ---------- Формы ---------- */
.consultation-form {
    padding: 1.5rem;
}

.consultation-anchor {
    scroll-margin-top: 90px;
}

.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    pointer-events: none;
}

.home-consultation {
    max-width: 720px;
    margin-inline: auto;
}

/* ---------- Адаптив для новых блоков ---------- */
@media (max-width: 599.98px) {
    .home-h1 {
        font-size: 1.9rem;
    }

    .service-h1 {
        font-size: 1.6rem;
    }

    .service-hero {
        padding: 2rem 1rem;
        margin: -1.5rem -0.75rem 1.5rem -0.75rem;
    }

    .price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .appbar-slogan {
        display: none;
    }
}

/* ============ Админ-панель: журнал посещений (собственная статистика сайта) ============ */

.journal-page {
    max-width: 1400px;
    margin: 0 auto;
}

.journal-panel,
.journal-card {
    background: var(--graphite-700) !important;
    color: var(--platinum) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 12px !important;
}

.journal-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: #8A8A8A;
}

/* Кнопки «Обновить» / «Сбросить»: не сжимаются, текст в одну строку внутри кнопки */
.journal-filters-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.journal-filters-actions .mud-button-root {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* ---------- KPI-карточки ---------- */
.journal-kpi {
    background: linear-gradient(160deg, var(--graphite-900), var(--graphite-700)) !important;
    border: 1px solid rgba(212, 175, 55, 0.22) !important;
    border-radius: 12px !important;
    text-align: center;
    height: 100%;
}

.journal-kpi-value {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--gold);
}

.journal-kpi-label {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #A0A0A0;
}

/* ---------- Динамика по дням ---------- */
.journal-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 180px;
    overflow-x: auto;
    padding-bottom: 1.2rem;
}

.journal-bar-col {
    position: relative;
    flex: 1 0 14px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 100%;
}

.journal-bar-fill {
    width: 100%;
    min-height: 2px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, var(--gold), rgba(212, 175, 55, 0.35));
}

.journal-bar-label {
    position: absolute;
    bottom: -1.1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.62rem;
    color: #8A8A8A;
}

/* ---------- Часы активности ---------- */
.journal-hours {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 150px;
    padding-bottom: 1.2rem;
}

.journal-hour-col {
    position: relative;
    flex: 1 1 0;
    display: flex;
    align-items: flex-end;
    height: 100%;
}

.journal-hour-fill {
    width: 100%;
    min-height: 1px;
    border-radius: 2px 2px 0 0;
    background: rgba(212, 175, 55, 0.75);
}

.journal-hour-label {
    position: absolute;
    bottom: -1.1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: #8A8A8A;
}

/* ---------- Тепловая карта: день недели × час ---------- */
.journal-heatmap {
    margin-top: 1rem;
    overflow-x: auto;
}

.journal-heatmap-row {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 3px;
}

.journal-heatmap-day {
    flex: 0 0 2rem;
    width: 2rem;
    font-size: 0.68rem;
    color: #A0A0A0;
}

.journal-heatmap-cell {
    flex: 1 1 0;
    min-width: 16px;
    height: 18px;
    border-radius: 3px;
    background: rgba(212, 175, 55, var(--h, 0.05));
}

.journal-heatmap-hours {
    display: flex;
    gap: 3px;
    margin-top: 0.35rem;
}

.journal-heatmap-hours span {
    flex: 1 1 0;
    min-width: 16px;
    font-size: 0.6rem;
    color: #8A8A8A;
}

.journal-heatmap-hours span:first-child {
    flex: 0 0 2rem;
}

/* ---------- Горизонтальные рейтинги (топы) ---------- */
.journal-hbars {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.4rem;
}

.journal-hbar {
    cursor: default;
}

.journal-hbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.82rem;
}

.journal-hbar-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--platinum);
}

.journal-hbar-count {
    flex-shrink: 0;
    color: var(--gold);
    font-weight: 600;
}

.journal-hbar-track {
    height: 6px;
    margin-top: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.journal-hbar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.45), var(--gold));
}

.journal-hbar.active .journal-hbar-fill {
    background: linear-gradient(90deg, var(--gold), #F1D27A);
}

.journal-hbar.active .journal-hbar-name {
    color: var(--gold);
}

/* ---------- Устройства: donut-диаграмма ---------- */
.journal-donut-wrap {
    display: flex;
    justify-content: center;
    margin: 0.75rem 0 0.5rem;
}

.journal-donut {
    width: 190px;
    height: 190px;
}

.journal-donut-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 6;
}

.journal-donut-seg {
    fill: none;
    stroke-width: 6;
    cursor: pointer;
    transition: stroke-width 0.2s ease;
}

.journal-donut-seg:hover {
    stroke-width: 8;
}

.journal-donut-seg.desktop { stroke: var(--gold); }
.journal-donut-seg.phone { stroke: #7FB3D5; }
.journal-donut-seg.robot { stroke: #8A8A8A; }

.journal-legend {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.journal-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    cursor: pointer;
}

.journal-legend-item:hover,
.journal-legend-item.active {
    background: rgba(212, 175, 55, 0.12);
}

.journal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.journal-dot.desktop { background: var(--gold); }
.journal-dot.phone { background: #7FB3D5; }
.journal-dot.robot { background: #8A8A8A; }

/* ---------- Таблица записей ---------- */
.journal-table-wrap {
    overflow-x: auto;
}

.journal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.journal-table th {
    text-align: left;
    padding: 0.5rem 0.6rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #A0A0A0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.journal-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.journal-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.journal-table .journal-nowrap {
    white-space: nowrap;
}

.journal-table .journal-url {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #A0A0A0;
}

.journal-row-important {
    background: rgba(220, 90, 90, 0.12);
}

.journal-row-important td {
    color: #F0B4B4;
}

/* ---------- Значки устройств, категорий и прогресс прокрутки ---------- */
.journal-device {
    font-size: 0.72rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.journal-device-robot {
    color: #A0A0A0;
}

.journal-device-phone {
    color: #7FB3D5;
}

.journal-badge {
    font-size: 0.72rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
}

.journal-badge-view {
    background: rgba(212, 175, 55, 0.16);
    color: var(--gold);
}

.journal-badge-request {
    background: rgba(120, 200, 120, 0.16);
    color: #9BD49B;
}

.journal-badge-error {
    background: rgba(220, 90, 90, 0.2);
    color: #F0B4B4;
}

.journal-scrollbar {
    width: 70px;
    height: 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.journal-scrollbar-fill {
    height: 100%;
    background: rgba(212, 175, 55, 0.6);
}

.journal-scrollbar-fill.end {
    background: var(--gold);
}

/* ---------- Звёздный рейтинг (замена MudRating в публичных блоках) ---------- */
.star-rating {
    display: inline-flex;
    gap: 2px;
    line-height: 1;
    font-size: 1.15rem;
}

.star-rating .star-rating-on {
    color: var(--gold);
}

.star-rating .star-rating-off {
    color: rgba(255, 255, 255, 0.22);
}

/* Картинки контента не должны «прыгать» при загрузке: атрибуты width/height
   задают соотношение сторон, ширина ограничивается контейнером.
   У карточек статей высота фиксированная (170px) — там соотношение задаёт CSS. */
.about-photo,
.hero-photo,
.contact-photo-img {
    height: auto;
}

/* ---------- Короткое имя в шапке на узких экранах ---------- */
/* Полное имя «Юрист Ильенко Екатерина Сергеевна» на телефоне не помещается
   в шапку и обрезалось многоточием сразу после слов «Юрист …». */
.appbar-brand-short {
    display: none;
}

@media (max-width: 599.98px) {
    .appbar-brand-full {
        display: none;
    }

    .appbar-brand-short {
        display: inline;
    }

    .mud-appbar .appbar-logo {
        font-size: 1.05rem;
    }
}

/* На самых узких экранах (до 430px) название в шапке всё равно не помещается
   рядом с кнопкой «Выключить долги» — оставляем меню и CTA без обрезков. */
@media (max-width: 429.98px) {
    .mud-appbar .appbar-logo {
        display: none;
    }
}

